Links
The Links resource has full CRUD functionality. It allows you to Create, Retrieve, Update, and Delete Links. The following actions can be performed on this resource...
Retrieve All Links
Retrieves all links associated with a specific brand.
You can include additional parameters in the request as described in the Query Parameters section. For instance, the request below will return only active links.
Example Response:
{
"data": [
{
"link_id": 33,
"_brand_id": 3,
"_contact_id": null,
"name": "SlickText",
"url": "http://www.slicktext.com",
"type": "normal",
"source": "Campaign",
"_source_id": 56,
"sub_source": null,
"_sub_source_id": null,
"clicks": 4,
"unique_clicks": 1,
"bot_clicks": 0,
"active": 1,
"created": "2024-10-31 20:38:30",
"expires": null
}
]
}
Retrieve a Specific Link
Retrieves a single link with the Link ID equal to {id}. The Link ID can be found using the retrieve all links endpoint.
Example Response:
{
"data": [
{
"link_id": 3333,
"_brand_id": 123456789,
"_contact_id": null,
"name": "SlickText",
"url": "http://www.slicktext.com",
"type": "normal",
"source": "Campaign",
"_source_id": 56,
"sub_source": null,
"_sub_source_id": null,
"clicks": 4,
"unique_clicks": 1,
"bot_clicks": 0,
"active": 1,
"created": "2024-10-31 20:38:30",
"expires": null
}
]
}
Edit a Specific Link
Allows you to edit existing Links. You can target an existing Link by passing the Link ID in your PUT request. The Link ID can be found using the retrieve all links endpoint. At least one of the arguments below is required.
Arguments
PARAMETER | DESCRIPTION |
---|---|
name | Name of the Link. |
url | URL that you want to link to. |
active | Indicate whether the Link is active (1 or 0). |
Example Request Body:
{
"name": "Updated Link Name",
"url": "http://dev.slicktext.com/",
"active": 0
}
Example Response:
{
"link_id": 111,
"_brand_id": 123456789,
"_contact_id": null,
"name": "Updated Link Name",
"url": "http://dev.slicktext.com/",
"type": "normal",
"source": "manual",
"_source_id": null,
"sub_source": null,
"_sub_source_id": null,
"clicks": 0,
"unique_clicks": 0,
"bot_clicks": 0,
"active": 0,
"created": "2024-11-27 18:22:48",
"expires": null
}
Create a Link
Creates an empty link on this brand.
Arguments
PARAMETER | DESCRIPTION |
---|---|
name (mandatory) | The name of the link you are creating. |
url | URL that you want to link to. |
active | Indicate whether the link is active (1 or 0). |
Example Request Body:
{
"name": "SlickText",
"url": "http://wwww.slicktext.com",
"active": 1
}
Example Response:
{
"_brand_id": 123456789,
"name": "SlickText",
"url": "http://wwww.slicktext.com",
"source": "manual",
"clicks": 0,
"unique_clicks": 0,
"bot_clicks": 0,
"active": 1,
"type": "normal",
"link_id": 111,
"created": "2024-12-23 21:42:38"
}
Delete a Specific Link
Deletes an existing link with the Link ID equal to {id}. The Link ID can be found using the retrieve all links endpoint. Using this action, the link is simply removed completely from the brand. All revenue and click data associated with the link will also be deleted.
Example Response:
[]