Gorgias Component
Gorgias is a customer support platform designed to help e-commerce businesses manage customer inquiries and support tickets efficiently.
Component key: gorgiasDescription
Gorgias is a customer service platform that helps e-commerce businesses provide support for their online stores. It allows businesses to offer multichannel customer service from a single app, including email, voice, SMS, live chat, and social media. Gorgias is known for its deep integration with e-commerce platforms like Shopify, Magento, and Big Commerce. This integration allows customer service teams to review, edit, or refund customer orders directly from within the Gorgias ticket window.
Use the Gorgias component to create and manage tickets, customers, and associated events.
API Documentation
This component was built using the Gorgias REST API.
Connections
Gorgias API Key
Steps to generate and use an API key for Gorgias:
- Login to Gorgias: Start by logging into your Gorgias account.
- Navigate to Settings: After logging in, go to the Settings section of your Gorgias account. This is where you can manage various configurations for your account, including those related to the API.
- REST API Section: Within the Settings, locate the REST API section. Here, you can manage API keys, which are essential for authenticating and interacting with the Gorgias API.
- Generate Password (API Key): In the REST API section, you'll see an option to generate a new API key, referred to as "Password" in this context. Click Generate to create a new API key.
- Enter the API Key: Once the API key is generated, you need to enter it in the connection configuration for the Prismatic integration.
Once completed, you can start performing requests directly from the API documentation.
Gorgias OAuth 2.0
Steps to generate app credentials for OAuth 2.0 for Gorgias:
- Login to Gorgias: Start by logging into the Gorgias developer portal.
- Create a New App: Click the Create New App button.
- Fill out the app submission form:
- App Name: Shown whenever you app is mentioned.
- App Tagline: Shown underneath the app name in your integration details.
- App Icon: Shown as your app logo.
- Set App URL: The App URL is required to set up the OAuth flow for your app, enter:
https://oauth2.prismatic.io/login
. - Configure Redirect URIs: For US-based integrations, enter:
https://oauth2.prismatic.io/callback
. For integrations outside the US, refer to this guide to find your region’s Callback URL.
- Retrieve Client ID and Client Secret: After creating the app, edit it to retrieve the Client ID and Client Secret.
- Enter the Client ID and Client Secret: Enter the Client ID and Client Secret values into the connection configuration for the Prismatic integration.
Once completed, you can start performing requests directly from the API documentation.
Data Sources
Select Customer
Allow a user to select one of their customers. | key: selectCustomer | type: picklist
Data Source Payload
{
"result": [
{
"key": "1",
"label": "John Doe"
},
{
"key": "2",
"label": "Jane Doe"
},
{
"key": "3",
"label": "Sarah Connor"
}
]
}
Select Event
Select a event from a list of events. | key: selectEvent | type: picklist
Data Source Payload
{
"result": [
{
"key": "1",
"label": "Event 1"
},
{
"key": "2",
"label": "Event 2"
},
{
"key": "3",
"label": "Event 3"
}
]
}
Select Message
Select a message from a list of messages. | key: selectMessage | type: picklist
Data Source Payload
{
"result": [
{
"key": "1",
"label": "Message 1"
},
{
"key": "2",
"label": "Message 2"
},
{
"key": "3",
"label": "Message 3"
}
]
}
Select Ticket
Select a ticket from a list of tickets. | key: selectTicket | type: picklist
Data Source Payload
{
"result": [
{
"key": "1",
"label": "Ticket 1"
},
{
"key": "2",
"label": "Ticket 2"
},
{
"key": "3",
"label": "Ticket 3"
}
]
}
Actions
Create Customer
Create a customer. | key: createCustomer
Output Example Payload
{
"data": {
"id": 3924,
"created_datetime": "2019-04-13T03:27:56.973873",
"email": "john@example.com",
"external_id": "customer-84203241",
"firstname": "John",
"integrations": {
"6": {
"orders": [
{
"id": 772803526679,
"total_tax": "0.02",
"created_at": "2018-12-04T03:29:37-08:00",
"line_items": [
{
"id": 1760305053719,
"sku": "0987654321",
"name": "Acidulous candy",
"grams": 10,
"price": "0.10",
"title": "Acidulous candy",
"taxable": true,
"quantity": 1,
"price_set": {
"shop_money": {
"amount": "0.10",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.10",
"currency_code": "USD"
}
},
"tax_lines": [
{
"rate": 0.2,
"price": "0.02",
"title": "TVA",
"price_set": {
"shop_money": {
"amount": "0.02",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.02",
"currency_code": "USD"
}
}
}
],
"product_id": 8345093387,
"variant_id": 28442938955,
"total_discount": "0.00",
"requires_shipping": true,
"fulfillment_status": null,
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"fulfillment_service": "manual",
"fulfillable_quantity": 1
}
],
"contact_email": "marie@gorgias.io",
"billing_address": {
"zip": "94103",
"city": "SAN FRANCISCO",
"name": "Marie Curie",
"country": "United States",
"address1": "52 Washburn Street",
"address2": "",
"province": "California",
"last_name": "Curie",
"first_name": "Marie",
"country_code": "US",
"province_code": "CA"
}
}
],
"customer": {
"id": 667928133655,
"note": "",
"tags": "",
"email": "marie@gorgias.io",
"firstname": "Marie",
"lastname": "Curie",
"orders_count": 1,
"default_address": {
"id": 707106144279,
"zip": "94103",
"city": "SAN FRANCISCO",
"name": "Marie Curie",
"country": "United States",
"default": true,
"address1": "52 Washburn Street",
"address2": "",
"province": "California",
"last_name": "Curie",
"first_name": "Marie",
"customer_id": 667928133655,
"country_code": "US",
"country_name": "United States",
"province_code": "CA"
}
},
"__integration_type__": "shopify"
}
},
"language": "fr",
"lastname": "Smith",
"name": "John Smith",
"note": "Our best customer.",
"timezone": "UTC",
"updated_datetime": "2019-09-25T06:18:22.839271"
}
}
Create Ticket
Create a new ticket. | key: createTicket
Output Example Payload
{
"data": {
"id": 1234,
"assignee_user": {
"id": 567,
"email": "assignee@example.com",
"name": "Alex Johnson",
"firstname": "Alex",
"lastname": "Johnson",
"meta": {
"sso": "sso-link",
"profile_picture_url": "https://www.example.com/images/profile.jpg"
}
},
"channel": "Email",
"closed_datetime": null,
"created_datetime": "2024-08-21T12:00:00Z",
"customer": {
"id": 789,
"channels": [
{
"id": 1
},
{
"id": 2
}
],
"email": "customer@example.com",
"external_id": "C123456",
"firstname": "Sam",
"integrations": {
"CRM": {
"customer_level": "Gold",
"points": 1200
}
},
"lastname": "Doe",
"name": "Sam Doe",
"note": "VIP Customer, handle with care."
},
"external_id": "EXT1234",
"from_agent": false,
"is_unread": true,
"language": "en",
"last_message_datetime": "2024-08-21T12:05:00Z",
"last_received_message_datetime": "2024-08-21T12:04:00Z",
"messages": [
{
"id": 2345,
"attachments": [
{
"url": "https://www.example.com/attachments/info.pdf",
"name": "Information.pdf",
"size": 1024,
"content_type": "application/pdf",
"public": true,
"extra": "User manual"
}
],
"body_html": "<p>Please see the attached user manual for more information.</p>",
"body_text": "Please see the attached user manual for more information.",
"channel": "Email",
"created_datetime": "2024-08-21T12:05:00Z",
"external_id": null,
"failed_datetime": null,
"from_agent": true,
"integration_id": 456,
"last_sending_error": null,
"message_id": "MSG4567",
"receiver": {
"id": 789,
"email": "customer@example.com",
"name": "Sam Doe",
"firstname": "Sam",
"lastname": "Doe",
"meta": null
},
"rule_id": 321,
"sender": {
"id": 567,
"email": "support@example.com",
"name": "Support Team",
"firstname": "Support",
"lastname": "Team",
"meta": null
},
"sent_datetime": "2024-08-21T12:05:00Z",
"source": {
"type": "email",
"to": [
{
"name": "Sam Doe",
"address": "customer@example.com"
}
],
"cc": [],
"bcc": [],
"from": {
"name": "Support Team",
"address": "support@example.com"
}
},
"stripped_html": "<p>Please see the attached user manual for more information.</p>",
"stripped_text": "Please see the attached user manual for more information.",
"subject": "User Manual",
"ticket_id": 1234,
"via": "Email",
"uri": "https://www.example.com/tickets/1234"
}
],
"meta": {
"issue_type": "technical",
"priority": "high"
},
"opened_datetime": "2024-08-21T12:00:00Z",
"reply_options": "Reply, Forward, Archive",
"satisfaction_survey": {
"id": 876,
"body_text": "Please rate our service.",
"created_datetime": "2024-08-21T12:30:00Z",
"customer_id": 789,
"meta": {
"survey_type": "email"
},
"score": null,
"scored_datetime": null,
"sent_datetime": null,
"should_send_datetime": "2024-08-22T12:30:00Z",
"ticket_id": 1234
},
"snoozed_datetime": null,
"spam": false,
"status": "open",
"subject": "Technical Support Inquiry",
"tags": [
{
"id": 1,
"name": "Technical",
"uri": "https://www.example.com/tags/technical",
"decoration": {
"color": "#FF5733"
}
},
{
"id": 2,
"name": "High Priority",
"uri": "https://www.example.com/tags/high_priority",
"decoration": {
"color": "#C70039"
}
}
],
"trashed_datetime": null,
"updated_datetime": "2024-08-21T12:10:00Z",
"via": "Email",
"uri": "https://www.example.com/tickets/1234"
}
}
Create Ticket Message
Create a message for a ticket. | key: createTicketMessage
Output Example Payload
{
"data": {
"id": 3001,
"attachments": [
{
"url": "https://www.example.com/attachments/document.pdf",
"name": "Document.pdf",
"size": 1200,
"content_type": "application/pdf",
"public": true,
"extra": "Confidential Document"
},
{
"url": "https://www.example.com/attachments/image.png",
"name": "Image.png",
"size": 800,
"content_type": "image/png",
"public": false,
"extra": "Screenshot"
}
],
"body_html": "<p>Hello, please find the details attached.</p>",
"body_text": "Hello, please find the details attached.",
"channel": "Email",
"created_datetime": "2024-08-20T12:30:00Z",
"external_id": null,
"failed_datetime": null,
"from_agent": false,
"integration_id": 200,
"last_sending_error": null,
"message_id": "MSG123456789",
"receiver": {
"id": 5002,
"email": "receiver@example.com",
"name": "John Doe",
"firstname": "John",
"lastname": "Doe",
"meta": null
},
"rule_id": 101,
"sender": {
"id": 5001,
"email": "sender@example.com",
"name": "Jane Smith",
"firstname": "Jane",
"lastname": "Smith",
"meta": null
},
"sent_datetime": "2024-08-20T12:35:00Z",
"source": {
"type": "email",
"to": [
{
"name": "John Doe",
"address": "john.doe@example.com"
}
],
"cc": [
{
"name": "Sarah Connor",
"address": "sarah.connor@example.com"
}
],
"bcc": [],
"from": {
"name": "Jane Smith",
"address": "jane.smith@example.com"
}
},
"stripped_html": "<p>Hello, please find the details attached.</p>",
"stripped_text": "Hello, please find the details attached.",
"subject": "Details for Your Request",
"ticket_id": 4003,
"via": "support_portal",
"uri": "https://www.example.com/tickets/4003"
}
}
Delete Customer
Delete a customer. | key: deleteCustomer
Output Example Payload
{
"data": {
"message": "Success"
}
}
Delete Ticket
Delete a ticket. | key: deleteTicket
Output Example Payload
{
"data": {
"message": "Success"
}
}
Delete Ticket Custom Field
Delete a ticket's custom field value. | key: deleteTicketCustomField
Output Example Payload
{
"data": {
"message": "Success"
}
}
Download File
Download a file. | key: downloadFile
Output Example Payload
{
"data": "https://www.example.com/attachments/12345"
}
Get Account
Retrieve your account. | key: getAccount
Output Example Payload
{
"data": {
"created_datetime": "2017-11-23T15:59:41.966927",
"deactivated_datetime": null,
"domain": "company_name",
"settings": [
{
"id": 987,
"type": "business-hours",
"data": {
"timezone": "UTC",
"business_hours": {
"days": "1,2,3,4,5",
"from_time": "09:00",
"to_time": "22:00"
}
}
}
],
"status": {
"status": "active"
}
}
}
Get Customer
Retrieve a customer. | key: getCustomer
Output Example Payload
{
"data": {
"id": 3924,
"channels": [
{
"id": 49182
}
],
"created_datetime": "2019-04-13T03:27:56.973873",
"email": "john@example.com",
"external_id": "customer-84203241",
"firstname": "John",
"integrations": {
"6": {
"orders": [
{
"id": 772803526679,
"total_tax": "0.02",
"created_at": "2018-12-04T03:29:37-08:00",
"line_items": [
{
"id": 1760305053719,
"sku": "0987654321",
"name": "Acidulous candy",
"grams": 10,
"price": "0.10",
"title": "Acidulous candy",
"taxable": true,
"quantity": 1,
"price_set": {
"shop_money": {
"amount": "0.10",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.10",
"currency_code": "USD"
}
},
"tax_lines": [
{
"rate": 0.2,
"price": "0.02",
"title": "TVA",
"price_set": {
"shop_money": {
"amount": "0.02",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.02",
"currency_code": "USD"
}
}
}
],
"product_id": 8345093387,
"variant_id": 28442938955,
"total_discount": "0.00",
"requires_shipping": true,
"fulfillment_status": null,
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"fulfillment_service": "manual",
"fulfillable_quantity": 1
}
],
"contact_email": "marie@gorgias.io",
"billing_address": {
"zip": "94103",
"city": "SAN FRANCISCO",
"name": "Marie Curie",
"country": "United States",
"address1": "52 Washburn Street",
"address2": "",
"province": "California",
"last_name": "Curie",
"first_name": "Marie",
"country_code": "US",
"province_code": "CA"
}
}
],
"customer": {
"id": 667928133655,
"note": "",
"tags": "",
"email": "marie@gorgias.io",
"firstname": "Marie",
"lastname": "Curie",
"orders_count": 1,
"default_address": {
"id": 707106144279,
"zip": "94103",
"city": "SAN FRANCISCO",
"name": "Marie Curie",
"country": "United States",
"default": true,
"address1": "52 Washburn Street",
"address2": "",
"province": "California",
"last_name": "Curie",
"first_name": "Marie",
"customer_id": 667928133655,
"country_code": "US",
"country_name": "United States",
"province_code": "CA"
}
},
"__integration_type__": "shopify"
}
},
"language": "fr",
"lastname": "Smith",
"name": "John Smith",
"note": "Our best customer.",
"timezone": "UTC",
"updated_datetime": "2019-09-25T06:18:22.839271",
"external_data": {
"my-awesome-3rd-party-app-ID": {
"badge": "Best customer",
"points": 22,
"__app_name__": "My awesome 3rd party app"
}
},
"ecommerce_data": {
"additionalProp": {
"store": {
"id": 123456,
"type": "woocommerce",
"helpdesk_integration_id": 123456,
"default_currency": "usd",
"url": "https://my-demo-store.com/",
"updated_datetime": "2023-07-15T00:00:00.000000+00:00",
"currencies": [
"usd",
"eur"
],
"display_name": "My Demo Store",
"created_datetime": "2023-07-15T00:00:00.000000+00:00",
"name": "my-demo-store",
"deleted_datetime": "2023-07-15T00:00:00.000000+00:00",
"uuid": "7736626b-0d5f-4e2c-86de-8b74e3401c26"
},
"shopper": {
"id": 123456,
"first_name": "Jean",
"helpdesk_customer_id": 123456,
"updated_datetime": "2023-07-15T00:00:00.000000+00:00",
"phone_number": "+1 123 456 7890",
"middle_name": "Mary",
"deleted_datetime": "2023-07-15T00:00:00.000000+00:00",
"birthdate": "2023-07-15",
"status": "tax_exempt",
"external_id": "example-id-123",
"email_address": "foo@bar.com",
"accepts_marketing_sms": true,
"accepts_marketing_email": true,
"last_name": "Doe",
"created_datetime": "2023-07-15T00:00:00.000000+00:00"
},
"orders": [
{
"external_status": "pending",
"total_amount": "20",
"number": 123456,
"billing_address": {
"id": 123456,
"first_name": "Jane",
"line_1": "123 Main Street",
"city": "Miami",
"zip_code": "123456",
"updated_datetime": "2023-07-15T00:00:00.000000+00:00",
"preferred": true,
"phone_number": "+1 123 456 7890",
"shopper_external_id": "example-id-123",
"country": "USA",
"line_2": "Apt 123, Floor 2",
"deleted_datetime": "2023-07-15T00:00:00.000000+00:00",
"last_name": "Doe",
"external_id": "example-id-123",
"state": "FL",
"created_datetime": "2023-07-15T00:00:00.000000+00:00"
},
"tax_amount": "20",
"discount_codes": [
"DISCOUNT_CODE_1",
"DISCOUNT_CODE_2"
],
"line_items": [
{
"id": 123456,
"unit_price": "123456",
"discount_reason": "Refurbished product",
"discount_type": "percentage",
"title": "My Awesome Product",
"total_amount": "5",
"fulfilled_quantity": 5,
"updated_datetime": "2023-07-15T00:00:00.000000+00:00",
"taxable": true,
"discount_amount": "20",
"product_options": {
"size": 10
},
"quantity": 5,
"deleted_datetime": "2023-07-15T00:00:00.000000+00:00",
"requires_shipping": true,
"created_datetime": "2023-07-15T00:00:00.000000+00:00"
}
],
"status": "completed",
"external_fulfillment_status": "fulfilled",
"payment_status": "paid",
"shopper_external_id": "example-id-123",
"external_payment_status": "paid",
"name": "Order #123456",
"currency": "usd",
"created_datetime": "2023-07-15T00:00:00.000000+00:00",
"id": 123456,
"updated_datetime": "2023-07-15T00:00:00.000000+00:00",
"subtotal_amount": "20",
"deleted_datetime": "2023-07-15T00:00:00.000000+00:00",
"external_id": "example-id-123",
"shipping_address": {
"id": 123456,
"first_name": "Jane",
"line_1": "123 Main Street",
"city": "Miami",
"zip_code": "123456",
"updated_datetime": "2023-07-15T00:00:00.000000+00:00",
"preferred": true,
"phone_number": "+1 123 456 7890",
"shopper_external_id": "example-id-123",
"country": "USA",
"line_2": "Apt 123, Floor 2",
"deleted_datetime": "2023-07-15T00:00:00.000000+00:00",
"last_name": "Doe",
"external_id": "example-id-123",
"state": "FL",
"created_datetime": "2023-07-15T00:00:00.000000+00:00"
},
"discount_amount": "20",
"shipping_amount": "20"
}
],
"addresses": [
{
"id": 123456,
"first_name": "Jane",
"line_1": "123 Main Street",
"city": "Miami",
"zip_code": "123456",
"updated_datetime": "2023-07-15T00:00:00.000000+00:00",
"preferred": true,
"phone_number": "+1 123 456 7890",
"shopper_external_id": "example-id-123",
"country": "USA",
"line_2": "Apt 123, Floor 2",
"deleted_datetime": "2023-07-15T00:00:00.000000+00:00",
"last_name": "Doe",
"external_id": "example-id-123",
"state": "FL",
"created_datetime": "2023-07-15T00:00:00.000000+00:00"
}
]
}
}
}
}
Get Event
Retrieve an event. | key: getEvent
Output Example Payload
{
"data": {
"id": 501,
"context": "User logged into the system from a new device.",
"created_datetime": "2024-08-20T19:15:00Z",
"data": {
"ipAddress": "192.168.1.100",
"deviceType": "Smartphone",
"os": "iOS"
},
"object_id": 12345,
"object_type": "UserSession",
"type": "LoginEvent",
"user_id": 7890,
"url": "https://www.example.com/login"
}
}
Get Ticket
Retrieve a ticket. | key: getTicket
Output Example Payload
{
"data": {
"id": 101,
"url": "https://www.example.com/tickets/101",
"external_id": "EXT1001",
"events": [
{
"idcreated_datetime": "2024-08-22T10:00:00Z",
"data": {
"action": "Ticket Created",
"details": "Initial creation of the ticket"
},
"type": "Creation",
"user": {
"id": 2001,
"firstname": "Alice",
"lastname": "Johnson",
"name": "Alice Johnson",
"email": "alice.johnson@example.com"
},
"uri": "https://www.example.com/events/1001"
}
],
"status": "Open",
"channel": "Email",
"via": "Web",
"from_agent": false,
"is_unread": true,
"spam": null,
"customer": {
"id": 501,
"channels": [
{
"id": 1,
"type": "Email",
"address": "customer501@example.com",
"preferred": true,
"created_datetime": "2024-01-01T12:00:00Z",
"updated_datetime": "2024-01-02T12:00:00Z",
"deleted_datetime": null,
"user": {
"id": 501,
"name": "John Doe"
},
"customer": {
"id": 501,
"name": "John Doe"
}
}
],
"email": "customer501@example.com",
"external_id": "CUST1001",
"firstname": "John",
"integrations": {
"CRM": {
"customer_level": "Gold"
}
},
"external_data": [
{
"loyalty_points": 1200
}
],
"ecommerce_data": {
"last_purchase": {
"date": "2024-01-10",
"amount": 300
}
},
"lastname": "Doe",
"meta": null,
"name": "John Doe",
"note": "High value customer"
},
"assignee_user": {
"id": 301,
"email": "agent301@example.com",
"name": "Sarah Parker",
"firstname": "Sarah",
"lastname": "Parker",
"meta": {
"sso": "sso-agent-link",
"profile_picture_url": "https://www.example.com/images/agent301.jpg"
}
},
"language": "en",
"subject": "Support Request",
"meta": {
"priority": "high",
"category": "technical"
},
"tags": [
{
"id": 1,
"name": "Urgent",
"uri": "https://www.example.com/tags/urgent",
"decoration": {
"color": "#FF0000"
}
}
],
"custom_fields": null,
"messages": [
{
"id": 201,
"attachments": [
{
"url": "https://www.example.com/attachments/guide.pdf",
"name": "UserGuide.pdf",
"size": 1024,
"content_type": "application/pdf",
"public": true,
"extra": "Attachment with additional details"
}
],
"body_html": "<p>Please see the attached user guide for more information.</p>",
"body_text": "Please see the attached user guide for more information.",
"channel": "Email",
"created_datetime": "2024-08-22T10:05:00Z",
"external_id": null,
"failed_datetime": null,
"from_agent": true,
"integration_id": 101,
"last_sending_error": null,
"message_id": "MSG2001",
"receiver": {
"id": 501,
"email": "customer501@example.com",
"name": "John Doe",
"firstname": "John",
"lastname": "Doe",
"meta": null
},
"rule_id": 101,
"sender": {
"id": 301,
"email": "agent301@example.com",
"name": "Sarah Parker",
"firstname": "Sarah",
"lastname": "Parker",
"meta": null
},
"sent_datetime": "2024-08-22T10:05:00Z",
"source": {
"type": "email",
"to": [
{
"name": "John Doe",
"address": "customer501@example.com"
}
],
"cc": [],
"bcc": [],
"from": {
"name": "Sarah Parker",
"address": "agent301@example.com"
}
},
"stripped_html": "<p>Please see the attached user guide for more information.</p>",
"stripped_text": "Please see the attached user guide for more information.",
"subject": "User Guide",
"ticket_id": 101,
"via": "Email",
"uri": "https://www.example.com/messages/201"
}
],
"created_datetime": "2024-08-22T10:00:00Z",
"opened_datetime": "2024-08-22T10:01:00Z",
"last_received_message_datetime": "2024-08-22T10:04:00Z",
"last_message_datetime": "2024-08-22T10:05:00Z",
"updated_datetime": "2024-08-22T10:06:00Z",
"closed_datetime": null,
"trashed_datetime": null,
"snooze_datetime": null,
"satisfaction_survey": {
"id": 401,
"body_text": "Please rate our service.",
"created_datetime": "2024-08-22T10:30:00Z",
"customer_id": 501,
"meta": null,
"score": null,
"scored_datetime": null,
"sent_datetime": null,
"should_send_datetime": "2024-08-23T10:30:00Z",
"ticket_id": 101
},
"reply_options": "Reply, Forward, Archive"
}
}
Get Ticket Message
Retrieve a message. | key: getTicketMessage
Output Example Payload
{
"data": {
"id": 3005,
"attachments": [
{
"url": "https://www.example.com/attachments/report.pdf",
"name": "AnnualReport.pdf",
"size": 2500,
"content_type": "application/pdf",
"public": true,
"extra": "Annual financial report"
},
{
"url": "https://www.example.com/attachments/photo.jpeg",
"name": "EventPhoto.jpeg",
"size": 1500,
"content_type": "image/jpeg",
"public": false,
"extra": "Photo from the company event"
}
],
"body_html": "<p>Here is the information you requested.</p>",
"body_text": "Here is the information you requested.",
"channel": "Email",
"created_datetime": "2024-08-20T15:00:00Z",
"external_id": "EXT123456",
"failed_datetime": null,
"from_agent": true,
"integration_id": 123,
"last_sending_error": null,
"message_id": "MSG000456",
"receiver": {
"id": 2020,
"email": "customer@example.com",
"name": "Sam Doe",
"firstname": "Sam",
"lastname": "Doe",
"meta": null
},
"rule_id": 105,
"sender": {
"id": 1010,
"email": "support@company.com",
"name": "Support Team",
"firstname": "Support",
"lastname": "Team",
"meta": null
},
"sent_datetime": "2024-08-20T15:05:00Z",
"source": {
"type": "email",
"to": [
{
"name": "Sam Doe",
"address": "sam.doe@example.com"
}
],
"cc": [],
"bcc": [],
"from": {
"name": "Support Team",
"address": "support@company.com"
}
},
"stripped_html": "<p>Here is the information you requested.</p>",
"stripped_text": "Here is the information you requested.",
"subject": "Your Requested Information",
"ticket_id": 4005,
"via": "email",
"uri": "https://www.example.com/tickets/4005"
}
}
List Customers
List customers, paginated, and ordered by their name (alphabetical order). | key: listCustomers
Output Example Payload
{
"data": {
"data": [
{
"id": 1,
"created_datetime": null,
"email": null,
"external_id": null,
"firstname": "Jane",
"language": null,
"lastname": "Doe",
"name": null,
"timezone": null,
"updated_datetime": "20190925T06:18:22.839271"
}
],
"object": "list",
"uri": "/customers",
"meta": {
"prev_cursor": null,
"next_cursor": null
}
}
}
List Events
List events, paginated, and ordered by their creation date, with the most recently created first. | key: listEvents
Output Example Payload
{
"data": {
"data": [
{
"id": 1024,
"context": "User updated account settings.",
"created_datetime": "2024-08-20T10:45:00Z",
"data": {
"settingsChanged": {
"emailNotifications": true,
"theme": "dark"
},
"actionPerformedBy": "Admin"
},
"object_id": 2048,
"object_type": "UserProfile",
"type": "UpdateSettings",
"user_id": 256,
"url": "https://www.example.com/settings"
}
],
"object": "list",
"uri": "/events",
"meta": {
"prev_cursor": null,
"next_cursor": null
}
}
}
List Messages
List messages matching the given parameters. | key: listMessages
Output Example Payload
{
"data": {
"data": [
{
"id": 3005,
"attachments": [
{
"url": "https://www.example.com/attachments/report.pdf",
"name": "AnnualReport.pdf",
"size": 2500,
"content_type": "application/pdf",
"public": true,
"extra": "Annual financial report"
},
{
"url": "https://www.example.com/attachments/photo.jpeg",
"name": "EventPhoto.jpeg",
"size": 1500,
"content_type": "image/jpeg",
"public": false,
"extra": "Photo from the company event"
}
],
"body_html": "<p>Here is the information you requested.</p>",
"body_text": "Here is the information you requested.",
"channel": "Email",
"created_datetime": "2024-08-20T15:00:00Z",
"external_id": "EXT123456",
"failed_datetime": null,
"from_agent": true,
"integration_id": 123,
"last_sending_error": null,
"message_id": "MSG000456",
"receiver": {
"id": 2020,
"email": "customer@example.com",
"name": "Sam Doe",
"firstname": "Sam",
"lastname": "Doe",
"meta": null
},
"rule_id": 105,
"sender": {
"id": 1010,
"email": "support@company.com",
"name": "Support Team",
"firstname": "Support",
"lastname": "Team",
"meta": null
},
"sent_datetime": "2024-08-20T15:05:00Z",
"source": {
"type": "email",
"to": [
{
"name": "Sam Doe",
"address": "sam.doe@example.com"
}
],
"cc": [],
"bcc": [],
"from": {
"name": "Support Team",
"address": "support@company.com"
}
},
"stripped_html": "<p>Here is the information you requested.</p>",
"stripped_text": "Here is the information you requested.",
"subject": "Your Requested Information",
"ticket_id": 4005,
"via": "email",
"uri": "https://www.example.com/tickets/4005"
}
],
"object": "list",
"uri": "/messages",
"meta": {
"prev_cursor": null,
"next_cursor": null
}
}
}
List Ticket Custom Fields
List all custom fields for a ticket. | key: listTicketCustomFields
Output Example Payload
{
"data": [
{
"field": {
"id": 101,
"external_id": "EXT001",
"object_type": "ticket",
"label": "Customer Satisfaction Score",
"description": "A score representing customer satisfaction on a scale of 1 to 10.",
"priority": 10,
"required": true,
"managed_by": "system",
"definition": {
"input_settings": "DROPDOWN",
"data_type": "integer"
},
"created_datetime": "2024-08-21T12:00:00Z",
"updated_datetime": "2024-08-21T12:30:00Z",
"deactivated_datetime": null
},
"value": "8",
"prediction": {
"predicted": "7",
"confidence": 75,
"display": true,
"confirmed": false,
"modified": false
}
}
]
}
List Tickets
List tickets, paginated and ordered by the attribute of the given view. | key: listTickets
Output Example Payload
{
"data": {
"data": [
{
"id": 1001,
"assignee_user": {
"id": 201,
"email": "jane.doe@example.com",
"name": "Jane Doe",
"firstname": "Jane",
"lastname": "Doe",
"meta": {
"sso": "sso-link",
"profile_picture_url": "https://www.example.com/images/jane.jpg"
}
},
"channel": "Email",
"closed_datetime": "2024-08-21T19:00:00Z",
"created_datetime": "2024-08-21T08:30:00Z",
"customer": {
"id": 301,
"email": "customer301@example.com",
"name": "John Smith",
"firstname": "John",
"lastname": "Smith"
},
"excerpt": "Urgent issue regarding account access...",
"external_id": "EXT-1001",
"from_agent": false,
"integrations": {
"CRM": {
"customer_id": "1001",
"interaction_count": 5
}
},
"is_unread": true,
"language": "en",
"last_message_datetime": "2024-08-21T18:45:00Z",
"last_received_message_datetime": "2024-08-21T18:44:00Z",
"messages_count": 5,
"meta": {
"priority": "high",
"category": "account issue"
},
"opened_datetime": "2024-08-21T09:00:00Z",
"snoozed_datetime": null,
"status": "Closed",
"subject": "Account Access Problem",
"tags": [
{
"id": 101,
"name": "urgent",
"uri": "https://www.example.com/tags/urgent",
"decoration": {
"color": "#FF0000"
}
},
{
"id": 102,
"name": "account-issue",
"uri": "https://www.example.com/tags/account-issue",
"decoration": {
"color": "#0000FF"
}
}
],
"spam": false,
"trashed_datetime": null,
"updated_datetime": "2024-08-21T18:50:00Z",
"via": "web",
"uri": "https://www.example.com/tickets/1001"
},
{
"id": 1002,
"assignee_user": {
"id": 202,
"email": "tom.black@example.com",
"name": "Tom Black",
"firstname": "Tom",
"lastname": "Black",
"meta": {
"sso": null,
"profile_picture_url": null
}
},
"channel": "Phone",
"closed_datetime": null,
"created_datetime": "2024-08-21T10:00:00Z",
"customer": {
"id": 302,
"email": "customer302@example.com",
"name": "Alice Johnson",
"firstname": "Alice",
"lastname": "Johnson"
},
"excerpt": "Inquiry about billing adjustments...",
"external_id": "EXT-1002",
"from_agent": true,
"integrations": {
"BillingSystem": {
"account_id": "302",
"last_payment_date": "2024-08-15"
}
},
"is_unread": false,
"language": "es",
"last_message_datetime": "2024-08-21T15:30:00Z",
"last_received_message_datetime": "2024-08-21T15:29:00Z",
"messages_count": 3,
"meta": {
"priority": "medium",
"category": "billing"
},
"opened_datetime": "2024-08-21T10:15:00Z",
"snoozed_datetime": null,
"status": "Open",
"subject": "Billing Adjustment Request",
"tags": [
{
"id": 103,
"name": "billing",
"uri": "https://www.example.com/tags/billing",
"decoration": {
"color": "#00FF00"
}
}
],
"spam": null,
"trashed_datetime": null,
"updated_datetime": "2024-08-21T15:35:00Z",
"via": "phone",
"uri": "https://www.example.com/tickets/1002"
}
],
"object": "list",
"uri": "/tickets",
"meta": {
"prev_cursor": null,
"next_cursor": null
}
}
}
Raw Request
Send raw HTTP request to Gorgias API. | key: rawRequest
Search
Search for resources. | key: search
Output Example Payload
{
"data": {}
}
Update Customer
Update a customer. | key: updateCustomer
Output Example Payload
{
"data": {
"id": 3924,
"created_datetime": "2019-04-13T03:27:56.973873",
"email": "john@example.com",
"external_id": "customer-84203241",
"firstname": "John",
"integrations": {
"6": {
"orders": [
{
"id": 772803526679,
"total_tax": "0.02",
"created_at": "2018-12-04T03:29:37-08:00",
"line_items": [
{
"id": 1760305053719,
"sku": "0987654321",
"name": "Acidulous candy",
"grams": 10,
"price": "0.10",
"title": "Acidulous candy",
"taxable": true,
"quantity": 1,
"price_set": {
"shop_money": {
"amount": "0.10",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.10",
"currency_code": "USD"
}
},
"tax_lines": [
{
"rate": 0.2,
"price": "0.02",
"title": "TVA",
"price_set": {
"shop_money": {
"amount": "0.02",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.02",
"currency_code": "USD"
}
}
}
],
"product_id": 8345093387,
"variant_id": 28442938955,
"total_discount": "0.00",
"requires_shipping": true,
"fulfillment_status": null,
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "USD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "USD"
}
},
"fulfillment_service": "manual",
"fulfillable_quantity": 1
}
],
"contact_email": "marie@gorgias.io",
"billing_address": {
"zip": "94103",
"city": "SAN FRANCISCO",
"name": "Marie Curie",
"country": "United States",
"address1": "52 Washburn Street",
"address2": "",
"province": "California",
"last_name": "Curie",
"first_name": "Marie",
"country_code": "US",
"province_code": "CA"
}
}
],
"customer": {
"id": 667928133655,
"note": "",
"tags": "",
"email": "marie@gorgias.io",
"firstname": "Marie",
"lastname": "Curie",
"orders_count": 1,
"default_address": {
"id": 707106144279,
"zip": "94103",
"city": "SAN FRANCISCO",
"name": "Marie Curie",
"country": "United States",
"default": true,
"address1": "52 Washburn Street",
"address2": "",
"province": "California",
"last_name": "Curie",
"first_name": "Marie",
"customer_id": 667928133655,
"country_code": "US",
"country_name": "United States",
"province_code": "CA"
}
},
"__integration_type__": "shopify"
}
},
"language": "fr",
"lastname": "Smith",
"name": "John Smith",
"note": "Our best customer.",
"timezone": "UTC",
"updated_datetime": "2019-09-25T06:18:22.839271"
}
}
Update Customer Data
Set a customer's data. | key: updateCustomerData
Output Example Payload
{
"data": {
"message": "Success"
}
}
Update Ticket
Update a ticket. | key: updateTicket
Output Example Payload
{
"data": {
"id": 2201,
"assignee_user": {
"id": 450,
"email": "sara.jones@example.com",
"name": "Sara Jones",
"firstname": "Sara",
"lastname": "Jones",
"meta": {
"sso": "sso-jones-link",
"profile_picture_url": "https://www.example.com/images/sara.jpg"
}
},
"channel": "Web",
"closed_datetime": null,
"created_datetime": "2024-08-22T10:00:00Z",
"customer": {
"id": 550,
"channels": [
{
"id": 1
}
],
"email": "customer550@example.com",
"external_id": "550-external",
"firstname": "Michael",
"integrations": {
"CRM": {
"customer_level": "Silver",
"interaction_count": 10
}
},
"lastname": "Brown",
"name": "Michael Brown",
"note": "Needs follow-up on previous issue"
},
"external_id": "EXT-2201",
"from_agent": true,
"is_unread": true,
"language": "en",
"last_message_datetime": "2024-08-22T10:15:00Z",
"last_received_message_datetime": "2024-08-22T10:14:00Z",
"messages": [
{
"id": 3301,
"attachments": [
{
"url": "https://www.example.com/attachments/info.pdf",
"name": "Details.pdf",
"size": 2048,
"content_type": "application/pdf",
"public": true,
"extra": "Detailed document"
}
],
"body_html": "<p>Thank you for reaching out. Please see the attached document for more information.</p>",
"body_text": "Thank you for reaching out. Please see the attached document for more information.",
"channel": "Email",
"created_datetime": "2024-08-22T10:15:00Z",
"external_id": "MSG-3301",
"failed_datetime": null,
"from_agent": true,
"integration_id": 501,
"last_sending_error": null,
"message_id": "MSG-3301",
"receiver": {
"id": 550,
"email": "customer550@example.com",
"name": "Michael Brown",
"firstname": "Michael",
"lastname": "Brown",
"meta": null
},
"rule_id": 101,
"sender": {
"id": 450,
"email": "sara.jones@example.com",
"name": "Sara Jones",
"firstname": "Sara",
"lastname": "Jones",
"meta": null
},
"sent_datetime": "2024-08-22T10:15:00Z",
"source": {
"type": "Email",
"to": [
{
"name": "Michael Brown",
"address": "customer550@example.com"
}
],
"cc": [],
"bcc": [],
"from": {
"name": "Sara Jones",
"address": "sara.jones@example.com"
}
},
"stripped_html": "<p>Thank you for reaching out. Please see the attached document for more information.</p>",
"stripped_text": "Thank you for reaching out. Please see the attached document for more information.",
"subject": "Further Information Required",
"ticket_id": 2201,
"via": "Email",
"uri": "https://www.example.com/messages/3301"
}
],
"meta": {
"issue_type": "technical",
"priority": "high"
},
"opened_datetime": "2024-08-22T10:01:00Z",
"reply_options": "Reply, Forward, Archive",
"satisfaction_survey": {
"id": 402,
"body_text": "Please rate our service.",
"created_datetime": "2024-08-22T12:30:00Z",
"customer_id": 550,
"meta": {
"survey_type": "email"
},
"score": null,
"scored_datetime": null,
"sent_datetime": null,
"should_send_datetime": "2024-08-23T12:30:00Z",
"ticket_id": 2201
},
"snoozed_datetime": null,
"spam": false,
"status": "Open",
"subject": "Support Inquiry",
"tags": [
{
"id": 301,
"name": "Technical Support",
"uri": "https://www.example.com/tags/technical-support",
"decoration": {
"color": "#007BFF"
}
}
],
"trashed_datetime": null,
"updated_datetime": "2024-08-22T10:20:00Z",
"via": "Web",
"uri": "https://www.example.com/tickets/2201"
}
}
Update Ticket Custom Fields
Update a ticket's custom fields values. | key: updateTicketCustomFields
Output Example Payload
{
"data": [
{
"field": {
"id": 101,
"external_id": "CF-101",
"object_type": "ticket",
"label": "Urgency Level",
"description": "A measure of how urgently the issue needs to be resolved.",
"priority": 5,
"required": true,
"managed_by": "system",
"definition": {
"input_settings": "DROPDOWN",
"data_type": "integer"
},
"created_datetime": "2024-01-01T12:00:00Z",
"updated_datetime": "2024-08-21T12:30:00Z",
"deactivated_datetime": null
},
"value": "High",
"prediction": {
"predicted": "Medium",
"confidence": 85,
"display": true,
"confirmed": false,
"modified": true
}
},
{
"field": {
"id": 102,
"external_id": "CF-102",
"object_type": "ticket",
"label": "Resolution Time",
"description": "Estimated time to resolve the ticket.",
"priority": 3,
"required": false,
"managed_by": "admin",
"definition": {
"input_settings": "INPUT_NUMBER",
"data_type": "integer"
},
"created_datetime": "2024-01-02T13:00:00Z",
"updated_datetime": "2024-08-21T14:00:00Z",
"deactivated_datetime": null
},
"value": "48",
"prediction": {
"predicted": "72",
"confidence": 70,
"display": true,
"confirmed": true,
"modified": false
}
},
{
"field": {
"id": 103,
"external_id": "CF-103",
"object_type": "ticket",
"label": "Customer Satisfaction",
"description": "Predicted customer satisfaction based on resolution.",
"priority": 2,
"required": true,
"managed_by": "system",
"definition": {
"input_settings": "INPUT",
"data_type": "integer"
},
"created_datetime": "2024-01-03T14:00:00Z",
"updated_datetime": "2024-08-21T15:00:00Z",
"deactivated_datetime": null
},
"value": "5",
"prediction": {
"predicted": "6",
"confidence": 65,
"display": true,
"confirmed": false,
"modified": true
}
}
]
}
Upload Files
Upload a file or several files. | key: uploadFiles
Output Example Payload
{
"data": [
{
"content_type": "image/jpeg",
"size": 1500,
"name": "vacation_photo.jpg",
"url": "https://www.example.com/uploads/vacation_photo.jpg"
}
]
}