The GDPR_MSG endpoint sends an SMS containing a verification code to a phone number, along with the selected GDPR communication consent channels.
Related SMS Phone Confirmation documentation:
- API - Description - SMS Phone Confirmation - GDPR_VERIF
- SMS Phone Confirmation introduction
- SMS Confirmation Swagger documentation
GET request
Endpoint
https://{SERVER_ADDRESS}/GDPR_MSG/?Phone={PHONE}&Duration={DURATION}&Custom_sms={CUSTOM_SMS_CONTENT}&Phonecom={VALUE_PHONECOM}&Email={VALUE_EMAIL}&Post={VALUE_POST}&Sms={VALUE_SMS}&Country={COUNTRY_CODE}&Licence={LICENCE_CODE}&Company={COMPANY_NAME}
Replace the values in braces with your own information:
| Parameter | Value | Description | Mandatory/Optional |
|---|---|---|---|
| SERVER_ADDRESS | {SERVER_ADDRESS} |
Address of the DQE server that will process the data. | Mandatory |
| Licence | {LICENCE_CODE} |
Licence code assigned to your account. | Mandatory |
| Phone | {PHONE} |
Phone number in international format. | Mandatory |
| Country | {COUNTRY_CODE} |
ISO 3-letter country code. | Mandatory |
| Company | {COMPANY_NAME} |
Company name used as the SMS sender. Minimum 3 characters and maximum 11 characters. | Mandatory |
| Custom_sms | {CUSTOM_SMS_CONTENT} |
Custom SMS content. Limited to 125 characters. The verification code is automatically appended. | Mandatory |
| Duration | {DURATION} |
Validity duration of the SMS code in minutes. | Optional |
| Phonecom | {VALUE_PHONECOM} |
1 or 0. Indicates whether phone communication consent was selected. |
Optional |
{VALUE_EMAIL} |
1 or 0. Indicates whether email communication consent was selected. |
Optional | |
| Post | {VALUE_POST} |
1 or 0. Indicates whether postal communication consent was selected. |
Optional |
| Sms | {VALUE_SMS} |
1 or 0. Indicates whether SMS communication consent was selected. |
Optional |
Optional multi-contact consent parameters: SMS2–SMS5, PHONE2–PHONE5, EMAIL2–EMAIL5, POST2–POST5 (consent for secondary contacts).
POST request
Endpoint
https://{SERVER_ADDRESS}/GDPR_MSG/
Add the following parameters in the request body using x-www-form-urlencoded.
| Parameter | Value | Description | Mandatory/Optional |
|---|---|---|---|
| Licence | {LICENCE_CODE} |
Licence code assigned to your account. | Mandatory |
| Phone | {PHONE} |
Phone number in international format. | Mandatory |
| Country | {COUNTRY_CODE} |
ISO 3-letter country code. | Mandatory |
| Company | {COMPANY_NAME} |
Company name used as the SMS sender. Minimum 3 characters and maximum 11 characters. | Mandatory |
| Custom_sms | {CUSTOM_SMS_CONTENT} |
Custom SMS content. Limited to 125 characters. The verification code is automatically appended. | Mandatory |
| Duration | {DURATION} |
Validity duration of the SMS code in minutes. | Optional |
| Phonecom | {VALUE_PHONECOM} |
1 or 0. Indicates whether phone communication consent was selected. |
Optional |
{VALUE_EMAIL} |
1 or 0. Indicates whether email communication consent was selected. |
Optional | |
| Post | {VALUE_POST} |
1 or 0. Indicates whether postal communication consent was selected. |
Optional |
| Sms | {VALUE_SMS} |
1 or 0. Indicates whether SMS communication consent was selected. |
Optional |
Optional multi-contact consent parameters: SMS2–SMS5, PHONE2–PHONE5, EMAIL2–EMAIL5, POST2–POST5 (consent for secondary contacts).
Response
Success response
The JSON response contains the SMS delivery status and verification metadata.
| Key | Description | Format |
|---|---|---|
| status | SMS delivery status. | STRING |
| timeout | Validity duration of the code in minutes. | STRING |
| companyName | Company name used as the sender. | STRING |
| country | ISO 3-letter country code. | STRING |
| to | Recipient phone number in international format. | STRING |
| channels | Selected communication channels. | JSON OBJECT |
| errors | Error details. | JSON OBJECT |
| smsToken | Unique identifier of the SMS. Pass this value to GDPR_VERIF as the Token parameter. |
STRING |
| dateTime | Date and time the SMS was sent. | STRING |
Status values:
| Status | Description |
|---|---|
PENDING |
The SMS was sent to the operator. |
DELIVERED |
The SMS was successfully delivered. |
UNDELIVERABLE |
The SMS could not be delivered. |
EXPIRED |
The SMS expired before delivery confirmation. |
REJECTED |
The SMS was rejected by the operator. |
Error codes:
| Code | Description |
|---|---|
00 |
No errors. |
01 |
Missing parameters. |
02 |
Service not authorized for this licence. |
03 |
Invalid phone number. |
04 |
Invalid country code. |
05 |
Invalid duration. |
06 |
Country not found. |
07 |
Invalid company name. |
08 |
Internal API error. |
09 |
No delivery status received. |
10 |
Invalid consent values. |
11 |
At least one communication channel must be enabled. |
Example:
{
"channels": {
"phone": 0,
"post": 0,
"sms": 1,
"email": 1
},
"to": "33612345678",
"errors": {
"00": "00 - No errors"
},
"status": "DELIVERED",
"smsToken": "C6hfYZIER3CVoGVYwTiZLg",
"timeout": "3",
"companyName": "MYCOMPANY",
"country": "FRA",
"dateTime": "2019-07-29 11:32:32.876709"
}
Related to