Skip to main content
POST
https://api.getmalakai.com/api/
/
api
/
contacts
Create a Contact
curl --request POST \
  --url https://api.getmalakai.com/api/api/contacts \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <x-access-token>' \
  --data '
{
  "contacts": [
    {}
  ],
  "contacts[].contact_name": "<string>",
  "contacts[].contact_email": "<string>",
  "contacts[].contact_number": [
    "<string>"
  ],
  "contacts[].tags": [
    "<string>"
  ]
}
'
{
    "responseCode": 2000,
    "message": "Contacts processing completed",
    "data": {
        "saved": [],
        "updated": [
            {
                "id": "d9f3733d-1854-4e3a-9c2c-270469d90abc",
                "user_id": "7xd2312345",
                "contact_name": "John Doe",
                "contact_number": [
                    "+921234567891"
                ],
                "contact_email": "[email protected]",
                "tags": [],
                "created_at": "2024-11-21T10:50:10.843Z",
                "updated_at": "2025-07-17T07:29:18.368Z"
            }
        ]
    }
}

Headers

Authorization
string
required
Your API key for authentication. Prefix with Bearer .
x-access-token
string
required
Your access token for authentication.

Body

The request body must contain a contacts array, where each object represents a contact to be created.
contacts
object[]
required
An array of contact objects to be created.
contacts[].contact_name
string
required
Full name of the contact.
contacts[].contact_email
string
required
Primary and unique email address for the contact.
contacts[].contact_number
string[]
required
Array of phone numbers linked to the contact.
contacts[].tags
string[]
Optional tags to organize the contact.

Request Example

{
  "contacts": [
    {
      "contact_name": "John Doe",
      "contact_email": "[email protected]",
      "contact_number": [
        "1234567890",
        "0987654321"
      ],
      "tags": [
        "tag1",
        "tag2"
      ]
    }
  ]
}

Response

message
string
Status of the request in the form of a short message.
data
object[]
List of the created contact objects, each including a unique id.
{
    "responseCode": 2000,
    "message": "Contacts processing completed",
    "data": {
        "saved": [],
        "updated": [
            {
                "id": "d9f3733d-1854-4e3a-9c2c-270469d90abc",
                "user_id": "7xd2312345",
                "contact_name": "John Doe",
                "contact_number": [
                    "+921234567891"
                ],
                "contact_email": "[email protected]",
                "tags": [],
                "created_at": "2024-11-21T10:50:10.843Z",
                "updated_at": "2025-07-17T07:29:18.368Z"
            }
        ]
    }
}