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.
Field | Type | Description |
---|---|---|
id | UUID | Unique contact identifier |
phoneNumber | String | Phone number as originally provided |
formatE164 | String | E.164 international format |
formatInternational | String | Human-readable international format |
formatNational | String | National format for the country |
formatRfc | String | RFC 3966 tel: URI format |
countryCode | String | Country calling code |
regionCode | String | ISO 3166-1 alpha-2 country code |
availableChannels | String | Comma-separated available channels |
defaultChannel | String | Recommended messaging channel |
Contact List Response
Paginated response containing an array of contact objects.
Template Models
Template Object
Pre-approved message templates for WhatsApp and SMS messaging.
Field | Type | Description |
---|---|---|
id | UUID | Unique template identifier |
name | String | Human-readable template name |
category | String | Template category (see below) |
whatsappTemplateName | String | WhatsApp internal name |
whatsappTemplateStatus | String | WhatsApp approval status |
published | Boolean | Whether template is active |
Template Categories
Category | Description | Use Cases |
---|---|---|
AUTHENTICATION | OTP and verification | 2FA, login codes |
MARKETING | Promotional content | Campaigns, offers |
UTILITY | Transactional messages | Confirmations, updates |
Template Status Values
Status | Description |
---|---|
PENDING | Awaiting WhatsApp approval |
APPROVED | Ready for use |
REJECTED | Not approved by WhatsApp |
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.
Field | Type | Required | Description |
---|---|---|---|
contactId | UUID | Yes* | Contact ID (for contact endpoint) |
phoneNumber | String | Yes* | Phone number (for phone endpoint) |
templateId | UUID | Yes | Template to use |
messageBody | Object | No | Template variable values |
webhookUrl | String | No | URL for status updates |
*One of contactId or phoneNumber is required depending on endpoint
Message Response
Message endpoints return 204 No Content
on success or include a message ID in the response body.
Pagination Model
Standard pagination structure used by list endpoints.
Field | Type | Description |
---|---|---|
items | Array | List of objects |
totalCount | Integer | Total items available |
page | Integer | Current page (0-based) |
pageSize | Integer | Items per page |
totalPages | Integer | Total pages available |
Channel Types
Channel | Description |
---|---|
sms | Traditional SMS messaging |
whatsapp | WhatsApp Business messaging |
Phone Number Formats
The API accepts various phone number formats and normalizes them:
Format | Example | Description |
---|---|---|
E.164 | +1234567890 | International format (recommended) |
International | +1 234-567-890 | With formatting |
National | (234) 567-890 | Country-specific format |
IDD Prefix | 0011234567890 | International dialing |
Raw | 1234567890 | Digits only (requires context) |
Webhook Payload
Status updates sent to the webhook URL when provided.
Webhook Status Values
Status | Description |
---|---|
sent | Message accepted by provider |
delivered | Confirmed delivery to device |
read | Message read (WhatsApp only) |
failed | Delivery failed |