Address Book


Endpoint

The base url is:

@bulk_base/api/v1

{info} Contacts, groups and their links are REST resources. Alongside the calls documented here, GET on a collection lists it, GET on an id returns one record and PUT/PATCH on an id updates it.

Add Contact

Method URI
POST /address-book/contacts

Request Params

Param Type Description
phone string(required) Contact Phone Number
name string(optional) Contact Names
email string(optional) Contact Email Address

Sample Request

{
    "name": "Test Contact",
    "email": "example@example.com",
    "phone": "0716XXXXXX"
}

Sample Success Response

StatusCode 200

Content

{
    "status": true,
    "data": {
        "id": 1,
        "name": "Test Contact",
        "email": "example@example.com",
        "phone": "0716XXXXXX",
        "client_id": 1,
        "created_by": 2,
        "unique_trace": "Unique_trace",
        "updated_at": "2020-01-16 11:05:12",
        "created_at": "2020-01-16 11:05:12"
    }
}

Delete Contact

Method URI
DELETE /address-book/contacts/{contact_id}

{info} Replace {contact_id} with the id that was received when creating the contact

Sample Success Response

StatusCode 200

Content

{
    "status": true,
    "message": "Contact Successfully Deleted!"
}

Add Group

Method URI
POST /address-book/groups

Request Params

Param Type Description
name string(required) Name of the Group

Sample Request

{
    "name": "Group 1"
}

Sample Success Response

StatusCode 200

Content

{
    "status": true,
    "data": {
        "id": 1,
        "client_id": 1,
        "created_by": 2,
        "updated_at": "2020-01-16 10:15:22",
        "created_at": "2020-01-16 10:15:22",
        "date_created": "16 Jan, 2020",
        "contacts_count": 0,
        "first_contact": null
    }
}

Delete Group

Method URI
DELETE /address-book/groups/{group_id}

{info} Replace {group_id} with the id that was received when creating the group

Sample Success Response

StatusCode 200

Content

{
    "status": true,
    "message": "Group and all associated contacts Successfully deleted!"
}

Add a Contact to a Group

Contacts and groups are created separately. This endpoint links the two.

Method URI
POST /address-book/address-pivot

Request Params

Param Type Description
contact_id integer(required) Id returned when the contact was created
group_id integer(required) Id returned when the group was created

Sample Request

{
    "contact_id": 1,
    "group_id": 1
}

Sample Success Response

StatusCode 200

{
    "status": true,
    "data": {
        "id": 1,
        "group_id": 1,
        "address_book_id": 1,
        "created_at": "2026-01-01 09:15:02",
        "updated_at": "2026-01-01 09:15:02"
    }
}

{info} If either id does not exist you receive {"status": false, "message": "Specified Contact does not exist!"} with HTTP 200, so check the status field rather than the status code.

Remove a Contact from a Group

Method URI
DELETE /address-book/address-pivot/{id}

{info} Replace {id} with the id returned when the contact was added to the group.