Use the Campaign API to get link, sublink, and partner information. Create new links and update existing links with new partner information.
Authentication
The Campaign API uses Bearer tokens for authentication. You MUST include your Adjust API token in an Authorization
header with each request you make to the Campaign API.
If your organization has enabled Single Sign-On (SSO), contact your Adjust representative or email support@adjust.com for help with finding your API token.
For non-SSO accounts, API tokens are located in a user’s profile. To find your token, follow these steps:
- Select the account (user) icon.
- Select Account settings.
- Select the My profile tab.
- Your API Token is shown with your User Details. Select the copy button to copy the token to your system clipboard.
Reset your Adjust API token
You can reset your Adjust API token at any time. Resetting your token invalidates the old token. If you reset your Adjust API token, you MUST replace your old token anywhere that you’re using it. Requests made with an invalidated token are rejected by Adjust.
To reset your Adjust API token:
- Select the account (user) icon.
- Select Account settings.
- Select the My Profile tab.
- Your API Token is shown with your User details.
- Select Reset API token.
- Enter your account password in the modal that appears and select Reset to reset your API token. A confirmation appears in the top right of the screen.
- Select the copy button next to the API Token to copy the token to your system clipboard.
Fetch partners
Use this endpoint to fetch a list of partners and associated data. Data are returned in an array of partner objects.
Parameters
You MAY pass the following parameters as query parameters:
after
(String
)-
The cursor position from which to start your request.
before
(String
)-
The cursor position at which to end your request.
limit
(Integer
)-
The maximum number of results to include in the response. This value MUST be a positive integer value. Defaults to
50
.
Pagination
Results from this endpoint are paginated using a cursor. Each page returns the location of the previous
and next
pages. You can include these in your calls to return specific pages.
Each results page contains a paging
object containing the cursor positions. You can use these cursor positions to programmatically move between pages. For example, the first page might contain the following paging
object:
To go to the second page, add the after
value to the next request in the after
parameter. For example:
Response format
Example
Fetch links
Use this endpoint to fetch network-level links associated with your app.
Parameters
You MUST pass the following parameter in the path of your request:
app_token
(String
)-
The alphanumeric token that identifies your app. This MUST be 12 characters long.
You MAY pass the following parameters as query parameters:
cursor
(String
)-
A cursor position.
limit
(Integer
)-
The maximum number of results to include in the response. This value MUST be a positive integer value. Defaults to
50
.
You MUST pass the following parameter in the path of your request:
app_token
(String
)-
The alphanumeric token that identifies your app. This MUST be 12 characters long.
You MAY pass the following parameters as query parameters:
after
(String
)-
The cursor position from which to start your request.
before
(String
)-
The cursor position at which to end your request.
limit
(Integer
)-
The maximum number of results to include in the response. This value MUST be a positive integer value. Defaults to
50
.
Pagination
Results from this endpoint are paginated using a cursor. Each results page contains a paging
object containing cursor positions. You can use these cursor positions to programmatically move between pages. For example, the first page might contain results like this:
To go to the second page, follow the next
link to return results from the next specified cursor
position.
To return to a specific location in the results, pass a cursor
value in your requests query params.
Results from this endpoint are paginated using a cursor. Each page returns the location of the previous
and next
pages. You can include these in your calls to return specific pages.
Each results page contains a paging
object containing the cursor positions. You can use these cursor positions to programmatically move between pages. For example, the first page might contain the following paging
object:
To go to the second page, follow the next
link to return results from the next specified cursor
position.
Response format
All links are returned as items in the following format:
Example
Fetch sublinks
Use this endpoint to get the sublinks for your specified app.
Parameters
You MUST pass the following parameters in the path of your request:
app_token
(String
)-
The alphanumeric token that identifies your app. This MUST be 12 characters long.
tracker_token
(String
)-
The link token of the parent link the sublink is nested under.
You MAY pass the following parameters in your request’s query parameters
cursor
(String
)-
A cursor position.
limit
(Integer
)-
The maximum number of results to include in the response. This value MUST be a positive integer value. Defaults to
50
.
You MUST pass the following parameters in the path of your request:
app_token
(String
)-
The alphanumeric token that identifies your app. This MUST be 12 characters long.
tracker_token
(String
)-
The link token of the parent link the sublink is nested under.
You MAY pass the following parameters in your request’s query parameters
after
(String
)-
The cursor position from which to start your request.
before
(String
)-
The cursor position at which to end your request.
limit
(Integer
)-
The maximum number of results to include in the response. This value MUST be a positive integer value. Defaults to
50
.
Pagination
Results from this endpoint are paginated using a cursor. Each results page contains a paging
object containing cursor positions. You can use these cursor positions to programmatically move between pages. For example, the first page might contain results like this:
To go to the second page, follow the next
link to return results from the next specified cursor
position.
To return to a specific location in the results, pass a cursor
value in your requests query params.
Results from this endpoint are paginated using a cursor. Each page returns the location of the previous
and next
pages. You can include these in your calls to return specific pages.
Each results page contains a paging
object containing the cursor positions. You can use these cursor positions to programmatically move between pages. For example, the first page might contain the following paging
object:
To go to the second page, follow the next
link to return results from the next specified cursor
position.
Response format
Example
Create links
Use this endpoint to create new links and sublinks for your app.
Parameters
You MUST pass the following parameter in the path of your request:
app_token
(String
)-
The alphanumeric token that identifies your app. This MUST be 12 characters long.
You MUST pass the following parameter in your request data:
name
(String
)-
The name of the new link.
You MAY pass the following parameter in your request data:
parent_token
(String
)-
The link token of the parent link the sublink is nested under. Only required if you’re creating a sublink.
Response format
The following level
values are available:
1
: Network level2
: Campaign level3
: Adgroup level4
: Creative level
Example
The following examples demonstrate how to create a link and a sublink.
Create a link
Create a sublink
Update links
Use this endpoint to update existing links and sublinks for your app. You can add new partners to links or control whether cost data is enabled.
Parameters
You MUST pass the following parameters in the path of your request:
app_token
(String
)-
The alphanumeric token that identifies your app. This MUST be 12 characters long.
tracker_token
(String
)-
The link token of the link you want to update.
You MAY pass the following parameters in the data of your request:
partner_id
(Integer
)-
The ID of the partner you want to attach to the link. See Fetch partners above to fetch a list of partners and their IDs.
cost_data_enabled
(Boolean
)-
Whether to enable Ad spend data for the link.
Response parameters
The following level
values are available:
1
: Network level2
: Campaign level3
: Adgroup level4
: Creative level