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

Name
Value

Content-Type

application/json

Authorization

Bearer <token>

Body (ContactUpdateInput) object + (ContactWhereUniqueInput) object

Name
Type
Description

id*

String

Organization ID

id*

String

Contact ID

name

String

Contact Name

contactCategoryID

String

Contact's First Name

Example body:

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

Response

Return values:

Name
Type
Description

id

String

Organization ID

name

String

Contact ID

id (contactCategoryID)

String

Contact Name

name (contactCategoryID)

String

Contact's First Name

firstName

String

Contact First Name

lastName

String

Contact Last Name

fullName

String

Contact Full Name

email

String

Contact Email

shouldNotifyTx

String

If true, send emails to this contact

for every transaction associated

with the contact's addresses

("walletCryptoAccounts")

phone

String

Phone Number

id (phoneCountry)

String

ID of the phoneCountry

phoneCode (phoneCountry)

String

Phone Code of the phoneCountry

{
  "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!