# Send SMS message

Send an SMS message to a destination phone number using your account credentials.
**Use case**: Standard SMS sending for your applications (2FA, notifications, alerts).
**Delivery**: Messages are queued and sent asynchronously. Use webhooks or Message Status API to track delivery.
**Character limits**:
- GSM-7 encoding: 160 chars
- UCS-2 encoding: 70 chars

Endpoint: POST /api/Services/send
Version: 27.3.1.6
Security: basicAuth

## Security:

  - `basicAuth` (unknown)
    http basic

## Request body:

  - `application/json` (unknown)
    Send parameters

## Request fields (application/json):

  - `destination` (string, required)
    Destination phone number in E.164 international format.
**Format**: `+[country code][number]` (e.g., `+393401234567`)
    Example: +390000000000

  - `text` (string, required)
    Message text to send.
**Character limits**:
- GSM-7: 160 chars (single), 153 chars (multi-part)
- UCS-2: 70 chars (single), 67 chars (multi-part)

**Encoding**: Automatically detected
**Special characters**: Emojis trigger UCS-2 (higher cost)

  - `reference` (object)
    Tracking reference to correlate SMS with your business logic. If any field is specified, `service` is required.

  - `reference.service` (string)
    Service identifier (e.g., MY_SERVICE). Required if `action` or `key` are specified. Must match one of the predefined allowed values — see [Reference Attribute](https://docs.namirial.app/products/sms/enterprise-documentation/developer-documentation/integration-guide/attribute-reference).

  - `reference.action` (string)
    Action within the service (e.g., 2FA, PASSWORD_RESET)

  - `reference.key` (string)
    Custom tracking key (e.g., user ID, order ID)

  - `attemptCount` (integer)
    **DEPRECATED**: No longer used. Retry logic is handled automatically.

  - `detailed` (boolean)
    Return detailed response including provider name.
- `true`: Response includes `provider`
- `false`: Response without `provider`

  - `businessRelationId` (string)
    Business Relation Identifier for One Platform integration.

Overrides default business relation settings.

  - `webhook` (object)
    Webhook configuration for delivery status notifications.
See [Webhook Configuration](https://docs.namirial.app/products/sms/enterprise-documentation/developer-documentation/wb/wb-configuration) for details.

  - `webhook.url` (string)
    Webhook endpoint URL (must be HTTPS)

  - `webhook.authentication` (object)
    Authentication for webhook requests

  - `webhook.authentication.type` (string)
    Authentication type
    Enum: "NONE", "JWS"

  - `webhook.authentication.value` (string)

## Response 200:

  - `200` (unknown)
    SMS accepted for delivery.

## Response 200 fields (application/json):

  - `id` (string, required)
    Unique message identifier (UUID). Use to query status via Message Status API.

  - `message` (string, required)
    Status message. Format: `<code>: <description>`. Code 0 = accepted.

  - `provider` (string)
    SMS provider used (only when detailed=true).

## Response 401:

  - `401` (unknown)
    Authentication failed.

## Response 401 fields (application/json):

  - `code` (integer, required)
    Machine-readable error code.
See [Error Codes](https://docs.namirial.app/products/sms/enterprise-documentation/developer-documentation/integration-guide/error-codes) for complete list.
    Enum: "8", "56", "59", "60", "61", "63", "64", "66", "74", "76"

  - `message` (string, required)
    Human-readable error message

  - `details` (array)
    Additional error details or troubleshooting hints

## Response 500:

  - `500` (unknown)
    Application error. Invalid parameter values may result in HTTP 500.

## Response 500 fields (application/json):

  - `code` (integer, required)
    Machine-readable error code.
See [Error Codes](https://docs.namirial.app/products/sms/enterprise-documentation/developer-documentation/integration-guide/error-codes) for complete list.
    Enum: "8", "56", "59", "60", "61", "63", "64", "66", "74", "76"

  - `message` (string, required)
    Human-readable error message

  - `details` (array)
    Additional error details or troubleshooting hints

## Response 200 examples:

  - `SMS accepted (detailed=false)` (unknown)

  - `SMS accepted (detailed=true)` (unknown)

## Response 401 examples:

  - `MISSING` (unknown)

  - `NOT_VALID` (unknown)

## Response 500 examples:

  - `WRONG_NUMBER` (unknown)

  - `EMPTY_TEXT` (unknown)

  - `MAX_LENGTH` (unknown)

