la documentazione qui presentata descrive tuttee le principali funzionalità e le istruzioni per gestire le rubriche e l'invio di messaggi multipli o singoli dai siti messaggisms (invio di SMS a numeri italiani +39) e textmessage pro (invio di SMS a numeri inglesi +44).
Dopo essersi iscritti ad uno dei siti è possibile recuperare i dati di autenticazione da Impostazioni > Api e Developers
Term of services messaggisms
Term of services textmessage.pro
Restituisce dati relativi all'utente
| success | boolean |
| code | number |
object |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://software.messaggisms.com/api//user_status"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
"{\n success: true,\n code: 200,\n data: [\n \"credit\": \"8\",\n \"history\": [\n {\n \"date\": \"2019-04-12 09:57:03\",\n \"payment_type\": null,\n \"user_generated\": true,\n \"currency\": null,\n \"price\": null,\n \"formatted_price\": null,\n \"operation\": \"First registration\",\n \"description\": \"First subscription to TextMessage by the user\"\n },\n ]\n ]\n}"Restituisce la lista dei mittenti registrati
| success | boolean |
| code | number |
Array of objects[ items ] |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://software.messaggisms.com/api//senders"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
"{\n success: true,\n code: 200,\n data: [\n {\n \"id_sender\": \"123456\",\n \"phone_number\": \"333123456789\",\n \"name\": \"ALTRAVIA\"\n }\n ]\n}"CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://software.messaggisms.com/api//api_version"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
"{\n success: true,\n code: 200,\n data: [\n {\n \"version\": \"1.0\"\n }\n ]\n}"Aggiunge un nuovo numero in rubrica
| addressbooks | Array of strings 2 items Lista delle rubriche dove aggiungere il contatto |
| disable_update | boolean Default: "<boolean>" Se passato a true non aggiorna eventuali dati duplicati |
| create_addressbook_if_not_exist | boolean Default: "<boolean>" se passato a true aggiunge una rubrica nel caso in cui la rubrica non sia esistente |
object |
| success | boolean |
| code | number |
object |
{- "addressbooks": [
- "<string>",
- "<string>"
], - "disable_update": "<boolean>",
- "create_addressbook_if_not_exist": "<boolean>",
- "contact_data": {
- "name": "<string>",
- "last_name": "<string>",
- "email": "<string>",
- "phone": "<string>",
- "birthday_date": "<string>",
- "sex": "M",
- "company_name": "<string>",
- "address": "<string>",
- "zip_code": "<string>",
- "region": "<string>",
- "custom_field1": "<string>",
- "custom_field2": "<string>",
- "custom_field3": "<string>",
- "custom_field4": "<string>"
}
}"{\n \"success\": true,\n \"code\": 200,\n \"data\": {\n \"created_contact\": 1,\n \"updated_contact\": 0\n }\n}"Restituisce i dettagli di un contatto a partire dal numero di telefono
| phone required | string Default: "<string>" Il numero di telefono |
| success | boolean |
| code | number |
object (ContactDetail) |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://software.messaggisms.com/api//contact/%7Bphone%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
"{\n \"success\": true,\n \"data\": {\n \"name\": \"Giuseppe\",\n \"last_name\": \"Rossio\",\n \"email\": \"\",\n \"phone\": \"3923456789\",\n \"birthday_date\": \"\",\n \"sex\": null,\n \"company_name\": \"\",\n \"address\": \"\",\n \"zip_code\": \"\",\n \"city\": \"\",\n \"region\": \"\",\n \"custom_field1\": \"\",\n \"custom_field2\": \"\",\n \"custom_field3\": \"\",\n \"custom_field4\": \"\",\n \"last_reading_date\": null,\n \"last_iteration_date\": null,\n \"last_click_date\": null,\n \"addressbooks\": [\n \"Default\",\n \"test\",\n \"rubrica prova lista\"\n ]\n },\n \"code\": 200\n}"Elimina un contatto a partire dal numero di telefono
| phone required | string Default: "<string>" Il numero di telefono |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_easy_setopt(hnd, CURLOPT_URL, "https://software.messaggisms.com/api//contact/%7Bphone%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
"{\n \"success\": true,\n \"code\": 200\n}"Restituisce la lista delle rubriche
| success | boolean |
| code | number |
Array of objects[ items ] |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://software.messaggisms.com/api//addressBook"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
"{\n success: true,\n code: 200,\n data: [\n {\n \"name\": \"Default\",\n \"note\": \"\",\n \"last_send_data\": null\n },\n {\n \"name\": \"test\",\n \"note\": \"\",\n \"last_send_data\": \"2019-10-16 17:52:22\"\n }\n ]\n}"Tramite questa funzione è possibile aggiungere una nuova rubrica
| name | string Default: "<string>" Il nome della rubrica |
| note | string Default: "<string>" Le note associate alla rubrica |
{- "name": "<string>",
- "note": "<string>"
}"{\n \"success\": true,\n \"code\": 200\n}"Restituisce i dettagli (compresi i contatti) di una rubrica
| adressBookName required | string Default: "<string>" Il nome dell arubrica da recuperare |
| name | string il nome della rubrica |
| last_send_data | string data dell'ultimo invio della rubrica |
| note | string note associate alla rubrica |
| contacts_number | number numero di contatti presenti nella rubrica |
Array of objects (ContactDetail) [ items ] |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://software.messaggisms.com/api//addressBook/%7BadressBookName%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
"{\n success: true,\n code: 200,\n data: [\n \"name\": \"test\",\n \"last_send_data\": \"2019-10-16 17:52:22\",\n \"note\": \"\",\n \"contacts_number\": 1,\n \"contacts\": [\n {\n \"name\": \"Paolo\",\n \"last_name\": \"Bernardini\",\n \"email\": \"\",\n \"phone\": \"3927091047\",\n \"birthday_date\": \"\",\n \"sex\": null,\n \"company_name\": \"\",\n \"address\": \"\",\n \"zip_code\": \"\",\n \"city\": \"\",\n \"region\": \"\",\n \"custom_field1\": \"\",\n \"custom_field2\": \"\",\n \"custom_field3\": \"\",\n \"custom_field4\": \"\",\n \"last_reading_date\": null,\n \"last_iteration_date\": null,\n \"last_click_date\": null,\n \"addressbooks\": [\n \"Default\",\n \"test\",\n \"rubrica prova lista\"\n ]\n }\n ]\n ]\n}"Restituisce la lista delle campagne
| success | boolean |
| code | number |
Array of objects[ items ] |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://software.messaggisms.com/api//campaign"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
"{\n \"success\": true,\n \"code\": 200,\n \"data\": [\n {\n \"name\": \"test\",\n \"state\": \"sent\",\n \"code\": \"d036c7d24b1\",\n \"send_dates\": [\n \"2019-04-12 10:52:00\"\n ]\n },\n {\n \"name\": \"prova\",\n \"state\": \"sent\",\n \"code\": \"af9fa777dd333\",\n \"send_dates\": [\n \"2019-09-05 09:28:00\"\n ]\n }\n ]\n}"Aggiunge una nuova campagna
| id_sender | number Default: "<number>" Uno tra id_sender e sender_name è obbligatorio |
| sender_name | string Default: "<string>" Uno tra id_sender e sender_name è obbligatorio |
| name | string Default: "<string>" il nome della campagna |
| message | string Default: "<string>" Il testo della campagna |
| send_date | Array of strings 2 items Lista delle date in cui inviare la campagna |
| state | string Default: "<string>" Enum: "draft" "sent" Lo stato della campagna |
| address_books | Array of strings 2 items lista delle rubriche a cui inviare |
{- "id_sender": "<number>",
- "sender_name": "<string>",
- "name": "<string>",
- "message": "<string>",
- "send_date": [
- "<string>",
- "<string>"
], - "state": "draft",
- "address_books": [
- "<string>",
- "<string>"
]
}"{\n \"data\": {\n \"code\": \"825709c7791272\"\n },\n \"success\": true,\n \"code\": 200\n}"Restituisce i dettagli di una campagna a partirte dal codice
| code required | string Default: "<string>" Il codice della campagna |
| success | boolean |
| code | number |
object |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://software.messaggisms.com/api//campaign/%7Bcode%7D"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
"{\n \"success\": true,\n \"code\": 200,\n \"data\": [\n \"name\": \"test\",\n \"message\": \"test {{Name}}\",\n \"sender\": \"333125485\",\n \"state\": \"sent\",\n \"code\": \"d036c7d24b12\",\n \"send_dates\": [\n \"2019-04-12 10:52:00\"\n ],\n \"addressbooks\": [\n \"test\"\n ]\n}"Invia un messaggio una tantum
| id_sender | number Default: "<number>" Uno tra id_sender e sender_name è obbligatorio |
| sender_name | string Default: "<string>" Uno tra id_sender e sender_name è obbligatorio |
| recipients | Array of strings 2 items Lista dei destinatari |
| message | string Default: "<string>" Il testo del messaggio |
| test | number Default: "<number>" Se passato ad 1(default = 0) il messaggio p un test |
| success | boolean |
| code | number |
object |
{- "id_sender": "<number>",
- "sender_name": "<string>",
- "recipients": [
- "<string>",
- "<string>"
], - "message": "<string>",
- "test": "<number>"
}"{\n \"success\": true,\n \"data\": {\n \"message\": \"prova prova prova\",\n \"credit\": \"6\",\n \"message_id\": 145870,\n \"sms_total\": 1,\n \"test\": false\n }\n}"Restituisce lo status di un singolo messaggio
| message_id | number Default: "<number>" L'id del messaggio singolo |
| success | boolean |
| code | number |
object |
CURL *hnd = curl_easy_init(); curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET"); curl_easy_setopt(hnd, CURLOPT_URL, "https://software.messaggisms.com/api//message_status?message_id=SOME_NUMBER_VALUE"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Authorization: Basic REPLACE_BASIC_AUTH"); curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers); CURLcode ret = curl_easy_perform(hnd);
"{\n \"success\": true,\n \"data\": {\n \"message_id\": \"145870\",\n \"message\": \"prova prova prova\",\n \"recipients\": [\n {\n \"recipients_number\": \"+39-3927091047\",\n \"state\": \"2\",\n \"error_description\": \"\",\n \"fields\": {},\n \"sent_date\": \"2020-07-27 16:40:02\",\n \"delivery_date\": \"2020-07-27 16:40:03\"\n }\n ]\n }"