Create New Contact Property

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

Requirements

field required type description
type yes string Enums PropertiesTypes
name yes array Language options (ar or en)
desc no array Language options (ar or en)
internal_name yes string unique and when created,
the property cannot be edited
group_id yes _id ID for contact property group
enum yes
if type single_select
array EnumOption

Header

Accept: application/json

Body

{
    "type": "string",
    "name": {
        "ar": "Test",
        "en": "Test"
    },
    "desc": {
        "ar": "Test",
        "en": "Test"
    },
    "internal_name": "test",
    "group_id": "64f62b4b24ec98cbd50a8742"
}

or

{
  "type": "single_select",
  "name": {
    "en": "test 2"
  },
  "group_id": "662679e6e9e9554b6e05a512",
  "internal_name": "test_2",
  "enum": [
    {
      "en": "Male",
      "ar": "ذكر",
      "internal_name": "male"
    },
    {
      "en": "Female",
      "ar": "أُنثى",
      "internal_name": "female"
    }
  ]
}

Response

The response is always in the format of Property.

{
    "data": {
        "type": "string",
        "name": {
            "ar": "Test",
            "en": "Test"
        },
        "internal_name": "test",
        "group_id": "64f62b4b24ec98cbd50a8742",
        "account_id": 1,
        "made_by": 8,
        "updated_at": "2024-05-26T22:39:24.971000Z",
        "created_at": "2024-05-26T22:39:24.971000Z",
        "_id": "6653ba1c190594f29707f383",
        "user": {
            "id": 8,
            "email": "ammar.alhasanat@alaaqat.com",
            "email_verified_at": "2023-10-23T14:18:27.000000Z",
            "created_at": "2023-10-23T13:37:08.000000Z",
            "updated_at": "2024-05-23T11:41:03.000000Z",
            "firstname": "Ammar",
            "lastname": "Alhasanat",
            "image": "https://alaaqat-public.s3.eu-west-1.amazonaws.com/users/8/FM3SACrjCXrx8UgXwAIGe1x8Ucb0ZClS1ZAAlbv2.jpg",
            "google_id": null,
            "google_token": null,
            "contacts_view_id": null,
            "two_factor_secret": null,
            "two_factor_recovery_codes": null,
            "two_factor_confirmed_at": null,
            "change_email_to": null,
            "locale": "en",
            "deals_view_id": null,
            "fullname": "Ammar Alhasanat"
        },
        "group": {
            "_id": "64f62b4b24ec98cbd50a8742",
            "internal_name": "contact_information",
            "name": {
                "en": "Contact's Information",
                "ar": "ملعومات العميل"
            },
            "desc": [],
            "account_id": null,
            "made_by": null,
            "updated_at": "2023-09-04T19:08:59.650000Z",
            "created_at": "2023-09-04T19:08:59.650000Z"
        }
    },
    "message": "Entity was created Successfully"
}