Ajouter un groupe
- Home
- Ajouter un groupe
Ajouter un groupe
URL
POST http://api.smspartner.fr/v1/group/add
Paramètres
Chaque demande d’API prend en charge les paramètres suivants :
apiKey | Clé API de votre compte. Vous l’obtenez dans votre compte SMS Partner. |
---|---|
name | Nom du compte |
Requête
Exemple de requête :
1 2 3 4 5 6 |
<span style="font-weight: 400;">curl --location --request POST 'http://api.smspartner.fr/v</span><span style="font-weight: 400;">1</span><span style="font-weight: 400;">/group/add' \</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;">--header 'Content-Type: application/json' \</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;">--data-raw '{</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;"> "apiKey": </span><span style="font-weight: 400;">"YOUR_API_KEY"</span><span style="font-weight: 400;">,</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;"> "name": </span><span style="font-weight: 400;">"Nom du groupe"</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;">}'</span> |
Réponses
1 2 3 4 5 6 |
<span style="font-weight: 400;">{</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;"> "success": </span><span style="font-weight: 400;">true</span><span style="font-weight: 400;">,</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;"> "code": </span><span style="font-weight: 400;">2</span><span style="font-weight: 400;">,</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;"> "name": </span><span style="font-weight: 400;">"Nom du groupe"</span><span style="font-weight: 400;">,</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;"> "groupId": </span><span style="font-weight: 400;">"ID GROUPE"</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;">}</span> |
Erreurs
Exemple de message d’erreur :
1 2 3 4 5 |
<span style="font-weight: 400;">{</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;">"success": </span><span style="font-weight: 400;">false</span><span style="font-weight: 400;">,</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;">"code": </span><span style="font-weight: 400;">10</span><span style="font-weight: 400;">,</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;">"message": </span><span style="font-weight: 400;">"Clef API incorrecte"</span><span style="font-weight: 400;"> </span><span style="font-weight: 400;">}</span> |
Code de contrôle
Code erreurs | ||
---|---|---|
1 | name est requis | |
10 | La Clé API est requise |
© 2014 - 2023 NDA MEDIA. Tous droits réservés. Mentions légales