Account
Properties description
id
Integer
Account unique identification.
name
String
Account name defined by user during creation
owner_account_id
Integer
Id of the owner account or parent account generally used for agency customer campaigns.
created_at
Datetime
Creation date of the account, GMT timezone
updated_at
Datetime
Last update of the account, GMT timezone
deleted_at
Datetime
Field used for softdeleting the account. This property is null for active account.
Search accounts
Search accounts
GET https://api.smartxsp.io/accounts
Allows you to retrieve the list of accounts associated to the connected user. ⚠️ Please note that the list is limited to the last 1000 accounts.
Query Parameters
search
String
Search string filtering on account name.
Headers
Authorization*
String
The Bearer token you get during login process.
{
    "success":true,
    "data":{
        "user":{
            "id":1,
            "name":"John Doe",
            "email":"[email protected]",
            "account_id":1,
            "account":{
                "id":1,
                "name":"Account Name",
                "account_type":"agency"
            }
        },
        "accounts":[
            {
                "id":1,
                "name":"First account"
            },
            {
                "id":2,
                "name":"Second account"
            }
        ]
    },
    "message":"Accounts retrieved successfully."
}Get account
Get account details
GET https://api.smartxsp.io/accounts/{account_id}
Retrieves account details.
Path Parameters
account_id*
String
The numeric id of the campaign
Headers
Authorization*
String
The Bearer token you get during login process.
{
    "success":true,
    "data":{
        "id":1,
        "name":"My first account",
        "owner_account_id":21,
        "created_at":"2023-04-26T15:24:05.000000Z",
        "updated_at":"2023-05-02T12:37:06.000000Z",
        "deleted_at":null
    },
    "message":"Account retrieved successfully."
}Create account
Create a new account
POST https://api.smartxsp.io/accounts
Create a new account.
Query Parameters
name*
String
The account name
Headers
Authorization*
String
The Bearer token you get during login process.
{
    "success":true,
    "data":{
        "id":1,
        "name":"My first campagn",
        "state":"running",
        "account_id":2216,
        "owner_account_id":21,
        "product_id":1,
        "start_at":"2023-04-25T22:00:00.000000Z",
        "stop_at":"2023-05-12T21:59:00.000000Z",
        "budget":24000,
        "sell_price":"20.00000",
        "buy_price":"12.00000",
        "impressions":11397,
        "visible_impressions":7938,
        "clicks":57,
        "exposure_time":140122,
        "created_at":"2023-04-26T15:24:05.000000Z",
        "updated_at":"2023-05-02T12:37:06.000000Z",
        "deleted_at":null
    },
    "message":"Campaign retrieved successfully."
}Last updated