☎️Contacts
Managing your customer contacts made easy.
Contact List
GET /contacts/:appId
Retrieve the contact list available in your application.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Query Params
page
Current page. Default: 1.
limit
Data size per page. Default: 10. Max: 50.
Path Variables
:appId
Application ID
Response
{
"statusCode": 200,
"code": "OK",
"message": "The request has been successfully processed.",
"data": [
{
"id": "abc5ea66-11ad-11ef-8e7a-00155d34f1bf",
"phone": 6280000000000,
"tag": "John Doe",
"is_blocked": false,
"created_at": "2024-05-14T11:51:48.000+07:00"
},
// ...
],
"meta": {
"total": 1,
"limit": 10,
"current_page": 1,
"first_page": 1,
"previous_page": null,
"next_page": null,
"last_page": 1
}
}{
"statusCode": 400,
"code": "BAD_REQUEST",
"message": "The request body does not contain valid data."
}{
"statusCode": 403,
"code": "FORBIDDEN",
"message": "You do not have access to this resource."
}{
"statusCode": 404,
"code": "NOT_FOUND",
"message": "The endpoint you are looking for seems to be not found."
}Contact Details
GET /contacts/:appId/:contactId
Retrieve spesific contact details.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Path Variables
:appId
Application ID
:contactId
Contact ID
Response
{
"statusCode": 200,
"code": "OK",
"message": "The request has been successfully processed.",
"data": {
"id": "abc5ea66-11ad-11ef-8e7a-00155d34f1bf",
"phone": 6280000000000,
"tags": [
"John Doe",
"John",
"Doe, John",
// ...
],
"is_blocked": false,
"created_at": "2024-05-14T11:51:48.000+07:00"
}
}{
"statusCode": 403,
"code": "FORBIDDEN",
"message": "You do not have access to this resource."
}{
"statusCode": 404,
"code": "NOT_FOUND",
"message": "The endpoint you are looking for seems to be not found."
}Create Contacts
POST /contacts/:appId
Create some contacts for conversation purposes.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Path Variables
:appId
Application ID
Body Raw
[
{
"name": "John Doe",
"phone": 6280000000000
},
{
"name": "Jane Doe",
"phone": 6280000000000
},
// ...
]Response
{
"statusCode": 201,
"code": "CREATED",
"message": "Data has been successfully inserted."
}{
"statusCode": 403,
"code": "FORBIDDEN",
"message": "You do not have access to this resource."
}{
"statusCode": 404,
"code": "NOT_FOUND",
"message": "The endpoint you are looking for seems to be not found."
}{
"statusCode": 422,
"code": "UNPROCESSABLE_ENTITY",
"message": "Data cannot be processed as it is invalid.",
"errors": {
"0.phone": "Nomor telepon harus ber-tipe data number",
// ...
}
}Block/Unblock
PUT /contacts/:appId/:contactId
Block and/or unblock contacts.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Path Variables
:appId
Application ID
:contactId
Contact ID
Response
{
"statusCode": 200,
"code": "OK",
"message": "The request has been successfully processed.",
"data": {
"id": "abc5ea66-11ad-11ef-8e7a-00155d34f1bf",
"phone": 6280000000000,
"tag": "John Doe",
"is_blocked": true,
"created_at": "2024-05-14T13:30:52.000+07:00"
}
}{
"statusCode": 403,
"code": "FORBIDDEN",
"message": "You do not have access to this resource."
}{
"statusCode": 404,
"code": "NOT_FOUND",
"message": "The endpoint you are looking for seems to be not found."
}Delete Contact
DELETE /contacts/:appId/:contactId
Delete contacts from your application.
Headers
Content-Type
application/json
Authorization
Bearer <token>
Path Variables
:appId
Application ID
:contactId
Contact ID
Response
{
"statusCode": 200,
"code": "OK",
"message": "Data has been successfully deleted."
}{
"statusCode": 403,
"code": "FORBIDDEN",
"message": "You do not have access to this resource."
}{
"statusCode": 404,
"code": "NOT_FOUND",
"message": "The endpoint you are looking for seems to be not found."
}Last updated