Skip to main content
POST
/
v2
/
creatives
curl -X POST "https://app.tracklysms.com/api/v2/creatives" \
  -H "X-Api-Key: trk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Summer Sale Promo",
    "message": "Hot deals just for you! Shop now: {{link1}} Reply STOP to opt out.",
    "offer_links": [
      {
        "key": "link1",
        "offer_id": "offer_abc123",
        "url_params": {"sub1": "sms"}
      }
    ],
    "status": "active",
    "creative_type": "automated"
  }'
{
  "success": true,
  "creative": {
    "id": 101,
    "name": "Summer Sale Promo",
    "message": "Hot deals just for you! Shop now: {{link1}} Reply STOP to opt out.",
    "offer_links": [
      {
        "key": "link1",
        "offer_id": "offer_abc123",
        "url": null,
        "url_params": {"sub1": "sms"}
      }
    ],
    "offers": ["offer_abc123"],
    "status": "active",
    "creative_type": "automated",
    "character_count": 97,
    "segment_count": 1,
    "created_at": "2025-06-10T12:00:00Z"
  }
}
Creates a new creative in your account. The message body must contain at least one {{linkN}} placeholder, and every placeholder must have a corresponding entry in the offer_links array.

Body Parameters

name
string
required
Display name for the creative. Maximum 255 characters.
message
string
required
The message template. Maximum 1600 characters. Must contain at least one {{linkN}} placeholder (e.g. {{link1}}). Placeholders are replaced with tracked short links at send time.
Array of offer link objects that map to the {{linkN}} placeholders in the message. Each placeholder in the message must have a matching entry.
status
string
default:"active"
Initial status of the creative. Accepted values: active, paused.
creative_type
string
default:"automated"
The type of creative. Accepted values: automated, one_time, welcome.

Response Fields

success
boolean
Indicates whether the creative was created successfully.
creative
object
The full creative object.
Segment calculation: Each link placeholder is estimated as 23 characters (short link length). An additional 34 characters of compliance overhead is added to account for required opt-out language. If the total exceeds 160 characters, multi-part SMS pricing applies at ceil(total / 153) segments.

Examples

curl -X POST "https://app.tracklysms.com/api/v2/creatives" \
  -H "X-Api-Key: trk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Summer Sale Promo",
    "message": "Hot deals just for you! Shop now: {{link1}} Reply STOP to opt out.",
    "offer_links": [
      {
        "key": "link1",
        "offer_id": "offer_abc123",
        "url_params": {"sub1": "sms"}
      }
    ],
    "status": "active",
    "creative_type": "automated"
  }'
{
  "success": true,
  "creative": {
    "id": 101,
    "name": "Summer Sale Promo",
    "message": "Hot deals just for you! Shop now: {{link1}} Reply STOP to opt out.",
    "offer_links": [
      {
        "key": "link1",
        "offer_id": "offer_abc123",
        "url": null,
        "url_params": {"sub1": "sms"}
      }
    ],
    "offers": ["offer_abc123"],
    "status": "active",
    "creative_type": "automated",
    "character_count": 97,
    "segment_count": 1,
    "created_at": "2025-06-10T12:00:00Z"
  }
}

Error Codes

HTTP StatusError CodeDescription
400missing_nameThe name field is required.
400missing_messageThe message field is required.
400missing_offer_linksThe offer_links array is required and must not be empty.
400name_too_longThe name exceeds 255 characters.
400message_too_longThe message exceeds 1600 characters.
400invalid_statusThe provided status is not active or paused.
400invalid_creative_typeThe provided creative_type is not automated, one_time, or welcome.
400missing_link_placeholderThe message must contain at least one {{linkN}} placeholder.
400missing_offer_links_for_placeholdersOne or more {{linkN}} placeholders in the message do not have a matching entry in offer_links.
400missing_offer_link_keyAn entry in offer_links is missing the required key field.
400missing_offer_link_offer_idAn entry in offer_links is missing the required offer_id field.
401unauthorizedAPI key is missing or invalid.
400offer_not_foundAn offer referenced in offer_links does not exist or does not belong to your account.

Next Steps

Creative Templates

Learn template best practices

Create Schedule

Use your creative in a campaign