Anchor to section titled 'undefined'

companyContactCreate
mutation

Requires write_customers access scope or write_companies access scope. Also: The API client must be installed on a Shopify Plus store.

Creates a company contact.


Anchor to companyId
companyId
required

The ID of the company that the company contact belongs to.

The fields to use to create the company contact.


Was this section helpful?

The created company contact.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation companyContactCreate($companyId: ID!, $input: CompanyContactInput!) {
  companyContactCreate(companyId: $companyId, input: $input) {
    companyContact {
      # CompanyContact fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "companyId": "gid://shopify/<objectName>/10079785100",
  "input": {
    "email": "<your-email>",
    "firstName": "<your-firstName>",
    "lastName": "<your-lastName>",
    "locale": "<your-locale>",
    "phone": "<your-phone>",
    "title": "<your-title>"
  }
}
input CompanyContactInput {
  email: String
  firstName: String
  lastName: String
  locale: String
  phone: String
  title: String
}