SMS di Alta Qualità con mittente personalizzato, report di consegna in tempo reale e invio immediato
Integra via API un servizio globale di invio SMS professionali, ideale per autenticazione a due fattori (2FA), notifiche e alert, reminder di appuntamenti e comunicazioni critiche, garantendo sicurezza, rapidità e monitoraggio completo di ogni messaggio.
Tutte le informazioni di cui hai bisogno
Qui trovi qualche consiglio da prendere in considerazione per approcciare a questa API. Se preferisci forniamo esempi di codice, documentazione in OAS3, la possibilità di provare l'API dal vivo con la Swagger UI oppure importare l'intera collezione in Postman. Offriamo inoltre un ambiente di Sandbox dove puoi sperimentare tutte le API gratuitamente.
Prendi il token nell'apposita sezione prima di cominciare.
Invio Messaggi SMS
Invia SMS a livello mondiale (Worldwide)
POST /WW-messages
Crea e mette in coda un nuovo messaggio SMS per l'invio in tutto il mondo. Il costo viene calcolato dopo l'invio.
Invia SMS in Italia
POST /IT-messages
Crea e mette in coda un nuovo messaggio SMS specifico per l'Italia.
Invia SMS in Spagna
POST /ES-messages
Crea e mette in coda un nuovo messaggio SMS specifico per la Spagna.
Invia codice OTP di verifica
POST /otp
Genera e invia un codice OTP sicuro via SMS. Il messaggio viene tradotto automaticamente.
Consultazione Messaggi
Elenca messaggi inviati
GET /messages
Restituisce un elenco impaginato dei messaggi inviati dal tuo account.
Ottieni dettagli messaggio
GET /messages/{id}
Restituisce i dettagli di uno specifico messaggio tramite il suo ID.
- Oas file url smsv2.openapi.json
-
PDF Documentation
- Fork or import with Postman
- Production domain sms.openapi.com
- Sandbox domain test.sms.openapi.com
-
Production Scopes 5
Rate Limits: 10000 req/min
-
Sandbox Scopes 5
- GET test.sms.openapi.com/messages
- POST test.sms.openapi.com/ES-messages
- POST test.sms.openapi.com/IT-messages
- POST test.sms.openapi.com/WW-messages
- POST test.sms.openapi.com/otp
Gateway SMS (1.3.0)
L'API Gateway SMS di Openapi fornisce una soluzione robusta e scalabile per integrare la messaggistica SMS professionale nelle vostre applicazioni. Il nostro servizio è progettato per gestire con precisione elevati volumi di messaggi e offre endpoint dedicati per regioni specifiche come l'Italia e la Spagna, oltre a un endpoint mondiale per una portata globale.
Ogni richiesta viene sottoposta a un rigoroso processo di convalida che include il controllo della sintassi per i formati E.164, il rilevamento della codifica dei caratteri (GSM-7 o UCS-2) e la segmentazione automatica per i messaggi lunghi. Diamo priorità alla sicurezza e alla conformità: il sistema analizza automaticamente il contenuto alla ricerca di parole proibite per evitare abusi e garantisce che tutti i messaggi siano conformi ai requisiti legali.
Gli sviluppatori possono usufruire di funzioni avanzate come il "Dry Run" per i test senza costi e i callback Webhook in tempo reale che forniscono aggiornamenti immediati sullo stato di consegna. I messaggi hanno un tempo massimo di scadenza di 48 ore; se un messaggio non può essere consegnato entro questa finestra, il suo stato cambia in EXPIRED. La fatturazione è trasparente e dinamica; mentre i messaggi regionali hanno tariffe fisse, i costi di consegna in tutto il mondo sono calcolati dopo l'invio per garantire il miglior prezzo di mercato. Per le operazioni in tutto il mondo è necessario mantenere un saldo minimo di credito e, per garantire la massima qualità del servizio a tutti gli utenti, si applicano sanzioni severe in caso di violazione delle norme.
Inviare un nuovo messaggio SMS (in tutto il mondo)
Crea e mette in coda un nuovo messaggio SMS da inviare in tutto il mondo. Si noti che per questo endpoint il costo del messaggio viene calcolato e addebitato solo dopo l'invio del messaggio. Il prezzo finale varia a seconda dell'operatore del destinatario.
Se l'utente ha un piano di abbonamento attivo, le parti del messaggio saranno detratte dal bundle disponibile prima di addebitare l'eventuale saldo residuo dal wallet.
Per inviare un messaggio tramite questo endpoint, è necessario disporre di un credito minimo sul proprio conto pari a 1 euro moltiplicato per il numero di parti di messaggio (messageCount) nel caso in cui il bundle non sia disponibile o sia insufficiente.
IMPORTANTE: se il contenuto del messaggio o il mittente contengono parole proibite, il messaggio verrà bloccato, l'account verrà inserito nella lista di blocco e verrà addebitata una penale di 1 EUR per ogni parte del messaggio.
Authorizations:
Request Body schema: application/json
Dati del messaggio da inviare.
| sender | string or null [ 3 .. 11 ] characters Default: "Openapi" Il mittente del messaggio. Deve essere un alias alfanumerico (tra 3 e 11 caratteri, spazi consentiti) e non può essere puramente numerico. Se nullo o vuoto, 'Openapi' sarà usato come mittente predefinito. |
| recipient required | string Il numero del destinatario in formato internazionale E.164. |
| message required | string Il testo del messaggio da inviare. La segmentazione è gestita automaticamente. La codifica GSM-7 consente fino a 160 caratteri per parte (153 se multipart), mentre UCS-2 consente fino a 70 caratteri (67 se multipart). |
object (MessageOptions) | |
object (CallbackOptions) È il nostro sistema di callback OpenAPI standardizzato. Consente di configurare i parametri per ricevere notifiche sugli aggiornamenti di stato delle richieste asincrone a questo endpoint. |
Responses
Response Schema: application/json
object (MessageResponse) Oggetto che rappresenta un messaggio. |
Callbacks
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "sender": "MyCompany",
- "recipient": "+393331234567",
- "message": "Hello! This is a test message.",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
Response samples
- 201
- 403
- 422
- "data": {
- "id": "633aabe3e4a9a0e69811ad7f",
- "username": "string",
- "state": "NEW",
- "sender": "string",
- "recipient": "string",
- "internationalPrefix": "39",
- "countryCode": "IT",
- "message": "string",
- "encoding": "GSM-7",
- "charactersCount": 0,
- "messageCount": 0,
- "price": 0,
- "totalPrice": 0,
- "blocklisted": true,
- "blocklistedReason": "string",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-08-24T14:15:22Z",
- "deliveredAt": "2019-08-24T14:15:22Z"
Callback payload samples
- "id": "633aabe3e4a9a0e69811ad7f",
- "username": "string",
- "state": "NEW",
- "sender": "string",
- "recipient": "string",
- "internationalPrefix": "39",
- "countryCode": "IT",
- "message": "string",
- "encoding": "GSM-7",
- "charactersCount": 0,
- "messageCount": 0,
- "price": 0,
- "totalPrice": 0,
- "blocklisted": true,
- "blocklistedReason": "string",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-08-24T14:15:22Z",
- "deliveredAt": "2019-08-24T14:15:22Z"
Inviare un nuovo messaggio SMS (Italia)
Crea e mette in coda un nuovo messaggio SMS da inviare specificamente in Italia. Applica regole e prezzi specifici per il Paese.
IMPORTANTE: se il contenuto del messaggio o il mittente contengono parole proibite, il messaggio verrà bloccato, l'account verrà inserito nella lista di blocco e verrà addebitato il costo del messaggio.
Authorizations:
Request Body schema: application/json
Dati del messaggio da inviare.
| sender | string or null [ 3 .. 11 ] characters Default: "Openapi" Il mittente del messaggio. Deve essere un alias alfanumerico (tra 3 e 11 caratteri, spazi consentiti) e non può essere puramente numerico. Se nullo o vuoto, 'Openapi' sarà usato come mittente predefinito. |
| recipient required | string Il numero del destinatario in formato internazionale E.164. |
| message required | string Il testo del messaggio da inviare. La segmentazione è gestita automaticamente. La codifica GSM-7 consente fino a 160 caratteri per parte (153 se multipart), mentre UCS-2 consente fino a 70 caratteri (67 se multipart). |
object (MessageOptions) | |
object (CallbackOptions) È il nostro sistema di callback OpenAPI standardizzato. Consente di configurare i parametri per ricevere notifiche sugli aggiornamenti di stato delle richieste asincrone a questo endpoint. |
Responses
Response Schema: application/json
object (MessageResponse) Oggetto che rappresenta un messaggio. |
Callbacks
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "sender": "MyCompany",
- "recipient": "+393331234567",
- "message": "Hello! This is a test message.",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
Response samples
- 201
- 403
- 422
- "data": {
- "id": "633aabe3e4a9a0e69811ad7f",
- "username": "string",
- "state": "NEW",
- "sender": "string",
- "recipient": "string",
- "internationalPrefix": "39",
- "countryCode": "IT",
- "message": "string",
- "encoding": "GSM-7",
- "charactersCount": 0,
- "messageCount": 0,
- "price": 0,
- "totalPrice": 0,
- "blocklisted": true,
- "blocklistedReason": "string",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-08-24T14:15:22Z",
- "deliveredAt": "2019-08-24T14:15:22Z"
Callback payload samples
- "id": "633aabe3e4a9a0e69811ad7f",
- "username": "string",
- "state": "NEW",
- "sender": "string",
- "recipient": "string",
- "internationalPrefix": "39",
- "countryCode": "IT",
- "message": "string",
- "encoding": "GSM-7",
- "charactersCount": 0,
- "messageCount": 0,
- "price": 0,
- "totalPrice": 0,
- "blocklisted": true,
- "blocklistedReason": "string",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-08-24T14:15:22Z",
- "deliveredAt": "2019-08-24T14:15:22Z"
Inviare un nuovo messaggio SMS (Spagna)
Crea e mette in coda un nuovo messaggio SMS da inviare specificamente in Spagna. Applica regole e prezzi specifici per il Paese.
IMPORTANTE: se il contenuto del messaggio o il mittente contengono parole proibite, il messaggio verrà bloccato, l'account verrà inserito nella lista di blocco e verrà addebitato il costo del messaggio.
Authorizations:
Request Body schema: application/json
Dati del messaggio da inviare.
| sender | string or null [ 3 .. 11 ] characters Default: "Openapi" Il mittente del messaggio. Deve essere un alias alfanumerico (tra 3 e 11 caratteri, spazi consentiti) e non può essere puramente numerico. Se nullo o vuoto, 'Openapi' sarà usato come mittente predefinito. |
| recipient required | string Il numero del destinatario in formato internazionale E.164. |
| message required | string Il testo del messaggio da inviare. La segmentazione è gestita automaticamente. La codifica GSM-7 consente fino a 160 caratteri per parte (153 se multipart), mentre UCS-2 consente fino a 70 caratteri (67 se multipart). |
object (MessageOptions) | |
object (CallbackOptions) È il nostro sistema di callback OpenAPI standardizzato. Consente di configurare i parametri per ricevere notifiche sugli aggiornamenti di stato delle richieste asincrone a questo endpoint. |
Responses
Response Schema: application/json
object (MessageResponse) Oggetto che rappresenta un messaggio. |
Callbacks
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "sender": "MyCompany",
- "recipient": "+393331234567",
- "message": "Hello! This is a test message.",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
Response samples
- 201
- 403
- 422
- "data": {
- "id": "633aabe3e4a9a0e69811ad7f",
- "username": "string",
- "state": "NEW",
- "sender": "string",
- "recipient": "string",
- "internationalPrefix": "39",
- "countryCode": "IT",
- "message": "string",
- "encoding": "GSM-7",
- "charactersCount": 0,
- "messageCount": 0,
- "price": 0,
- "totalPrice": 0,
- "blocklisted": true,
- "blocklistedReason": "string",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-08-24T14:15:22Z",
- "deliveredAt": "2019-08-24T14:15:22Z"
Callback payload samples
- "id": "633aabe3e4a9a0e69811ad7f",
- "username": "string",
- "state": "NEW",
- "sender": "string",
- "recipient": "string",
- "internationalPrefix": "39",
- "countryCode": "IT",
- "message": "string",
- "encoding": "GSM-7",
- "charactersCount": 0,
- "messageCount": 0,
- "price": 0,
- "totalPrice": 0,
- "blocklisted": true,
- "blocklistedReason": "string",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-08-24T14:15:22Z",
- "deliveredAt": "2019-08-24T14:15:22Z"
Inviare un messaggio di verifica OTP
Genera un codice OTP sicuro e lo invia via SMS al destinatario utilizzando 'OTP MOBILE' come mittente predefinito. Il corpo del messaggio viene tradotto automaticamente in base al Paese del destinatario. I prezzi seguono il modello Worldwide (WW).
Authorizations:
Request Body schema: application/json
Dati per il messaggio OTP.
| recipient required | string Il numero del destinatario in formato internazionale E.164. |
| alphanumeric | boolean Default: false Se impostato su "true", l'OTP generato sarà alfanumerico. Se impostato su 'false' (valore predefinito), sarà puramente numerico. |
| length | integer [ 4 .. 10 ] Default: 5 La lunghezza del codice OTP (min 4, max 10). |
| cacheSeconds | integer [ 0 .. 600 ] Default: 0 Numero di secondi entro i quali lo stesso codice OTP sarà riutilizzato per lo stesso destinatario (max 600). |
object (MessageOptions) | |
object (CallbackOptions) È il nostro sistema di callback OpenAPI standardizzato. Consente di configurare i parametri per ricevere notifiche sugli aggiornamenti di stato delle richieste asincrone a questo endpoint. |
Responses
Response Schema: application/json
object (OTPMessageResponse) Oggetto che rappresenta un messaggio. |
Callbacks
Request samples
- Payload
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
- "recipient": "+393331234567",
- "alphanumeric": false,
- "length": 5,
- "cacheSeconds": 0,
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
Response samples
- 201
- 403
- 422
- "data": {
- "id": "633aabe3e4a9a0e69811ad7f",
- "username": "string",
- "state": "NEW",
- "sender": "string",
- "recipient": "string",
- "internationalPrefix": "39",
- "countryCode": "IT",
- "message": "string",
- "encoding": "GSM-7",
- "charactersCount": 0,
- "messageCount": 0,
- "price": 0,
- "totalPrice": 0,
- "blocklisted": true,
- "blocklistedReason": "string",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-08-24T14:15:22Z",
- "deliveredAt": "2019-08-24T14:15:22Z",
- "isOtp": true,
- "otp": "5F8A2",
- "otpOptions": {
- "length": 5,
- "alphanumeric": false,
- "cacheSeconds": 300
Callback payload samples
- "id": "633aabe3e4a9a0e69811ad7f",
- "username": "string",
- "state": "NEW",
- "sender": "string",
- "recipient": "string",
- "internationalPrefix": "39",
- "countryCode": "IT",
- "message": "string",
- "encoding": "GSM-7",
- "charactersCount": 0,
- "messageCount": 0,
- "price": 0,
- "totalPrice": 0,
- "blocklisted": true,
- "blocklistedReason": "string",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-08-24T14:15:22Z",
- "deliveredAt": "2019-08-24T14:15:22Z",
- "isOtp": true,
- "otp": "5F8A2",
- "otpOptions": {
- "length": 5,
- "alphanumeric": false,
- "cacheSeconds": 300
Recuperare l'elenco dei messaggi inviati
Restituisce un elenco impaginato dei messaggi inviati dall'account.
Authorizations:
query Parameters
| skip | integer Default: 0 Numero di messaggi da saltare per la paginazione. |
| limit | integer Default: 100 Numero massimo di messaggi da restituire. |
Responses
Response Schema: application/json
Array of objects (MessageResponse) |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://sms.openapi.com/messages?skip=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": [
- {
- "id": "633aabe3e4a9a0e69811ad7f",
- "username": "string",
- "state": "NEW",
- "sender": "string",
- "recipient": "string",
- "internationalPrefix": "39",
- "countryCode": "IT",
- "message": "string",
- "encoding": "GSM-7",
- "charactersCount": 0,
- "messageCount": 0,
- "price": 0,
- "totalPrice": 0,
- "blocklisted": true,
- "blocklistedReason": "string",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-08-24T14:15:22Z",
- "deliveredAt": "2019-08-24T14:15:22Z"
Recuperare un singolo messaggio
Restituisce i dettagli di un messaggio specifico tramite il suo ID.
Authorizations:
path Parameters
| id required | string L'ID univoco del messaggio da recuperare. |
Responses
Response Schema: application/json
object (MessageResponse) Oggetto che rappresenta un messaggio. |
Request samples
- C + Libcurl
- Csharp + Restsharp
- Go + Native
- Java + Okhttp
- Java + Unirest
- Javascript + Jquery
- Javascript + Xhr
- Node + Native
- Node + Request
- Node + Unirest
- Objc + Nsurlsession
- Ocaml + Cohttp
- Php + Curl
- Php + Http1
- Php + Http2
- Python + Python3
- Python + Requests
- Ruby + Native
- Shell + Curl
- Shell + Httpie
- Shell + Wget
- Swift + Nsurlsession
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://sms.openapi.com/messages/%7Bid%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Bearer REPLACE_BEARER_TOKEN"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
Response samples
- 200
- "data": {
- "id": "633aabe3e4a9a0e69811ad7f",
- "username": "string",
- "state": "NEW",
- "sender": "string",
- "recipient": "string",
- "internationalPrefix": "39",
- "countryCode": "IT",
- "message": "string",
- "encoding": "GSM-7",
- "charactersCount": 0,
- "messageCount": 0,
- "price": 0,
- "totalPrice": 0,
- "blocklisted": true,
- "blocklistedReason": "string",
- "options": {
- "dryRun": false,
- "failOnMultipleMessages": false
- "callback": {
- "method": "POST",
- "field": "data",
- "retry": 3,
- "headers": {
- "session_id": "9834r5fh589494"
- "custom": {
- "my_custom_id": "123456789"
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-08-24T14:15:22Z",
- "deliveredAt": "2019-08-24T14:15:22Z"