We use cookies to give you the best possible experience while you browse through our site. By continuing to use our website you implicitly agree to the usage of cookies on this site.

Read More
← Atlas API & Provisioning Reference

CSP Campaigns

Schema

A TCR campaign

Type Object

Name Type Description
attributes attributes
dca_approved Boolean Desc. dca_approved
description String Description of the campaign
embedded_link_sample String
help_keywords String
help_message String
id String(format:ulid) Desc. id
inserted_at String(format:date-time) An ISO8601 formatted timestamp
message_flow String
name String(1..255) Desc. name
notes String Desc. notes
optin_keywords String
optin_message String
optout_keywords String
optout_message String
privacy_policy_link String
sample_messages Array(0..5):String Desc. sample_messages
shared Enum(NO, OWNED, PARTNER):String Desc. shared
sub_use_case Array:String Additional usecases for a campaign
tcr_brand_id String The brand the campaign is attached to
tcr_campaign_id String The TCR issued campaign ID
tcr_csp_id String The owning campaign service provider ID
tcr_reseller_id String TCR Issued Reseller ID
tcr_status String TCR Activation Status
terms_and_conditions_link String
updated_at String(format:date-time) An ISO8601 formatted timestamp
use_case String Desc. use_case

Desc. dca_approved

Whether or not the campaign has been approved by the DCA

Desc. id

Another format for UUID, used primarily for tasks, requests and messages.

Desc. name

A display name to identify the campaign.

In the case of SHARED campaigns, the name is typically taken from the description and truncated to fit the length requirements.

Desc. notes

Any notes about the campaign.

In the case of SHARED campaigns the notes may always be empty.

Desc. sample_messages

The overall format or example of messages that the campaign will send.

Note that different usecases may require more samples.

Desc. shared

Was this campaign created directly or is a partner campaign.

  • NO - Should be treated the same as OWNED
  • OWNED - The campaign was created on site and belongs to this system
  • PARTNER - The campaign originates from outside of the system

Desc. use_case

Campaign Usecase, see CSP Enums for possible values

attributes

Name Type Description
has_affiliate_marketing Boolean
has_age_gated_content Boolean
has_direct_lending Boolean
has_embedded_link Boolean
has_embedded_phone_number Boolean
has_number_pooling Boolean
has_subscriber_help Boolean
has_subscriber_opt_in Boolean
has_subscriber_opt_out Boolean
has_terms_and_conditions Boolean

Example

{
  "attributes": {
    "has_affiliate_marketing": true,
    "has_age_gated_content": true,
    "has_direct_lending": true,
    "has_embedded_link": true,
    "has_embedded_phone_number": true,
    "has_number_pooling": true,
    "has_subscriber_help": true,
    "has_subscriber_opt_in": true,
    "has_subscriber_opt_out": true,
    "has_terms_and_conditions": true
  },
  "dca_approved": true,
  "description": "The original description provided to TCR.\n",
  "embedded_link_sample": "https://example.com/something",
  "help_keywords": "HELP",
  "help_message": "string",
  "id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
  "inserted_at": "2021-08-13T04:08:44.762841Z",
  "message_flow": "string",
  "name": "Receive 2FA Codes over SMS",
  "notes": "string",
  "optin_keywords": "START,SUBSCRIBE",
  "optin_message": "string",
  "optout_keywords": "STOP,UNSUBSCRIBE",
  "optout_message": "string",
  "privacy_policy_link": "https://example.com/privacy",
  "sample_messages": [
    "string"
  ],
  "shared": "NO",
  "sub_use_case": [
    "2FA"
  ],
  "tcr_brand_id": "B000000",
  "tcr_campaign_id": "C000000",
  "tcr_csp_id": "S000000",
  "tcr_reseller_id": "R000000",
  "tcr_status": "ACTIVE",
  "terms_and_conditions_link": "https://example.com/terms_and_conditions",
  "updated_at": "2021-08-13T04:08:44.762841Z",
  "use_case": "MIXED"
}

API

Share CSP Campaign With Account

POST /api/v1/campaigns/{campaign_id}/share_with/accounts/{account_id} HTTP/1.1

Shares the campaign with another account, either by specifying the account id, or the resource group that it should be shared via.

Path Parameters

Name Type Description
campaign_id String(format:uuid)! Path Desc. campaign_id

Path Desc. campaign_id

Campaign ID A Universally unique identifier, which identifies the resource

Request

POST /api/v1/campaigns/{campaign_id}/share_with/accounts/{account_id} HTTP/1.1
Accept: application/json

Response 200

application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 1674
{
  "associations": {
    "brand": {
      "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48",
      "tcr_brand_id": "B000000"
    },
    "shared_resource_group": {
      "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48"
    }
  },
  "data": {
    "attributes": {
      "has_affiliate_marketing": true,
      "has_age_gated_content": true,
      "has_direct_lending": true,
      "has_embedded_link": true,
      "has_embedded_phone_number": true,
      "has_number_pooling": true,
      "has_subscriber_help": true,
      "has_subscriber_opt_in": true,
      "has_subscriber_opt_out": true,
      "has_terms_and_conditions": true
    },
    "dca_approved": true,
    "description": "The original description provided to TCR.\n",
    "embedded_link_sample": "https://example.com/something",
    "help_keywords": "HELP",
    "help_message": "string",
    "id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
    "inserted_at": "2021-08-13T04:08:44.762841Z",
    "message_flow": "string",
    "name": "Receive 2FA Codes over SMS",
    "notes": "string",
    "optin_keywords": "START,SUBSCRIBE",
    "optin_message": "string",
    "optout_keywords": "STOP,UNSUBSCRIBE",
    "optout_message": "string",
    "privacy_policy_link": "https://example.com/privacy",
    "sample_messages": [
      "string"
    ],
    "shared": "NO",
    "sub_use_case": [
      "2FA"
    ],
    "tcr_brand_id": "B000000",
    "tcr_campaign_id": "C000000",
    "tcr_csp_id": "S000000",
    "tcr_reseller_id": "R000000",
    "tcr_status": "ACTIVE",
    "terms_and_conditions_link": "https://example.com/terms_and_conditions",
    "updated_at": "2021-08-13T04:08:44.762841Z",
    "use_case": "MIXED"
  },
  "type": "csp_campaign"
}

Response 403

application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
  "errors": [
    {
      "code": "access_denied.no_scope",
      "detail": "No scope available to user role",
      "params": {
        "action": "index",
        "level": "guest",
        "resource": "resource"
      },
      "sub_code": "none",
      "title": "Access Denied, no scope available"
    }
  ]
}

Response 404

application/json
HTTP/1.1 404
Content-Type: application/json
Content-Length: 314
{
  "errors": [
    {
      "code": "not_found",
      "detail": "The specified resource could not be found",
      "params": {
        "resource": {
          "id": "3fbb573a-6049-44a0-a12c-d3a1ffae0b69",
          "type": "user"
        }
      },
      "sub_code": "none",
      "title": "Not Found"
    }
  ]
}

Response 409

application/json
HTTP/1.1 409
Content-Type: application/json
Content-Length: 217
{
  "errors": [
    {
      "code": "conflict.changing_shared_resource_group",
      "detail": "Cannot change shared resource group",
      "params": {},
      "sub_code": "none",
      "title": "Conflict"
    }
  ]
}

Share CSP Campaign With Shared Resource Group

POST /api/v1/campaigns/{campaign_id}/share_with/shared_resource_groups/{shared_resource_group_id} HTTP/1.1

Shares the campaign with another account, either by specifying the account id, or the resource group that it should be shared via.

Path Parameters

Name Type Description
campaign_id String(format:uuid)! Path Desc. campaign_id

Path Desc. campaign_id

Campaign ID A Universally unique identifier, which identifies the resource

Request

POST /api/v1/campaigns/{campaign_id}/share_with/shared_resource_groups/{shared_resource_group_id} HTTP/1.1
Accept: application/json

Response 200

application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 1674
{
  "associations": {
    "brand": {
      "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48",
      "tcr_brand_id": "B000000"
    },
    "shared_resource_group": {
      "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48"
    }
  },
  "data": {
    "attributes": {
      "has_affiliate_marketing": true,
      "has_age_gated_content": true,
      "has_direct_lending": true,
      "has_embedded_link": true,
      "has_embedded_phone_number": true,
      "has_number_pooling": true,
      "has_subscriber_help": true,
      "has_subscriber_opt_in": true,
      "has_subscriber_opt_out": true,
      "has_terms_and_conditions": true
    },
    "dca_approved": true,
    "description": "The original description provided to TCR.\n",
    "embedded_link_sample": "https://example.com/something",
    "help_keywords": "HELP",
    "help_message": "string",
    "id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
    "inserted_at": "2021-08-13T04:08:44.762841Z",
    "message_flow": "string",
    "name": "Receive 2FA Codes over SMS",
    "notes": "string",
    "optin_keywords": "START,SUBSCRIBE",
    "optin_message": "string",
    "optout_keywords": "STOP,UNSUBSCRIBE",
    "optout_message": "string",
    "privacy_policy_link": "https://example.com/privacy",
    "sample_messages": [
      "string"
    ],
    "shared": "NO",
    "sub_use_case": [
      "2FA"
    ],
    "tcr_brand_id": "B000000",
    "tcr_campaign_id": "C000000",
    "tcr_csp_id": "S000000",
    "tcr_reseller_id": "R000000",
    "tcr_status": "ACTIVE",
    "terms_and_conditions_link": "https://example.com/terms_and_conditions",
    "updated_at": "2021-08-13T04:08:44.762841Z",
    "use_case": "MIXED"
  },
  "type": "csp_campaign"
}

Response 403

application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
  "errors": [
    {
      "code": "access_denied.no_scope",
      "detail": "No scope available to user role",
      "params": {
        "action": "index",
        "level": "guest",
        "resource": "resource"
      },
      "sub_code": "none",
      "title": "Access Denied, no scope available"
    }
  ]
}

Response 404

application/json
HTTP/1.1 404
Content-Type: application/json
Content-Length: 314
{
  "errors": [
    {
      "code": "not_found",
      "detail": "The specified resource could not be found",
      "params": {
        "resource": {
          "id": "3fbb573a-6049-44a0-a12c-d3a1ffae0b69",
          "type": "user"
        }
      },
      "sub_code": "none",
      "title": "Not Found"
    }
  ]
}

Response 409

application/json
HTTP/1.1 409
Content-Type: application/json
Content-Length: 217
{
  "errors": [
    {
      "code": "conflict.changing_shared_resource_group",
      "detail": "Cannot change shared resource group",
      "params": {},
      "sub_code": "none",
      "title": "Conflict"
    }
  ]
}

Unshare CSP Campaign

DELETE /api/v1/campaigns/{campaign_id}/shared_resource_group HTTP/1.1

Removes any associated Shared Resource Group from the campaign.

Note that if the campaign is inuse (has numbers associated with it), it cannot be removed.

Path Parameters

Name Type Description
campaign_id String(format:uuid)! Path Desc. campaign_id

Path Desc. campaign_id

Campaign ID A Universally unique identifier, which identifies the resource

Request

DELETE /api/v1/campaigns/{campaign_id}/shared_resource_group HTTP/1.1
Accept: application/json

Response 200

application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 1674
{
  "associations": {
    "brand": {
      "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48",
      "tcr_brand_id": "B000000"
    },
    "shared_resource_group": {
      "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48"
    }
  },
  "data": {
    "attributes": {
      "has_affiliate_marketing": true,
      "has_age_gated_content": true,
      "has_direct_lending": true,
      "has_embedded_link": true,
      "has_embedded_phone_number": true,
      "has_number_pooling": true,
      "has_subscriber_help": true,
      "has_subscriber_opt_in": true,
      "has_subscriber_opt_out": true,
      "has_terms_and_conditions": true
    },
    "dca_approved": true,
    "description": "The original description provided to TCR.\n",
    "embedded_link_sample": "https://example.com/something",
    "help_keywords": "HELP",
    "help_message": "string",
    "id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
    "inserted_at": "2021-08-13T04:08:44.762841Z",
    "message_flow": "string",
    "name": "Receive 2FA Codes over SMS",
    "notes": "string",
    "optin_keywords": "START,SUBSCRIBE",
    "optin_message": "string",
    "optout_keywords": "STOP,UNSUBSCRIBE",
    "optout_message": "string",
    "privacy_policy_link": "https://example.com/privacy",
    "sample_messages": [
      "string"
    ],
    "shared": "NO",
    "sub_use_case": [
      "2FA"
    ],
    "tcr_brand_id": "B000000",
    "tcr_campaign_id": "C000000",
    "tcr_csp_id": "S000000",
    "tcr_reseller_id": "R000000",
    "tcr_status": "ACTIVE",
    "terms_and_conditions_link": "https://example.com/terms_and_conditions",
    "updated_at": "2021-08-13T04:08:44.762841Z",
    "use_case": "MIXED"
  },
  "type": "csp_campaign"
}

Response 403

application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
  "errors": [
    {
      "code": "access_denied.no_scope",
      "detail": "No scope available to user role",
      "params": {
        "action": "index",
        "level": "guest",
        "resource": "resource"
      },
      "sub_code": "none",
      "title": "Access Denied, no scope available"
    }
  ]
}

Response 404

application/json
HTTP/1.1 404
Content-Type: application/json
Content-Length: 314
{
  "errors": [
    {
      "code": "not_found",
      "detail": "The specified resource could not be found",
      "params": {
        "resource": {
          "id": "3fbb573a-6049-44a0-a12c-d3a1ffae0b69",
          "type": "user"
        }
      },
      "sub_code": "none",
      "title": "Not Found"
    }
  ]
}

Response 409

application/json
HTTP/1.1 409
Content-Type: application/json
Content-Length: 253
{
  "errors": [
    {
      "code": "conflict.remove_shared_resource_group",
      "detail": "Cannot remove shared resource group, may still be associated with numbers",
      "params": {},
      "sub_code": "none",
      "title": "Conflict"
    }
  ]
}

Get CSP Campaign Shared Resource Group

GET /api/v1/campaigns/{campaign_id}/shared_resource_group HTTP/1.1

Retrieves the shared resource group associated with the campaign, if any.

Path Parameters

Name Type Description
campaign_id String(format:uuid)! Path Desc. campaign_id

Path Desc. campaign_id

Campaign ID A Universally unique identifier, which identifies the resource

Request

GET /api/v1/campaigns/{campaign_id}/shared_resource_group HTTP/1.1
Accept: application/json

Response 200

application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 433
{
  "associations": {
    "account": {
      "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48"
    },
    "donee": {
      "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48"
    }
  },
  "data": {
    "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48",
    "inserted_at": "2021-08-13T04:08:44.762841Z",
    "name": "ACME Corp Shared Resources",
    "notes": "",
    "updated_at": "2021-08-13T04:08:44.762841Z"
  },
  "type": "shared_resource_group"
}

Response 403

application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
  "errors": [
    {
      "code": "access_denied.no_scope",
      "detail": "No scope available to user role",
      "params": {
        "action": "index",
        "level": "guest",
        "resource": "resource"
      },
      "sub_code": "none",
      "title": "Access Denied, no scope available"
    }
  ]
}

Response 404

application/json
HTTP/1.1 404
Content-Type: application/json
Content-Length: 314
{
  "errors": [
    {
      "code": "not_found",
      "detail": "The specified resource could not be found",
      "params": {
        "resource": {
          "id": "3fbb573a-6049-44a0-a12c-d3a1ffae0b69",
          "type": "user"
        }
      },
      "sub_code": "none",
      "title": "Not Found"
    }
  ]
}

List CSP Campaigns

GET /api/v1/campaigns HTTP/1.1

Retrieve a list of campaigns associated with the account

Query Parameters

Name Type Description
first Integer Query Desc. first
last Integer Query Desc. last
after String Query Desc. after
before String Query Desc. before

Query Desc. first

The number of items to return starting from the 'after' cursor

Query Desc. last

The number of items to return behind the 'before' cursor

Query Desc. after

The cursor representing the starting point of a 'first' based paging

Query Desc. before

The cursor representing the starting point of a 'last' based paging

Request

GET /api/v1/campaigns HTTP/1.1
Accept: application/json

Response 200

application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 2059
{
  "count": 1,
  "page_info": {
    "first": "string",
    "has_next_page": true,
    "has_previous_page": true,
    "last": "string"
  },
  "results": [
    {
      "associations": {
        "brand": {
          "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48",
          "tcr_brand_id": "B000000"
        },
        "shared_resource_group": {
          "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48"
        }
      },
      "data": {
        "attributes": {
          "has_affiliate_marketing": true,
          "has_age_gated_content": true,
          "has_direct_lending": true,
          "has_embedded_link": true,
          "has_embedded_phone_number": true,
          "has_number_pooling": true,
          "has_subscriber_help": true,
          "has_subscriber_opt_in": true,
          "has_subscriber_opt_out": true,
          "has_terms_and_conditions": true
        },
        "dca_approved": true,
        "description": "The original description provided to TCR.\n",
        "embedded_link_sample": "https://example.com/something",
        "help_keywords": "HELP",
        "help_message": "string",
        "id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
        "inserted_at": "2021-08-13T04:08:44.762841Z",
        "message_flow": "string",
        "name": "Receive 2FA Codes over SMS",
        "notes": "string",
        "optin_keywords": "START,SUBSCRIBE",
        "optin_message": "string",
        "optout_keywords": "STOP,UNSUBSCRIBE",
        "optout_message": "string",
        "privacy_policy_link": "https://example.com/privacy",
        "sample_messages": [
          "string"
        ],
        "shared": "NO",
        "sub_use_case": [
          "2FA"
        ],
        "tcr_brand_id": "B000000",
        "tcr_campaign_id": "C000000",
        "tcr_csp_id": "S000000",
        "tcr_reseller_id": "R000000",
        "tcr_status": "ACTIVE",
        "terms_and_conditions_link": "https://example.com/terms_and_conditions",
        "updated_at": "2021-08-13T04:08:44.762841Z",
        "use_case": "MIXED"
      },
      "type": "csp_campaign"
    }
  ]
}

Response 403

application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
  "errors": [
    {
      "code": "access_denied.no_scope",
      "detail": "No scope available to user role",
      "params": {
        "action": "index",
        "level": "guest",
        "resource": "resource"
      },
      "sub_code": "none",
      "title": "Access Denied, no scope available"
    }
  ]
}

Get CSP Campaign

GET /api/v1/campaigns/{id} HTTP/1.1

Lookup a Campaign by its internal UUID

Path Parameters

Name Type Description
id String(format:uuid)! Path Desc. id

Path Desc. id

Campaign ID A Universally unique identifier, which identifies the resource

Request

GET /api/v1/campaigns/{id} HTTP/1.1
Accept: application/json

Response 200

application/json
HTTP/1.1 200
Content-Type: application/json
Content-Length: 1674
{
  "associations": {
    "brand": {
      "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48",
      "tcr_brand_id": "B000000"
    },
    "shared_resource_group": {
      "id": "c6be45e4-b7dd-412c-96c4-777e83fb9c48"
    }
  },
  "data": {
    "attributes": {
      "has_affiliate_marketing": true,
      "has_age_gated_content": true,
      "has_direct_lending": true,
      "has_embedded_link": true,
      "has_embedded_phone_number": true,
      "has_number_pooling": true,
      "has_subscriber_help": true,
      "has_subscriber_opt_in": true,
      "has_subscriber_opt_out": true,
      "has_terms_and_conditions": true
    },
    "dca_approved": true,
    "description": "The original description provided to TCR.\n",
    "embedded_link_sample": "https://example.com/something",
    "help_keywords": "HELP",
    "help_message": "string",
    "id": "01EH2Y28M6KXG14QMPM3HSP1Y0",
    "inserted_at": "2021-08-13T04:08:44.762841Z",
    "message_flow": "string",
    "name": "Receive 2FA Codes over SMS",
    "notes": "string",
    "optin_keywords": "START,SUBSCRIBE",
    "optin_message": "string",
    "optout_keywords": "STOP,UNSUBSCRIBE",
    "optout_message": "string",
    "privacy_policy_link": "https://example.com/privacy",
    "sample_messages": [
      "string"
    ],
    "shared": "NO",
    "sub_use_case": [
      "2FA"
    ],
    "tcr_brand_id": "B000000",
    "tcr_campaign_id": "C000000",
    "tcr_csp_id": "S000000",
    "tcr_reseller_id": "R000000",
    "tcr_status": "ACTIVE",
    "terms_and_conditions_link": "https://example.com/terms_and_conditions",
    "updated_at": "2021-08-13T04:08:44.762841Z",
    "use_case": "MIXED"
  },
  "type": "csp_campaign"
}

Response 403

application/json
HTTP/1.1 403
Content-Type: application/json
Content-Length: 312
{
  "errors": [
    {
      "code": "access_denied.no_scope",
      "detail": "No scope available to user role",
      "params": {
        "action": "index",
        "level": "guest",
        "resource": "resource"
      },
      "sub_code": "none",
      "title": "Access Denied, no scope available"
    }
  ]
}

Response 404

application/json
HTTP/1.1 404
Content-Type: application/json
Content-Length: 314
{
  "errors": [
    {
      "code": "not_found",
      "detail": "The specified resource could not be found",
      "params": {
        "resource": {
          "id": "3fbb573a-6049-44a0-a12c-d3a1ffae0b69",
          "type": "user"
        }
      },
      "sub_code": "none",
      "title": "Not Found"
    }
  ]
}

Updated 2026-08-12 · Generated from the Atlas OpenAPI spec.