Docs
OverviewPlatformPlatform APIA2P Messaging API
AI & MCP
Open dashboard
OverviewPlatformPlatform APIA2P Messaging API
AI & MCP
  • Overview
  • Introduction
  • Create an account
  • Choose your API
  • Authentication
  • AI & MCP
Product API
  • Guide
  • Quickstart
    • API tokens
    • Connected apps (OAuth)
    • Project readiness
    • Channel readiness
    • Senders
    • Attention
    • Recommendations
    • Overview
    • Contacts and attributes
    • Events
    • Query filter
    • Event query filter
    • Probes
    • Counting and retrieval
    • Segments
    • Overview
    • Creating a draft
    • Editing a draft
    • Audience targeting
    • Message content
    • Dates and scheduling
    • Reading campaigns
    • Estimating and deleting
    • OverviewBeta
    • Templates
    • Creating and editing drafts
    • Triggers and exits
    • Nodes
    • Delays and waits
    • Overview
    • Statistics catalog
    • Building queries
    • Conversions & revenue
    • Reading results
    • Flow reports
    • Rate limits
    • Errors
  • Full API Reference
Ingest API
  • Guide
  • Quickstart
  • Authentication
  • Rate limits
  • Errors
  • Best practices
  • Full API Reference
Further reading
  • Query Filter
DashboardSupportinstasent.com

Platform API · Product API · Campaigns

Message content

Write the copy a campaign draft carries: template variables and short links, the sender that speaks for it, SMS Unicode, the RCS message with its cards, carousels, media and buttons, the SMS fallback for contacts RCS cannot reach, and how to declare languages to translate later.

On this page▾
  • One block of copy
  • Template variables
  • Choosing a sender
  • SMS
  • RCS
  • Text and buttons
  • The RCS message object
  • Button kinds
  • Template limits
  • What a template does not keep
  • When a template is refused
  • Falling back to SMS
  • Which sender the fallback uses
  • Declaring other languages
  • Errors
  • What's next

channel decides the shape of everything on this page. A campaign is sms or rcs, the choice is made at creation and cannot change afterwards, and each channel accepts fields the other ignores: allowUnicode is meaningless for RCS, suggestions and template are meaningless for SMS, and only a channel that cannot reach every contact takes a fallback.

What both share is the core: one block of copy, in one language, and a sender to speak for it.

One block of copy

{
  "message": {
    "text": "Your order is ready for pickup at our downtown store."
  }
}

message.text is required whenever you send a message at all — except on an RCS campaign that sends the RCS message object in message.template instead. You can also omit message entirely — the result is a valid draft with an audience, a sender and a date, and no copy, for someone to write in the dashboard. That is a legitimate way to use this endpoint: prepare the boring parts programmatically and leave the words to a human.

What this endpoint never does is invent copy. Nothing is generated, completed or translated on your behalf; a draft contains exactly the text you supplied.

Template variables

The text supports the same template variables as the rest of the platform. Two of them matter for almost every campaign:

VariableEffect
{{short:https://example.com/page}}Replaces the URL with a short link.
{{unsubscribe}}Inserts an unsubscribe link.

A short link costs 10–15 characters instead of the full URL, and every tap on it is measurable in the campaign's reporting. In SMS, where length is billed, that is usually worth doing for every link you include.

{
  "message": {
    "text": "Summer sale starts today: 30% off everything.\nShop now: {{short:https://example.com/sale}}"
  }
}

Do not wrap a button URL in {{short:...}}. The rule applies to the message text. URLs inside RCS buttons — suggestions, or the buttons of a template — are shortened and tracked by the platform on their own when the message is prepared — wrapping them yourself shortens an already-shortened link.

Choosing a sender

sender is a top-level field, not part of message, and it takes the id of a sender that belongs to this project. An id from another project is refused with unknown-sender rather than silently ignored.

Omit it and the project's default sender for the channel applies. If the project has no default either, the draft is still created — with no sender, and a no-default-sender entry in metadata.warnings. The campaign cannot be sent until someone picks one, in the dashboard or with an edit, which is why that warning is worth surfacing in your own UI rather than dropping.

Whichever sender ends up on the campaign is also inherited by every language declared through translateTo that does not name its own.

SMS

An SMS body has no hard maximum in this API; length maps to cost instead.

allowUnicodebooleandefault: false

SMS only. Set it to true when the text may contain non-GSM-7 characters — accents, emoji, most non-Latin scripts. Ignored on RCS campaigns.

A GSM-7 part holds 160 characters; a Unicode part holds 70. Longer copy is split into several parts, and each part is billed as a message — so a 200-character GSM-7 message costs two, and the same text carrying one emoji costs three. That is simply the price of the copy you chose; a {{short:...}} link is the cheapest way to claw characters back.

{
  "channel": "sms",
  "title": "Flash sale for Spanish contacts",
  "message": {
    "text": "Solo hoy: 30% de descuento en toda la tienda.",
    "allowUnicode": true
  }
}

RCS

An RCS message comes in one of two forms, and a request uses exactly one of them:

  • Text and buttons: message.text, a text bubble of up to 3072 characters, with up to 11 url or dialer buttons in message.suggestions. The quickest way to write a plain RCS message.
  • The RCS message object: message.template, the full RCS message. It carries a text bubble, a single card, a carousel of cards or a media file, and buttons of every kind. It is the same object a flow's RCS send stores, validated by the same rules, so one shape serves both.

Sending message.template together with message.text or message.suggestions is refused with invalid-message (Pass either message.text with message.suggestions, or message.template, not both.), and so is message.template on an SMS campaign (message.template is only accepted on rcs campaigns.). With template, message.text is not required.

Unlike SMS, an RCS message is never split into parts: a text over 160 bytes (accented letters take 2 bytes, most emojis 4) is billed as one rich message instead of a text one. The full billing rules are in RCS: text and rich messages.

Text and buttons

suggestionsarray

RCS only. The buttons shown under the message, in order, up to 11.

typestringrequired

url opens a link; dialer starts a phone call. The other kinds go in the RCS message object.

displayTextstringrequired

The label the recipient sees, up to 25 characters.

urlstring

Required when type is url. A plain absolute http or https URL — not wrapped in a template variable. With urlVariable, it is the page the button opens for contacts without a link of their own, and its query parameters are added to each contact's link too, replacing any of the same name.

urlVariablestring

Only for type url. Makes the button open each contact's own link: the name of the contact attribute that holds it, without braces. Each contact's link is shortened and tracked, and a contact with no link (or a value that is not a URL) opens url instead, so the button is never missing. Campaigns have no trigger event, so only contact attributes resolve here.

interactionTokenstring

Optional interaction tag, up to 32 characters of lowercase letters, numbers, - and _. It lands on the taps the button produces, so reports can tell which button was used. Never generated for you.

phoneNumberstring

Required when type is dialer. The number to call, in E.164 format.

{
  "channel": "rcs",
  "title": "Order pickup reminder",
  "audience": {
    "include": ["pending-pickups"]
  },
  "message": {
    "text": "Your order is ready for pickup at our downtown store.",
    "suggestions": [
      {
        "type": "url",
        "displayText": "View order",
        "url": "https://example.com/orders"
      },
      {
        "type": "dialer",
        "displayText": "Call the store",
        "phoneNumber": "+34600000000"
      }
    ]
  }
}

Three behaviours to know when you generate suggestions programmatically:

  • Incomplete or unrecognised entries are dropped, not fatal. A button without displayText, a dialer without phoneNumber, or a type this form does not take, is left out and the rest of the draft is created. Count the buttons on the response if your caller needs to know what survived.
  • A url button is never dropped. Without a valid http(s) url, or with a malformed urlVariable, the request fails with a message on that field, so a link button cannot vanish silently.
  • More than 11 accepted buttons is an error (invalid-message). The cap is a channel limit, not a preference, so it fails loudly rather than truncating your list at an arbitrary point.

The RCS message object

message.template holds exactly one body — text, richMessage or media — and, optionally, suggestions: the buttons under the message. A campaign that needs cards, a carousel, an image or a button other than url and dialer is written this way.

textobject

A text bubble: { "text": "..." }, up to 3072 characters. Never a bare string.

richMessageobject

A single card ("type": "card") or a carousel ("type": "cardCarousel") whose cards holds 2 to 10 cards.

typestringrequired

card or cardCarousel.

titlestring

A card's title, up to 200 characters.

descriptionstring

A card's text, up to 2000 characters. Put links in a button, never here: a URL in a card's text cannot be tapped on most handsets.

mediaobject

A card's image or video, in the shape of media below.

suggestionsobject

A card's own buttons, up to 4, in the shape of suggestions below.

cardsobject[]

cardCarousel only, required. 2 to 10 cards, each { "type": "card", ... } with the fields above. Every card's media uses the same mediaHeight.

mediaobject

A media file, as the message body or on a card. The file is referenced by a public URL, which the RCS provider downloads when it sends.

typestringrequired

image, video, file or audio. On a card, image or video.

mediaUrlstringrequired

The public URL of the file.

mediaContentTypestringrequired

The file's MIME type, such as image/png or video/mp4.

mediaHeightstringdefault: automatic

image and video only. SHORT_HEIGHT, MEDIUM_HEIGHT or TALL_HEIGHT. Leave it out and the platform picks the height that crops the image least (a video by its thumbnail), as the dashboard's "Automatic" does, with one height for the whole carousel; MEDIUM_HEIGHT when the image cannot be read. A height you send is kept.

descriptionstring

Up to 2000 characters.

suggestionsobject

The buttons: { "suggestions": [ ... ] }, never a bare array. Up to 11 under the message, up to 4 on a card. Each button takes a type, a displayText of up to 25 characters, an optional interactionToken, and the fields its type asks for (next section).

A carousel of two cards with buttons, and an unsubscribe button under the message:

{
  "channel": "rcs",
  "title": "New running collection",
  "message": {
    "template": {
      "richMessage": {
        "type": "cardCarousel",
        "cards": [
          {
            "type": "card",
            "title": "Running shoes",
            "description": "Light, for every day.",
            "media": {
              "type": "image",
              "mediaUrl": "https://example.com/shoes.png",
              "mediaContentType": "image/png"
            },
            "suggestions": {
              "suggestions": [
                { "type": "reply", "displayText": "I want them", "interactionToken": "shoes-yes" },
                { "type": "url", "displayText": "See more", "url": "https://example.com/shoes", "interactionToken": "shoes-web" }
              ]
            }
          },
          {
            "type": "card",
            "title": "Trail shoes",
            "description": "Grip for the mountain.",
            "media": {
              "type": "image",
              "mediaUrl": "https://example.com/trail.png",
              "mediaContentType": "image/png"
            }
          }
        ]
      },
      "suggestions": {
        "suggestions": [
          { "type": "unsubscribe", "displayText": "Unsubscribe" }
        ]
      }
    }
  }
}

A plain text bubble in this form is "template": { "text": { "text": "..." } }, and a single card is "richMessage": { "type": "card", ... }. Reading the campaign back, the stored message sits at channel.options[0].template of the campaign, in this same shape.

Button kinds

typeWhat the tap doesFields it needs
replySends the label back as the contact's answer.—
urlOpens a link.url, a plain absolute http(s) URL; optional urlVariable, as in text and buttons.
dialerStarts a phone call.phoneNumber, in E.164.
calendarAdds an event to the contact's calendar.startDate and endDate, with an offset and no fractional seconds (2026-12-01T10:00:00Z); title, up to 100 characters.
viewLocationOpens a map.latitude and longitude, in decimal degrees (a number is accepted and comes back as a string); optional label.
clipboardCopies a text.text, the text copied.
unsubscribeOpens the opt-out page.None: it carries no url, because the platform fills the opt-out link when the message is prepared.

interactionToken works as in the short form — lowercase letters, numbers, - and _, up to 32 — and is never set on unsubscribe. As with any button, a url is never wrapped in {{short:...}}.

Template limits

ElementLimit
Text bubbleup to 3072 characters
Carousel2 to 10 cards, all with the same mediaHeight
Card titleup to 200 characters
Card description, media descriptionup to 2000 characters
Buttons under the messageup to 11
Buttons on a cardup to 4
displayTextup to 25 characters
interactionTokena-z, 0-9, -, _, up to 32 characters

What a template does not keep

Some keys of a template never reach the draft: a misspelt key, a field at the wrong level, or a field this API does not take. The draft is still created, and the response says what was left out instead of passing it off as a success. metadata.ignoredTemplateFields lists the path of each key, relative to template, and metadata.warnings carries template-fields-ignored:

{
  "entity": { "...": "..." },
  "metadata": {
    "warnings": ["template-fields-ignored"],
    "ignoredTemplateFields": ["richMessage.cards[0].buttons"]
  }
}

ignoredTemplateFields is present whenever the request carried message.template, and empty when everything was kept. The card width and the card and button layouts (cardWidth, and layout on a card or on its buttons) are set in the dashboard, not here: sent through this endpoint, they come back in the list. A read-only key sent back with the value a read already shows — a campaign's template re-posted as it was read — lost nothing, so it is not listed.

When a template is refused

What the dashboard or a flow would refuse is refused here too, and no draft is created. A refusal coded invalid-message carries its reason in errors.fields.errorMessage:

  • A value with the wrong shape — a text bubble sent as a bare string, a type that does not exist (a richMessage of type carousel instead of cardCarousel) — is an invalid-message, with the message starting A value in message.template has the wrong shape: and naming the value, worded as for a flow draft.
  • A template that is not a JSON object is an invalid-message: message.template must be an object.
  • A value past a limit — a carousel with one card, a label over 25 characters, five buttons on a card, cards with different media heights — is a field-level 422 naming the field, such as cards or displayText.

Falling back to SMS

RCS does not reach every contact: the handset and the network have to support it. A fallback covers the rest with an SMS, forming an rcs -> sms chain — the contacts RCS can reach get the rich message, everyone else gets the SMS.

fallbackobject

RCS only. Sending it on an SMS campaign is refused with fallback-not-supported: SMS already reaches everyone, so there is nothing to fall back to.

textstringrequired

The SMS body. Required whenever fallback is present.

senderstring

Id of the SMS sender for this leg. Must belong to the project.

allowUnicodeboolean

Allow non-GSM characters in the fallback SMS.

{
  "channel": "rcs",
  "title": "Order pickup reminder",
  "audience": {
    "include": ["pending-pickups"]
  },
  "message": {
    "text": "Your order is ready for pickup at our downtown store.",
    "suggestions": [
      {
        "type": "url",
        "displayText": "View order",
        "url": "https://example.com/orders"
      }
    ]
  },
  "fallback": {
    "text": "Your order is ready for pickup at our downtown store: {{short:https://example.com/orders}}"
  }
}

The fallback copy is required and is never derived from the RCS body. Beyond the standing rule that this endpoint writes no copy nobody supplied, there is a cost reason: an RCS body may run to 3072 characters, and pushing that into SMS would bill a long multi-part message nobody asked to send. Write the SMS version deliberately, short, with a short link.

Which sender the fallback uses

The SMS leg resolves its sender from the most specific answer available:

  1. 1

    The explicit one

    fallback.sender, when you send it.

  2. 2

    The one the RCS sender designates

    The SMS sender configured on the RCS sender itself — whoever set up the RCS sender already chose which SMS speaks for it.

  3. 3

    The project default

    The project's default SMS sender.

If none of the three exists the draft is still created, with no-fallback-sender in metadata.warnings.

Declaring other languages

translateTo lists the other languages the campaign should eventually go out in, as two-letter lowercase codes:

{
  "channel": "sms",
  "title": "Product launch",
  "audience": {
    "include": ["newsletter-subscribers"]
  },
  "message": {
    "language": "en",
    "text": "Our new collection is live. Take a look: {{short:https://example.com/new}}"
  },
  "translateTo": ["fr", "de"]
}

Each entry becomes a declared but empty language on the draft — a recorded intention to translate, not a translation. No copy is generated. Someone writes the French and the German in the dashboard, and until they do, the campaign cannot be estimated, quoted or prepared: an empty declared language is a deliberate gate, so a half-translated campaign can never be sent by accident.

message.language is the two-letter code of the copy you already wrote. Its only job is this de-duplication: without it, the language you supplied would be declared as one of the missing translations and the campaign would wait forever on a translation that already exists. That is why it is optional on its own and required whenever translateTo is used — and why it is not stored anywhere: it is a fact about your request, not about the campaign.

Multi-language campaigns are a paid feature. A request that declares languages without a subscription that includes it returns 409 Conflict and creates nothing at all — there is no partial draft to clean up.

Errors

errorCodeCause
invalid-messagemessage was sent without text (or, on RCS, without template); a fallback was sent without text; more than 11 RCS buttons; template sent with text or suggestions, on an SMS campaign, not as an object, or with a value of the wrong shape; translateTo without message.language; an unknown compliance value.
unknown-senderThe sender id does not exist or belongs to another project.
fallback-not-supportedA fallback was sent on a channel that reaches every contact.
unknown-channelchannel is missing, or names a channel this endpoint cannot draft.

What's next

Dates and scheduling

Where the campaign sits on the calendar — and why nothing is scheduled here.

Audience targeting

Who receives what you just wrote.

Creating a draft

Back to the endpoint contract, limits and error codes.

Last updated November 27, 2026

PreviousAudience targetingNextDates and scheduling
  • One block of copy
  • Template variables
  • Choosing a sender
  • SMS
  • RCS
  • Text and buttons
  • The RCS message object
  • Button kinds
  • Template limits
  • What a template does not keep
  • When a template is refused
  • Falling back to SMS
  • Which sender the fallback uses
  • Declaring other languages
  • Errors
  • What's next

© 2026 Instasent

Privacy PolicyTerms & ConditionsCookie PolicyLegal Notice
All systems operational