☎️Contacts

Managing your customer contacts made easy.

Contact List

GET /contacts/:appId

Retrieve the contact list available in your application.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Query Params

Key
Description
Required

page

Current page. Default: 1.

limit

Data size per page. Default: 10. Max: 50.

Path Variables

Key
Description
Required

: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
    }
}

Contact Details

GET /contacts/:appId/:contactId

Retrieve spesific contact details.

Headers

Key
Value

Content-Type

application/json

Authorization

Bearer <token>

Path Variables

Key
Description
Required

: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"
    }
}

Create Contacts

POST /contacts/:appId

Create some contacts for conversation purposes.

Headers

Key
Value

Content-Type

application/json

Authorization

Bearer <token>

Path Variables

Key
Description
Required

: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."
}

Block/Unblock

PUT /contacts/:appId/:contactId

Block and/or unblock contacts.

Which actually just ignores messages.

Headers

Key
Value

Content-Type

application/json

Authorization

Bearer <token>

Path Variables

Key
Description
Required

: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"
    }
}

Delete Contact

DELETE /contacts/:appId/:contactId

Delete contacts from your application.

Headers

Key
Value

Content-Type

application/json

Authorization

Bearer <token>

Path Variables

Key
Description
Required

:appId

Application ID

:contactId

Contact ID

Response

{
    "statusCode": 200,
    "code": "OK",
    "message": "Data has been successfully deleted."
}

Last updated