Vai al contenuto

Send SMS message

Richiesta

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
Sicurezza
basicAuth
Corpoapplication/json

Send parameters

destinationstring^\+[1-9]\d{6,14}$obbligatorio

Destination phone number in E.164 international format.

Format: +[country code][number] (e.g., +393401234567)

Esempio:"+390000000000"
textstring, [ 1 .. 1600 ] charactersobbligatorio

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)

referenceobject(ReferenceService)

Tracking reference to correlate SMS with your business logic. If any field is specified, service is required.

detailedboolean

Return detailed response including provider name.

  • true: Response includes provider
  • false: Response without provider
Predefinito:false
businessRelationIdstring, <= 255 characters

Business Relation Identifier for One Platform integration.

Overrides default business relation settings.

webhookobject(ClientWebhookData)

Webhook configuration for delivery status notifications.

See Webhook Configuration for details.

attemptCountinteger, (int32)obsoleto

DEPRECATED: No longer used. Retry logic is handled automatically.

curl -i -X POST \
  -u '<username>:<password>' \
  https://sms.namirialtsp.com/api/Services/send \
  -H 'Content-Type: application/json' \
  -d '{
    "destination": "+390000000000",
    "text": "Your verification code is: 123456",
    "reference": {
      "service": "SPID",
      "action": "VERIFICATION",
      "key": "123123456456"
    },
    "businessRelationId": "123456789",
    "webhook": {
      "url": "https://example.com/webhook"
    },
    "detailed": false
  }'

Risposte

SMS accepted for delivery.

Corpoapplication/json
idstringobbligatorio

Unique message identifier (UUID). Use to query status via Message Status API.

messagestringobbligatorio

Status message. Format: <code>: <description>. Code 0 = accepted.

providerstring or null

SMS provider used (only when detailed=true).

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