Skip to main content

connectIntegration

Sets up a new integration and assigns it to a company.

This mutation connects a new integration for a company.

Authentication Requirements​

  • Header Authorization must be provided

Integration Connection Process​

  1. Checks a previous integration connection was requested
  2. Extracts and validates the connection request metadata
  3. Creates a new integration with a unique ID if not exists
  4. Encrypts and stores authentication credentials (api_key, api_secret, api_token, oauth_token)
  5. Assigns specified roles to determine integration permissions
  6. Associates the integration with the company
  7. Configures management settings (managed vs user-managed)

Credential Storage​

All authentication credentials are automatically encrypted before storage:

  • api_key: Main API key or primary connection credential
  • api_secret: API secret for authentication
  • api_token: Additional API token
  • oauth_token: Shopify OAuth token (for Shopify integrations)

Role Assignment​

The integration must be assigned at least one role from the available role types. Roles determine the permissions and actions the integration can perform.

Behavior​

Upon successful execution, returns the created integration with all configured settings. The integration will be ready for use according to its assigned roles and permissions.

Possible Errors​

  • GraphQL::ExecutionError - when required headers are missing
  • ValidationError - when required arguments are missing or invalid
  • AuthenticationError - when authentication credentials are invalid
  • PermissionError - when user lacks permission to create integrations

**Permissions required:** Company access

connectIntegration(
input: ConnectIntegrationInput!
): Integration!

Arguments​

connectIntegration.input ● ConnectIntegrationInput! non-null input common​

Parameters for ConnectIntegration

Type​

Integration object integrations​