Cycle API
CycleStatusChangelog
  • Cycle API
  • Introduction
    • About Cycle
    • Data model
  • The graphql API
    • How to start
    • Authentication
    • Node interface
    • Pagination
    • Webhooks
    • Limitations
    • Graphql Schema
    • Examples
  • Company
    • Company Attribute
    • List Company attributes by product
    • Create a company
    • Update a company attribute value
  • Practical use case: the feedback form
    • Create a feedback
    • Advanced: use your properties
Powered by GitBook
On this page
  • 1. Create a company linked to external provider
  • 2. Create a company with attributes
  1. Company

Create a company

With the createCompany mutation you can easily create a company in your Cycle workspace linked to external ids (hubpost, intercom, pipedrive, ...)

1. Create a company linked to external provider

mutation createCompany {
    createCompany(
        name: "my first company",
        domain: ""mycompany.com,
        productId: "<productId>",
        externalId: {
            customId: "customId1",
            zendeskId: "zendeskId1",
            hubspotId: "hubspotId1",
            intercomId: "intercomId1",
            pipedriveId: "pipedriveId1",
            snowflakeId: "snowflakeId1",
        },
    ) {
        id
    }
}

2. Create a company with attributes

mutation createCompany {
  createCompany(
    name: "companyName"
    productId: "<productId>"
    externalId: {
      zendesk: "zendeskId",
      intercom: "intercomId",
      ...
    }
    arr: 100.4
    numberOfEmployees: 200
    attributes: [
    {
      attributeDefinitionId: "<SelectAttributeDefinitionId>"
      value: {
        select: "<valueId>" OR "value"
      }
    }, {
      attributeDefinitionId: "<NumberAttributeDefinitionId>"
      value: {
        number: 10
      }
    }]
  ) {
    id
  }
}
PreviousList Company attributes by productNextUpdate a company attribute value

Last updated 11 months ago