Create a Contact

POST https://app.alaaqat.com/api/contacts

Creates a contact. Your API key needs the contact-create ability.

Header

{
    "Accept": "application/json",
    "Content-Type": "application/json"
}

Body

The body is a flat object of property values. Each key is the internal_name of a contact property, built in or yours, and each value must match that property's type. Read Properties for the types.

{
    firstname: string,
    lastname?: string,
    email?: string,
    phone?: string,
    [internal_name: string]: any
}
Field Required Validation Description
firstname Required Text The contact's first name.
lastname Optional Text The contact's last name.
email Optional A valid email address The contact's email address. A unique key by default.
phone Optional Text The contact's phone number. A unique key by default.
Any other property Optional Must match the property's type Use the property's internal_name as the key.

Alaaqat sets _id itself. A request that sends it is rejected.

{
    "firstname": "Layla",
    "lastname": "Nasser",
    "email": "layla.nasser@example.com",
    "phone": "+962790000000",
    "membership_number": "LC-20417"
}

Unique keys

A contact cannot take a value that another contact already holds for a unique key property. For contacts, email, phone and whatsapp_number are unique keys by default, and you can make your own properties unique keys too, see Unique keys.

When a value is already taken, the contact is not created. The request is refused with 422, and the error is reported on the field:

{
    "message": "The email has already been taken.",
    "errors": {
        "email": [
            "The email has already been taken."
        ]
    }
}

Look the existing contact up with List Contacts and update it instead.

Response

201 Created, with the new contact under data.

{
    "data": {
        "properties": {
            "firstname": "Layla",
            "lastname": "Nasser",
            "email": "layla.nasser@example.com",
            "phone": "+962790000000",
            "membership_number": "LC-20417",
            "account_id": 1024,
            "created_by": 12,
            "updated_at": "2026-10-20T09:30:00.000000Z",
            "created_at": "2026-10-20T09:30:00.000000Z",
            "_id": "6650f1a2b3c4d5e6f7a8b901",
            "fullname": "Layla Nasser",
            "image": null
        },
        "channels": []
    },
    "message": "Entity was created successfully."
}

Errors

Status Meaning
422 firstname is missing, a value does not match its property's type, or a unique key value is already taken.