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

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Body (ContactCreateInput object)

NameTypeDescription

oraganizationId*

String

Organization ID

contactName*

String

Contact Name

firstName

String

Contact's First Name

lastName

String

Contact's Last Name

email

String

Contact Email

shouldNotifyTx

Boolean

If true, send emails to this contact

for every transaction associated

with the contact's addresses

("walletCryptoAccounts")

phone

String

Phone Number

contactCategory name

String

Category name from "Categories"

contactCryptoAccounts*

String

Name + address per wallet

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:

NameTypeDescription

id

String

Contact ID

name

String

Contact Name

id (contactCryptoAccounts)

String

ID of the created contactCryptoAccount

name (contactCryptoAccounts)

String

Name of the created contactCryptoAccount

address (contactCryptoAccounts)

String

Address of the created contactCryptoAccount

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

Last updated