Documentation Center

Create CRM data

Use the createType GraphQL mutation to create new CRM entities.

Example request

The first sample code block illustrates a request to to create a new entity of the type "Contact".

mutation {
  createContact(
    parentIdentity: {
      namespace: "salesforce"
      id:"root"
    }
    input: {
      firstName: "John"
      lastName: "Smith"
      email: "jsmith@company.com"
      phone: "+441234567890"
    }
  ) {
    identity {
      namespace
      id
      type
    } 
  }
}

Example response

The second code block illustrates the corresponding response with a confirmation of the new contact's identity.

{
  "data": {
    "createContact": {
      "identity": {
        "namespace": "salesforce",
        "id": "0033Y00002pvAjuQAE",
        "type": "Contact"
      }
    }
  }
}