Opt-in consent
Parameter table common for all methods (show, add, remove)
https://portal.bulkgate.com/api/1.0/address-book/agreement/show
https://portal.bulkgate.com/api/1.0/address-book/agreement/add
https://portal.bulkgate.com/api/1.0/address-book/agreement/remove
PARAMETER NAME | VALUE | MANDATORY | DEFAULT VALUE |
---|---|---|---|
application_id | Application ID | Yes | - |
application_token | Application token | Yes | - |
phone_number | Phone number of the contact | Yes | - |
Show consent
API URL
URL used to send HTTP requests:
https://portal.bulkgate.com/api/1.0/address-book/agreement/show
Example of full request
POST /api/1.0/address-book/agreement/show HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
Cache-Control: no-cache
{
"application_id": "####",
"application_token": "#######################",
"phone_number": "+420777777777",
}
Response to this command may be:
In case of success:
{
"data": {
"phone_number": "+420777777777",
"agreement": "2023-03-30T13:29:15+02:00"
}
}
In case of error:
{
"type": "number_not_found",
"code": 400,
"error": "Number not found",
"detail": null
}
{
"type": "invalid_phone_mobile",
"code": 400,
"error": "Invalid phone mobile",
"detail": null
}
Add consent
Note: If the phone number does not exist in the address book, it will be automatically added.
API URL
URL used to send HTTP requests:
https://portal.bulkgate.com/api/1.0/address-book/agreement/add
Example of full request
POST /api/1.0/address-book/agreement/add HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
Cache-Control: no-cache
{
"application_id": "####",
"application_token": "#######################",
"phone_number": "+420777777777",
}
Response to this command may be:
In case of success:
{
"data": {
"phone_number": "+420777777777",
"agreement": "2023-03-30T12:59:26+02:00"
}
}
In case of error:
{
"type": "invalid_phone_mobile",
"code": 400,
"error": "Invalid phone mobile",
"detail": null
}
Remove consent
API URL
URL used to send HTTP requests:
https://portal.bulkgate.com/api/1.0/address-book/agreement/remove
Example of full request
POST /api/1.0/address-book/agreement/remove HTTP/1.1
Host: portal.bulkgate.com
Content-Type: application/json
Cache-Control: no-cache
{
"application_id": "####",
"application_token": "#######################",
"phone_number": "+420777777777",
}
Response to this command may be:
In case of success:
{
"data": {
"phone_number": "+420777777777",
"agreement": "null",
}
}
In case of error:
{
"type": "number_not_found",
"code": 400,
"error": "Number not found",
"detail": null
}
{
"type": "invalid_phone_mobile",
"code": 400,
"error": "Invalid phone mobile",
"detail": null
}