AddAssets API
The AddAssets API allows developers to add assets (domains) to the platform. You can add multiple assets in a single request using this API. There are two sections on the Assets page of the Platform where assets can be added:
- Managed by Brand
- Managed by Affiliates
The section where the assets are added is determined by the isAffiliated flag in the API. You can also manually add assets via the Platform’s Assets page.
Step 1: Locate Your API Key
Before using the AddAssets API, you need your Bolster API Key. Follow these steps to find it:
- Click on the user dropdown in the top-right corner of the page.
- Select Profile Information from the dropdown menu.
- Copy the API key displayed on your profile screen.
Step 2: Initiate request through API
To make an AddAssets request, use the following details.
Endpoint:
/neo/v1/addAssets
API Host:
https://developers.bolster.ai/api
Request Format:
curl --location 'https://developers.bolster.ai/api/neo/v1/addAssets' \
--header 'Content-Type: application/json' \
--data '{
"apiKey": "<your_api_key>",
"domainList": [
"example1.com",
"example2.com"
],
"isAffiliated": false
}'
Request Parameters
- apiKey (required): Your user API key.
- domainList (required): List of assets (domains) you want to add, formatted as an array of strings.
- isAffiliated (optional): Default is false. Set this to false (or omit it) to add assets under “Managed by Brand”. Set to true to add assets under “Managed by Affiliates”.
Response
Upon a successful request, you will receive a response like the following with Status code: 200.
If all domains are added successfully:
{
"result": {
"success": 2,
"existing": 0,
"failure":0
}
}
If the domains are already present in the system:
{
"result": {
"success": 0,
"existing": 2,
"failure":0
}
}
If the domains are incorrect:
{
"result": {
"success": 0,
"existing": 0,
"failure":2
}
}
If some domains are correct and others are incorrect:
{
"result": {
"success": 1,
"existing": 0,
"failure":1
}
}
In case of an unsuccessful request, the following status codes and error messages may be returned:
- Status Code: 500. Message: Invalid API key or API key not enabled.
- Status Code: 400. Message: domainList is a required argument.
Support
If you have any questions or encounter any issues while using the AddAssets API, please contact our support team at [email protected].