endpoint

Send SMS to an endpoint

<Info icon="fa-light fa-lock" className="permission-callout"> <div className="permission-callout__header"><span className="permission-callout__title"><span className="permission-callout__label">Required permissions</span> <span className="fern-docs-badge small blue subtle rounded-full permission-callout__beta">Beta</span></span> <span className="permission-callout__learn-more">[Learn more](/developers/api-guidelines/permissions#how-permissions-work)</span></div>

Endpoint.Sms + Create

<div className="permission-callout__roles"><span className="permission-callout__roles-label">Roles:</span> <Badge intent="info">Administrator</Badge> <Badge intent="info">User</Badge></div> </Info>

Sends a mobile terminating SMS (MT-SMS) to a connected device. The device must have an active SIM with SMS capability enabled in its service profile.

Use cases

Standard SMS

Send an SMS with a numeric sender ID. Set source_address to the sender's phone number (for example, 12345689) and include your message in payload.

Alphanumeric sender ID

Display a custom sender name instead of a phone number. Set source_address to your brand name (for example, CompanyName, up to 11 characters) and include source_address_type with id: 208.

<Info> Alphanumeric sender IDs are one-way only. Recipients can't reply directly to these messages. </Info>

Person-to-Application (P2A) SMS

Receive SMS responses at your server. Set dest_address with a callback identifier. The platform forwards incoming messages to the API callback URL configured in your service profile.

Concatenated SMS

Send messages longer than 160 characters by splitting them across multiple API calls. Each call requires a udh (User Data Header) that identifies the message sequence.

The UDH format 050003XXYYZZ contains:

  • XX: Unique message reference (for example, CC)
  • YY: Total number of parts (for example, 02 for 2 parts)
  • ZZ: Current part number (for example, 01 for part 1)

For more information, see the 3GPP TS 23.040 specification.

post/api/v1/endpoint/{endpoint_id}/sms

Request

  • Base URL: https://cdn.emnify.net
  • URL: https://cdn.emnify.net/api/v1/endpoint/{endpoint_id}/sms
  • Auth: HTTP bearer

Path parameters

endpoint_idinteger required

Numeric ID of an endpoint

Request body

payloadstring required

The SMS message content. Must be UTF-8 encoded. Maximum 160 characters for a single SMS, or use udh for longer messages.

source_addressstring

The sender identifier displayed on the recipient's device. Can be an MSISDN (phone number), short code, or alphanumeric string. Alphanumeric strings are limited to 11 characters per GSM specifications.

dest_addressstring

The callback identifier for Person-to-Application (P2A) SMS. When set, incoming SMS responses are forwarded to the API callback URL configured in your service profile.

udhstring

User Data Header for concatenated SMS. Encoded as a hexadecimal string following 3GPP TS 23.040. For example, 050003CC0201 indicates message 1 of 2 in sequence CC.

dcsinteger

Data Coding Scheme per 3GPP TS 23.038. Controls character encoding (for example, 0 for GSM 7-bit default alphabet, 8 for UCS2/UTF-16).

expiry_datestring date-time

The deadline for delivery attempts. If the SMS can't be delivered by this time, it's discarded. ISO 8601 format.

Response

Resource Created

EndpointEndpointSmsByIdPostResponse201 required

Empty response body

Changes

No recorded changes to this operation across all 1 revision of this API.