Sent LogoSent API Docs

Data Models

Complete reference for all data structures used in the Sent API.

Contact Models

Contact Object

The contact object represents a phone number with its various formats and available messaging channels.

FieldTypeDescription
idUUIDUnique contact identifier
phoneNumberStringPhone number as originally provided
formatE164StringE.164 international format
formatInternationalStringHuman-readable international format
formatNationalStringNational format for the country
formatRfcStringRFC 3966 tel: URI format
countryCodeStringCountry calling code
regionCodeStringISO 3166-1 alpha-2 country code
availableChannelsStringComma-separated available channels
defaultChannelStringRecommended messaging channel

Contact List Response

Paginated response containing an array of contact objects.

Template Models

Template Object

Message templates for multi-channel messaging (SMS, WhatsApp).

FieldTypeDescription
idUUIDUnique template identifier
displayNameStringHuman-readable template name
categoryEnumTemplate category (see below)
languageISO CodeLanguage/locale (e.g., en_US)
definitionObjectTemplate Definition object (see below)
statusEnumTemplate status (see below)
isPublishedBooleanWhether template is published for use
whatsappTemplateIdStringWhatsApp internal template ID (when applicable)
whatsappTemplateNameStringWhatsApp internal template name (when applicable)
createdAtDateTimeISO 8601 creation timestamp
updatedAtDateTimeISO 8601 last update timestamp

Template Definition Object

Defines the content and components of a template, including channel-specific bodies and interactive elements.

FieldTypeDescription
headerObject?Optional header; supports type and template, with variables
bodyObjectMessage body definitions: supports multiChannel, sms, and whatsapp
footerObject?Optional footer with type and template
buttonsArray<Button>Optional interactive buttons (max 3)
definitionVersionStringDefinition schema version (e.g., 1.0)

Body fields (multiChannel, sms, whatsapp) share the same shape:

FieldTypeDescription
templateStringMessage text with variable placeholders (e.g., Hello {{1:name}})
variablesArray<Variable>Variables referenced in the template

Variable Object

Represents a dynamic placeholder used in headers and bodies.

FieldTypeDescription
idIntegerSequential variable ID starting from 1
nameStringReadable variable name
typeEnumvariable
props.variableTypeEnumtext
props.sampleStringSample value for approval and previews
props.urlString?Full URL (for link/media)
props.shortUrlString?Shortened URL (optional)
props.altString?Alternative text (media)
props.mediaTypeEnum?image

Button Object

Interactive button used primarily for WhatsApp templates.

FieldTypeDescription
idIntegerButton identifier
typeEnumURL
props.textStringButton label
props.urlTypeEnum?static
props.urlString?Destination URL (URL buttons)
props.countryCodeString?E.g., +1 (phone buttons)
props.phoneNumberString?Local number (phone buttons)
props.quickReplyTypeString?custom
props.activeForInteger?Active window in seconds (voice call)
props.offerCodeString?Code to copy (copy code)

Template Categories

CategoryDescriptionUse Cases
AUTHENTICATIONOTP and verification2FA, login codes
MARKETINGPromotional contentCampaigns, offers
UTILITYTransactional messagesConfirmations, updates

Template Status Values

StatusDescription
DRAFTNot submitted for review
PENDINGUnder review
APPROVEDApproved for use
REJECTEDRejected and cannot be used
PAUSEDTemporarily disabled
ARCHIVEDArchived and not in active use

Template List Response

Paginated response containing an array of template objects.

Message Models

Send Message Request

Request payload for sending messages via contact ID or phone number.

FieldTypeRequiredDescription
contactIdUUIDYes*Contact ID (for contact endpoint)
phoneNumberStringYes*Phone number (for phone endpoint)
templateIdUUIDYesTemplate to use
messageBodyObjectNoTemplate variable values
webhookUrlStringNoURL for status updates

*One of contactId or phoneNumber is required depending on endpoint

Message Response

Message endpoints return 200 OK with a JSON response containing the message ID:

{
  "messageId": "8ba7b830-9dad-11d1-80b4-00c04fd430c8"
}

Pagination Model

Standard pagination structure used by list endpoints.

FieldTypeDescription
itemsArrayList of objects
totalCountIntegerTotal items available
pageIntegerCurrent page (0-based)
pageSizeIntegerItems per page
totalPagesIntegerTotal pages available

Channel Types

ChannelDescription
smsTraditional SMS messaging
whatsappWhatsApp Business messaging

Phone Number Formats

The API accepts various phone number formats and normalizes them:

FormatExampleDescription
E.164+1234567890International format (recommended)
International+1 234-567-890With formatting
National(234) 567-890Country-specific format
IDD Prefix0011234567890International dialing
Raw1234567890Digits only (requires context)

Webhook Payload

Status updates sent to the webhook URL when provided.

Webhook Status Values

StatusDescription
sentMessage accepted by provider
deliveredConfirmed delivery to device
readMessage read (WhatsApp only)
failedDelivery failed