API SMS

Intégrez Primotexto à vos applications grâce à notre puissante API SMS.

  >  
Campagnes  >  







Tester votre campagne vers un numéro

Requête à envoyer

URL

https://api.primotexto.com/v2/marketing/campaigns/534bac13e4b0598311698694/test

HTTP METHOD

POST

HEADERS

X-Primotexto-ApiKey: YOUR_API_KEY Content-Type: application/json

DATA

{ "identifier": "+33600000000" }

Retour de l'API


HEADERS

HTTP/1.1 200 OK Date: Fri, 08 Jan 2016 15:11:02 GMT Server: Apache Content-Type: application/json;charset=UTF-8 Vary: Accept-Encoding Transfer-Encoding: chunked

DATA

{"creditsUsed":1.0}
// Download library -> https://www.primotexto.com/api/librairies/latest-php.asp require_once 'primotexto-api-php/baseManager.class.php'; // Authentication authenticationManager::setApiKey('YOUR_API_KEY'); // Test $newCampaign = new PTCampaign(); $newCampaign->type = 'marketing'; $newCampaign->id = '533c14d5e3b05a2eeeb66c03'; $newCampaign->identifier = '+33600000000'; $testCampaign = campaignsManager::campaignsTest($newCampaign);
curl -X POST -H "userId:5315a288e4d0656b1a95b115" \ -H "X-Primotexto-ApiKey: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"identifier":"+33600000000"}' \ https://api.primotexto.com/v2/marketing/campaigns/534bac13e4b0598311698694/test


Envoyer votre campagne



Requête à envoyer

URL

https://api.primotexto.com/v2/marketing/campaigns/534bac13e4b0598311698694/send

HTTP METHOD

POST

HEADERS

X-Primotexto-ApiKey: YOUR_API_KEY Content-Type: application/json

DATA

Retour de l'API


HEADERS

HTTP/1.1 200 OK Date: Fri, 08 Jan 2016 15:11:02 GMT Server: Apache Content-Type: application/json;charset=UTF-8 Vary: Accept-Encoding Transfer-Encoding: chunked

DATA

{"creditsUsed":26146.0}
// Download library -> https://www.primotexto.com/api/librairies/latest-php.asp require_once 'primotexto-api-php/baseManager.class.php'; // Authentication authenticationManager::setApiKey('YOUR_API_KEY'); // Send $newCampaign = new PTCampaign(); $newCampaign->type = 'marketing'; $newCampaign->id = '533c14d5e3b05a2eeeb66c03'; $testCampaign = campaignsManager::campaignsSend($newCampaign);
curl -X POST -H "userId:5315a288e4d0656b1a95b115" \ -H "X-Primotexto-ApiKey: YOUR_API_KEY" \ https://api.primotexto.com/v2/marketing/campaigns/534bac13e4b0598311698694/send