# Send SMS (Admin) Send SMS messages with administrative privileges. This endpoint allows additional parameters and account impersonation. **For the full technical reference, see the [OpenAPI specification](/products/sms/openapi/smsadmin/adminsendsms)**. #### Endpoint * **URL**: `/api/Admin/send` * **Method**: `POST` #### Headers Ensure you include the following headers in your request: * `Accept: application/json` * `Content-Type: application/json` * `Authorization: Basic base64(username:password)` #### Body parameters | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `destination` | string | Yes | Destination phone number in E.164 format(e.g. +401234567889) | | `text` | string | Yes | Message text to send | | `reference` | object | No | Tracking reference to correlate the SMS with your business logic. (see [Reference Attribute](/products/sms/enterprise-documentation/developer-documentation/integration-guide/attribute-reference)) | |    `service` | string | No | Service identifier (e.g. `AUTHENTICATION`, `DIGITALSIGN`) | |    `action` | string | No | Action within the service (e.g. `2FA`, `PASSWORD_RESET`) | |    `key` | string | No | Custom tracking key (e.g. user ID, order ID) | | `attemptCount` | integer | No | Deprecated. No longer required and has no effect. | | `detailed` | boolean | No | Returns detailed response including provider information (default: `false`) | | `account` | string | No | Account username to impersonate (send on behalf of another account) | | `lra` | integer | No | Local Registration Authority (LRA) identifier | | `businessRelationId` | string | No | Business Relation Identifier for One Platform. Overrides default business relation settings and tracks consumption for this BRI | | `webhook` | object | No | Inline webhook configuration. See [webhook configuration](/products/sms/enterprise-documentation/developer-documentation/wb/wb-configuration) | #### Request Example ```json { "destination": "+1234567890", "text": "Administrative message", "reference": { "service": "ADMIN", "action": "NOTIFICATION", "key": "admin-task-123" }, "account": "admin-account", "lra": 1234, "businessRelationId": "BR-001", "detailed": true } ``` #### Response Examples **Success (200 OK):** ```json { "message": "0: Accepted for delivery", "provider": "PROVIDER1", "id": "7b8ef313-f1f2-4c4f-bffa-438c287ba9d8" } ``` **Error (500 Internal Server Error):** ```json { "code": 8, "message": "Wrong number", "details" : null } ``` #### Error Codes | Code | Description | Solution | | --- | --- | --- | | 8 | Wrong destination number | Verify number format and country code | | 56 | Invalid number | Check number validity with carrier | | 59 | Invalid reference service | Use valid service identifier | | 60 | Message blocked by anti-flooding | Reduce sending rate | | 61 | Message in watchlist | The destination number is blocked by watchlist rules. It is not possible to send SMS to this number. If you believe this is an error, contact Namirial support. | | 64 | SMS provider not available | Retry or contact support | | 66 | Empty or missing message text | Ensure the `text` field is not empty | | 74 | Message containing URL is denied | Contact support to configure the account to send URLs | #### Authentication Errors Authentication failures return HTTP 401 with error code 63. | Code | Description | Solution | | --- | --- | --- | | 63 | Missing basic authentication header | Include `Authorization: Basic base64(username:password)` header | | 63 | Username or password not valid | Verify credentials are correct and account is active | **Example response**: ```json { "code": 63, "message": "Username or password not valid", "details": null } ``` See [Authentication](/products/sms/enterprise-documentation/developer-documentation/authentication) for setup instructions. #### Code Examples #### cURL ```bash curl -X POST https://sms.namirialtsp.com/api/Admin/send \ -u username:password \ -H "Content-Type: application/json" \ -d '{ "destination": "+1234567890", "text": "Admin notification", "account": "customer-account", "detailed": true }' ```