Skip to main content
POST
/
assets
Create assets
curl --request POST \
  --url https://v2.firstpromoter.com/api/v2/company/assets \
  --header 'Account-ID: <account-id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "asset_type": "image",
  "url": "<string>",
  "category_id": 123,
  "allowed_campaign_ids": [
    123
  ],
  "content": "<string>",
  "landing_page_url": "<string>"
}'
{
  "id": 123,
  "name": "<string>",
  "allowed_campaign_ids": [
    123
  ],
  "details": {
    "file_format": "<string>",
    "file_size": 123,
    "image_size": {
      "width": 123,
      "height": 123
    }
  },
  "content": "<string>",
  "landing_page_url": "<string>",
  "asset_type": "image",
  "url": "<string>",
  "thumbnail_url": "<string>",
  "uploading": true,
  "category": {
    "id": 123,
    "name": "<string>",
    "position": 123
  },
  "allowed_campaigns": [
    {
      "id": 123,
      "name": "<string>",
      "color": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Access token passed as a Bearer token in the Authorization header

Headers

Account-ID
string
required

Account identifier that specifies which account is making the request

Example:

"acc_123456"

Body

application/json
name
string
required

Name of the asset

asset_type
enum<string>
required

Type of the asset

Available options:
image,
document,
link,
text
file
file

File of the asset if asset_type is image or document

url
string

URL of the asset

category_id
integer

ID of the category

allowed_campaign_ids
integer[]

Array of allowed campaign IDs

content
string

Content. Required for email and social media asset types

landing_page_url
string

Landing page url. Optional for social media asset types

Response

Asset created successfully

id
integer
name
string
allowed_campaign_ids
integer[]
details
object
content
string
landing_page_url
string
asset_type
enum<string>
Available options:
image,
document,
link,
text
url
string
thumbnail_url
string
uploading
boolean
category
object
allowed_campaigns
object[]
I