Skip to main content

connectIntegration

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

This mutation connects a new integration for the provided brand.

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
  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 specified brand
  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 and brand access

connectIntegration(
input: ConnectIntegrationInput!
): Integration!

Arguments

connectIntegration.input ● ConnectIntegrationInput! non-null input

Parameters for ConnectIntegration

Type

Integration object