Create New Contact

Create a new contact in your organization.

Create a New Contact

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

Using this endpoint users can create a new contact in their organization and associate crypto addresses to it.

mutation CreateContact($data: ContactCreateInput!) {
  createContact(data: $data) {
    id
    name
    firstName
    lastName
    email
    shouldNotifyTx
    phone
    contactCategory {
      name
    }
    contactCryptoAccounts {
      name
      address
    }
    }
  }
}

Headers

Body (ContactCreateInput object)

Example body:

{
  "data": {
    "organization": {
      "id": "cloh4qk1e0002dn01v9u2rfvc"
    },
    "name": "George Johnson Limited",
    "firstName": "George",
    "lastName": "Johnson",
    "email": "contactemail@example.com",
    "shouldNotifyTx": true,
    "phone": "588080080",
    },
    "contactCategory": {
      "name": "FinancialServices"
    },
    "contactCryptoAccounts": {
      "create": [
        {
          "name": "Contact address TRON",
          "address": "TBNVRZWdb3ofKeEjucKMCdnnRUbmbdmL8H"
        },
        {
          "name": "Contact address ETH",
          "address": "0xeee9db769958a4b75b5b771f7d196569258e114b"
        }
      ]
    }
  }
}

Response

Return values:

{
  "data": {
    "createContact": {
      "id": "clph5roj900138f01ngzdkzdm",
      "name": "George Johnson Limited",
      "contactCryptoAccounts": [
        {
          "id": "clph5roj900148f010tomaef4",
          "name": "Contact address TRON",
          "address": "TBNVRZWdb3ofKeEjucKMCdnnRUbmbdmL8H",
        },
        {
          "id": "clph5roj900158f01ssdlpu7e",
          "name": "Contact address ETH",
          "address": "0xeee9db769958a4b75b5b771f7d196569258e114b",
        }
      ],
    }
  }
}

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!