Create short link
POST
/api/v2/client/short-links
const url = 'https://app.affisemmp.com/api/v2/client/short-links';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"application_id":16,"single_link_id":16,"params":["architecto"],"generate_qr":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.affisemmp.com/api/v2/client/short-links \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "application_id": 16, "single_link_id": 16, "params": [ "architecto" ], "generate_qr": false }'Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ” Media type application/json
object
application_id
This field is required when single_link_id is not present. The id of an existing record in the applications table.
integer
Example
16 single_link_id
This field is required when application_id is not present. The id of an existing record in the single_links table.
integer
Example
16 params
Array<string>
Example
[ "architecto"] generate_qr
boolean
Example
falseResponses
Section titled “ Responses ” Media type application/json
object
data
object
id
integer
token
string
application
object
id
integer
name
string
icon
string
store
string
single_link
string
parameters
object
short_link
string
impression_short_link
string
tracking_url
string
created_at
string
message
string
Example
{ "data": { "id": 19, "token": "849553", "application": { "id": 377, "name": "quos velit et", "icon": "https://downloads.affattr.com/public/applications/icons/icon.jpeg", "store": "apple" }, "single_link": null, "parameters": {}, "short_link": "https://trk.affattr.com/s/849553", "impression_short_link": "https://trk.affattr.com/s/i/849553", "tracking_url": "https://trk.affattr.com/FKAXA0PU7ME65", "created_at": "1997-10-08T15:43:56Z" }, "message": "Short link successfully created."}