younifyd
Menu

Create Integration

Create an integration

POST/api/integrations

Use it in a workflow

  1. Add a step and choose the Gorgias connector.
  2. Pick the Create Integration action (under Integrations).
  3. Fill in the fields below, then reference the result from later steps as {{createIntegration.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

deactivated_datetimestring | null

When the integration was deactivated.

descriptionstring | null

Description about the integration.

httpobject

Only available for HTTP integrations, defines the configuration of the integration.

formnull

Data to send to the external service. It can either be a raw JSON object (if `request_content_type` is `application/json`) or a key-value object representing form data (if `request_content_type` is `application/x-www-form-urlencoded`). You can use variables like {{ticket.customer.email}} as values for the request. Check all properties from a [customer](#the-customer-object), or review the list of [Gorgias variables](https://docs.gorgias.com/macros/macro-variables#gorgias_variables) for inspiration.

Default {}

headersnull

HTTP headers expected by the external service.

Default {}

hmac_secretstring

The HMAC secret to use to sign HTTP calls to the external service.

methodstringrequired

HTTP method expected by the external service.

One ofGETPOSTPUTDELETEHEADPATCHDefault "GET"

request_content_typestringrequired

Content type of the outgoing request to the external service.

One ofapplication/jsonapplication/x-www-form-urlencodedDefault "application/json"

response_content_typestringrequired

Content type of the incoming response from the external service.

One ofapplication/jsonDefault "application/json"

triggersobject8 fields

Events that will trigger the request to the external service.

urlstringrequired

URL of the external service. You can use variables like {{ticket.customer.email}} to pass customer data to the integration. Check all properties from a [customer](#the-customer-object), or review the list of [Gorgias variables](https://docs.gorgias.com/macros/macro-variables#gorgias_variables) for inspiration.

namestringrequired

Name of the integration. Usually the email address, Facebook page name, etc.

typestringrequired

Type of integration.

One ofhttp

managedboolean

Whether integration is managed by Gorgias.

Default false

json
{
  "name": "My HTTP integration",
  "type": "http",
  "deactivated_datetime": "2025-01-01T00:00:00Z",
  "description": "string",
  "http": {
    "id": 987,
    "url": "https://company.com/api/customers?email={{ticket.customer.email}}",
    "method": "GET",
    "headers": {
      "x-api-key": "abcdef12345"
    },
    "form": {
      "hello": "world",
      "ticket_id": "{{ticket.id}}"
    },
    "triggers": {
      "ticket_created": true,
      "ticket_updated": true,
      "ticket_message_created": true,
      "ticket_self_unsnoozed": true,
      "ticket_message_failed": true,
      "ticket_assignee_updated": true,
      "ticket_status_updated": true,
      "ticket_handed_over": true
    },
    "request_content_type": "application/json",
    "response_content_type": "application/json"
  },
  "managed": false
}

Response

Returns 201 with an object. Read it in later steps with {{createIntegration.response.data.<field>}}.

idinteger

ID of the integration.

created_datetimestring | null

When the integration was created.

deactivated_datetimestring | null

When the integration was deactivated.

descriptionstring | null

Description about the integration.

httpobject

Only available for HTTP integrations, defines the configuration of the integration.

formnull

Data to send to the external service. It can either be a raw JSON object (if `request_content_type` is `application/json`) or a key-value object representing form data (if `request_content_type` is `application/x-www-form-urlencoded`). You can use variables like {{ticket.customer.email}} as values for the request. Check all properties from a [customer](#the-customer-object), or review the list of [Gorgias variables](https://docs.gorgias.com/macros/macro-variables#gorgias_variables) for inspiration.

Default {}

methodstring

HTTP method expected by the external service.

One ofGETPOSTPUTDELETEHEADPATCHDefault "GET"

request_content_typestring

Content type of the outgoing request to the external service.

One ofapplication/jsonapplication/x-www-form-urlencodedDefault "application/json"

response_content_typestring

Content type of the incoming response from the external service.

One ofapplication/jsonDefault "application/json"

triggersobject8 fields

Events that will trigger the request to the external service.

urlstringrequired

URL of the external service. You can use variables like {{ticket.customer.email}} to pass customer data to the integration. Check all properties from a [customer](#the-customer-object), or review the list of [Gorgias variables](https://docs.gorgias.com/macros/macro-variables#gorgias_variables) for inspiration.

oauth2null

OAuth2 settings.

namestring

Name of the integration. Usually the email address, Facebook page name, etc.

typestring

Type of integration.

One ofhttp

updated_datetimestring | null

When the integration was last updated.

userobject

User which created this integration.

idinteger

ID of the object

uristring

URI of the integration.

application_idstring | null

ID of the related application.

managedboolean

Whether integration is managed by Gorgias.

Default false

business_hours_idinteger | null

The ID of the business hour the phone integration is associated with. If null, the integration will use the default business hours.

json
{
  "name": "My HTTP integration",
  "id": 123,
  "created_datetime": "2021-01-07T13:00:00.123456",
  "deactivated_datetime": "2025-01-01T00:00:00Z",
  "description": "string",
  "http": {
    "id": 987,
    "url": "https://company.com/api/customers?email={{ticket.customer.email}}",
    "method": "GET",
    "form": {
      "hello": "world",
      "ticket_id": "{{ticket.id}}"
    },
    "triggers": {
      "ticket_created": true,
      "ticket_updated": true,
      "ticket_message_created": true,
      "ticket_self_unsnoozed": true,
      "ticket_message_failed": true,
      "ticket_assignee_updated": true,
      "ticket_status_updated": true,
      "ticket_handed_over": true
    },
    "request_content_type": "application/json",
    "response_content_type": "application/json"
  },
  "type": "http",
  "updated_datetime": "2021-01-07T13:00:00.123456",
  "user": {
    "id": 0
  },
  "uri": "string",
  "application_id": "string",
  "managed": false
}

Need more? See the Gorgias guide for connection setup and behaviour shared by every action.