Update Contact

Update a specific contact's details

Update Existing Contact Details

Fetch a specific contact's data in an inabit organization, according to the contact's ID.

By this endpoint, users can update an existing contact details in their organization.

mutation UpdateContact($data: ContactUpdateInput!, $where: ContactWhereUniqueInput!) {
  updateContact(data: $data, where: $where) {
    id
    name
    contactCategory {
      id
      name
    }
    firstName
    lastName
    fullName
    email
    shouldNotifyTx
    phone
    phoneCountry {
      id
      phoneCode
    }
  }
}

Headers

Body (ContactUpdateInput) object + (ContactWhereUniqueInput) object

Example body:

{
  "data": {
    "organization": {
      "id": "cloh4qk1e0002dn01v9u2rfvh"
    },
    "name": "NEW Asher QA",
    "contactCategory": {
      "id": "cllurziwt006xgqjllg9x5grm"
    }
  },
  "where": {
    "id": "clph5roj900138f01ngzdkzdm"
  }
}

Response

Return values:

{
  "data": {
    "updateContact": {
      "id": "clph5roj900138f01ngzdkzdm",
      "name": "NEW Asher QA",
      "contactCategory": {
        "id": "cllurziwt006xgqjllg9x5grm",
        "name": "Marketing",
      },
      "firstName": "Asher",
      "lastName": "Indursky",
      "fullName": "Asher Indursky",
      "email": "asher@example.com",
      "shouldNotifyTx": true,
      "phone": "588080080",
      "phoneCountry": {
        "id": "cli023gmw005vlczi6pl7ck0w",
        "phoneCode": "+972",
      },
    }
  }
}

How do I retrieve my organization ID?

In order to retrieve an organization's identifier, you'll need to call your user details first, to understand which organization is related to them.

query User($where: UserWhereUniqueInput!) {
  user(where: $where) {
    fullName
    organizations {
      name
      id
    }
  }
}

Try it out!