1.1.0
OAS 3.0.0

Sent.dm Core API

Sent.dm is a unified messaging API that enables developers to seamlessly send messages across multiple channels including SMS and WhatsApp. It provides programmatic management of customer accounts, messaging capabilities with intelligent routing, message delivery, and template management. The API supports creating, updating, and managing customer profiles, sending messages using templates, retrieving contact information, and handling templates across different messaging channels.

Client Libraries

Contact

Lookup phone numbers and manage contacts with the Sent API

Retrieve a contact by ID

Fetches detailed contact information including available messaging channels and verification status. Use this endpoint when you need to look up a specific contact using their unique identifier.

Path Parameters
  • customerId
    string uuid
    required

    Unique identifier of the customer account

  • id
    string uuid
    required

    Unique identifier of the contact

Responses
  • 401

    Authentication credentials are missing or invalid

  • 404

    Contact not found

GET/contact/{customerId}/id/{id}
curl https://api.sent.dm/contact//id/
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "phoneNumber": "+1234567890",
  "countryCode": "US",
  "nationalFormat": "(123) 456-7890",
  "availableChannels": "SMS,WHATSAPP",
  "defaultChannel": "WHATSAPP",
  "verified": true,
  "createdAt": "2023-01-01T12:00:00Z",
  "updatedAt": "2023-01-01T12:00:00Z"
}

Retrieve a contact by phone number

Looks up contact information using a phone number. This endpoint is useful when you need to find a contact's details but only have their phone number. It returns the same detailed information as the ID-based lookup.

Path Parameters
  • customerId
    string uuid
    required

    Unique identifier of the customer account

  • phoneNumber
    string
    required

    Phone number in E.164 format (e.g., +1234567890)

Responses
  • 401

    Authentication credentials are missing or invalid

  • 404

    Contact not found

GET/contact/{customerId}/phone/{phoneNumber}
curl https://api.sent.dm/contact//phone/
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "phoneNumber": "+1234567890",
  "countryCode": "US",
  "nationalFormat": "(123) 456-7890",
  "availableChannels": "SMS,WHATSAPP",
  "defaultChannel": "WHATSAPP",
  "verified": true,
  "createdAt": "2023-01-01T12:00:00Z",
  "updatedAt": "2023-01-01T12:00:00Z"
}

Customers

Create, update, and manage customer accounts with the Sent API

Create a new customer account

Creates a new customer account in the Sent platform. This endpoint initializes a new customer profile with basic information and returns the created customer details including generated IDs and credentials for various messaging channels.

Body
application/json

Customer name to create the account

string
Responses
  • 401

    Authentication credentials are missing or invalid

POST/customers

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Acme Corp",
  "sendingPhoneNumber": "+1234567890",
  "smsMessagingProfileId": "msg_prof_123",
  "smsBearerToken": "sms_token_xyz",
  "createdAt": "2023-01-01T12:00:00Z",
  "updatedAt": "2023-01-01T12:00:00Z"
}

Messages

Send and manage messages across multiple channels with the Sent API

Send a message to a contact using a template

Sends a templated message to a specific contact. The platform automatically determines the optimal channel (SMS or WhatsApp) based on the contact's preferences and availability. Messages are sent using pre-defined templates to ensure consistent formatting and compliance across channels.

Body
application/json

Message details including customer ID, contact ID, and template ID

Request model for sending a message to a contact using a template

customerId
string uuid
required

Unique identifier of the customer

contactId
string uuid
required

Unique identifier of the contact

templateId
string uuid
required

Unique identifier of the message template

Responses
  • 401

    Unauthorized - Invalid or missing API key

  • 404

    Contact, template, or customer not found

POST/messages
curl https://api.sent.dm/messages \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "customerId": "550e8400-e29b-41d4-a716-446655440000",
  "contactId": "7c11e821-c839-4c3d-8a89-1f78b71a0c38",
  "templateId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"
}'
{
  "messageId": "123e4567-e89b-12d3-a456-426614174000",
  "status": "queued",
  "channel": "whatsapp"
}

SMS

Retrieve and manage SMS contact information and capabilities with the Sent API

SMS Endpoints

Retrieve SMS contact information and capabilities

Fetches or creates SMS contact information for a given phone number. This endpoint validates the phone number, determines SMS capabilities, and returns detailed formatting information needed for message delivery. Use this before sending messages to ensure proper SMS channel availability.

Query Parameters
  • phoneNumber
    string
    required

    Target phone number in E.164 format (e.g., +1234567890)

  • retrieveIfDoesNotExists
    boolean
    required

    When true, creates a new SMS contact if one doesn't exist

  • sentId
    string | nullableuuid

    Optional Sent platform identifier for existing contacts

Responses
  • 401

    Unauthorized - Invalid or missing API key

GET/sms
curl 'https://api.sent.dm/sms?phoneNumber=%2B14155552671'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "sentId": "123e4567-e89b-12d3-a456-426614174111",
  "phoneNumber": "+14155552671",
  "countryCode": "US",
  "validNumber": true,
  "nationalFormat": "(415) 555-2671",
  "payload": "{\"carrier\":\"Verizon\",\"type\":\"mobile\"}",
  "createdAt": "2023-01-01T12:00:00Z",
  "updatedAt": "2023-01-01T12:00:00Z"
}

Templates

Create and manage message templates with the Sent API

Templates Endpoints

Create a new message template

Creates a new message template that can be used for sending standardized messages across different channels. Templates ensure consistent messaging and support variable substitution.

Body
application/json

Template creation details including customer ID and template name

Request model for creating a new message template

customerId
string uuid
required

Unique identifier of the customer creating the template

name
string
min: 
1
max: 
100
required

Name of the template for identification purposes

Responses
POST/templates
curl https://api.sent.dm/templates \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "customerId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Order Confirmation"
}'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "customerId": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Order Confirmation",
  "category": "transactional",
  "rawBody": "Your order #{{orderId}} has been confirmed.",
  "whatsappTemplateName": "order_confirmation",
  "whatsappTemplateStatus": "approved",
  "createdAt": "2023-01-01T12:00:00Z",
  "updatedAt": "2023-01-01T12:00:00Z"
}

Whatsapp

Retrieve and manage WhatsApp contact information and capabilities with the Sent API

Whatsapp Endpoints

Retrieve WhatsApp contact information

Fetches or creates WhatsApp contact information for a given phone number. This endpoint validates WhatsApp availability and returns detailed contact metadata including business account status and profile information.

Query Parameters
  • phoneNumber
    string
    required

    Phone number in international format (E.164)

    Example+14155552671
  • retrieveIfDoesNotExists
    boolean
    default: 
    false
    required

    Whether to create a new contact if one doesn't exist

  • sentId
    string | nullableuuid

    Optional Sent platform identifier for tracking

Responses
  • 401

    Unauthorized - Invalid or missing API key

  • 404

    WhatsApp contact not found and creation not requested

GET/whatsapp
curl 'https://api.sent.dm/whatsapp?phoneNumber=%2B14155552671&retrieveIfDoesNotExists=false'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "sentId": "123e4567-e89b-12d3-a456-426614174111",
  "phoneNumber": "+14155552671",
  "whatsappId": "14155552671",
  "countryCode": "US",
  "numberType": "MOBILE",
  "profilePicture": "https://profile.whatsapp.com/photo.jpg",
  "isBusiness": false,
  "invalidRecord": false,
  "createdAt": "2023-01-01T12:00:00Z",
  "updatedAt": "2023-01-01T12:00:00Z"
}

Models