Skip to content
Last updated

Send SMS messages with administrative privileges. This endpoint allows additional parameters and account impersonation.

For the full technical reference, see the OpenAPI specification.

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

ParameterTypeRequiredDescription
destinationstringYesDestination phone number in E.164 format(e.g. +401234567889)
textstringYesMessage text to send
referenceobjectNoTracking reference to correlate the SMS with your business logic. (see Reference Attribute)
   servicestringNoService identifier (e.g. AUTHENTICATION, DIGITALSIGN)
   actionstringNoAction within the service (e.g. 2FA, PASSWORD_RESET)
   keystringNoCustom tracking key (e.g. user ID, order ID)
attemptCountintegerNoDeprecated. No longer required and has no effect.
detailedbooleanNoReturns detailed response including provider information (default: false)
accountstringNoAccount username to impersonate (send on behalf of another account)
lraintegerNoLocal Registration Authority (LRA) identifier
businessRelationIdstringNoBusiness Relation Identifier for One Platform. Overrides default business relation settings and tracks consumption for this BRI
webhookobjectNoInline webhook configuration. See webhook configuration

Request Example

{
  "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):

{
  "message": "0: Accepted for delivery",
  "provider": "PROVIDER1",
  "id": "7b8ef313-f1f2-4c4f-bffa-438c287ba9d8"
}

Error (500 Internal Server Error):

{
  "code": 8,
  "message": "Wrong number",
  "details" : null
}

Error Codes

CodeDescriptionSolution
8Wrong destination numberVerify number format and country code
56Invalid numberCheck number validity with carrier
59Invalid reference serviceUse valid service identifier
60Message blocked by anti-floodingReduce sending rate
61Message in watchlistThe 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.
64SMS provider not availableRetry or contact support
66Empty or missing message textEnsure the text field is not empty
74Message containing URL is deniedContact support to configure the account to send URLs

Authentication Errors

Authentication failures return HTTP 401 with error code 63.

CodeDescriptionSolution
63Missing basic authentication headerInclude Authorization: Basic base64(username:password) header
63Username or password not validVerify credentials are correct and account is active

Example response:

{
  "code": 63,
  "message": "Username or password not valid",
  "details": null
}

See Authentication for setup instructions.

Code Examples

cURL

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
  }'