openapi: 3.0.1 info: title: Gladly API description: >- # Introducing the Gladly API At Gladly, we believe that customer service is best when it's a conversation. That means more than just helping customers with one-off questions or issues: it's about making them feel known, valued, and respected for the individuals they are. The Gladly API was built to help facilitate those relationships, providing agents with the rich customer context they need to deliver seamless experiences that make customers feel like they're more than just a number in a sea of others. # Overview You can integrate easily with Gladly by calling Gladly's [REST API](https://developer.gladly.com/rest/) and implementing the [Lookup API](https://developer.gladly.com/rest/) to provide data from your own services. Some examples of what you do through Gladly APIs include managing customer profile data, interacting with a customer's timeline, providing the latest information about a customer's orders, and more. ## REST API Clients can access the **REST API** via HTTPS at your organization's Gladly domain (e.g. `https://{organization}.gladly.com`). Resources follow REST semantics and utilize industry-standard HTTP verbs, response codes, and authentication schemes. In addition, all responses and payloads are in JSON with consistent error codes and formats. ## Lookup API The Gladly **Lookup API** allows your organization to provide data services to power the agent's experience with a complete view of your customers' information, transactions, and activity. You can provide a web service that implements the Lookup API and Gladly will call it when that data is needed. Like the REST API, the Lookup API is specified using REST semantics, and exchanges JSON requests and responses authenticated and signed with secure keys. Gladly will perform lookups when certain activities occur within Gladly, such as when a customer's profile is loaded. A detailed overview of Lookup Adaptor architecture, requests, resposnes and more can be found [here](https://help.gladly.com/developer/docs/lookup-adapter-introduction). ## Testing Test the myriad possibilities of the Gladly API in a safe, secure space. We'll enable the Gladly API in a separate sandbox environment, so you can experiment freely without impacting your production environment (or vice versa). Your sandbox environment is accessible at `https://{organization}.gladly.qa`, where `organization` is your company name. For specific API endpoints, see documentation below. # Getting Started Think of this section as getting the keys to unlocking your access to the Gladly APIs. First, you'll need to set up an account with the necessary API [permissions](https://developer.gladly.com/rest/). With these permissions, you can then go on to create the [API Token(s)](https://developer.gladly.com/rest/) you need to access Gladly's API [resources](https://developer.gladly.com/rest/). ## Permissions Gladly Administrators can set API permissions on an agent-by-agent basis. We'll discuss how this maps to API access in the section on [authentication](https://developer.gladly.com/rest/) below. To allow a user to create API tokens and access the API: 1. Log in to your Gladly instance. 2. Open the menu on the top left-hand corner of the page. 3. Navigate to **Settings** > **Users* 4. Search and click the user profile you wish to give access to. 5. You'll see a permission called **API User**. Select it, while making sure to keep the user's **Agent** role intact. 6. Hit **Save** to give access. ![Agent profile screen](assets/permissions-agent.png) We recommend creating a dedicated user to make API calls, whose account won't be used for agent and organization management. This will help you with any future audits of API activity vs. agent activity. ## Creating API Tokens You must create an API token to access Gladly API resources (see above [Permissions](https://developer.gladly.com/rest/)). If your profile already has access to the **API User** permission, you'll see a menu item titled **More settings**. Click **More settings**: ![API Token Menu](assets/permissions-token-nav.png) Click **API Tokens**, then the **Create Token** button on the upper right-hand corner of the page: ![API Token Add](assets/permissions-token-add.png) A token will be generated and named, by default, **New Token** (though depending on whether you have existing tokens, it may be named New Token 2, or New Token 3, etc.). You can rename the token to something more easily referenceable by clicking the name to edit. This token will be associated with your agent profile, which we refer to as the API User in this document. ![API Token View](assets/permissions-token-view.png) For security purposes, you'll only see a new token once before you navigate away from the page. ## Replacing/Rotating API Tokens Should you lose this token, or wish to rotate your application keys, you can do the following: 1. Generate a new token. 2. Store the new token in a secure location. 3. Delete the old token. 4. Update your applications/scripts with the new token. # Authentication version: '1.0' x-api-status-urls: false x-konfig-ignore: object-with-no-properties: true potential-incorrect-type: true servers: - url: https://organization.gladly.com tags: - description: > ## Conversation A **Conversation** in Gladly contains the timeline of activity for a customer including communications to and from your organization along with other internal and external activity. Conversations API enables you to interact with the customer conversation timeline. ## Conversation Items A number of different types of items may appear in a customer's timeline. Each is described below. | Item Type | Item Definition | Create | Read | Update | Delete | Media | |-------------------------------|----------------|--------|------|--------|--------|--------| | Chat Message | A message sent/received via the [Chat](https://help.gladly.com/docs/add-and-configure-chat-entry-points#) channel | Yes | Yes | No | No | No | | Conversation Status Change | Conversation status changed (e.g.: from OPEN to WAITING, or OPEN to CLOSED) | Yes | Yes | Yes | No | No | | Custom Channel Message | A Message sent/received via a Custom Channel integration | No | Yes | No | No | No | | Customer Activity | Non-routable customer activity added to customer timeline via API | Yes | Yes | No | Yes | No | | Email | A message sent/received via the [Email](https://help.gladly.com/docs/add-and-configure-email-entry-point) channel | Yes | Yes | No | No | No | | Facebook Messenger Message | A message sent/received via the [Facebook Messenger](https://help.gladly.com/docs/set-up-and-configure-facebook-messenger) channel | Yes | Yes | No | No | No | | Instagram Direct | A message sent/received via the [Instagram](https://help.gladly.com/docs/set-up-and-configure-instagram-messaging) channel | No | Yes | No | No | No | | Note | An internal [Note](https://help.gladly.com/docs/add-a-note-to-a-conversation) on the Customer conversation | Yes | Yes | No | No | No | | Phone Call | A [Phone Call](https://help.gladly.com/docs/add-and-configure-voice-entry-points) placed/received on Gladly | No | Yes | No | No | Yes | | SMS Message | A message sent/received via the [SMS](https://help.gladly.com/docs/add-and-configure-sms-entry-points) channel | Yes | Yes | No | No | No | | Task | A [Task](https://help.gladly.com/docs/what-is-a-task) on a Customer's profile | Yes | Yes | Yes | No | No | | Topic Change | A [Topic](https://help.gladly.com/docs/what-are-topics) added or removed on a Conversation | Yes | Yes | No | Yes | No | | Twitter (decommissioned as of 04/20/23) | A message sent/received via the [Twitter](https://help.gladly.com/docs/setup-and-configure-twitter-direct-messages) channel | No | Yes | No | Yes | No | | Voicemail | A Voicemail received | No | Yes | No | No | Yes | | WhatsApp | A message sent/received via the WhatsApp channel | No | Yes | No | No | No | ### Chat Message Content of messages sent between Gladly and customers through Gladly Chat. ### Conversation Status Change Record of a change in the status of a conversation. ### Customer Activity Information about activities customers participated in, for example, emails they received, issues in another system, or customer satisfaction surveys they answered. These can be created through the API to bring in information from other systems. Adding an activity to the customer timeline is not customer facing. For example, posting an email activity to the timeline does not send an email to the customer. ![Customer Activity](assets/customer-activity.png) ### Email Content of emails sent between Gladly and customers. ### Facebook Messenger Message Content of messages sent between Gladly and customers on Facebook Messenger. ### Instagram Direct Content of messages sent between Gladly and customers on Instagram Direct. ### Note Content of the note recorded in Gladly. ### Phone Call Information about phone calls that took place between Gladly and customers. ### SMS Message Content of SMS text messages sent between Gladly and customers. To send SMS messages to customers through the API, see [Send SMS](https://developer.gladly.com/rest/). ### Task Interacting with tasks through the conversations API is deprecated. Use [Tasks API](https://developer.gladly.com/rest/) instead. ### Topic Change Record of an agent adding or removing a topic from a conversation in Gladly. ### Twitter (decommissioned as of 04/20/23) Content of messages sent between Gladly and customers on Twitter. ### Voicemail Information about voicemail left by customers in Gladly. ### WhatsApp Content of messages sent between Gladly and customers on WhatsApp. name: Conversations - description: > A task is a way to create and do internal follow-up work for a customer within Gladly. Tasks have a due date, an assignee, a description of what is needed for a customer, and can be commented on. These can be created through the API to assign items to work within Gladly. ![Task](assets/task.png) name: Tasks - description: > The collection of Message Automation APIs are used to facilitate communication between a Customer via a Gladly channel and a 3rd party Automation service, such as a chat bot. These APIs allow an Automation service to interact with a Customer as well as close a Conversation with a Customer or route a Customer to an Agent. Subscribe to the [Webhook Event](https://developer.gladly.com/rest/) `AUTOMATION/MESSAGE_RECEIVED` to receive inbound messages. **Note** The Message Automation APIs are currently in a private beta and attachments are currently not supported. Please contact your Customer Success Manager for access. name: Message Automation - description: > Export API is a simple, comprehensive, file-based data export. You can export the lifetime of your customers' conversations in Gladly to a central data repository such as your data warehouse or data lake. You can export all communications successfully delivered within a specified date range. The export date range could be the past hour, the past 24 hours, or a custom data range. Please note, for one-time exports covering a period greater than six months, a service fee may apply. Job results can be deleted once downloaded. Delete will remove all result files along with the job metadata. Files older than 14 days are removed from Gladly and jobs older than 14 days are not available from the API. If you discover that you need the deleted files later, please contact Gladly Support to regenerate them for you. ### SCHEDULING EXPORT JOBS You can schedule a one-time or repeating - hourly or daily - data export job. By default, each organization has a daily export job configured. To schedule a one-time job or change the job frequency, please contact Gladly Support. name: Export - description: > A **Webhook** is a way to send notifications about Gladly events as a POST request to the endpoint of your choice. name: Webhooks - description: > An **Agent** represents the user profile of a person who helps customers in Gladly. The API allows you to lookup Agents who participated in conversations with customers. name: Agents - description: > A **Public Answer** in Gladly represents a consumer-facing Answer. Answers API allows you to search and retrieve Public Answers (created directly in the Gladly UI), which you can display in the Glad App web widget, use to build your website's help center/FAQ page, or publish on any page on your website. This API can be used without an API token because it only provides access to public content. You may also work with Gladly Support to enable [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) access so the API can be used directly from client-side javascript. ### How a user creates a public answer in Gladly ![](assets/create-public-answer.png) ### How that answer is searched and displayed on the Glad App Web widget ![](assets/sidekick-answer-search.png) name: Answers - description: > A **Customer** in Gladly represents information about a customer of your organization including their profile, contact information, notes, and transactions. Customers API allows you to add, update, and get customer profile data. ### Error Handling Id, mobile phone number, and email address must be unique across customer records. 409 errors returned will include details on any conflicts, such as a field being taken. Additionally, errors may be returned due to customer profiles being merged. If a customer has been merged into another, requests to get a customer by id will return 301 errors specifying the new id of the customer, and requests to update a customer by id will return 404 errors. name: Customers - description: > Communications API enables you to programmatically send SMS messages to your customers and receive messages from a custom channel integration. ### Agent View ![Agent View](assets/agent-sms.png) ### Consumer View ![Customer View](assets/consumer-sms.png) name: Communications - description: > A **Report** in Gladly contains metrics that you need to run the contact center. Reports API allows you to access Gladly's reports programatically. name: Reports - description: > An **Inbox** receives customer communications in Gladly. The communications route to the inbox according to channel and destination endpoint configuration. For example, all calls to a specific phone number or emails to a specific address may go to an inbox. name: Inboxes - description: > A **Team** represents a group of Agents. They may handle particular **Inboxes** or types of work within Gladly. name: Teams - description: > A **Topic** is a way of labeling a conversation in Gladly for specific business purposes. For example, an agent may apply the topic "Return" to a conversation where a customer returns merchandise. Topics are used for reporting and to control various workflows. Topics can be configured to have a nested hierarchy. For instance, the topic "Return" could be a parent of "Size" and "Color" child topics. Visit our [Help Pages](https://help.gladly.com/docs/principles-of-hierarchical-topics) to learn more about Hierarchical Topics. name: Topics - description: > An **Event** is something that has happened in Gladly. The Events API allows you to extract event details from the past 24 hours. name: Events - description: > Freeform Topics allow you to associate granular data like Order Number to a Conversation. This data can be accessed for analysis via APIs, Webhooks, and AWS EventBridge. They are powered by custom attributes as you will see throughout this API, the Conversations API, the Events API and events used in Webhooks. Note: These attributes are currently associated to the Conversation entity only and are therefore different from customAttributes listed under the Customer entity. See the Customer API for more information on Customer custom attributes. name: Freeform Topics - description: > An **Organization** contains metadata about your company that Gladly is configured with. name: Organization - name: User Identity - name: Payloads - description: > Gladly **webhooks** are an easy way to send notifications about Gladly events and have them delivered to the endpoint of your choice, giving you a streamlined method to trigger associated actions in external systems that respond to events in Gladly. Simply choose where to send notifications about events that you are interested in (e.g. when a conversation is closed), and they’ll be delivered to the endpoint of your choice. Configure webhooks using the [Webhooks API](https://developer.gladly.com/rest/) or the Webhooks Admin Page. Users with API User permissions can configure webhooks by navigating to Integrations > Webhooks. ![Webhooks admin page](assets/webhooks-admin.png) ## Securing Webhooks We provide two methods for your web service to authenticate requests from Gladly. We recommend implementing at least one **authentication** option. ### Basic Authentication For this method you will supply a username and password with the webhooks `credentials` field. This will be sent with each request. You may optionally supply a realm if needed. ### Header Based Token Authentication For this method you will configure one or more HTTP headers with the webhook's `headers` field. Gladly will send in each request to your web service. ## Ping Event Whenever you enable a webhook or update a webhook's URL, we'll send you a special `PING` event. Your web service is expected to respond with a 200 status code to this event. If it does not respond or times out, the webhook create or update will not succeed. ## Retry Policy **Effective 6/28/23** If your service responds to an event with a response code outside the 2XX range or times out after 15 seconds, Gladly considers that delivery as failed and will resend the request up to 4 times over an hour. After the fourth attempt, we will deactivate the webhook and wil notify all API Users in your organization's environment via email. To reactivate the webhook, your team will first need to investigate the issue and make the necessary changes for the webhook to start working again. Once the issue is resolved, you will be able to re-activate the webhook via the Settings > Webhooks page. The following table shows the intervals between each retry attempt. | Attempt | Retry interval | | ------- | ------------------------ | | 1 | 30 seconds | | 2 | 5 minutes | | 3 | 30 minutes | | 4 | 1 hour | ## Logs We provide the last 100 HTTP request logs for a webhook that occurred during the past month. Logs can take up to 30 seconds to view and require you to refresh the page. ![Webhook Logs](assets/webhook-log.png) Each log displays the status, event type and occurred at timestamp for a given request. You can expand the log for more details about the request and response. For more information about webhook logs, please see our [Help Documentation](https://connect.gladly.com/docs/help-documentation/article/reactivate-deactivated-webhooks/?highlight=webhook). ## Payloads Gladly payloads are intentionally small: they contain only Gladly IDs and event names rather than the object/data that has been modified or created This helps Gladly webhooks perform more quickly when many events occur throughout the day. This also assists with security, so if you misconfigure a webhook, it does not send sensitive information to an outside service. To retrieve more information about the object in question, you may make an additional Gladly API call to retrieve the Gladly object. For example, to know more about conversationId whose status was updated, call the [GET Conversation API](https://developer.gladly.com/rest/) or the [List Items in Conversation API](https://developer.gladly.com/rest/). ## Available Events Please see the [Help Documentation](https://help.gladly.com/docs/reporting-concepts) for more information about many of the events listed below. | Event | Triggered by Gladly when: | | ------------------------------| --------------------------------------------------------------| | AGENT_AVAILABILITY/UPDATED | an Agent's availability is updated | | AGENT_STATUS/CHANGED_ACTIVE_REASON | an Agent's active reason is updated | | AGENT_STATUS/LOGGED_IN | an Agent logs in | | AGENT_STATUS/LOGGED_OUT | an Agent logs out | | AGENT_STATUS/RETURNED_FROM_AWAY | an Agent returns from away | | AGENT_STATUS/WENT_AWAY | an Agent goes away | | AUTOMATION/MESSAGE_RECEIVED | an Entry Point that has been configured for Message Automation receives an inbound message | | CONTACT/ENDED | a Contact is ended | | CONTACT/FULFILLED | a Contact's SLA is fulfilled | | CONTACT/HOLD_ENDED | a Contact's hold is ended | | CONTACT/HOLD_STARTED | a Contact's hold is started | | CONTACT/JOINED | an Agent joins a Contact | | CONTACT/MESSAGE_RECEIVED | a Message is received | | CONTACT/MESSAGE_SENT | a Message is sent | | CONTACT/OFFER_ACCEPTED | a Contact's offer is accepted | | CONTACT/OFFERED | a Contact is offered | | CONTACT/OFFER_REJECTED | a Contact's offer is rejected | | CONTACT/STARTED | a Contact is started | | CONTACT/TRANSFERRED | a Contact is transferred | | CONVERSATION/CLOSED | a Conversation is closed | | CONVERSATION/CREATED | a new Conversation is created | | CONVERSATION/CUSTOM_ATTRIBUTE_ADDED | a custom attribute has been added to the conversation | | CONVERSATION/CUSTOM_ATTRIBUTE_REMOVED | a custom attribute has been removed from the conversation | | CONVERSATION/NOTE_CREATED | a Note is added to a Conversation | | CONVERSATION/REOPENED | a Conversation is reopened | CONVERSATION/TOPIC_ADDED | a topic is added to a Conversation | | CONVERSATION/TOPIC_REMOVED | a Conversation's topic is removed | | CONVERSATION_ASSIGNEE/UPDATED | a Conversation's assignee (inbox and/or Agent) changes | | CONVERSATION_STATUS/UPDATED | a Conversation changes statuses (e.g.: from OPEN to CLOSED) | | CUSTOM_CHANNEL/MESSAGE_SENT | an outbound message sent using a Custom Channel | | CUSTOMER/MERGED | a Customer Profile is merged with another profile | | CUSTOMER_PROFILE/CREATED | a Customer Profile is created | | CUSTOMER_PROFILE/DELETED | a Customer Profile is deleted | | CUSTOMER_PROFILE/MERGED | a Customer Profile is merged with another profile | | CUSTOMER_PROFILE/UPDATED | a Customer Profile is updated (e.g.: name is updated) | | EXPORT_JOB/COMPLETED | a [data export job](https://developer.gladly.com/rest/) is completed | | EXPORT_JOB/FAILED | a [data export job](https://developer.gladly.com/rest/) fails to complete | | MESSAGE/RECEIVED | an inbound message other than a phone call is received | | PAYMENT_REQUEST/CREATED | a payment request is created | | PAYMENT_REQUEST/STATUS_CHANGED | a payment request's status changes | | PAYMENT_REQUEST/VIEWED | a payment request is viewed by the Customer | | PING | a webhook is initially created to verify serivce availability | | TASK/ASSIGNEE_UPDATED | a task's assignee is updated | | TASK/CLOSED | a task is closed | | TASK/COMMENT_ADDED | a comment is added to a task | | TASK/CONTENT_UPDATED | the content of a task is updated | | TASK/CREATED | a task is created | | TASK/DUE_DATE_UPDATED | the due date of a task is updated | | TASK/FOLLOWER_ADDED | a follower is added to a task | | TASK/FOLLOWER_REMOVED | a follower is removed from a task | TASK/REOPENED | a closed task is reopened | name: Summary - description: > **Customer Lookup** allows you to provide a web service to search and get customer profile data and transactions. To support Customer Lookup, your organization will deploy an adaptor service (aka Lookup Adaptor) running on your network that implements the Lookup API. From there you can can connect the service to internal systems providing customer and transaction data. ![Lookup Architecture](assets/lookup-adapter-arch.svg) ### Overview Building a Lookup Adaptor will allow you to showcase extended customer profile information and actions in Gladly. For example, you may extend the customer profile in Gladly with loyalty points and lifetime value to assist with VIP routing. You can also display historical orders in Gladly to allow agents to view frequently used directly in Gladly without having to go to another system. You can even extend Gladly with Actions so that agents can cancel orders or award loyalty points directly in Gladly! On a high-level, Gladly will perform a request to your Customer Lookup integration(s) to retrieve extended information from your system(s) about a Customer Profile in Gladly. To ensure performance, Gladly recommends that your Customer Lookup integration(s) be able to respond back to the Gladly POST request in < 5 seconds. Gladly will terminate the request in 15 seconds if it receives no response from your integration(s). Please note that if one Customer Lookup integration times out / responds with an error that Gladly will consider this an error for all Customer Lookup integration(s). ### Sample code Sample code for building a Customer Lookup integration can be found [here](https://github.com/gladly/lookup-practice). ### Architecture, Setup, Authentication, Sample Requests and More A detailed overview of Lookup Adaptor architecture, requests, resposnes and more can be found [here](https://help.gladly.com/developer/docs/lookup-adapter-introduction). name: Customer Lookup - description: > As we evolve the Gladly API over time, changes will be either added to the current version of the API (i.e. **[backwards compatible changes](https://developer.gladly.com/rest/)**), or result in a new version that you will need to integrate with afresh (i.e. **[non-backwards compatible changes](https://developer.gladly.com/rest/)**). ## URL Path Versioning The various versions of the Gladly API will be differentiated via global versioning, with the relevant version number reflected within the path parameter of the URL: https://organization.gladly.com/api/v{major-version-number}/{resource path} ## Backwards Compatible Changes For the most part, changes to the API will be backwards compatible, such as adding resources, additional fields to response objects, new value types for enums, or expanding a validation constraint to be more accepting. Ensure your client can gracefully handle or ignore unfamiliar fields and values so it continues to operate smoothly over the lifespan of an API version. ## Non-Backwards Compatible Changes Versions will be upleveled when a non-backwards compatible change occurs. This should not happen often, but can occur in the case of: - a field being removed from an object - a resource path no longer being supported - changing the type of a field - adding a new required parameter for a resource - constricting the validation parameters for a request These will only occur when absolutely necessary and a summary of the changes from version to version can be viewed in the release notes. Previous versions will be supported for a period of time before being removed after providing ample advanced notice. name: Versioning - description: > Wherever possible, Gladly uses standard HTTP status codes to signal the success or failure of a call. Generally speaking, `2xx` statuses indicate success, `3xx` statuses indicate the client must take further action such as redirection, `4xx` statuses indicate an error with the input supplied by the client, `5xx` statuses indicate an unexpected error from Gladly servers (these will be rare cases). ## Common Status Codes | HTTP Status | Description | | ----------- | ------------------------------------------------- | | 200 | Success with results in response body | | 201 | Resource created | | 204 | Success with empty response body | | 301 | The resource location has moved | | 400 | API usage error | | 401 | Authentication not provided | | 403 | User does not have persmission to access resource | | 404 | Resource is not found | | 429 | Rate limit reached | ## Programmatic Remediation In the case of a `400` response, there will be a structured list of `error` objects that will provide information to correct the error. The error object will contain a `code` to describe the problem. The most common codes are: | Code | Description | | ------------ | -------------------------------------- | | blank | Presence error | | invalid | Format error | | moved | This resource is now located elsewhere | | not_a_number | Value not numeric error | | present | Absence error | | taken | Uniqueness error | | too_long | Exceeds permissible length error | | wrong_length | Length is not equal to expected error | Refer to the errors section of each endpoint for more information. Example: {"errors":[{"code":"blank","detail":"one of emailAddress, phoneNumber must be present"}]} name: Error Handling - description: > In some data properties, HTML markup is supported for formatting rich content to display within Gladly. For security and readability, only a limited set of HTML tags and attributes are allowed. | Tags | Attributes | | ------------------- | ----------------------------------------------------------------------------------- | | a | href, target | | img | src, align, alt, height, width | | h1, h2, h3 | | | hr, br | | | div | style | | span, p | | | font | size, color | | strong, em, b, i, u | | | ul, ol | type | | li | type, value | | dl, dt, dd | | | table | | | tbody, tfoot | align, valign | | col, colgroup | align, valign, height, width, span | | thead, tr | align, valign | | td, th | align, valign, style, abbr, colspan, rowspan, headers, height, width, scope, nowrap | | caption | | The `style` attribute may use style properties: `border-left`, `margin`, `padding-left`, `text-align`, `background-color`. name: Rich Content - description: > We are continuously expanding Gladly's integration capabilities. To get early access to any of the following features, please contact Gladly Support. ## New Integrations Create customer service experiences that fit your business and delight your customers. We continue to build integrations with applications that your teams already rely on today. Customer satisfaction, quality assurance, workforce management, email marketing, and order management are application categories we're focusing on next. For the list of available integrations, see our [Integrations Library](https://www.gladly.com/integrations/). ## New APIs If you can't wait for native integrations mentioned above, you can integrate your apps with Gladly using a growing list of APIs and webhook events. Sign up for our [release notes](https://gladly.com/product-release) to be notified of new developments. name: Launching Soon - description: "The number of requests for an **[organization](https://developer.gladly.com/rest/)** is rate limited for all APIs to ensure that adequate resources are available for all customers.\n\nGladly has two types of API rate limits:\n\n### Request Limit\nRequest limits are applied on a per-second basis and are implemented to protect against denial-of-service attacks. This ensures that adequate resources are available for all customers.\n\n### Concurrency Limit\nConcurrency limits are applied on the number of simultaneous requests to the endpoint. For example, a few long-lasting requests to an API endpoint simultaneously might exceed the concurrent rate limit for that endpoint.\n\n## Default Rate Limit\n\nOrganizations that send many requests in quick succession may see error responses that show up as status code\_**`429`**.\n>Individual APIs may have their own API Rate Limit and will be documented as such. Otherwise, the following default rate limits apply.\n\n| Method | Request Limit | Concurrency Limit |\n| ------------------- | -----------------------------------|----------------------------------|\n| GET | 10 Requests per second | Not Applicable |\n| POST | 10 Requests per second | Not Applicable |\n| PUT | 10 Requests per second | Not Applicable |\n| PATCH | 10 Requests per second | Not Applicable |\n| DELETE | 10 Requests per second | Not Applicable |\n\nWe may adjust limits to prevent abuse.\n\nIf you have questions about rate limited requests, please contact [Gladly Support](https://help.gladly.com/docs/contact-gladly-support).\n\n## Reporting API Rate Limit\n\nThe [Reports](https://developer.gladly.com/rest/) APIs have slightly different default rate limits than other APIs.\n\n| Method | Request Limit | Concurrency Limit |\n| ------------------- | -----------------------------------|----------------------------------|\n| POST | 10 Requests per minute | 2 concurrent requests at a time across the entire organization |\n\n## Handling Rate Limit\n\nThe Gladly API response headers include the organization's current rate limit and the number of requests remaining in the current second.\nThe remaining limit is calculated using the total number of requests received from all clients with your organization's API tokens.\n\n```json\n Ratelimit-Limit-Second\n Ratelimit-Remaining-Second\n```\n\nYou can anticipate hitting the rate limit by checking these headers.\n\nOne technique for gracefully handling rate-limited requests is to watch for\_**`429`**\_status codes and implement a client-side retry mechanism with an exponential backoff schedule.\nWe’d also recommend building some randomness into the backoff schedule to avoid a\_**[thundering herd effect](https://en.wikipedia.org/wiki/Thundering_herd_problem)**.\n" name: Rate Limit paths: /api/v1/communications/sms: post: tags: - Communications summary: Send SMS operationId: Communications_sendSms description: > To send an SMS message to a customer specified by a mobile phone number. Gladly can send outbound SMS messages globally. By default, your organization is set up to only allow access to your home country. To send SMS messages to other countries, please contact [Gladly Support](https://help.gladly.com/implementation/docs/filing-a-support-issue) with a P4 designation. Please be aware that: - Any automated outbound text messages **must** comply with carrier [acceptable use policies](https://help.gladly.com/docs/sms-compliance-requirements) (e.g.: if sending automated messages about order status, make sure customers can explicitly opt-in to text messages), including registering your SMS use cases carriers. - Text messages send in [segments](https://help.gladly.com/v1/docs/en/voice-and-sms-phone-number-costs) and you pay per segment. We highly recommend using the [segment calculator](https://twiliodeved.github.io/message-segment-calculator/) when crafting automated outbound text messages. - Each type of phone number has a [Message Segments per Second limit](https://support.twilio.com/hc/en-us/articles/115002943027-Understanding-Twilio-Rate-Limits-and-Message-Queues). requestBody: description: SMS to send content: application/json: schema: $ref: '#/components/schemas/CommunicationsSendSmsRequest' example: customer: mobileNumber: '+14152223000' from: '+14152223316' body: hello, this is a sample SMS message! required: true responses: '200': description: the customer and conversation item ID content: application/json: schema: $ref: '#/components/schemas/CommunicationsSendSmsResponse' '400': description: Invalid field(s) in request body content: application/json: schema: $ref: '#/components/schemas/Errors' /api/v1/communications/custom-channels/{customChannelId}/messages: post: tags: - Communications summary: Receive Custom Channel messages operationId: Communications_receiveCustomChannelMessages description: > Custom Channels allows for building custom channel integration with Gladly. This functionality is deactivated by default. **Note that the intended use case for custom channels is any non Gladly messaging based supported channel.** Please contact [Gladly Support](https://gladly.com/support) if you would like to activate this API and believe you have a valid use case. To receive a Custom Channel message, you must first create a Custom Channel and a Custom Channel Entry Point in Gladly Settings -> Custom Channels page. This API will accept messages from the channel integration and process them similarly to built-in messaging channels. parameters: - description: > The ID of the Custom Channel. To find the Custom Channel ID, you must open the overflow menu of a Custom Channel Entry Point and select the "View Integration Data" option. in: path name: customChannelId schema: type: string required: true requestBody: description: Custom Channel message content: application/json: schema: $ref: >- #/components/schemas/CommunicationsReceiveCustomChannelMessagesRequest required: true responses: '201': description: | Message received headers: Location: schema: description: > The relative location of the created item that represents the received message. type: string example: /api/v1/conversation-items/OOrlNMXeS72gs_WEX2TtMg '400': description: | Invalid fields(s) in the request body content: application/json: schema: $ref: '#/components/schemas/Errors' /api/v1/communications/custom-channels/{customChannelId}/messages/{messageId}/status: put: tags: - Communications summary: Update message status operationId: Communications_updateMessageStatus description: > Update message status of Custom Channel messages sent from agents. This allow a Custom Channel integration to set message status to indicate to an Agent that the message has been delivered. parameters: - description: > The ID of the Custom Channel. To find the Custom Channel ID, you must open the overflow menu of a Custom Channel Entry Point and select the "View Integration Data" option. in: path name: customChannelId schema: type: string required: true - description: | The id of message updated in: path name: messageId schema: type: string required: true requestBody: description: Custom Channel message status content: application/json: schema: $ref: '#/components/schemas/CommunicationsUpdateMessageStatusRequest' required: true responses: '200': description: | Status updated '400': description: | Invalid fields(s) in the request body content: application/json: schema: $ref: '#/components/schemas/Errors' '404': description: | Message with messageId not found content: application/json: schema: $ref: '#/components/schemas/Errors' /api/v1/conversations/{conversationId}: get: tags: - Conversations summary: Get conversation operationId: Conversations_getMetadata description: | Get conversation metadata such as it's assignee, topics, inbox, etc. parameters: - description: Id of the conversation to get in: path name: conversationId schema: type: string required: true example: 9BcE2O0DQ2ynGHRmk9FeoA responses: '200': description: Conversation metadata content: application/json: schema: $ref: '#/components/schemas/ConversationsGetMetadataResponse' example: id: HXRqKC5GSV-jAlq0-sxYTA topicIds: - _DZTz4I0Qsq9YXxeXwufMg - tYVmwhIVQe-2tflRIszQ3g customAttributes: - id: UCeBpdBVSNyaP54jhd8CZw value: '1234556777' - id: UCeBpdBVSNyaP54jhd8CZwX value: '883399334403' - id: cEBkE90eQHObfcsnrm60Tg value: UPS customerId: o2sg-TMTSD2rTwMuxzewbA createdAt: '2016-01-02T00:10:00Z' closedAt: '2016-01-03T08:10:00Z' agentId: sHuXx-U3QqOmhvFusJGeBw inboxId: E1nArq1uQAees_DogHB0MA status: OPEN '404': description: A conversation with the given id does not exist patch: tags: - Conversations summary: Update conversation operationId: Conversations_updateAssigneeStatus description: | Update conversation assignee, statusor both parameters: - description: Id of the conversation in: path name: conversationId schema: type: string required: true example: 9BcE2O0DQ2ynGHRmk9FeoA requestBody: description: JSON representation of conversation updates required: true content: application/json: schema: $ref: '#/components/schemas/ConversationsUpdateAssigneeStatusRequest' example: assignee: inboxId: E1nArq1uQAees_DogHB0MA agentId: sHuXx-U3QqOmhvFusJGeBw status: value: CLOSED force: true responses: '204': description: updated conversation '400': description: Invalid request content: application/json: schema: $ref: '#/components/schemas/Errors' examples: some required fields are blank: value: errors: - attr: assignee.inboxId code: blank detail: '''inboxId'' cannot be blank when updating assignee' - attr: status.value code: blank detail: '''value'' cannot be blank when updating status' agent does not belong to inbox: value: errors: - attr: assignee.agentId code: invalid_state detail: agent does not belong to inbox reassigning closed conversation: value: errors: - code: invalid_state detail: closed conversation cannot be reassigned topics required before closing conversation: value: errors: - code: invalid_state detail: topics are required before closing of conversation customer waiting for response: value: errors: - code: invalid_state detail: >- cannot close conversation, customer waiting for response, set 'status.force' to true to override '404': description: A conversation with the given id does not exist content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - code: not_exist detail: conversation does not exist /api/v1/conversation-items: post: tags: - Conversations summary: Create item operationId: Conversations_createCustomerItem description: > To add items to the timeline for a customer specified by identifying information. If the customer doesn't exist, a new customer profile is created. Any items created using this API will not be considered part of a conversation, and are **non-routable** and **non-searchable** aside from the mobile phone number or email address specified as part of the payload. requestBody: description: Conversation Item to create content: application/json: schema: $ref: '#/components/schemas/ConversationsCreateCustomerItemRequest' examples: Customer Activity: value: id: pOVVdzweSumI4bFxjlT8LA customer: emailAddress: michelle.smith@example.org content: title: Welcome to Gladly! type: CUSTOMER_ACTIVITY body: >- At Gladly we set out to reinvent customer service. Why? Because 21st century consumers are different. They are from 18 to 80 years old, expect the brands they love to recognize them, and to be able to communicate with your agents over all channels – all the time. activityType: EMAIL sourceName: HubSpot link: url: https://www.gladly.com/product/ text: View Details required: true responses: '200': description: The created item content: application/json: schema: $ref: '#/components/schemas/ConversationsCreateCustomerItemResponse' '400': description: Invalid field(s) in request body content: application/json: schema: $ref: '#/components/schemas/Errors' '409': description: Specified id is in use content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - attr: newConversationItems code: taken detail: conversation item already exists /api/v1/conversation-items/{itemId}: get: tags: - Conversations summary: Get item operationId: Conversations_getItem description: | Returns the conversation item with the provided id. parameters: - description: | id of the conversation item in: path name: itemId schema: type: string example: pOVVdzweSumI4bFxjlT8LA required: true responses: '200': description: conversation item content: application/json: schema: $ref: '#/components/schemas/ConversationsGetItemResponse' '400': description: An item exists but is not supported by the API content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - code: invalid detail: >- Conversation item with id [pOVVdzweSumI4bFxjlT8LA] exists but is not supported by the API. '404': description: An item with the given id could not be found delete: tags: - Conversations summary: Delete item operationId: Conversations_deleteItem description: > To delete an item. Please note only items of type **CUSTOMER_ACTIVITY** may be deleted by this API. parameters: - description: | Id of the item to be deleted. in: path name: itemId schema: type: string required: true responses: '204': description: The item was deleted '404': description: An item with the given id could not be found /api/v1/conversation-items/{itemId}/media/recording: get: tags: - Conversations summary: Get media operationId: Conversations_getRecording description: | Returns the media file associated with the conversation item. parameters: - description: | id of the conversation item in: path name: itemId schema: type: string example: pOVVdzweSumI4bFxjlT8LA required: true responses: '200': description: The media file associated with the conversation item content: audio/mpeg: schema: $ref: '#/components/schemas/ConversationsGetRecordingResponse' '404': description: An item with the given id could not be found /api/v1/customers/{customerId}/conversation-items: post: tags: - Conversations summary: Create item for customer operationId: Conversations_createCustomerItem description: > To add items to a customer's timeline. Any items created using this API will not be considered part of a conversation, and are **non-routable** and **non-searchable** aside from the mobile phone number or email address specified as part of the payload. parameters: - description: > Id of the customer associated with this item. You can look up the id using the [Find customers](index.html#tag/Customers) API. in: path name: customerId schema: type: string required: true requestBody: description: Conversation Item to create content: application/json: schema: $ref: '#/components/schemas/ConversationsCreateCustomerItemRequest1' examples: Customer Activity: value: content: title: Welcome to Gladly! type: CUSTOMER_ACTIVITY body: >- At Gladly we set out to reinvent customer service. Why? Because 21st century consumers are different. They are from 18 to 80 years old, expect the brands they love to recognize them, and to be able to communicate with your agents over all channels – all the time. activityType: EMAIL sourceName: HubSpot link: url: https://www.gladly.com/product/ text: View Details responses: '200': description: The created item content: application/json: schema: $ref: >- #/paths/~1api~1v1~1conversation-items/post/responses/200/content/application~1json/schema '301': description: >- This customer id no longer exists, but has been moved because it has been merged with another customer headers: Location: description: Location of the new customer id to use schema: type: string example: >- https://example.gladly.com/api/v1/customers/TX6f82W4S_ayp11kP4dhrQ/conversation-items content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - attr: customer id code: moved detail: >- the customer id has changed from [wjotRA-fSU6feGCxdFwwNQ] to [TX6f82W4S_ayp11kP4dhrQ] meta: old: wjotRA-fSU6feGCxdFwwNQ new: TX6f82W4S_ayp11kP4dhrQ '400': description: Invalid field(s) in request body content: application/json: schema: $ref: '#/components/schemas/Errors' '404': description: Customer with customerId does not exist '409': description: Specified id is in use content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - attr: newConversationItems code: taken detail: conversation item already exists /api/v1/customers/{customerId}/conversation-items/{itemId}: delete: tags: - Conversations summary: Delete item for customer operationId: Conversations_deleteCustomerItem description: > To delete an item. Please note only items of type **CUSTOMER_ACTIVITY** may be deleted by this API. parameters: - description: > Id of the customer associated with this item. You can look up the id using the [Find customers](index.html#tag/Customers) API. in: path name: customerId schema: type: string required: true - description: | Id of the item to be deleted. in: path name: itemId schema: type: string required: true responses: '204': description: The item was deleted '404': description: >- An item with the given id, for the given customer id, could not be found /api/v1/conversations/{conversationId}/items: get: tags: - Conversations summary: List items in conversation operationId: Conversations_listItemsInConversation description: > Get the list of items in the timeline of a conversation. The conversation represents a period of related interactions between a customer and your organization. The list is not paginated and will return at most 1000 items. The items are returned in ascending order by timestamp. The `Gladly-Limited-Data` header flag in the response will indicate if the conversation has more items than returned. parameters: - description: Id of the conversation to get the timeline for in: path name: conversationId schema: type: string required: true example: 9BcE2O0DQ2ynGHRmk9FeoA responses: '200': description: The items on the conversation timeline content: application/json: schema: $ref: >- #/components/schemas/ConversationsListItemsInConversationResponse example: - id: ybP4szYCSy6LdV4DNwEd6g conversationId: 9BcE2O0DQ2ynGHRmk9FeoA customerId: OOrlNMXeS72gs_WEX2TtMg timestamp: '2019-07-01T11:46:45.01Z' initiator: id: OOrlNMXeS72gs_WEX2TtMg type: CUSTOMER content: type: CHAT_MESSAGE sessionId: 5k04bYuTRGqyT6uoSQfWVA content: >- Hi! I know it's after hours but can someone help upgrade my account? - id: 9lQDrx-HTz-JMoP2T4CtZA conversationId: 9BcE2O0DQ2ynGHRmk9FeoA customerId: OOrlNMXeS72gs_WEX2TtMg timestamp: '2019-07-02T06:30:12.07Z' initiator: id: WmeA3Y51Q5ayCAaZ1AotIA type: AGENT content: type: EMAIL from: amy.agent@company.com to: - martha.williams@gmail.com subject: Account upgrade content: >- I would be happy to help you! We need a few details, so please give us a call this morning. - id: S6pMkJ78QMmkVf9qPP_SeQ conversationId: 9BcE2O0DQ2ynGHRmk9FeoA customerId: OOrlNMXeS72gs_WEX2TtMg timestamp: '2019-07-02T08:05:00.10Z' initiator: id: OOrlNMXeS72gs_WEX2TtMgX type: CUSTOMER responder: id: WmeA3Y51Q5ayCAaZ1AotIAX type: AGENT content: type: PHONE_CALL from: '+14153335555' to: '+12149897676' startedAt: '2019-07-02T08:05:00.10Z' answeredAt: '2019-07-02T08:05:09.41Z' completedAt: '2019-07-02T08:11:15.03Z' recordingStatus: AVAILABLE recordingURL: >- /api/v1/conversation-items/S6pMkJ78QMmkVf9qPP_SeQ/media/recording recordingDuration: '100' - id: K0UGL3n6S4uPpvtMvItqHA conversationId: 9BcE2O0DQ2ynGHRmk9FeoA customerId: OOrlNMXeS72gs_WEX2TtMg timestamp: '2019-07-02T08:12:55.870Z' initiator: id: WmeA3Y51Q5ayCAaZ1AotIAX type: AGENT content: type: TOPIC_CHANGE addedTopicIds: - uu4t00vITaKQ3bVjU2UrGQ - id: zwo9AtljSfaGjWb4Aq-aDQ conversationId: WmeA3Y51Q5ayCAaZ1AotIA customerId: o2sg-TMTSD2rTwMuxzewbA timestamp: '2019-07-02T08:12:55.870Z' initiator: id": zGaHXjD4SR-moMR9LbULDA type": AGENT content: type: CONVERSATION_STATUS_CHANGE status: CLOSED - id: azwo9AtljSfaGjWb4Aq-aDQ conversationId: WmeA3Y51Q5ayCAaZ1AotIA customerId: o2sg-TMTSD2rTwMuxzewbA timestamp: '2019-07-02T08:12:55.870Z' initiator: id": zGaHXjD4SR-moMR9LbULDA type": AGENT content: type: VOICEMAIL startedAt: '2019-07-04T08:12:55.870Z' recordingURL: >- /api/v1/conversation-items/azwo9AtljSfaGjWb4Aq-aDQ/media/recording recordingStatus: AVAILABLE recordingDuration: 200 - id: DnaU23pZSIqOixATlII1vA conversationId: HXRqKC5GSV-jAlq0-sxYTA customerId: o2sg-TMTSD2rTwMuxzewbA timestamp: '2019-07-04T23:42:57.780Z' initiator: type: AGENT id: zGaHXjD4SR-moMR9LbULDA content: type: CONVERSATION_NOTE body: >- Customer has requested more information about our loyalty program. '404': description: A conversation with the given id does not exist /api/v1/conversations/{conversationId}/topics: post: tags: - Conversations summary: Add topic operationId: Conversations_addTopicToList description: > Adds a list of topics to the conversation. If the topic being added already exists on the conversation, that topic is ignored. parameters: - description: | Id of the conversation. in: path name: conversationId schema: type: string required: true requestBody: content: application/json: schema: $ref: '#/components/schemas/ConversationsAddTopicToListRequest' examples: Conversation Topic: value: topicIds: - pOVVdzweSumI4bFxjlT8LA - pOVVdzweSumI4bFxjlT8LB required: true responses: '204': description: The topic was added successfully '400': description: Invalid field(s) in request body content: application/json: schema: $ref: '#/components/schemas/Errors' '404': description: A conversation with the given Id could not be found /api/v1/conversations/{conversationId}/topics/{topicId}: delete: tags: - Conversations summary: Delete topic operationId: Conversations_deleteTopic description: | Delete a topic from a conversation. parameters: - description: | Id of the conversation. in: path name: conversationId schema: type: string required: true - description: | Id of topic to be deleted from conversation. in: path name: topicId schema: type: string required: true responses: '204': description: The topic was deleted from the conversation successfully '404': description: A conversation with the given id could not be found /api/v1/customer-history/{customerId}/conversations/{conversationId}/custom-attributes: post: tags: - Conversations summary: Add or Remove Freeform topic operationId: Conversations_addFreeformTopics description: > Adds or removes a list of freeform topics to the conversation. If the freeform topic being added already exists on the conversation, that topic is ignored. parameters: - description: | Id of the customer. in: path name: customerId schema: type: string required: true - description: | Id of the conversation. in: path name: conversationId schema: type: string required: true requestBody: content: application/json: schema: $ref: '#/components/schemas/ConversationsAddFreeformTopicsRequest' examples: Custom Attributes: value: add: - key: ORDER_ID value: ORD_3 - key: ORDER_ID value: ORD_4 remove: - key: ORDER_ID value: ORD_1 - key: ORDER_ID value: ORD_2 required: true responses: '204': description: The freeform topic was added successfully '400': description: Invalid field(s) in request body content: application/json: schema: $ref: '#/components/schemas/NotFoundErrors' '404': description: A conversation with the given Id could not be found /api/v1/conversations/{conversationId}/notes: post: tags: - Conversations summary: Add note operationId: Conversations_addNoteToConversation description: Adds note to an existing conversation. parameters: - description: | Id of the conversation. in: path name: conversationId schema: type: string required: true requestBody: content: application/json: schema: $ref: '#/components/schemas/ConversationsAddNoteToConversationRequest' examples: Conversation Note: value: content: body: >- Customer has requested more information about our loyalty program. responses: '201': description: The note was added successfully headers: Location: schema: description: Relative URL of the created note example: >- /api/v1/conversations/cHBetnP5QYiwg-rvfaVDAQ/notes/HVFDjpu1SCKJlDR7rRKkCQ '400': description: Invalid field(s) in request body content: application/json: schema: $ref: '#/components/schemas/Errors' '404': description: A conversation with the given Id could not be found /api/v1/conversations/{conversationId}/notes/{noteId}: get: tags: - Conversations summary: Get note operationId: Conversations_getNote description: | Returns the note with the provided conversation and note id. parameters: - description: | id of the conversation in: path name: conversationId schema: type: string example: pOVVdzweSumI4bFxjlT8LA required: true - description: | id of the note in: path name: noteId schema: type: string example: aOVVdzweSumI4bFxjlT8LA required: true responses: '200': description: Conversation note content: application/json: schema: $ref: '#/components/schemas/ConversationsGetNoteResponse' '404': description: An item with the given id could not be found /api/v1/conversation-items/{itemId}/reply: post: tags: - Conversations summary: Reply to message operationId: Conversations_sendResponse description: Sends a response to a conversation item parameters: - description: | id of the conversation item in: path name: itemId schema: type: string example: pOVVdzweSumI4bFxjlT8LA required: true requestBody: content: application/json: schema: $ref: '#/components/schemas/ConversationsSendResponseRequest' examples: Reply with email: value: content: type: EMAIL body: Hi!
Of course we can help with your issue! bodyPlain: |- Hi! We can definitely help you with that! Reply with chat message: value: content: type: CHAT_MESSAGE messageType: TEXT body: Hi from chat! Reply with chat quick reply: value: content: type: CHAT_MESSAGE messageType: QUICK_REPLY_REQUEST body: Hi from chat! Please select an option! messageData: options: - id: option-1 label: option one - id: option-2 label: option two Reply with facebook message: value: content: type: FACEBOOK_MESSAGE body: Hi from Facebook Messenger! Reply with instagram direct message: value: content: type: INSTAGRAM_DIRECT body: Hi from Instagram Direct! Reply with sms message: value: content: type: SMS body: Hi from SMS! Reply with twitter direct message (decommissioned as of 04/20/2023): value: content: type: TWITTER body: Hi from Twitter Direct Messages! Reply with whatsapp message: value: content: type: WHATSAPP body: Hi from WhatsApp! responses: '201': description: >- The reply was created successfully. Note that creation doesn't guarantee delivery headers: Location: schema: description: Relative URL of the created message example: /api/v1/conversation-items/HVFDjpu1SCKJlDR7rRKkCQ '400': description: Invalid field(s) in request body content: application/json: schema: $ref: '#/components/schemas/Errors' examples: Closed conversation: value: errors: - code: invalid detail: you cannot reply to items in closed conversations Empty type: value: errors: - code: blank attr: content.type Wrong type: value: errors: - code: invalid detail: type [VOICEMAIL] is not supported Body too long: value: errors: - code: too_long attr: content.body detail: content.body cannot be larger than 2048 characters Not a customer message: value: errors: - code: invalid detail: you can only reply to customer messages '404': description: A conversation item with the given id could not be found /api/v1/conversation-items/{itemId}/redact: post: tags: - Conversations summary: Redact conversation item operationId: Conversations_redactConversationItem description: > For supported items, the item's content will be removed but the item will remain in the conversation timeline. Supported types are Chat Message, SMS Message, Email, Twitter (decommissioned as of 04/20/23, but can still be redacted), WhatsApp, Voicemail, Phone Call. parameters: - description: | id of the conversation item in: path name: itemId schema: type: string example: pOVVdzweSumI4bFxjlT8LA required: true requestBody: content: application/json: schema: $ref: '#/components/schemas/ConversationsRedactConversationItemRequest' responses: '201': description: The redaction was successful. headers: Location: schema: description: Relative URL of the redacted item example: /api/v1/conversation-items/HVFDjpu1SCKJlDR7rRKkCQ '404': description: A conversation item with the given id could not be found /api/v1/message-automation/sessions/{sessionId}: get: tags: - Message Automation summary: Get Automation Session operationId: MessageAutomation_getSession description: Returns the automation session with the provided sessionId. parameters: - description: The id of the automation session. in: path name: sessionId schema: type: string example: pOVVdzweSumI4bFxjlT8LA required: true responses: '200': description: Automation Session content: application/json: schema: $ref: '#/components/schemas/MessageAutomationGetSessionResponse' '404': description: An automation session with the given id does not exist. content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - code: not_exist detail: entity does not exist /api/v1/message-automation/sessions/{sessionId}/messages: post: tags: - Message Automation summary: Send Outbound Automation Message operationId: MessageAutomation_outboundMessage description: Returns the outbound automation message. parameters: - description: Id of the automation session. in: path name: sessionId schema: type: string example: pOVVdzweSumI4bFxjlT8LA required: true requestBody: description: Create an outbound message content: application/json: schema: $ref: '#/components/schemas/MessageAutomationOutboundMessageRequest' example: type: TEXT content: value: Your order is on the way! required: true responses: '200': description: The outbound automation message is created. content: application/json: schema: $ref: '#/components/schemas/MessageAutomationOutboundMessageResponse' '400': description: Message has invalid type or content. content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - attr: type code: invalid detail: invalid message type '404': description: >- Message with the given messageId does not exist in the given automation session. content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - code: not_exist detail: entity does not exist get: tags: - Message Automation summary: Get Automation Messages operationId: MessageAutomation_getSessionMessages description: >- Returns all the messages within the automation session with the provided sessionId. parameters: - description: | Id of the automation session. in: path name: sessionId schema: type: string example: pOVVdzweSumI4bFxjlT8LA required: true responses: '200': description: Automation session messages content: application/json: schema: $ref: >- #/components/schemas/MessageAutomationGetSessionMessagesResponse '404': description: An automation session with the given id does not exist content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - code: not_exist detail: entity does not exist /api/v1/message-automation/sessions/{sessionId}/messages/{messageId}: get: tags: - Message Automation summary: Get Automation Message operationId: MessageAutomation_getMessage description: >- Returns the message with the provided messageId within the automation session with the provided sessionId. parameters: - description: Id of the automation session. in: path name: sessionId schema: type: string example: pOVVdzweSumI4bFxjlT8LA required: true - description: | Id of the message. in: path name: messageId schema: type: string example: 62723418e0374c00f31c4ca7 required: true responses: '200': description: Automation session message content: application/json: schema: $ref: >- #/paths/~1api~1v1~1message-automation~1sessions~1%7BsessionId%7D~1messages/post/responses/200/content/application~1json/schema '404': description: >- Message with the given messageId does not exist in the given automation session. content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - code: not_exist detail: entity does not exist /api/v1/message-automation/sessions/{sessionId}/handoff: post: tags: - Message Automation summary: Agent Handoff operationId: MessageAutomation_handoffSessionToAgent description: >- Handoff communication of the automation session, given sessionId, to an agent. If successful, returns nothing. parameters: - description: Id of the automation session. in: path name: sessionId schema: type: string example: pOVVdzweSumI4bFxjlT8LA required: true requestBody: description: Handoff to agent. content: application/json: schema: $ref: >- #/components/schemas/MessageAutomationHandoffSessionToAgentRequest examples: Message Content: value: description: Could not handle request. Hand off to agent. required: true responses: '204': description: The handoff is successful. '400': description: Failed to handoff to agent. content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - code: not_exist detail: entity does not exist /api/v1/message-automation/sessions/{sessionId}/close: post: tags: - Message Automation summary: Close Automation Session operationId: MessageAutomation_closeSession description: >- Closes the automation session for the given sessionId. Returns nothing if successful. parameters: - description: Id of the automation session. in: path name: sessionId schema: type: string example: pOVVdzweSumI4bFxjlT8LA required: true requestBody: description: Close the automation session. content: application/json: schema: $ref: '#/components/schemas/MessageAutomationCloseSessionRequest' examples: Message Content: value: description: Customer not responding. Close session. required: true responses: '204': description: Automation session was successfully closed. '400': description: Failed to close the given automation session. content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - code: not_exist detail: entity does not exist /api/v1/tasks: post: tags: - Tasks summary: Create task operationId: Tasks_customerTimeline description: > To add tasks to the timeline for a customer specified by identifying information. If the customer doesn't exist, a new customer profile is created. requestBody: description: Task to create content: application/json: schema: $ref: '#/components/schemas/TasksCustomerTimelineRequest' responses: '201': description: task created headers: Location: schema: description: path to the created task type: string example: /api/v1/tasks/OOrlNMXeS72gs_WEX2TtMg '400': description: Invalid field(s) in request body content: application/json: schema: $ref: '#/components/schemas/Errors' /api/v1/customers/{customerId}/tasks: post: tags: - Tasks summary: Create task for customer operationId: Tasks_createCustomerTask description: | Add a task to an existing customer's conversation timeline parameters: - description: > Id of the customer associated with the task to create. You can look up the id using the [Find customers](index.html#tag/Customers) API. in: path name: customerId schema: type: string required: true requestBody: description: Create Task content: application/json: schema: $ref: '#/components/schemas/TasksCreateCustomerTaskRequest' responses: '201': description: task created headers: Location: schema: description: path to the created task type: string example: /api/v1/tasks/OOrlNMXeS72gs_WEX2TtMg '400': description: Invalid field(s) in request body content: application/json: schema: $ref: '#/components/schemas/Errors' '404': description: Customer with customerId does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundErrors' '409': description: Specified id is in use content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - attr: newConversationItems code: taken detail: task already exists get: tags: - Tasks summary: List tasks operationId: Tasks_getCustomerTasks description: > Fetch all tasks for a customer. The list is not paginated and will return at most 2000 tasks. The tasks are returned in descending order by timestamp. The `Gladly-Limited-Data` header flag in the response will indicate if the customer has more tasks than returned. To see and act on any newly created tasks, webhooks can be used to listen for task related events. Tasks older than the limit can be viewed using the Task Export. parameters: - description: | Id of the customer whose tasks you'd like to view. in: path name: customerId schema: type: string required: true - description: | Fetch tasks with the provided status. in: query name: status required: false schema: type: string enum: - OPEN - CLOSED responses: '200': description: Array of tasks content: application/json: schema: $ref: '#/components/schemas/TasksGetCustomerTasksResponse' '400': description: Invalid input content: application/json: schema: $ref: '#/components/schemas/Errors' '404': description: A customer with the given id does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundErrors' /api/v1/tasks/{taskId}: patch: tags: - Tasks summary: Update task operationId: Tasks_updateTask description: | Update an existing task parameters: - description: | Id of the task that is to be updated in: path name: taskId schema: type: string required: true requestBody: description: Task properties to create content: application/json: schema: $ref: '#/components/schemas/TasksUpdateTaskRequest' responses: '204': description: The task was created task '400': description: Invalid field(s) in request body content: application/json: schema: $ref: '#/components/schemas/Errors' '404': description: Task with taskId does not exist. content: application/json: schema: $ref: '#/components/schemas/NotFoundErrors' get: tags: - Tasks summary: Get task operationId: Tasks_getTask description: | Get task parameters: - description: | Id of the task requested in: path name: taskId schema: type: string required: true responses: '200': description: Returns requested task content: application/json: schema: $ref: '#/components/schemas/TasksGetTaskResponse' '404': description: Given task id does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundErrors' /api/v1/tasks/{taskId}/comments: post: tags: - Tasks summary: | Add task comment operationId: Tasks_addTaskComment description: > Create a comment on a task. Note that you can’t create comments on closed tasks. ![Task Comment](assets/task-comment.png) parameters: - description: | Id of the task that will be commented on. in: path name: taskId schema: type: string required: true requestBody: description: Add comment to task content: application/json: schema: $ref: '#/components/schemas/TasksAddTaskCommentRequest' responses: '201': description: comment added headers: Location: schema: description: path to the created task type: string example: /api/v1/tasks/OOrlNMXeS72gs_WEX2TtMg/comments/77323sf2fj2k '400': description: Invalid field(s) in request body content: application/json: schema: $ref: '#/components/schemas/Errors' '404': description: Task with taskId does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundErrors' get: tags: - Tasks summary: Get task comments operationId: Tasks_getTaskComments description: > The comments are returned in ascending order by createdAt timestamp. The list is not paginated and will return at most 1000 task comments. The `Gladly-Limited-Data` header flag in the response will indicate if the task has more comments than returned. To see and act on any newly created task comments, webhooks can be used to listen to any task comment related events. parameters: - description: | Id of the task comments are requested for. in: path name: taskId schema: type: string required: true responses: '200': description: All comments that belong to task content: application/json: schema: $ref: '#/components/schemas/TasksGetTaskCommentsResponse' '404': description: Task with taskId does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundErrors' /api/v1/tasks/{taskId}/comments/{commentId}: get: tags: - Tasks summary: Get task comment operationId: Tasks_getComment description: | Get task comment. parameters: - description: | Task id in: path name: taskId schema: type: string required: true - description: | Comment id in: path name: commentId schema: type: string required: true responses: '200': description: Returns task comment content: application/json: schema: $ref: '#/components/schemas/TasksGetCommentResponse' '404': description: Comment with commentId does not exist content: application/json: schema: $ref: '#/components/schemas/NotFoundErrors' /api/v1/custom-attributes/:customAttributeId: get: tags: - Freeform Topics summary: Get custom attribute operationId: FreeformTopics_getAttribute description: > Returns a custom attribute that matches the provided custom attribute id. parameters: - description: | id of the custom attribute name: customAttributeId in: path required: true schema: type: string example: 1grfSzATQLa334VDLCWc4A responses: '200': content: application/json: schema: $ref: '#/components/schemas/FreeformTopicsGetAttributeResponse' '404': description: Custom Attribute not found content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: code: not_exist detail: custom attribute 1grfSzATQLa334VDLCWc4A does not exist /api/v1/customer-profiles: post: tags: - Customers summary: Create customer operationId: Customers_createProfile description: | Create a new customer with the supplied profile data. requestBody: description: Customer record to add. required: true content: application/json: schema: $ref: '#/components/schemas/CustomersCreateProfileRequest' example: id: OOrlNMXeS72gs_WEX2TtMgX name: Francis Avallone address: 4303 Spring Forest Ln, Westlake Village, CA 91362-5605 emails: - original: existing@francisavallone.com phones: - original: '+17192662837' type: HOME externalCustomerId: a21c1636-c622-48b7-bf6a-d9032645aa55 customAttributes: albums: '6' singles: '40' responses: '201': description: customer created headers: Location: schema: description: location of the created customer type: string example: /api/v1/customer-profiles/OOrlNMXeS72gs_WEX2TtMg '400': description: error creating customer content: application/json: schema: $ref: '#/components/schemas/Errors' '409': description: Specified id is in use or a uniqueness constraint failed content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - attr: id code: taken detail: customer ID exists get: tags: - Customers summary: Find customers operationId: Customers_findProfiles description: > Find customers by searching by choosing **one** of the following identifiers as query parameters: ``` /api/v1/customer-profiles?phoneNumber=%2B14151234567 ``` Max limit of 50 profiles returned, sorted by most recently updatedAt date descending. parameters: - description: customer email address to search on. name: email in: query schema: type: string example: customer@email.net - description: >- Customer ID in your system of record for Customer Profiles linked to a Lookup Adaptor installed prior to 05/12/21. If Customer Profile is linked to a Lookup Adaptor installed on or after 05/12/21, this field is not searchable. name: externalCustomerId in: query schema: type: string example: a21c1636-c622-48b7-bf6a-d9032645aa55 - description: > Phone number in E.164 format. The value should be URL escaped where `+` becomes `%2B`. name: phoneNumber in: query schema: type: string example: '+16505551987' responses: '200': description: found customers content: application/json: schema: $ref: '#/components/schemas/CustomersFindProfilesResponse' '400': description: error finding customers content: application/json: schema: $ref: '#/components/schemas/Errors' /api/v1/customer-profiles/{customerId}: parameters: - description: id of the customer name: customerId in: path required: true schema: type: string example: OOrlNMXeS72gs_WEX2TtMg get: tags: - Customers summary: Get customer operationId: Customers_getProfileById description: > Get a customer by unique id. If a customer has been merged into another, an error will be returned specifying the new id of the customer. responses: '200': description: fetched customer content: application/json: schema: $ref: '#/components/schemas/CustomersGetProfileByIdResponse' '301': description: >- customer id no longer exists and has been changed due to a merge with another customer content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: - attr: customerId code: moved detail: customer id has changed meta: old: OOrlNMXeS72gs_WEX2TtMg new: rVamfZHvQuORFnsk-3mNuw '404': description: customer not found content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: code: not_exist detail: customer profile [OOrlNMXeS72gs_WEX2TtMg] does not exist patch: tags: - Customers summary: Update customer operationId: Customers_updateProfileById description: > Update a customer by unique id with the supplied JSON patch. You may supply only the properties which you want to update or insert into the profile. When updating arrays, such as `phones` and `emails` you must provide the entire list of values since it is not possible to add or delete a single value. If a customer has been merged into another, an error will be returned specifying the new id of the customer. requestBody: description: JSON patch of customer profiles properties to insert or update. required: true content: application/json: schema: $ref: '#/components/schemas/CustomersUpdateProfileByIdRequest' example: name: Frankie Avalon emails: - original: existing@francisavallone.com - original: new@frankieavalon.com customAttributes: albums: '7' singles: '41' responses: '204': description: updated customer '400': description: error updating customer content: application/json: schema: $ref: '#/components/schemas/Errors' '404': description: customer not found content: application/json: schema: $ref: '#/components/schemas/Errors' /api/v1/user-identity-jwt: post: tags: - User Identity summary: Create a User Identity JWT operationId: UserIdentity_generateJwt description: > Create a User Identity JWT for a customer. The JWT is used to authenticate the customer with [Glad App](https://developer.gladly.com/glad-app/). The JWT contains the customer identity information. requestBody: description: Customer Identity Information required: true content: application/json: schema: $ref: '#/components/schemas/UserIdentityGenerateJwtRequest' example: identityType: EMAIL identity: test@example.com responses: '200': description: customer created content: application/json: schema: $ref: '#/components/schemas/UserIdentityGenerateJwtResponse' '400': description: error creating JWT content: application/json: schema: $ref: '#/components/schemas/Errors' /api/v1/orgs/{orgId}/answers-search?q=search+terms: get: tags: - Answers summary: Search public answers operationId: Answers_searchResults description: | Returns a list of answers that match the provided query string. parameters: - description: > id of your organization You can look up the ID using the [Get organization](index.html#tag/Organization) API. name: orgId in: path required: true schema: type: string example: ihKsWxiZCDVtXg1iwVmT9Q - description: search term name: q in: query schema: type: string example: reset%20password - description: language code name: lng in: query schema: type: string example: en-us - description: >- Audience ID. The Audience ID can be retrieved by going to Settings > Audiences in Gladly, then clicking on the Edit button next to the Audience in question. The ID will be in the page URL. name: audienceId in: query schema: type: string example: en-us responses: '200': description: found answers content: application/json: schema: $ref: '#/components/schemas/AnswersSearchResultsResponse' /api/v1/orgs/{orgId}/answers?lng={lng}&audienceId={audienceId}: get: tags: - Answers summary: List public answers operationId: Answers_listPublic description: | Returns the first 1000 public answers sorted alphabetically by name. parameters: - description: > id of your organization You can look up the ID using the [Get organization](index.html#tag/Organization) API. name: orgId in: path required: true schema: type: string example: ihKsWxiZCDVtXg1iwVmT9Q - description: | Language of the answers returned Defaults to `en-us` name: lng in: query schema: type: string example: es-419 - description: > Audience ID for answers returned - optional. The Audience ID can be retrieved by going to Settings > Audiences in Gladly, then clicking on the Edit button next to the Audience in question. The ID will be in the page URL. name: audienceId in: query schema: type: string example: ihKsWxiZCDVtXg1iwVmT9Q responses: '200': description: answers content: application/json: schema: $ref: '#/components/schemas/AnswersListPublicResponse' /api/v1/orgs/{orgId}/help-center/{helpCenterId}/answer-titles?lng={lng}&audienceId={audienceId}: get: tags: - Answers summary: List Help Center Answer Titles operationId: Answers_listAnswerTitles description: > Returns an array of answers configured in Help Center sections with their ID and name parameters: - description: > id of your organization You can look up the ID using the [Get organization](index.html#tag/Organization) API. name: orgId in: path required: true schema: type: string example: ihKsWxiZCDVtXg1iwVmT9Q - description: > Help Center ID You can look up the ID by going to Settings > Help Center in Gladly, then clicking on the 3 dots next to the Help Center and selecting Configure. Help Center ID will be in the URL name: helpCenterId in: path required: true schema: type: string example: ihKsWxiZCDVtXg1iwVmT9Q - description: | Language of the answers returned Defaults to `en-us` name: lng in: query schema: type: string example: es-419 - description: > Audience ID for answers returned - optional. The Audience ID can be retrieved by going to Settings > Audiences in Gladly, then clicking on the Edit button next to the Audience in question. The ID will be in the page URL. name: audienceId in: query schema: type: string example: ihKsWxiZCDVtXg1iwVmT9Q responses: '200': description: answers content: application/json: schema: $ref: '#/components/schemas/AnswersListAnswerTitlesResponse' /api/v1/orgs/{orgId}/answers/{answerId}: get: tags: - Answers summary: Get public answer operationId: Answers_getById description: | Returns the answer with the provided id. parameters: - description: > id of your organization You can look up the ID using the [Get organization](index.html#tag/Organization) API. name: orgId in: path required: true schema: type: string example: ihKsWxiZCDVtXg1iwVmT9Q - description: id of the answer name: answerId in: path required: true schema: type: string example: 1grfSzATQLa334VDLCWc4A - description: language code name: lng in: query schema: type: string example: en-us responses: '200': description: answer content: application/json: schema: $ref: '#/components/schemas/AnswersGetByIdResponse' /api/v1/agents: get: tags: - Agents summary: List Agents operationId: Agents_list description: | Returns a list of agents. responses: '200': description: Agents content: application/json: schema: $ref: '#/components/schemas/AgentsListResponse' /api/v1/agents/{agentId}: parameters: - description: id of the agent name: agentId in: path required: true schema: type: string example: WmeA3Y51Q5ayCAaZ1AotIA get: tags: - Agents summary: Get Agent operationId: Agents_getAgentProfile description: | Get an agent profile by their unique id. responses: '200': description: Agent content: application/json: schema: $ref: '#/components/schemas/AgentsGetAgentProfileResponse' /api/v1/agents/{agentId}/call-recorder: parameters: - description: Gladly ID or Gladly email address of the agent name: agentId in: path required: true schema: type: string example: WmeA3Y51Q5ayCAaZ1AotIA OR agent@customer.com get: tags: - Agents summary: Get Agent CallRecorder operationId: Agents_getCallRecorderStatus description: | Get an agent call recording status. responses: '200': description: CallRecorder content: application/json: schema: $ref: >- #/paths/~1api~1v1~1agents~1%7BagentId%7D~1call-recorder/patch/requestBody/content/application~1json/schema '404': description: Agent not found content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: code: not_exist detail: agent WmeA3Y51Q5ayCAaZ1AotIA does not exist patch: tags: - Agents summary: Update Agent CallRecorder operationId: Agents_updateCallRecorder description: > Update an agent's active call recording status. This API allows changing the `recording` property. requestBody: description: JSON patch of CallRecorder required: true content: application/json: schema: $ref: '#/components/schemas/AgentsUpdateCallRecorderRequest' example: recording: false responses: '204': description: >- Call recording updated. If an agent is not on a call the update will do nothing. '404': description: Agent not found content: application/json: schema: $ref: '#/components/schemas/Errors' example: errors: code: not_exist detail: agent WmeA3Y51Q5ayCAaZ1AotIA does not exist /api/v1/organization: get: tags: - Organization summary: Get organization operationId: Organization_getMetadata description: | Returns metadata about your organization. responses: '200': description: Organization content: application/json: schema: $ref: '#/components/schemas/OrganizationGetMetadataResponse' /api/v1/inboxes: get: tags: - Inboxes summary: List inboxes operationId: Inboxes_listMetadata description: | Returns a list of inbox metadata. responses: '200': description: Inboxes content: application/json: schema: $ref: '#/components/schemas/InboxesListMetadataResponse' /api/v1/inboxes/{inboxId}: parameters: - description: id of the inbox name: inboxId in: path required: true schema: type: string example: vZgCEQlDR6aQz_0HeWZ9_Q get: tags: - Inboxes summary: Get inbox operationId: Inboxes_getMetadata description: | Get the metadata for an inbox by its unique id. responses: '200': description: Inbox content: application/json: schema: $ref: '#/components/schemas/InboxesGetMetadataResponse' /api/v1/teams: get: tags: - Teams summary: List teams operationId: Teams_listTeams description: | Returns a list of teams. responses: '200': description: Teams content: application/json: schema: $ref: '#/components/schemas/TeamsListTeamsResponse' /api/v1/teams/{teamId}: parameters: - description: id of the team name: teamId in: path required: true schema: type: string example: ovg2jQCQS9ScsDkBxG-o2Q get: tags: - Teams summary: Get team operationId: Teams_getById description: | Get a team by its unique id. responses: '200': description: Team content: application/json: schema: $ref: '#/components/schemas/TeamsGetByIdResponse' /api/v1/topics: get: tags: - Topics summary: List topics operationId: Topics_list description: | Returns a list of topics. responses: '200': description: Topics content: application/json: schema: $ref: '#/components/schemas/TopicsListResponse' example: - id: Z_Oto7j-Sy2DlQdnZBDdDw disabled: false name: Order Return - id: 8eiDakrnTgKa3HIxtgV5OA disabled: false name: Damaged Merchandise parentId: Z_Oto7j-Sy2DlQdnZBDdDw - id: WgZnWNicSMmORcNzP8rwGQ disabled: true name: Holiday 2019 parentId: Z_Oto7j-Sy2DlQdnZBDdDw /api/v1/topics/{topicId}: parameters: - description: id of the topic name: topicId in: path required: true schema: type: string example: uu4t00vITaKQ3bVjU2UrGQ get: tags: - Topics summary: Get topic operationId: Topics_getById description: | Get a topic by its unique id. responses: '200': description: Topic content: application/json: schema: $ref: '#/components/schemas/TopicsGetByIdResponse' /api/v1/export/schedules: get: tags: - Export summary: List schedules operationId: Export_listSchedules description: > List all schedules. Currently, only one schedule can be configured per organization. The schedule will generate recurring data export jobs with an hourly or daily frequency. By default, each organization has a daily export job configured. To change the job frequency, please contact Gladly Support. Hourly schedules generate new jobs on a roughly two hour lag after the `nextStartAt` time. For example, for an hourly schedule with a `nextStartAt` equal to `2019-01-21T08:00:00.00Z`, the next job will be created at approximately `2019-01-21T10:00:00.00Z`. Daily schedules will run jobs during the night (UTC time). responses: '200': description: found jobs content: application/json: schema: $ref: '#/components/schemas/ExportListSchedulesResponse' /api/v1/export/jobs: get: tags: - Export summary: List jobs operationId: Export_jobsList description: > List all jobs from the last 14 days using the following optional query parameter: ``` /api/v1/export/jobs?status=COMPLETED ``` parameters: - description: export job status to search on. name: status in: query schema: type: string enum: - PENDING - IN_PROGRESS - COMPLETED - FAILED responses: '200': description: found jobs content: application/json: schema: $ref: '#/components/schemas/ExportJobsListResponse' /api/v1/export/jobs/{jobId}: parameters: - description: id of the job name: jobId in: path required: true schema: type: string example: OOrlNMXeS72gs_WEX2TtMg get: tags: - Export summary: Get job operationId: Export_jobById description: | Get a job by unique id. responses: '200': description: fetched job content: application/json: schema: $ref: '#/components/schemas/ExportJobByIdResponse' links: GetFilename: operationId: getFile description: > The entries in `filenames` returned in the response can be used as the the `filename` parameter in `GET /api/v1/export/jobs/{jobId}/files/{filename}` parameters: filename: $response.body#/id '404': description: job not found content: application/json: schema: $ref: '#/components/schemas/NotFoundErrors' delete: tags: - Export summary: Delete job operationId: Export_deleteJob description: > Delete a job and all associated files. *Note*: job status must be `COMPLETED` or `FAILED` to be deleted. responses: '204': description: the job was deleted '400': description: unable to delete job content: application/json: schema: $ref: '#/components/schemas/Errors' example: - attr: status code: temporary_failure detail: >- unable to delete job with status [IN_PROGRESS]. Please try again after it has finished '404': description: job not found content: application/json: schema: $ref: '#/components/schemas/NotFoundErrors' /api/v1/export/jobs/{jobId}/files/{filename}: get: tags: - Export summary: Get file operationId: Export_downloadFile description: > Download a file generated by a data export job. Filenames can be found from an export [job's](index.html#operation/getJob) `files` field. Files are returned in `.jsonl` format where each line is a `json` object representing an element from the array of data. Please note that, in rare cases, conversation items with invalid attributes may be excluded from the data export. For example: - An email message that was undelivered due to an invalid recipient email address - EMAIL / SMS auto-replies sent by Gladly to the customer via a Rule Examples are as follows with schema below. **agents.jsonl** ``` {"id": "WmeA3Y51Q5ayCAaZ1AotIA","name": "Amy Agent","emailAddress": "amy.agent@company.com"} ``` **conversation_items.jsonl** ``` {"id": "ybP4szYCSy6LdV4DNwEd6g","conversationId": "9BcE2O0DQ2ynGHRmk9FeoA","customerId": "OOrlNMXeS72gs_WEX2TtMg","timestamp": "2019-07-01T11:46:45.010Z","initiator": {"id": "OOrlNMXeS72gs_WEX2TtMg","type": "CUSTOMER"},"content": {"type": "CHAT_MESSAGE","sessionId": "5k04bYuTRGqyT6uoSQfWVA","content": "Hi! I know it's after hours but can someone help upgrade my account?"}} {"id": "9lQDrx-HTz-JMoP2T4CtZA","conversationId": "9BcE2O0DQ2ynGHRmk9FeoA","customerId": "OOrlNMXeS72gs_WEX2TtMg","timestamp": "2019-07-02T06:30:12.070Z","initiator": {"id": "WmeA3Y51Q5ayCAaZ1AotIA","type": "AGENT"},"content": {"type": "EMAIL","from": "amy.agent@company.com","to": ["martha.williams@gmail.com"],"subject": "Account upgrade","content": "I would be happy to help you! We need a few details, so please give us a call this morning."}} {"id": "QN1nURRuRne_eAEhW45UMA","conversationId": "9BcE2O0DQ2ynGHRmk9FeoA","customerId": "KgnVOMc2TbiA3zad6iVlWA","timestamp": "2020-04-21T00:44:33.690Z","initiator": {"type":"AGENT","id":"VjeJI9_GRUS_LUjKLcNlBw"},"responder":{"type":"CUSTOMER","id":"KgnVOMc2TbiA3zad6iVlWA"},"content":{"startedAt":"2020-04-21T00:44:34.604Z","answeredAt":"2020-04-21T00:44:45.515Z","completedAt":"2020-04-21T00:44:57.130Z","from":"+12096248260","to":"+14155335980","recordingUrl":"/api/v1/conversation-items/QN1nURRuRne_eAEhW45UMA/media/recording","recordingStatus":"AVAILABLE","recordingDuration":11,"type":"PHONE_CALL"}} {"id": "K0UGL3n6S4uPpvtMvItqHA","conversationId": "9BcE2O0DQ2ynGHRmk9FeoA","customerId": "OOrlNMXeS72gs_WEX2TtMg","timestamp": "2019-07-02T08:12:55.870Z","initiator": {"id": "WmeA3Y51Q5ayCAaZ1AotIA","type": "AGENT"},"content": {"type": "TOPIC_CHANGE","addedTopicIds": ["uu4t00vITaKQ3bVjU2UrGQ"]}} {"id": "VMn_5L1iTPmcM5DBP1U8oQ","conversationId": "9BcE2O0DQ2ynGHRmk9FeoA","customerId": "KgnVOMc2TbiA3zad6iVlWA","timestamp": "2020-04-21T00:56:03.712Z","initiator": {"type":"CUSTOMER","id":"KgnVOMc2TbiA3zad6iVlWA"}, "content":{"startedAt":"2020-04-21T00:55:50.703Z","recordingUrl":"/api/v1/conversation-items/VMn_5L1iTPmcM5DBP1U8oQ/media/recording","recordingStatus":"AVAILABLE","recordingDuration":13,"type":"VOICEMAIL"}} {"id": "SShWgSCHSHy6EO5TiL7rNw","conversationId": "gHuxLQNXSAmmWuNePSyVTw","customerId": "0EphnSIJR0ycjMWFTf-GXA","timestamp": "2020-04-20T23:58:51.941Z","initiator": {"type":"AGENT","id":"LsFXSnO6Ty6gdnyH6y8yug"},"content":{"type":"CONVERSATION_STATUS_CHANGE","status":"CLOSED"}} {"id": "DnaU23pZSIqOixATlII1vA","conversationId": "HXRqKC5GSV-jAlq0-sxYTA","customerId": "o2sg-TMTSD2rTwMuxzewbA","timestamp": "2020-04-24T23:42:57.780Z","initiator": {"type":"AGENT","id":"zGaHXjD4SR-moMR9LbULDA"},"content":{"type":"CONVERSATION_NOTE","body":"Customer has requested more information about our loyalty program."}} ``` **customers.jsonl** ``` {"id": "OOrlNMXeS72gs_WEX2TtMg","name": "Martha J Williams","address": "563 Rigoberto Station Apt. 197","emailAddresses": ["Martha.Williams@gmail.com"],"phoneNumbers": ["+17244895501"],"externalCustomerId": "a21c1636-c622-48b7-bf6a-d9032645aa55"} ``` **topics.jsonl** ``` {"id": "uu4t00vITaKQ3bVjU2UrGQ","name": "Order Returns","disabled": false} ``` parameters: - description: id of the job name: jobId in: path required: true schema: type: string example: OOrlNMXeS72gs_WEX2TtMg - description: name of the file name: filename in: path required: true schema: type: string example: agents.jsonl responses: '200': description: returns a file content: application/x-ndjson: schema: $ref: '#/components/schemas/ExportDownloadFileResponse' examples: null '404': description: file not found content: application/json: schema: $ref: '#/components/schemas/NotFoundErrors' /api/v1/reports: post: tags: - Reports summary: Generate a report operationId: Reports_generateReportCsv description: >- Generate a report with a set of specific parameters and filters. The report is returned as a CSV file. These are the same reports that you can normally access via UI. For more information about each report, check out the [Reporting and Insights](https://help.gladly.com/docs/reports-key-concepts) section of the help docs. requestBody: description: Parameters describing the report to generate. content: application/json: schema: $ref: '#/components/schemas/ReportsGenerateReportCsvRequest' examples: ContactSummaryReport: value: metricSet: ContactSummaryReport timezone: America/Los_Angeles startAt: '2021-10-01' endAt: '2021-10-02' aggregationLevel: daily filters: channel: allChannels inboxes: - c23d738960f946988e943f400313133a - 2c475a4351ce4aa39ff5cb9f526d77db IvrEndStatesReportV2: value: metricSet: IvrEndStatesReportV2 startAt: '2019-05-01' endAt: '2019-05-16' aggregationLevel: daily filters: phoneNumber: '+15555555555' required: true responses: '200': description: Report CSV headers: Content-Disposition: schema: type: string example: >- attachment; filename=SummaryReportV2-20190501-20190516-Daily.csv content: text/csv: schema: $ref: '#/components/schemas/ReportsGenerateReportCsvResponse' '400': description: Invalid request content: application/json: schema: $ref: '#/components/schemas/Errors' examples: invalid filter: value: errors: - attr: filters.phoneNumber code: invalid detail: >- the phoneNumber filter cannot be applied to the SummaryReport metricSet - attr: aggregationLevel code: invalid detail: the specified value is not a valid aggregation level missing metricSet: value: errors: - attr: metricSet code: blank detail: metricSet must be specified nonexistent inbox: value: errors: - attr: filters.inboxes code: present detail: the requested inbox does not exist /api/v1/webhooks: post: tags: - Webhooks summary: Create webhook operationId: Webhooks_createWebhook description: > Create a new webhook with the supplied data. The webhook will be in disabled state by default. If creating a new enabled webhook, your service is expected to respond to a [Ping Event](https://developer.gladly.com/rest/). You are limited to 20 webhooks for your organization. requestBody: description: Webhook to add required: true content: application/json: schema: $ref: '#/components/schemas/WebhooksCreateWebhookRequest' example: name: CSAT integration url: https://gateway.organization.com/gladly/webhook events: - CONVERSATION/CLOSED credentials: username: integrations@organization.com password: fxdUfTcejVxVs9bQ8DizKccq headers: X-Gladly-Token: '123' responses: '201': description: Created webhook headers: Location: description: Location of the created webhook schema: type: string example: /api/v1/webhooks/c5yeqK8VTlm9xAXgvq_5-w '400': description: Invalid field(s) in request body content: application/json: schema: $ref: '#/components/schemas/Errors' callbacks: event: '{$request.body#/url}': post: requestBody: content: application/json: schema: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema responses: '200': description: Event was accepted get: tags: - Webhooks summary: List webhooks operationId: Webhooks_list description: | Returns a list of webhooks. responses: '200': description: Webhook content: application/json: schema: $ref: '#/components/schemas/WebhooksListResponse' /api/v1/webhooks/{webhookId}: parameters: - description: id of the webhook name: webhookId in: path required: true schema: type: string example: a9dIl-kKRrKUZLQtJ-tjtw patch: tags: - Webhooks summary: Update webhook operationId: Webhooks_updateById description: > Update webhook by id. If enabling a webhook or updating a webhook's URL, your service is expected to respond to a [Ping Event](https://developer.gladly.com/rest/). requestBody: description: JSON patch of webhook properties to insert or update required: true content: application/json: schema: $ref: '#/components/schemas/WebhooksUpdateByIdRequest' example: enabled: true responses: '204': description: Updated webhook '400': description: Invalid field(s) in request body '404': description: Webhook with id does not exist delete: tags: - Webhooks summary: Delete webhook operationId: Webhooks_deleteById description: | Delete a webhook by ID responses: '204': description: Webhook deleted '400': description: Webhook must be disabled to be deleted '404': description: Webhook with id does not exist get: tags: - Webhooks summary: Get webhook operationId: Webhooks_getById description: | Get a webhook by ID responses: '200': description: Webhook content: application/json: schema: $ref: >- #/paths/~1api~1v1~1webhooks~1%7BwebhookId%7D/patch/requestBody/content/application~1json/schema '404': description: Webhook with id does not exist /gladly/webhook: servers: - description: >- Web service hosted on your servers should be reachable from the Gladly cluster url: https://gateway.organization.com post: tags: - Payloads operationId: Payloads_notifyEndpoint description: > Gladly will perform a POST request to your endpoint when the event occurs. Your service is expected to respond within 15 seconds. If your service responds to a webhook notification with a response code outside the 2XX range or times out after 15 seconds, Gladly considers that delivery as failed and will resend the request up to 4 times over an hour. After the fourth attempt, we will deactivate the webhook and will notify all API Users in your organization's environment via email. requestBody: description: the event payload content: application/json: schema: $ref: '#/components/schemas/PayloadsNotifyEndpointRequest' responses: '200': description: Success /api/v1/reports/work-session-events: post: tags: - Reports summary: Generate a work session report operationId: Reports_generateWorkSessionReport description: > A **Work Session** represents a period of time that an Agent spends working with a Customer on a given channel, during a given Contact (messaging exchange, phone call, etc.). In particular: - A Customer may have 0 or more Conversations, but only 1 Conversation is open at any given time. - A Conversation may contain 0 or more Contacts (e.g.: A single phone call, a chat session, an email session). - A Contact may have 0 or more Work Sessions (i.e.: Agents who work on the Contact). - A Work Session is the unique combination of contact_session_id and agent_id. The agent_id column will be NULL if the contact has not been handled by any Agent. The Work Session Report API contains **both** contacts and work sessions. It allows you to understand what your inbound contact volume looks like, and to get a view into how Agents are using their time. The primary use of this information is for forecasting and scheduling purposes, but it can also be used to understand, at a fine-grained level, aspects of agent behavior, agent performance, multichannel conversation patterns and more. The time anchor for data returned by this API is COALESCE(contact_session_created_at, contact_session_ended_at) (i.e.: if contact_session_ended_at does not exist, use contact_session_created_at. Otherwise, use contact_session_ended_at). This means that if it is currently 2023-03-23T00:00Z and: - contact_session_id A was created on 2023-03-21T04:00Z and ended on 2023-03-22T04:00Z - You set the startAt time filter to 2023-03-21T00:00Z - You set the endAt time filter to 2023-03-22T00:00Z - You would not be able to retrieve contact_session_id A in your API request. Instead, you will need to set the endAt time filter to now() (aka 2023-03-23T00:00Z) to retrieve the contact information. Therefore, the general recommendation to get correct data is always to set the endAt time to now() rather than the end interval you'd like to analyze - this will accomodate contacts that "move" intervals due to ending. Note that: - work_session_unknown_time_sec and work_session_after_contact_time_sec may accumulate after the contact ends and before the conversation ends / another contact begins - work_session_handle_time_sec will only be available for a contact after it ends - This report is subject to the same [data latency](https://help.gladly.com/docs/why-is-my-reporting-data-not-current) as other Gladly reports This CSV file contains the following columns, whose definitions may be viewed via the [Work Sessions](https://help.gladly.com/docs/work-sessions) section of the help docs. - id - contact_session_id - contact_session_created_at - customer_id - conversation_id - inbox_id - channel - direction - agent_accepted_at - contact_session_routed_at - agent_id - sla_fulfilled_at - contact_session_ended_at - status - within_sla - work_session_handle_time_sec - work_session_after_contact_time_sec - work_session_unknown_time_sec - accepted_inbox_id requestBody: description: A time range for the report that will be generated. content: application/json: schema: $ref: '#/components/schemas/ReportsGenerateWorkSessionReportRequest' example: startAtTime: 2020-04-13T19:27-09:00 endAtTime: 2020-04-14T19:27-09:00 required: true responses: '200': description: Work Session Report CSV headers: Content-Disposition: schema: type: string example: >- attachment; filename=WorkSessionEventsReport-20200302T1000Z-20200302T2000Z.csv content: text/csv: schema: $ref: '#/components/schemas/ReportsGenerateWorkSessionReportResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Errors' examples: invalid parameter: value: errors: - attr: startAtTime code: invalid detail: endAtTime must occur after startAtTime /api/v1/events: parameters: - description: > Starting time of the events interval. This is based on the `timestamp` field which indicates when the event was recorded. Must be from last 24 hours. The date should be in ISO 8601 format. name: startAt required: true in: query schema: type: string example: '2020-04-13T19:27:34-09:00' - description: > Ending time of the events interval. This is based on the `timestamp` field which indicates when the event was recorded. If unspecified, current time will be implied. The date should be in ISO 8601 format. name: endAt in: query required: false schema: type: string example: '2020-04-13T20:27:12-09:00' - description: > Entity types that have associated events. Any number of types is acceptable and at least one must be present Available Types: `AGENT_AVAILABILITY`, `AGENT_STATUS`, `CONTACT`, `CONVERSATION`, `CUSTOMER`, `PAYMENT_REQUEST`,`TASK` name: entities required: true in: query schema: type: array example: - AGENT_AVAILABILITY - AGENT_STATUS items: description: >- WARNING: Missing items property in array schema. Missing items property has been filled with this AnyType schema. get: tags: - Events summary: List events operationId: Events_listStreamOfEvents description: > Returns a stream of events for the specified entities within the given time range. Responses are streamed using JSONL. Events are up to 15 seconds behind real-time. ``` /api/v1/events?startAt=2020-05-20T14:00:00Z&entities=AGENT_STATUS&entities=AGENT_AVAILABILITY ``` responses: '200': description: Events Streaming Response content: application/x-jsonlines: schema: $ref: '#/components/schemas/EventsListStreamOfEventsResponse' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Errors' examples: invalid parameter: value: errors: - attr: startAt code: invalid detail: endAt must occur after startAt components: securitySchemes: BasicAuth: description: > Gladly API uses token-based **Basic Authentication**. API tokens are associated with designated Gladly users. To create and use an API token, your user must have the API User permission. An API token can be used to perform any API request without restriction. | user name | password | | ----------- | --------- | | agent email | API token | The credentials must be passed via an `Authorization` HTTP header. All requests must be made over HTTPS. ```shell curl -u user@organization.com:$GLADLY_API_TOKEN \ https://organization.gladly.com/api/v1/organization ``` type: http scheme: basic schemas: Error: type: object properties: attr: description: Identifies the field causing the error type: string code: description: Code indicating the error type type: string detail: description: More details describing what went wrong type: string Errors: type: object properties: errors: type: array items: $ref: '#/components/schemas/Error' example: - attr: content code: blank detail: content cannot be blank NotFoundErrors: type: object properties: errors: type: array items: $ref: '#/components/schemas/Error' example: - code: not_exist detail: entity does not exist CommunicationsSendSmsRequest: title: SMS request body required: - customer - from - body type: object properties: customer: title: customer with mobile number required: - mobileNumber type: object properties: mobileNumber: $ref: >- #/paths/~1api~1v1~1communications~1sms/post/requestBody/content/application~1json/schema/properties/from from: title: mobile number type: string example: '+14152223316' body: title: SMS message type: string example: hello, this is an SMS message! CommunicationsReceiveCustomChannelMessagesRequest: title: Custom Channel Message request body type: object required: - sender - to - type - content properties: sender: type: object required: - address properties: address: description: > The address is used to map inbound messages to the Customer Profile. This address is a unique identifier of the Gladly Customer. type: string displayName: title: Optional description: > The message sender's display name shown on the contact details card. type: string profileIdentifier: title: Optional description: > The profileIdentifier allows associating the message with other identifiable addresses of a Customer. We will use the profileIdentifier when the first message is received and link the sender address to a Gladly Profile that has a matching identifier. If no existing Profile exist with a matching identifier, a new Profile with the identifier will be created. required: - type - address properties: type: title: the identifier type type: string enum: - EMAIL - PHONE_NUMBER address: title: the identifier address description: > Depending on the type, this should either be an email address or a phone number in E.164 format. type: string to: description: > The address of the recipient of the message. This should correspond to the Entry Point Address created for the Custom Channel in Gladly. type: string type: description: | Describes the message type type: string enum: - TEXT - FILES groupId: title: Message Group ID description: > Optional message group ID that can be associated with a message, the Custom Channel must be configured for Message Groups in order to use this field. type: string groupName: title: Message Group Name description: > Used together with `groupId` to give the group a name that can be displayed to an Agent. type: string content: oneOf: - title: Plain text message description: | Plain text message required: - text properties: text: description: | Plain text content on the message type: string - title: Files message description: > A message that has attached files, this could be images or other types of files. required: - files properties: caption: description: | Optional text describing the files type: string files: type: array items: title: A file description type: object required: - url properties: fileName: description: Optional name of file type: string url: description: >- Publicly available URL where file can be downloaded from type: string CommunicationsUpdateMessageStatusRequest: title: Custom Channel Message status type: object required: - value properties: value: type: string enum: - ACCEPTED - DELIVERED - READ - FAILED details: description: >- Optional status details. It is particularly useful when the value is 'Failed'. type: string ConversationsUpdateAssigneeStatusRequest: title: Conversation Update type: object properties: assignee: title: Assignee Update type: object required: - inboxId properties: agentId: description: The id of the agent who is assigned to the conversation type: string example: sHuXx-U3QqOmhvFusJGeBw inboxId: description: The id of the inbox to which the conversation belongs to type: string example: E1nArq1uQAees_DogHB0MA status: title: Conversation Status type: object required: - value properties: value: description: Value of the status to change to type: string enum: - CLOSED - OPEN force: description: >- Determines whether to override the value if conversation still needs a response type: boolean default: false ConversationsCreateCustomerItemRequest: title: Conversation Item To Create with Customer required: - content - customer type: object properties: id: description: >- Unique conversation item id. Must be URL safe and under 50 characters. An id will be automatically generated if one is not included. maxLength: 50 type: string example: pOVVdzweSumI4bFxjlT8LA customer: title: Customer Specification description: >- Specifies the customer an item belongs to. You must provide exactly one of the values. type: object properties: emailAddress: type: string example: michelle.smith@example.org mobilePhone: type: string example: '+16505551987' content: title: Conversation Item Content To Create oneOf: - title: Customer Activity description: >- An event such as consumer interaction outside Gladly that agents will see in the customer timeline. required: - activityType - type type: object properties: title: description: >- First line of highlighted text for the item in the customer timeline maxLength: 100 type: string example: Welcome to Gladly! type: type: string example: CUSTOMER_ACTIVITY enum: - CUSTOMER_ACTIVITY body: description: >- Plain text or rich content ([see here for supported markup](https://developer.gladly.com/rest/)) of the activity that will appear as the main content. maxLength: 25000 type: string example: >- At Gladly we set out to reinvent customer service. Why? Because 21st century consumers are different. They are from 18 to 80 years old, expect the brands they love to recognize them, and to be able to communicate with your agents over all channels – all the time. activityType: description: >- Type of this activity. This will determine the icon displayed in the customer timeline. type: string example: EMAIL enum: - EMAIL - ISSUE - SMS - SURVEY sourceName: description: Name of the source system generating this activity maxLength: 50 type: string example: HubSpot link: description: >- Clickable reference to appear at the bottom portion of the customer activity card in the customer timeline type: object properties: url: description: URL for a clickable link that this item should go to type: string example: https://www.gladly.com/product/ text: description: Text label for the link maxLength: 50 type: string example: View Details occurredAt: description: >- Time when this activity occurred. Will determine where in the customer timeline this item appears. Limited to events no older than 1 year. Note if this value is not set, it will be ommitted from the GET Item API call, and ordering on the timeline will default to the `receivedAt` time (i.e.: `current_time`). type: string format: RFC3339 with millis example: '2016-04-11T14:09:23.000Z' receivedAt: description: The time when this item was first sent to Gladly type: string format: RFC3339 with millis readOnly: true example: '2019-01-11T20:49:55.000Z' - title: Task (deprecated) required: - body - dueAt - type - assignee type: object properties: type: type: string example: TASK enum: - TASK assignee: title: Assignee description: Inbox and Agent assignee for a Task required: - inboxId properties: inboxId: description: >- Id of the inbox the task should be assigned to. You can look up the id in the Gladly UI. type: string example: NFpDZtfqhk2pI6fjaVDlFf agentId: description: >- Id of the agent the task should be assigned to. You can look up the id in the Gladly UI. type: string example: zGaHXjD4SR-moMR9LbULDa body: description: >- Text to describe what task to complete. Constrained HTML [Rich Content](https://developer.gladly.com/rest/) is supported. maxLength: 10000 type: string example: Call customer back with information about booking dueAt: description: >- Time when the task will be due. This must be set to a time in the future. type: string format: RFC3339 example: '2020-03-15T06:13:00.125Z' ConversationsCreateCustomerItemRequest1: title: Conversation Item To Create required: - content type: object properties: id: description: >- Unique conversation item id. Must be URL safe and under 50 characters. An id will be automatically generated if one is not included. maxLength: 50 type: string example: pOVVdzweSumI4bFxjlT8LA content: $ref: >- #/paths/~1api~1v1~1conversation-items/post/requestBody/content/application~1json/schema/properties/content ConversationsAddTopicToListRequest: title: List of Conversation Topics to Add required: - topicIDs type: object properties: topicIds: description: Topic Ids to be added to the conversation. type: array example: - pOVVdzweSumI4bFxjlT8LA items: type: string ConversationsAddFreeformTopicsRequest: title: List of Conversation Freeform Topics to Add or Remove required: - content type: object properties: body: description: Freeform topics that need to be added or removed from a conversation type: string items: type: object ConversationsAddNoteToConversationRequest: title: Content of note to add required: - content type: object properties: body: description: >- Plain text or [rich content](https://developer.gladly.com/rest/) of the note. type: string example: >-

Customer has requested more information about our loyalty program.

ConversationsSendResponseRequest: title: Message description: Message that can be sent in Gladly type: object required: - content properties: content: title: Message content oneOf: - title: Email Message Content description: The content of the email message type: object required: - type - body properties: type: type: string enum: - EMAIL body: description: HTML message that can be added to an email type: string example:

Customer service is being reinvented by Gladly

bodyPlain: description: Plain text message that can be added to an email type: string example: Customer service is being reinvented by Gladly - title: Chat Message Content oneOf: - title: Message Content description: The content of the chat message type: object required: - type - body properties: type: type: string enum: - CHAT_MESSAGE messageType: type: string enum: - TEXT body: description: Plain text message type: string example: Customer service is being reinvented by Gladly - title: QuickReply Request Content description: The content of chat QuickReply request type: object required: - type - body - messageType - messageData properties: type: type: string enum: - CHAT_MESSAGE messageType: type: string enum: - QUICK_REPLY_REQUEST body: description: Plain text message type: string example: What can I help you with? messageData: description: QuickReply request data type: object required: - options properties: options: title: Options description: >- The options the user can choose from, the number of options must be greater or equal to one and less or equal to 10. type: array items: title: Option type: object required: - id - label properties: id: title: Id description: >- Id of this option, must be unique in the request and only contain alphanumeric characters (a-z, A-Z, 0-9), hyphen or underscore type: string label: title: Label description: >- Text label of the option that will be presented to the user (max length 50 characters) type: string - title: Facebook Message Content description: The content of the facebook message type: object required: - type - body properties: type: type: string enum: - FACEBOOK_MESSAGE body: description: Plain text message type: string example: Customer service is being reinvented by Gladly - title: Instagram Direct Message Content description: The content of the Instagram Direct message type: object required: - type - body properties: type: type: string enum: - INSTAGRAM_DIRECT body: description: Plain text message type: string example: Customer service is being reinvented by Gladly - title: SMS Message Content description: The content of the sms message type: object required: - type - body properties: type: type: string enum: - SMS body: description: Plain text message type: string example: Customer service is being reinvented by Gladly - title: Twitter Direct Message Content (decommissioned as of 04/20/2023) description: The content of the twitter direct message type: object required: - type - body properties: type: type: string enum: - TWITTER body: description: Plain text message type: string example: Customer service is being reinvented by Gladly - title: WhatsApp Message Content description: The content of the WhatsApp message type: object required: - type - body properties: type: type: string enum: - WHATSAPP body: description: Plain text message type: string example: Customer service is being reinvented by Gladly ConversationsRedactConversationItemRequest: description: The request body should be empty MessageAutomationOutboundMessageRequest: title: Outbound Message required: - type - content type: object properties: type: description: The type of The outbound automation message. type: string enum: - TEXT - MENU content: title: Outbound Message Content oneOf: - title: Content of Text description: Send text based message to user client. required: - value type: object properties: value: description: Message body. minLength: 1 maxLength: 2048 type: string example: How can I help you? - title: Content of Menu description: Prompt and menu options that will be sent to user client. required: - prompt - menuItems properties: prompt: description: Text message sent with menu items. minLength: 1 maxLength: 50 type: string example: What is your favorite food? menuItems: description: >- An array of items that describe the menu items that will be displayed in user client. minItems: 1 maxItems: 10 type: array items: title: Menu Item description: Menu option required: '-id -label' properties: id: description: >- A unique identifier that can only contain (a-z, A-Z, 1-9, -, _). Spaces not allowed. minLength: 1 maxLength: 50 type: string label: description: Menu item label. minLength: 1 maxLength: 256 type: string MessageAutomationHandoffSessionToAgentRequest: title: Handoff Description type: object required: - description properties: description: description: >- A brief description why the session was handed off to an agent. Cannot be blank. type: string minLength: 1 maxLength: 240 MessageAutomationCloseSessionRequest: title: Close Description type: object required: - description properties: description: description: A brief description why the session was closed. Cannot be blank. type: string minLength: 1 maxLength: 240 TasksCustomerTimelineRequest: required: - body - dueAt - assignee - customer properties: id: description: Specifies the id of the task maxLength: 50 type: string example: pOVVdzweSumI4bFxjlT8LA assignee: title: Assignee description: Inbox and agent assignee for a task required: - inboxId properties: inboxId: description: >- Id of the inbox the task should be assigned to. You can look up the id in the Gladly UI. type: string example: NFpDZtfqhk2pI6fjaVDlFf agentId: description: >- Id of the agent the task should be assigned to. You can look up the id in the Gladly UI. type: string example: zGaHXjD4SR-moMR9LbULDa body: description: >- Text to describe what task to complete. Constrained HTML [Rich Content](https://developer.gladly.com/rest/) is supported. maxLength: 10000 type: string example: Call customer back with information about booking dueAt: description: >- Time when the task will be due. This must be set to a time in the future. type: string format: RFC3339 example: '2020-03-15T06:13:00.125Z' customer: title: Customer Specification description: >- Specifies the customer a task belongs to. You must provide exactly one of the values. type: object properties: emailAddress: type: string example: michelle.smith@example.org mobilePhone: type: string example: '+16505551987' TasksCreateCustomerTaskRequest: title: Create Task description: A task to be completed for a specific customer required: - body - dueAt - assignee properties: id: description: >- Unique task id. Must be URL safe and under 50 characters. An id will be automatically generated if one is not included. maxLength: 50 type: string example: pOVVdzweSumI4bFxjlT8LA assignee: $ref: >- #/paths/~1api~1v1~1tasks/post/requestBody/content/application~1json/schema/properties/assignee body: description: >- Text to describe what task to complete. Constrained HTML [Rich Content](https://developer.gladly.com/rest/) is supported. maxLength: 10000 type: string example: Call customer back with information about booking dueAt: description: >- Time when the task will be due. This must be set to a time in the future. type: string format: RFC3339 example: '2020-03-15T06:13:00.125Z' TasksUpdateTaskRequest: type: object properties: status: type: string enum: - OPEN - CLOSED body: description: >- Text to describe what task to complete. Constrained HTML [Rich Content](https://developer.gladly.com/rest/) is supported. maxLength: 10000 type: string example: Call customer back with information about booking dueAt: description: Due date of task type: string format: RFC3339 with millis example: '2021-04-11T14:09:23.000Z' assignee: type: object $ref: >- #/paths/~1api~1v1~1tasks/post/requestBody/content/application~1json/schema/properties/assignee TasksAddTaskCommentRequest: title: Task Comment Request description: Add a comment to an open task. type: object required: - agentId - message properties: id: description: >- Unique comment id. Must be URL safe and under 50 characters. An id will be automatically generated if one is not included. maxLength: 50 type: string example: pOVVdzweSumI4bFxjlT8LA agentId: description: the id of the agent making the comment type: string example: dzweSumI4bFxjlT8LApOVV comment: description: Comment body maxLength: 10000 type: string example: Return call to customer CustomersCreateProfileRequest: allOf: - $ref: >- #/paths/~1api~1v1~1customer-profiles~1%7BcustomerId%7D/patch/requestBody/content/application~1json/schema - type: object properties: id: description: >- Unique customer id. Must be URL safe and under 50 characters. An id will be automatically generated if one is not included type: string example: OOrlNMXeS72gs_WEX2TtMg CustomersUpdateProfileByIdRequest: title: Customer Profile description: Customer profile type: object properties: name: description: Customer's name type: string example: Martha J Williams image: description: URL for an image that will appear as the customer's avatar type: string example: https://www.gladly.com/your-image.jpg address: description: Customer's street address type: string example: 563 Rigoberto Station Apt. 197 emails: title: email addresses description: Customer's email addresses type: array items: type: object required: - original properties: normalized: description: | Customer's email address in normalized form. type: string example: martha.williams@gmail.com original: description: > Customer's email address as entered or imported, only the addr-spec (per RFC8228) is retained. type: string example: Martha.Williams@gmail.com primary: description: >- marks the customer's preferred email. at most one per customer. type: boolean default: false example: false phones: title: phone numbers description: Customer's phone numbers type: array items: type: object required: - original properties: normalized: description: normalized E.164 value for the phone number. type: string format: E.164 example: '+17244895501' extension: description: phone number extension. type: string example: '123' original: description: phone number as entered or imported. type: string example: '7244895501' regionCode: description: > If set, the original is intepreted as a national number in this region. If NOT set, the original must contian an E.164 number or it will be interpreted as a US number. type: string default: US primary: description: marks the customer's preferred phone. type: boolean default: false smsPreference: description: Enables sending SMS to a customer. type: string enum: - 'ON' - 'OFF' - FORBIDDEN example: 'OFF' type: description: > Describes the usage of the device. Non-presense indicates unknown or non-specific OTHER type. type: string enum: - HOME - MOBILE - OFFICE example: OFFICE externalCustomerId: description: >- Customer ID in your system of record for Customer Profiles linked to a Lookup Adaptor installed prior to 05/12/21. If Customer Profile is linked to a Lookup Adaptor installed on or after 05/12/21, this field will not exist and cannot be set. type: string example: a21c1636-c622-48b7-bf6a-d9032645aa55 customAttributes: description: > Organization-specific attributes from Customer system of record. The shape of customAttributes is defined by the Customer Profile Definition. These are specific to a customer and different from the Custom Attribute entity. type: object example: membershipNumber: RQ564555333 membershipTier: gold UserIdentityGenerateJwtRequest: title: Identity Object type: object properties: identityType: description: The type of identity information type: string enum: - EMAIL - MOBILE_PHONE_NUMBER example: EMAIL identity: description: >- The identity information, the value depends on the identityType field. Needs to be a valid email or phone number format ([E.164](https://en.wikipedia.org/wiki/E.164)). type: string example: test@example.com AgentsUpdateCallRecorderRequest: title: CallRecorder type: object properties: agentId: description: Id of the agent type: string example: WmeA3Y51Q5ayCAaZ1AotIA customerId: description: >- Id of the customer on the call, if the agent is on a call. If the agent is not on a call this is omitted type: string example: ZcyobierQhucTS5GV1R2Fw conversationItemId: description: >- Id of the conversation item of the call, if the agent is on a call. If the agent is not on a call this is omitted type: string example: g6UatsvAQC69AcDpOKF-yQ recording: description: If the call is currently being recorded or not type: boolean example: true ReportsGenerateReportCsvRequest: title: Report request body type: object required: - metricSet - startAt - endAt properties: metricSet: description: > This parameter is used to specify that the report should include a predetermined set of metrics. These are the same reports that you can normally access via UI. For more information about each report, check out the [Work With OOTB Reports](https://help.gladly.com/docs/export-reports) section of the help docs. type: string example: ContactSummaryReport enum: - AgentAwayTimeReport - AgentDurationsReport - AgentLoginTimeReport - AgentSummary - AgentSummaryV2 - AgentSummaryGlanceReport - AgentSummaryGlanceReportV2 - AgentTimestampsReport - FirstContactResolutionByAgentV2Report - PaymentsByAgentReport - WorkSessionEventsReportV3 - WorkSessionsReport - WorkSessionsReportV3 - AnswerUsageReport - AnswerUsageByAgentReport - ChannelMixReportV2 - ChannelWaitTimeReport - ChannelWaitTimeReportV2 - ContactExportReport - ContactExportReportV2 - ContactExportReportV3 - ContactSummaryReport - ContactSummaryReportV2 - ContactSummaryCountsReport - ContactSummaryDurationsReport - ContactSummaryDurationsReportV2 - ContactTimestampsReport - ConversationExportReport - ConversationSummaryReport - ConversationTimestampsReport - AbandonedCallsInIVRReport - AutoThrottleMissedConversationsReport - IVRExecutiveSummaryReportV2 - IvrEndStatesReportV2 - PaymentsSummaryReport - ProactiveVoiceSummaryReport - TopicHierarchyReport - TaskExportReport - TaskSummaryReport - TaskTimestampsReport - TopicSummaryReport - AutoThrottleChangesReport - ChatDisplayPctChangesReport - HelpCenterAnswerSearchReport - HelpCenterAnswerUsageReport - QuickActionsUsageReport - SelfServiceThreadsReport - SidekickAssistsByClassificationTopicReport - GladAppAnswerSearchReport - GladAppAnswerUsageReport - GladAppContactPointsReport timezone: description: > The timezone to be used for the report. Supported timezones are those found in the IANA timezone database. If omitted, the organization's default timezone will be used. type: string example: America/Denver startAt: description: > Starting date at the timezone indicated by the timezone parameter. The report will begin at midnight of the specified date. The date should be in the format `YYYY-mm-dd`. For example `2019-05-01`. type: string example: '2019-05-01' endAt: description: > Ending date at the timezone indicated by the timezone parameter. The report will end just before midnight of the following day such that the report includes all data for the `endAt` day. The date should be in the format `YYYY-mm-dd`. For example `2019-05-01`. type: string example: '2019-05-16' aggregationLevel: description: > \ The aggregation level for the report. Applies to the following `metricSet`s: `AgentAwayTimeReport`, `AgentLoginTimeReport`, `AgentSummary`, `AgentSummaryV2`, `AgentSummaryGlanceReport`, `AgentSummaryGlanceReportV2`, `FirstContactResolutionByAgentV2Report`, `AnswerUsageReport`, `AnswerUsageByAgentReport`, `ChannelMixReportV2`, `ChannelWaitTimeReport`,`ChannelWaitTimeReportV2`, `ContactSummaryReport`, `ContactSummaryReportV2`, `ContactSummaryCountsReport`, `ContactSummaryDurationsReport`, `ContactSummaryDurationsReportV2`, `ConversationSummaryReport`, `AbandonedCallsInIVRReport`, `AutoThrottleMissedConversationsReport`, `PaymentsSummaryReport`, `ProactiveVoiceSummaryReport`, `TopicHierarchyReport`, `TaskSummaryReport`, `HelpCenterAnswerUsageReport`, `QuickActionsUsageReport`, and `GladAppAnswerUsageReport`. Note that an individual aggregationLevel may only be available depending on the `metricSet` and date range selected. For example: - "halfHourly" is not available on the `AgentSummary` `metricSet` if requesting over 1 month's worth of data - "quarterHourly" is only available for `AgentAwayTimeReport` and `AgentLoginTimeReport` type: string default: daily enum: - quarterHourly - halfHourly - daily - weekly - monthly - quarterly example: daily filters: description: >- Additional filters that can be applied to the report. Each filter applies to select `metricSet`s. Compatibility is detailed in the description of each parameter. type: object properties: channel: description: > \ Specifies a channel to filter the report by. Specifying a channel filter may alter which metrics are returned. For details, see the Data Dictionary. Applies to the following `metricSet`s: `FirstContactResolutionByAgentV2Report`, `WorkSessionsReport`, `WorkSessionsReportV3`, `ChannelMixReportV2`, `ContactExportReport`,`ContactExportReportV2`, `ContactExportReportV3`, `ContactSummaryReport`, `ContactSummaryReportV2`, `ContactSummaryCountsReport`, `ContactSummaryDurationsReport`, `ContactSummaryDurationsReportV2`, `TopicHierarchyReport`, `TopicSummaryReport`. type: string default: allChannels enum: - allChannels - chat - email - fbMessenger - sms - twitter - voice - whatsapp - instagramDirect example: voice inboxes: description: > \ An array containing inbox IDs of the inboxes for which to filter this report. Passing an inbox ID for a nonexistent inbox will result in an error response. Applies to the following `metricSet`s: `FirstContactResolutionByAgentV2Report`, `WorkSessionsReport`, `WorkSessionsReportV3`, `ChannelMixReportV2`, `ChannelWaitTimeReport`,`ChannelWaitTimeReportV2`, `ContactExportReport`,`ContactExportReportV2`, `ContactExportReportV3`, `ContactSummaryReport`,`ContactSummaryReportV2`, `ContactSummaryCountsReport`, `ContactSummaryDurationsReport`, `ContactSummaryDurationsReportV2`, `ConversationExportReport`, `ConversationSummaryReport`, `TopicHierarchyReport`, `TopicSummaryReport`, `TaskExportReport`, and `TaskSummaryReport`. See the [Inboxes API](https://developer.gladly.com/rest/) documentation for more details on how to get inbox IDs. type: array items: type: string default: [] example: - c23d738960f946988e943f400313133a - 2c475a4351ce4aa39ff5cb9f526d77db teams: description: > \ An array containing team IDs of the teams to be included in the report. Passing a team ID for a nonexistent team will result in an error response. Applies to the following `metricSet`s: `AgentDurationsReport`, `AgentLoginTimeReport`, `AgentSummary`, `AgentSummaryV2`, `AgentSummaryGlanceReport`, `AgentSummaryGlanceReportV2`, `AgentTimestampsReport`, `FirstContactResolutionByAgentV2Report`, `WorkSessionsReport`, `WorkSessionsReportV3`, `AnswerUsageByAgentReport`, `TaskExportReport`, and `TaskSummaryReport`. See the [Teams API](https://developer.gladly.com/rest/) documentation for more details on how to get team IDs. type: array items: type: string default: [] example: - dd96426e5d2b4fed86dad91cdcc84112 - cab03fe3066e4fa7ba3397e8925c5132 phoneNumber: description: > Specifies which inbound phone number the report is to be generated for. The number must be in E164 format. For example `+15555555555`. Applies to and is **required** for the following `metricSet`s: `IVRExecutiveSummaryReportV2`, and `IvrEndStatesReportV2`. type: string example: '+15555555555' WebhooksCreateWebhookRequest: title: Webhook allOf: - $ref: >- #/paths/~1api~1v1~1webhooks~1%7BwebhookId%7D/patch/requestBody/content/application~1json/schema - type: object required: - url - events WebhooksUpdateByIdRequest: title: Webhook allOf: - title: Webhook properties: id: description: id of the webhook type: string readOnly: true example: a9dIl-kKRrKUZLQtJ-tjtw name: description: friendly name of the webhook type: string maxLength: 200 example: CSAT integration events: description: >- list of events that trigger the webhook. More events are coming soon. Please see [Events](https://developer.gladly.com/rest/) for more information about the data included for each event type. type: array example: - CONVERSATION/CLOSED items: type: string enum: - AGENT_AVAILABILITY/FOCUS_ENTERED - AGENT_AVAILABILITY/FOCUS_EXITED - AGENT_AVAILABILITY/UPDATED - AGENT_STATUS/CHANGED_ACTIVE_REASON - AGENT_STATUS/LOGGED_IN - AGENT_STATUS/LOGGED_OUT - AGENT_STATUS/RETURNED_FROM_AWAY - AGENT_STATUS/WENT_AWAY - AUTOMATION/MESSAGE_RECEIVED - CONTACT/ENDED - CONTACT/FULFILLED - CONTACT/HOLD_ENDED - CONTACT/HOLD_STARTED - CONTACT/JOINED - CONTACT/MESSAGE_RECEIVED - CONTACT/MESSAGE_SENT - CONTACT/OFFER_ACCEPTED - CONTACT/OFFERED - CONTACT/OFFER_REJECTED - CONTACT/STARTED - CONTACT/TRANSFERRED - CONVERSATION/CLOSED - CONVERSATION/CREATED - CONVERSATION/CUSTOM_ATTRIBUTE_ADDED - CONVERSATION/CUSTOM_ATTRIBUTE_REMOVED - CONVERSATION/NOTE_CREATED - CONVERSATION/REOPENED - CONVERSATION/TOPIC_ADDED - CONVERSATION/TOPIC_REMOVED - CONVERSATION_ASSIGNEE/UPDATED - CONVERSATION_STATUS/UPDATED - CUSTOM_CHANNEL/MESSAGE_SENT - CUSTOMER/MERGED - CUSTOMER_PROFILE/CREATED - CUSTOMER_PROFILE/DELETED - CUSTOMER_PROFILE/MERGED (deprecated) - CUSTOMER_PROFILE/UPDATED - EXPORT_JOB/COMPLETED - EXPORT_JOB/FAILED - MESSAGE/RECEIVED (deprecated) - PAYMENT_REQUEST/CREATED - PAYMENT_REQUEST/STATUS_CHANGED - PAYMENT_REQUEST/VIEWED - TASK/ASSIGNEE_UPDATED - TASK/CLOSED - TASK/COMMENT_ADDED - TASK/CONTENT_UPDATED - TASK/CREATED - TASK/DUE_DATE_UPDATED - TASK/FOLLOWER_ADDED - TASK/FOLLOWER_REMOVED - TASK/REOPENED url: description: >- your URL that POST requests are sent to when events occur. HTTPS is required and this value must be unique across all webhooks. type: string example: https://gateway.organization.com/gladly/webhook credentials: title: Basic Auth Credentials writeOnly: true required: - username - password properties: username: description: basic auth username type: string example: integrations@organization.com password: description: basic auth password type: string example: '' realm: description: optional realm to authenticate with type: string example: '' headers: title: HTTP Headers description: custom HTTP headers to include in every request type: object writeOnly: true additionalProperties: description: static value for the HTTP header type: string example: X-API-key: X-Gladly-token: createdAt: description: time the webhook was created type: string format: RFC3339 readOnly: true example: '2019-07-03T04:30:12.07Z' updatedAt: description: time the item was last updated type: string format: RFC3339 readOnly: true example: '2019-07-09T09:00:10.00Z' hasCredentials: description: >- whether the webhook has been configured with basic auth credentials type: boolean readOnly: true example: true headerKeys: description: >- list of header keys (without values) to include in every request to your URL. type: array readOnly: true example: - X-Gladly-Key items: type: string - type: object properties: enabled: description: whether the webhook is delivering notifications type: boolean default: false example: false disabledAtDueToRetryLimit: description: time the webhook was disabled due to our retry limit type: string format: RFC3339 readOnly: true example: '2019-07-10T12:00:00.00Z' PayloadsNotifyEndpointRequest: title: Event description: data about the event oneOf: - title: Agent Availability Updated type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: zGaHXjD4SR-moMR9LbULDa type: type: string example: AGENT_AVAILABILITY/UPDATED enum: - AGENT_AVAILABILITY/UPDATED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: title: Initiator description: >- Type and ID (if applicable) of the entity that triggered the event. required: - id - type properties: id: description: ID of the entity that triggered the event. type: string example: NFpDZtfqhk2pI6fjaVDlFf type: description: The type of the entity that triggered the event. type: string example: AGENT content: title: Content description: Content for event required: - agentId - availableFor - occurredAt properties: agentId: description: ID of the agent whose availability was updated. type: string example: zGaHXjD4SR-moMR9LbULDa availableFor: description: > The set of channel types for which the agent is available after changing their availability. type: array enum: - MAIL - MESSAGING - TASK - VOICE example: - MAIL - VOICE items: description: >- WARNING: Missing items property in array schema. Missing items property has been filled with this AnyType schema. occurredAt: description: Timestamp when the action occurred type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' - title: Agent Changed Active Reason type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: AGENT_STATUS/CHANGED_ACTIVE_REASON enum: - AGENT_STATUS/CHANGED_ACTIVE_REASON timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - agentId - occurredAt properties: agentId: description: ID of the agent who changed active reason type: string example: zGaHXjD4SR-moMR9LbULDa occurredAt: description: Timestamp when the action occurred type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' activeReason: title: Active Reason description: >- Working states used by Agents to indicate what they are currently doing. The system sets a configurable default value upon login or return from away. The agent can subsequently update their active status. required: - id properties: id: description: ID of the active reason type: string example: eRaHXjD4li-moMR8LbULXc name: description: Name of the active reason type: string example: Triaging Customer - title: Agent Logged In type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: zGaHXjD4SR-moMR9LbULDa type: type: string example: AGENT_STATUS/LOGGED_IN enum: - AGENT_STATUS/LOGGED_IN timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - agentId - occurredAt properties: agentId: description: ID of the agent who logged in. type: string example: zGaHXjD4SR-moMR9LbULDa occurredAt: description: Timestamp when the action occurred type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' activeReason: title: Active Reason description: >- Working states used by Agents to indicate what they are currently doing. The system sets a configurable default value upon login or return from away. The agent can subsequently update their active status. required: - id properties: id: description: ID of the active reason type: string example: bHaHXjD4li-moMR8LbULZc name: description: Name of the active reason type: string example: Triaging Inbox (Default) - title: Agent Logged Out type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: zGaHXjD4SR-moMR9LbULDa type: type: string example: AGENT_STATUS/LOGGED_OUT enum: - AGENT_STATUS/LOGGED_OUT timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - agentId - occurredAt properties: agentId: description: ID of the agent who logged out. type: string example: zGaHXjD4SR-moMR9LbULDa occurredAt: description: Timestamp when the action occurred type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' - title: Agent Returned From Away type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: zGaHXjD4SR-moMR9LbULDa type: type: string example: AGENT_STATUS/RETURNED_FROM_AWAY enum: - AGENT_STATUS/RETURNED_FROM_AWAY timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - agentId - awayAt - occurredAt properties: agentId: description: ID of the agent who returned from away. type: string example: zGaHXjD4SR-moMR9LbULDa awayAt: description: Timestamp when the agent previously went away type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' activeReason: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/2/properties/content/properties/activeReason awayReason: title: Away Reason description: >- The reason the Agent went away. Reason will not be provided if Agent is auto-Away after the configured idle period. Agents can also be auto-logged out after an idle period, in which case that Away period will not have a corresponding AGENT_STATUS/RETURNED_FROM_AWAY event. required: - id properties: id: description: ID of the away reason type: string example: aGaHXjD4li-moMR8LbULZb name: description: name of the away reason type: string example: coffee break occurredAt: description: Timestamp when the action occurred type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' - title: Agent Went Away type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: zGaHXjD4SR-moMR9LbULDa type: type: string example: AGENT_STATUS/WENT_AWAY enum: - AGENT_STATUS/WENT_AWAY timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - agentId - occurredAt properties: agentId: description: ID of the agent who went away. type: string example: zGaHXjD4SR-moMR9LbULDa awayReason: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/4/properties/content/properties/awayReason occurredAt: description: Timestamp when the action occurred type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' - title: Automation Message Received type: object properties: id: description: Unique event ID type: string example: zGaHXjD4SR-moMR9LbULDa type: type: string example: AUTOMATION/MESSAGE_RECEIVED enum: - AUTOMATION/MESSAGE_RECEIVED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: type: object properties: sessionId: description: The session id that the message belongs to. type: string example: zGaHXjD4SR-moMR9LbULDa channelType: description: The channel type of the entry point. type: string enum: - CHAT example: CHAT customerId: description: The id of the customer that sent the message. type: string example: zGaHXjD4SR-moMR9LbULDa conversationId: description: The id of the Conversation this message is associated with. type: string example: zGaHXjD4SR-moMR9LbULDa companyAddress: description: The entry point address. type: string context: description: > Context of event as a map. Properties are specific to certain types of channel. | Channel | Property Name | Description | |-----|-----|-----| | Chat | URL | The URL where the chat originated from | | Chat | IsAuthenticated | If the chat session where the message originated from is authenticated | type: object additionalProperties: type: string enum: - URL - IsAuthenticated example: URL: https://developer.gladly.com IsAuthenticated: 'true' message: type: object properties: id: description: The id of this Automation Message. type: string example: zGaHXjD4SR-moMR9LbULDa type: description: The subtype of the Automation Message. type: string example: TEXT enum: - TEXT content: type: object properties: body: description: Message body. type: string example: Where is my order? - title: Contact Ended type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONTACT/ENDED enum: - CONTACT/ENDED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - channel - contactId - conversationId - customerId - status - context properties: channel: description: The channel of the contact. type: string enum: - CHAT - EMAIL - FB_MESSENGER - INSTAGRAM_DIRECT - PHONE_CALL - SMS - VOICEMAIL - WHATSAPP example: SMS contactId: description: The ID of the contact. type: string example: dzweSumI4bFxjlT8LApOVV conversationId: description: >- The ID of the conversation to which the contact is associated. type: string example: K98jhf874HjDFkA1457K86 customerId: description: >- The ID of the customer profile to which the contact is associated. type: string example: gHufx-U3QqOmhvFuViceTw reason: description: The reason why the contact was ended. type: string enum: - AGENT_ENDED - CONVERSATION_CLOSED - CUSTOMER_DELETED - CUSTOMER_NO_REPLY - MERGED - NO_REPLY_NEEDED - STARTED_NEW example: MERGED status: description: The status of the contact. type: string enum: - ABANDONED - ANSWERED - UNANSWERED - UNKNOWN example: ANSWERED context: title: Contact Context description: >- The state of the contact immediately before the event occurred. required: - assignee properties: assignee: title: Assignee description: >- Inbox and agent assignee of the contact just before the event was triggered. required: - inboxId properties: inboxId: description: >- ID of the inbox the contact was assigned to just before the event was triggered. You can look up the id in the Gladly UI. type: string example: NFpDZtfqhk2pI6fjaVDlFf agentId: description: >- ID of the agent the contact was assigned to just before the event was triggered. You can look up the id in the Gladly UI. type: string example: zGaHXjD4SR-moMR9LbULDa - title: Contact Fulfilled type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONTACT/FULFILLED enum: - CONTACT/FULFILLED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - channel - contactId - conversationId - customerId - fulfilledType - context properties: channel: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/channel contactId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/contactId conversationId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/conversationId customerId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/customerId fulfilledType: description: The type of fulfillment. type: string enum: - CANCELED - RESPONDED example: CANCELED context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/context - title: Contact Hold Ended type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONTACT/HOLD_ENDED enum: - CONTACT/HOLD_ENDED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - channel - contactId - conversationId - customerId - reason - context properties: channel: description: The only channel for contact holds is PHONE_CALL. type: string enum: - PHONE_CALL example: PHONE_CALL contactId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/contactId conversationId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/conversationId customerId: description: The ID of the contact. $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/customerId example: dzweSumI4bFxjlT8LApOVV reason: description: The reason the phone call contact was put on hold type: string enum: - COLD_TRANSFER - CONFERENCE - MANUAL - WARM_TRANSFER example: CONFERENCE context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/context - title: Contact Hold Started type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONTACT/HOLD_STARTED enum: - CONTACT/HOLD_STARTED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - channel - contactId - conversationId - customerId - reason - context properties: channel: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/9/properties/content/properties/channel contactId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/contactId conversationId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/conversationId customerId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/customerId reason: description: The reason the phone call contact was put on hold type: string enum: - COLD_TRANSFER - CONFERENCE - MANUAL - WARM_TRANSFER example: CONFERENCE context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/context - title: Contact Joined type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONTACT/JOINED enum: - CONTACT/JOINED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - channel - contactId - conversationId - customerId - messageId - context properties: channel: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/channel contactId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/contactId conversationId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/conversationId customerId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/customerId context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/context - title: Contact Message Received type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONTACT/MESSAGE_RECEIVED enum: - CONTACT/MESSAGE_RECEIVED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - channel - contactId - conversationId - customerId - messageId - context properties: channel: description: The channel of the contact. type: string enum: - CHAT - EMAIL - FB_MESSENGER - INSTAGRAM_DIRECT - SMS - VOICEMAIL - WHATSAPP example: SMS contactId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/contactId conversationId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/conversationId customerId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/customerId messageId: description: >- The ID of the message that was received. This message can be retreived using the Gladly Conversations API (`/api/v1/conversation-items/{itemId}`) type: string example: dzweSumI4bFxjlT8LApOVV context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/context - title: Contact Message Sent type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONTACT/MESSAGE_SENT enum: - CONTACT/MESSAGE_SENT timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - channel - contactId - conversationId - customerId - messageId - context properties: channel: description: The channel of the contact. type: string enum: - CHAT - EMAIL - FB_MESSENGER - INSTAGRAM_DIRECT - SMS - WHATSAPP example: SMS contactId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/contactId conversationId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/conversationId customerId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/customerId messageId: description: The ID of the message that was sent type: string example: dzweSumI4bFxjlT8LApOVV context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/context - title: Contact Offer Accepted type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONTACT/OFFER_ACCEPTED enum: - CONTACT/OFFER_ACCEPTED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - channel - contactId - conversationId - customerId - agentId - context properties: channel: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/channel contactId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/contactId conversationId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/conversationId customerId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/customerId agentId: description: The ID of the assigned agent after the offer was accepted. type: string example: dzweSumI4bFxjlT8LApOVV context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/context - title: Contact Offer Rejected type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONTACT/OFFER_REJECTED enum: - CONTACT/OFFER_REJECTED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - channel - contactId - conversationId - customerId - agentId - reason - context properties: channel: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/channel contactId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/contactId conversationId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/conversationId customerId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/customerId agentId: description: The ID of the agent who was offered the contact. type: string example: dzweSumI4bFxjlT8LApOVV reason: description: >- The reason the offer was rejected by the system or by an agent. enum: - DECLINED - MISSED - DEVICE ERROR type: string context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/context - title: Contact Offered type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONTACT/OFFERED enum: - CONTACT/OFFERED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - channel - contactId - conversationId - customerId - agentId - context properties: channel: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/channel contactId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/contactId conversationId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/conversationId customerId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/customerId agentId: description: The ID of the agent being offered the contact. type: string example: dzweSumI4bFxjlT8LApOVV matchReasons: description: > The names of the People Match Priority Boosts that boosted the score for the contact offer. type: array example: - Transfer - Receipt Request items: description: >- WARNING: Missing items property in array schema. Missing items property has been filled with this AnyType schema. context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/context - title: Contact Started type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONTACT/STARTED enum: - CONTACT/STARTED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - channel - contactId - conversationId - customerId - context properties: channel: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/channel contactId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/contactId conversationId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/conversationId customerId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/customerId dueAt: description: The due date of the contact format: ISO 8601 example: '2019-07-03T04:30:12.07Z' entryPoint: description: >- The “To” address (e.g. phone number, email address) that the customer reached out to type: string example: endpoint-1 finalIVRSelection: description: Final selection made in the IVR before the contact is queued type: string example: __billing context: description: >- The state of the contact immediately before the event occurred. required: - assignee properties: assignee: description: >- Inbox and agent assignee of the contact when the event was triggered. required: - inboxId properties: inboxId: description: >- ID of the inbox the contact was assigned to when the event was triggered. You can look up the id in the Gladly UI. type: string example: NFpDZtfqhk2pI6fjaVDlFf agentId: description: >- ID of the agent the contact was assigned to when the event was triggered. You can look up the id in the Gladly UI. type: string example: zGaHXjD4SR-moMR9LbULDa - title: Contact Transferred type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONTACT/TRANSFERRED enum: - CONTACT/TRANSFERRED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - channel - contactId - conversationId - customerId - reason - transferType - assignee - context properties: channel: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/channel contactId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/contactId conversationId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/conversationId customerId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/customerId transferType: description: The type of transfer. type: string enum: - COLD - WARM example: COLD reason: description: The reason the contact was transferred enum: - AUTOMATION - MANUAL - MERGE - UNKNOWN example: MANUAL type: string assignee: description: The new assignee after the contact was transferred type: object required: - inboxId properties: inboxId: description: >- ID of the inbox the contact was assigned to after the event occurred. You can look up the id in the Gladly UI. type: string example: NFpDZtfqhk2pI6fjaVDlFf agentId: description: >- ID of the agent the contact was assigned to after the event occurred. You can look up the id in the Gladly UI. type: string example: zGaHXjD4SR-moMR9LbULDa context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/context - title: Conversation Assignee Updated type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONVERSATION_ASSIGNEE/UPDATED enum: - CONVERSATION_ASSIGNEE/UPDATED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for the event required: - customerId - conversationId - reason - assignee - context properties: customerId: description: >- The ID of the customer profile to which the conversation is associated. type: string example: THx8Z8y-ScuMoqBH8Awtng conversationId: description: The ID of the conversation. type: string example: aGaHXjD4li-moMR8LbULZb reason: description: The reason for the assignee update type: string enum: - AUTOMATED_ASSIGNMENT - CONTACT_DECLINED - CONTACT_INBOUND - CONTACT_MISSED - CONTACT_OFFERED - CUSTOMER_CONVERSATION_MERGE - DEDICATED_HERO_ASSIGN - DEDICATED_HERO_CHANGE - DEVICE_ERROR - MANUAL - MESSAGE_OUTBOUND - CONTACT_OFFER_CONFLICT - PHONE_CALL_TRANSFER - QUEUE_IVR_TRANSFER - REROUTED_UNASSIGN - USER_DEACTIVATION assignee: title: Assignee description: Inbox and agent assignee being assigned the conversation. required: - inboxId properties: inboxId: description: >- ID of the inbox the conversation is being assigned. You can look up the id in the Gladly UI. type: string example: NFpDZtfqhk2pI6fjaVDlFf agentId: description: >- ID of the agent the conversation is being assigned. You can look up the id in the Gladly UI. type: string example: zGaHXjD4SR-moMR9LbULDa context: title: Conversation Context description: >- The state of the conversation immediately before the event occurred. required: - assignee properties: assignee: description: >- Inbox and agent assignee of the conversation when the event was triggered. required: - inboxId properties: inboxId: description: >- ID of the inbox the conversation was assigned to when the event was triggered. You can look up the id in the Gladly UI. type: string example: NFpDZtfqhk2pI6fjaVDlFf agentId: description: >- ID of the agent the conversation was assigned to when the event was triggered. You can look up the id in the Gladly UI. type: string example: zGaHXjD4SR-moMR9LbULDa - title: Conversation Closed type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONVERSATION/CLOSED enum: - CONVERSATION/CLOSED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Conversation description: '' required: - customerId - conversationId - context properties: customerId: description: >- The ID of the customer profile to which the conversation is associated. type: string example: THx8Z8y-ScuMoqBH8Awtng conversationId: description: The ID of the conversation. type: string example: aGaHXjD4li-moMR8LbULZb context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/19/properties/content/properties/context - title: Conversation Created type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONVERSATION/CREATED enum: - CONVERSATION/CREATED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/20/properties/content - title: Conversation Custom Attribute Added type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONVERSATION/CUSTOM_ATTRIBUTE_ADDED enum: - CONVERSATION/CUSTOM_ATTRIBUTE_ADDED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: ConversationCustomAttribute description: Content for the event required: - customerId - conversationId - customAttributeId - customAttributeKey - customAttributeValue properties: customerId: description: >- The ID of the customer profile to which the conversation is associated. type: string example: THx8Z8y-ScuMoqBH8Awtng conversationId: description: The ID of the conversation. type: string example: aGaHXjD4li-moMR8LbULZb customAttributeId: description: The ID of the custom attribute. type: string example: aGaHXjD4li-moMR8LbULZb customAttributeKey: description: The Key of the custom attribute. type: string example: orderId customAttributeValue: description: The Value of the custom attribute. type: string example: '1232424890' - title: Conversation Custom Attribute Removed type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONVERSATION/CUSTOM_ATTRIBUTE_REMOVED enum: - CONVERSATION/CUSTOM_ATTRIBUTE_REMOVED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/22/properties/content - title: Conversation Note Created type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONVERSATION/NOTE_CREATED enum: - CONVERSATION/NOTE_CREATED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for the event required: - noteId - customerId - conversationId properties: noteId: description: The ID of the note being created type: string example: UAAAlBdOQwGl7mzqQUfVow customerId: description: >- The ID of the customer profile to which the conversation is associated. type: string example: THx8Z8y-ScuMoqBH8Awtng conversationId: description: The ID of the conversation. type: string example: aGaHXjD4li-moMR8LbULZb - title: Conversation Reopened type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONVERSATION/REOPENED enum: - CONVERSATION/REOPENED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/20/properties/content - title: Conversation Status Updated type: object required: - id - type - timestamp - content properties: id: description: Unique event ID type: string example: zGaHXjD4SR-moMR9LbULDa type: type: string example: CONVERSATION_STATUS/UPDATED enum: - CONVERSATION_STATUS/UPDATED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' content: title: CONVERSATION_STATUS/UPDATED properties: conversationId: description: id of the conversation for which the status was updated type: string example: IBBcbj2ARXWwvUGV_LbfEQ customerId: description: id of the customer whose conversation's status was updated type: string example: qJaE0di0SdOWNnq5dT13Aw - title: Conversation Topic Added type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONVERSATION/TOPIC_ADDED enum: - CONVERSATION/TOPIC_ADDED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for the event required: - customerId - conversationId - topicId - context properties: customerId: description: >- The ID of the customer profile to which the conversation is associated. type: string example: THx8Z8y-ScuMoqBH8Awtng conversationId: description: The ID of the conversation. type: string example: aGaHXjD4li-moMR8LbULZb topicId: description: The ID of the topic being added to the conversation. type: string example: 0f2oNq7sR6CJpKq0WDbTbg context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/19/properties/content/properties/context - title: Conversation Topic Removed type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CONVERSATION/TOPIC_REMOVED enum: - CONVERSATION/TOPIC_REMOVED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for the event required: - customerId - conversationId - topicId - context properties: customerId: description: >- The ID of the customer profile to which the conversation is associated. type: string example: THx8Z8y-ScuMoqBH8Awtng conversationId: description: The ID of the conversation. type: string example: aGaHXjD4li-moMR8LbULZb topicId: description: The ID of the topic removed from the conversation. type: string example: 0f2oNq7sR6CJpKq0WDbTbg context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/19/properties/content/properties/context - title: Custom Channel Message Sent description: > Triggered when an Agent or an Automation service is sending a message to a Customer on a Custom Channel. type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CUSTOM_CHANNEL/MESSAGE_SENT enum: - CUSTOM_CHANNEL/MESSAGE_SENT timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for the event required: - customChannelId - companyAddress - customerAddress - conversationId - customerId - sessionId - messageId - type - content properties: customChannelId: description: The customChannelId message was addressed from type: string companyAddress: description: >- The companyAddress ((Entry Point Address)) message was addressed from type: string customerAddress: description: The customerAddress the message was addressed to type: string conversationId: description: The ID of the Conversation the message is part of type: string customerId: description: The Gladly customId that the message was sent to type: string groupId: title: Message Group ID description: > Optional message group ID that can be associated with a message, the Custom Channel must be configured for Message Groups in order to use this field. type: string groupName: title: Message Group Name description: > Used together with `groupId` to give the group a name that can be displayed to an Agent. type: string sessionId: description: The ID of the Conversation Session the message is part of type: string messageId: description: > Unique ID of the Item representing the message. The ID can be used to fetch the message via the [Get item](https://developer.gladly.com/rest/) API. type: string type: description: The type of message type: string enum: - TEXT - FILES content: oneOf: - $ref: >- #/paths/~1api~1v1~1communications~1custom-channels~1%7BcustomChannelId%7D~1messages/post/requestBody/content/application~1json/schema/properties/content/oneOf/0 - title: Files message description: > A message that has attached files, this could be images or other types of files. required: - files properties: caption: description: | Optional text describing the files type: string files: type: array items: title: A file description type: object required: - url properties: fileName: description: Optional name of file type: string url: description: >- URL where file can be downloaded from, Basic Authentication is required to download the file. type: string - title: Customer Merged type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: CUSTOMER/MERGED enum: - CUSTOMER/MERGED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for the event required: - destinationCustomerId - destinationConversationId - sourceCustomerId - sourceConversationId properties: destinationCustomerId: description: >- The ID of the combined customer profile that remains after the merge. type: string example: THx8Z8y-ScuMoqBH8Awtng destinationConversationId: description: >- The ID of the combined open conversation (if applicable) that remains after the merge. type: string example: aGaHXjD4li-moMR8LbULZb sourceCustomerId: description: >- The ID of the customer profile that is being merged into another customer profile. type: string example: 0f2oNq7sR6CJpKq0WDbTbg sourceConversationId: description: >- The ID of the open conversation (if applicable) that is being merged into another open conversation. type: string example: fjsSrGvhv83-k1hjfoz742 - title: Customer Profile Created type: object required: - id - type - timestamp - content properties: id: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/id type: type: string example: CUSTOMER_PROFILE/CREATED enum: - CUSTOMER_PROFILE/CREATED timestamp: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/timestamp content: title: CUSTOMER_PROFILE/CREATED properties: customerId: description: id of the customer that was created type: string example: qJaE0di0SdOWNnq5dT13Aw - title: Customer Profile Deleted type: object required: - id - type - timestamp - content properties: id: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/id type: type: string example: CUSTOMER_PROFILE/DELETED enum: - CUSTOMER_PROFILE/DELETED timestamp: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/timestamp content: title: CUSTOMER_PROFILE/DELETED properties: customerId: description: id of the customer that was deleted type: string example: qJaE0di0SdOWNnq5dT13Aw - title: Customer Profile Merged (deprecated) type: object required: - id - type - timestamp - content properties: id: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/id type: type: string example: CUSTOMER_PROFILE/MERGED enum: - CUSTOMER_PROFILE/MERGED timestamp: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/timestamp content: title: CUSTOMER_PROFILE/MERGED (deprecated) properties: sourceCustomerId: description: id of the customer that was merged type: string example: qJaE0di0SdOWNnq5dT13Aw destinationCustomerId: description: id of the customer that the source customer was merged into type: string example: qJaE0di0SdOWNnq5dT13Aw - title: Customer Profile Updated type: object required: - id - type - timestamp - content properties: id: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/id type: type: string example: CUSTOMER_PROFILE/UPDATED enum: - CUSTOMER_PROFILE/UPDATED timestamp: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/timestamp content: title: CUSTOMER_PROFILE/UPDATED properties: customerId: description: id of the customer that was updated type: string example: qJaE0di0SdOWNnq5dT13Aw - title: Export Job Completed type: object required: - id - type - timestamp - content properties: id: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/id type: type: string example: EXPORT_JOB/COMPLETED enum: - EXPORT_JOB/COMPLETED timestamp: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/timestamp content: title: EXPORT_JOB/COMPLETED properties: jobId: description: id of the export job that has completed type: string - title: Export Job Failed type: object required: - id - type - timestamp - content properties: id: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/id type: type: string example: EXPORT_JOB/FAILED enum: - EXPORT_JOB/FAILED timestamp: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/timestamp content: title: EXPORT_JOB/FAILED properties: jobId: description: id of the export job that has failed type: string - title: Message Received (deprecated) type: object required: - id - type - timestamp - content properties: id: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/id type: type: string example: MESSAGE/RECEIVED enum: - MESSAGE/RECEIVED timestamp: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/26/properties/timestamp content: title: MESSAGE/RECEIVED (deprecated) properties: conversationId: description: id of the conversation to which the message is associated type: string conversationItemId: description: conversation item id of the message type: string customerId: description: id of the customer who sent the message type: string - title: PING description: >- a special event that is sent when webhooks are created or updated. See [Ping Event](https://developer.gladly.com/rest/) for more information. - title: Payment Request Created type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: PAYMENT_REQUEST/CREATED enum: - PAYMENT_REQUEST/CREATED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Payment Request Created description: Content for the event required: - contactId - customerId - conversationId - paymentRequestId - context properties: contactId: description: >- The ID of the contact to which the payment request is associated. type: string example: aGaHXjD4li-moMR8LbULZb customerId: description: >- The ID of the customer profile to which the payment request is associated. type: string example: THx8Z8y-ScuMoqBH8Awtng conversationId: description: >- The ID of the conversation to which the payment request is associated. type: string example: pJpmy-qjazfzJh1K8gc1BR paymentRequestId: description: The ID of the payment request type: string example: aGaHXjD4li-moMR8LbULZb context: title: Context description: Context for Payment Request required: - currency - monetaryUnit properties: currency: description: Currency of the payment request type: string monetaryUnit: description: Amount of the payment request type: number - title: Payment Status Changed type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: PAYMENT_REQUEST/STATUS_CHANGED enum: - PAYMENT_REQUEST/STATUS_CHANGED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for Payment Status Changed required: - contactId - conversationId - customerId - paymentRequestId - oldStatus - newStatus - context properties: contactId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/contactId conversationId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/conversationId customerId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7/properties/content/properties/customerId paymentRequestId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/39/properties/content/properties/paymentRequestId oldStatus: description: Previous status of the payment request type: string example: REQUESTING enum: - COMPLETED - DECLINED - ERROR - REQUESTING - SUBMITTED - TIMED_OUT newStatus: description: New status of the payment request type: string example: COMPLETED enum: - COMPLETED - DECLINED - ERROR - REQUESTING - SUBMITTED - TIMED_OUT context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/39/properties/content/properties/context - title: Payment Request Viewed type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: PAYMENT_REQUEST/VIEWED enum: - PAYMENT_REQUEST/VIEWED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Payment Request Viewed description: Content for the event required: - contactId - customerId - conversationId - paymentRequestId - context properties: contactId: description: >- The ID of the contact to which the payment request is associated. type: string example: aGaHXjD4li-moMR8LbULZb customerId: description: >- The ID of the customer profile to which the payment request is associated. type: string example: THx8Z8y-ScuMoqBH8Awtng conversationId: description: >- The ID of the conversation to which the payment request is associated. type: string example: aGaHXjD4li-moMR8LbULZb paymentRequestId: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/39/properties/content/properties/paymentRequestId context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/39/properties/content/properties/context - title: Task Assignee Updated type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: TASK/ASSIGNEE_UPDATED enum: - TASK/ASSIGNEE_UPDATED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - assignee - customerId - taskId - context properties: assignee: description: The new assignee for the task. type: object required: - inboxId properties: inboxId: description: >- ID of the inbox the task is now assigned to. You can look up the id in the Gladly UI. type: string example: NFpDZtfqhk2pI6fjaVDlFf agentId: description: >- ID of the agent the task is now assigned to. You can look up the id in the Gladly UI. type: string example: zGaHXjD4SR-moMR9LbULDa customerId: description: >- The ID of the customer profile to which the task is associated. type: string example: gHufx-U3QqOmhvFuViceTw taskId: description: The ID of the task. type: string example: dzweSumI4bFxjlT8LApOVV context: title: Task Context description: The state of the task immediately before the event occurred. required: - createdAt properties: assignee: title: Assignee description: >- Inbox and agent assignee of the task just before the event was triggered. required: - inboxId properties: inboxId: description: >- ID of the inbox the task is assigned to. You can look up the id in the Gladly UI. type: string example: NFpDZtfqhk2pI6fjaVDlFf agentId: description: >- ID of the agent the task is assigned to. You can look up the id in the Gladly UI. type: string example: zGaHXjD4SR-moMR9LbULDa dueAt: description: Time when the task will be due. type: string format: RFC3339 example: '2020-03-15T06:13:00.125Z' createdAt: description: Timestamp when the action occurred. type: string format: RFC3339 example: '2019-07-03T04:30:12.07Z' - title: Task Closed type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: TASK/CLOSED enum: - TASK/CLOSED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - customerId - taskId - context properties: customerId: description: >- The ID of the customer profile to which the task is associated. type: string example: gHufx-U3QqOmhvFuViceTw taskId: description: The ID of the task. type: string example: dzweSumI4bFxjlT8LApOVV context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/42/properties/content/properties/context - title: Task Comment Added type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: TASK/COMMENT_ADDED enum: - TASK/COMMENT_ADDED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - customerId - taskId - commentId - context properties: customerId: description: >- The ID of the customer profile to which the task is associated. type: string example: gHufx-U3QqOmhvFuViceTw taskId: description: The ID of the task. type: string example: dzweSumI4bFxjlT8LApOVV commentId: description: The ID of the comment that was added to the task. type: string example: pOVVdzweSumI4bFxjlT8LA context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/42/properties/content/properties/context - title: Task Content Updated type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: TASK/CONTENT_UPDATED enum: - TASK/CONTENT_UPDATED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - customerId - taskId - dueAt - context properties: customerId: description: >- The ID of the customer profile to which the task is associated. type: string example: gHufx-U3QqOmhvFuViceTw taskId: description: The ID of the task. type: string example: dzweSumI4bFxjlT8LApOVV context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/42/properties/content/properties/context - title: Task Created type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: TASK/CREATED enum: - TASK/CREATED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - customerId - taskId - context properties: customerId: description: >- The ID of the customer profile to which the task is associated. type: string example: gHufx-U3QqOmhvFuViceTw taskId: description: The ID of the task. type: string example: dzweSumI4bFxjlT8LApOVV context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/42/properties/content/properties/context - title: Task Due Date Updated type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: TASK/DUE_DATE_UPDATED enum: - TASK/DUE_DATE_UPDATED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - customerId - taskId - context properties: customerId: description: >- The ID of the customer profile to which the task is associated. type: string example: gHufx-U3QqOmhvFuViceTw taskId: description: The ID of the task. type: string example: dzweSumI4bFxjlT8LApOVV dueAt: description: New time when the task will be due. type: string format: RFC3339 example: '2020-03-15T06:13:00.125Z' context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/42/properties/content/properties/context - title: Task Follower Added type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: TASK/FOLLOWER_ADDED enum: - TASK/FOLLOWER_ADDED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - customerId - taskId - agentId - context properties: customerId: description: >- The ID of the customer profile to which the task is associated. type: string example: gHufx-U3QqOmhvFuViceTw taskId: description: The ID of the task. type: string example: dzweSumI4bFxjlT8LApOVV agentId: description: ID of the agent who was added as a follower type: string example: zGaHXjD4SR-moMR9LbULDa context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/42/properties/content/properties/context - title: Task Follower Removed type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: TASK/FOLLOWER_REMOVED enum: - TASK/FOLLOWER_REMOVED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - customerId - taskId - agentId - context properties: customerId: description: >- The ID of the customer profile to which the task is associated. type: string example: gHufx-U3QqOmhvFuViceTw taskId: description: The ID of the task. type: string example: dzweSumI4bFxjlT8LApOVV agentId: description: ID of the agent who was removed as a follower type: string example: zGaHXjD4SR-moMR9LbULDa context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/42/properties/content/properties/context - title: Task Reopened type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: yHaHXjD4SR-moMR9LbULDb type: type: string example: TASK/REOPENED enum: - TASK/REOPENED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - customerId - taskId - context properties: customerId: description: >- The ID of the customer profile to which the task is associated. type: string example: gHufx-U3QqOmhvFuViceTw taskId: description: The ID of the task. type: string example: dzweSumI4bFxjlT8LApOVV context: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/42/properties/content/properties/context ReportsGenerateWorkSessionReportRequest: title: Work Session Report request body type: object required: - startAtTime - endAtTime properties: startAtTime: description: > Starting time of the report interval The date should be in ISO 8601 format `YYYY-mm-ddThh:mmZ`. For example 2020-04-13T19:27Z type: string example: 2020-04-13T19:27Z endAtTime: description: > Ending time of the report interval. This date is inclusive meaning that the report will include data up to 1min past the endAtTime The date should be in ISO 8601 format `YYYY-mm-ddThh:mmZ`. For example 2020-04-14T19:27-09:00 type: string example: 2020-04-14T19:27-09:00 CommunicationsSendSmsResponse: type: object properties: customerId: description: customer ID type: string example: gHufx-U3QqOmhvFuViceTw conversationItemId: description: conversation item ID of the SMS type: string example: pOVVdzweSumI4bFxjlT8LA ConversationsGetMetadataResponse: title: Conversation type: object required: - id - customerId - createdAt - inboxId - status properties: id: description: The id of the conversation type: string example: pOVVdzweSumI4bFxjlT8LA customerId: description: The id of the profile that this conversation belongs to type: string example: gHufx-U3QqOmhvFuViceTw agentId: description: The id of the agent who is assigned to the conversation type: string example: sHuXx-U3QqOmhvFusJGeBw inboxId: description: The id of the inbox to which the conversation belongs to type: string example: E1nArq1uQAees_DogHB0MA customAttributes: description: Custom attributes assigned to the conversation type: array items: title: Custom Attribute description: Specifies a custom attribute type: object properties: id: description: id of the custom attribute type: string example: pOVVdzweSumI4bFxjlT8LA value: description: value of the custom attribute type: string example: '1234567890' topicIds: description: Ids of topics assigned to the conversation type: array items: type: string createdAt: description: Time the conversation was created type: string format: RFC3339 with millis example: '2016-04-11T14:09:23.000Z' closedAt: description: >- Time the conversation was closed. Only present if conversation is closed type: string format: RFC3339 with millis example: '2016-05-10T13:49:23.000Z' status: title: Conversation Status description: | Status of the conversation: * `OPEN` - conversation requires further action * `WAITING` - no further action from an agent required. Waiting for response from the customer * `CLOSED` - resolved and requiring no further action. It can be changed back to OPEN if customer needs further assistance type: string enum: - OPEN - WAITING - CLOSED example: OPEN ConversationsCreateCustomerItemResponse: title: Conversation Item To Create type: object required: - content - timestamp properties: id: description: the id of the item type: string example: pOVVdzweSumI4bFxjlT8LA customerId: description: the id of the profile that this item belongs to type: string example: gHufx-U3QqOmhvFuViceTw timestamp: description: Time the item occurred type: string format: RFC3339 example: '2019-07-03T04:30:12.07Z' initiator: allOf: - $ref: >- #/paths/~1api~1v1~1conversation-items/post/responses/200/content/application~1json/schema/properties/responder - example: id: gHufx-U3QqOmhvFuViceTw type: CUSTOMER responder: title: Describes the communicator initiating or responding to the item type: object properties: id: description: id of the communicator type: string example: zGaHXjD4SR-moMR9LbULDa type: description: > type of communicator which can be an agent, customer, a person related to customer, rule, or application If an email response comes from a third-party recipient who was previously included in an email exchange with the customer (TO, CC, or BCC), the reply's initiator type will be either 'INTERNAL' or 'EXTERNAL' depending on the sender's email address domain. 'INTERNAL' types are sent from email addresses that share domain with the agent's organization. 'EXTERNAL' types are sent from other domains. type: string enum: - AGENT - API - AUTOMATION - CUSTOMER - INTERNAL - EXTERNAL example: AGENT content: $ref: >- #/paths/~1api~1v1~1conversation-items/post/requestBody/content/application~1json/schema/properties/content ConversationsGetItemResponse: title: Conversation Item type: object required: - id - customerId - content - timestamp properties: id: description: the id of the item type: string example: pOVVdzweSumI4bFxjlT8LA customerId: description: the id of the profile that this item belongs to type: string example: gHufx-U3QqOmhvFuViceTw conversationId: description: id of the conversation the item is part of if it is within one type: string example: PmDVUfWfRjKuwb4VgA2zEA timestamp: description: Time the item occurred type: string format: RFC3339 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1api~1v1~1conversation-items/post/responses/200/content/application~1json/schema/properties/initiator responder: $ref: >- #/paths/~1api~1v1~1conversation-items/post/responses/200/content/application~1json/schema/properties/responder content: title: Conversation Item Content oneOf: - title: Chat Message oneOf: - title: Chat Message description: A text message sent during a Gladly chat session. type: object required: - type - sessionId - content - messageType properties: type: type: string enum: - CHAT_MESSAGE messageType: type: string enum: - TEXT sessionId: description: id of the chat session the message is part of type: string example: 5k04bYuTRGqyT6uoSQfWVA content: description: text of the message sent type: string example: HI! Can you help me with my order? - title: Chat QuickReply Request description: >- A QuickReply request sent to a user during a Gladly chat session. type: object required: - type - sessionId - content - messageType - messageData properties: type: type: string enum: - CHAT_MESSAGE messageType: type: string enum: - QUICK_REPLY_REQUEST sessionId: description: id of the chat session the message is part of type: string example: 5k04bYuTRGqyT6uoSQfWVA content: description: text of the message sent type: string example: What can I help with? messageData: title: QuickReply request data description: >- Data that describes the QuickReply request options presented to the user type: object properties: options: $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D~1reply/post/requestBody/content/application~1json/schema/properties/content/oneOf/1/oneOf/1/properties/messageData/properties/options - title: Chat QuickReply response description: A response to a QuickReply request type: object required: - type - sessionId - content - messageType - messageData properties: type: type: string enum: - CHAT_MESSAGE messageType: type: string enum: - QUICK_REPLY_RESPONSE sessionId: description: id of the chat session the message is part of type: string example: 5k04bYuTRGqyT6uoSQfWVA content: description: The label of the selected option type: string example: Furniture messageData: title: QuickReplyResponse data description: Data that describes the users option selection type: object properties: quickReplyRequest: title: QuickReply Request description: >- The QuickReply request that this is a response to, for additional context. type: object properties: options: $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D~1reply/post/requestBody/content/application~1json/schema/properties/content/oneOf/1/oneOf/1/properties/messageData/properties/options selectedOptionId: title: Selected option id description: The Id of the option the user selected type: string requestMessageId: title: message Id description: >- The id of the QuickReply request message that this is a response to type: string - title: Conversation Status Change description: Record of a change in the status of a conversation type: object required: - type properties: type: type: string enum: - CONVERSATION_STATUS_CHANGE status: description: >- Status of the conversation, where “OPEN” means conversation is assigned to an agent and “CLOSED” means the problem reported by the customer has been solved and the conversation requires no further action. Note that a conversation can be reopened, setting the status back to “OPEN”, if a customer responds to a closed conversation within a configurable time window. type: string enum: - OPEN - CLOSED - title: Custom Channel Message type: object required: - customChannelId - companyAddress - customerAddress - sessionId - type - content - status properties: customChannelId: description: >- The ID of the Custom Channel the message was sent or received from type: string companyAddress: description: The Entry Point Address in Gladly type: string customerAddress: description: The Customer address type: string groupId: title: Message Group ID description: > Optional message group ID that can be associated with a message, the Custom Channel must be configured for Message Groups in order to use this field. type: string groupName: title: Message Group Name description: > Used together with `groupId` to give the group a name that can be displayed to an Agent. type: string sessionId: description: The ID of the Conversation Session the message is part of type: string type: description: The type of message type: string enum: - TEXT - FILES content: oneOf: - $ref: >- #/paths/~1api~1v1~1communications~1custom-channels~1%7BcustomChannelId%7D~1messages/post/requestBody/content/application~1json/schema/properties/content/oneOf/0 - $ref: >- #/paths/~1api~1v1~1communications~1custom-channels~1%7BcustomChannelId%7D~1messages/post/requestBody/content/application~1json/schema/properties/content/oneOf/1 status: title: Message status type: object required: - value properties: value: type: string enum: - SENDING - SENT - ACCEPTED - DELIVERED - READ - FAILED details: description: > Optional status details. It is particularly useful when the value is 'Failed'. type: string - $ref: >- #/paths/~1api~1v1~1conversation-items/post/requestBody/content/application~1json/schema/properties/content/oneOf/0 - title: Email description: '' type: object required: - type - from - to - subject - content properties: type: type: string enum: - EMAIL from: description: email address the message was from type: string example: martha.williams@gmail.com to: description: email addresses the message was sent to type: array example: - martha.williams@gmail.com items: type: string cc: description: email addresses the message was carbon copied to type: array example: - billing@company.com items: type: string bcc: description: email addresses the message was blind carbon copied to type: array example: - supervisor@company.com items: type: string subject: description: subject text of the email type: string example: My order content: description: plain text body of the email type: string example: >- Part of my order was damaged. May I get a refund for those items? - title: Facebook Messenger Message description: '' type: object required: - type - pageId - userId - content properties: type: type: string enum: - FACEBOOK_MESSAGE pageId: description: Facebook page id type: string userId: description: Facebook user id for the communication type: string content: description: text of the message type: string example: I love your brand! Do you have a loyalty program? - $ref: >- #/paths/~1api~1v1~1conversations~1%7BconversationId%7D~1notes~1%7BnoteId%7D/get/responses/200/content/application~1json/schema/properties/content - title: Phone Call description: Record of a phone call between a customer and an agent type: object required: - type - from - to - startedAt properties: type: type: string enum: - PHONE_CALL from: description: phone number of the caller type: string format: E.164 example: '+14153335555' to: description: phone number call was to type: string format: E.164 example: '+12149897676' startedAt: description: time the phone call started type: string format: RFC3339 example: '2019-07-02T08:05:00.10Z' answeredAt: description: time the phone call was answered type: string format: RFC3339 example: '2019-07-02T08:05:09.41Z' completedAt: description: time the phone call ended type: string format: RFC3339 example: '2019-07-02T08:11:15.03Z' recordingStatus: description: >- Status of the phone call recording.
AVAILABLE : Recording is available for download
DELETED : Recording was deleted by the user
ERROR : An error occurred while recording. Please contact Gladly Support Team type: string enum: - AVAILABLE - DELETED - ERROR recordingURL: description: >- URL to retrieve media for the phone call recording in single-channel 32-kbps MP3 format. Present if recording is “AVAILABLE” type: string recordingDuration: description: >- Duration of the phone call recording in seconds. Present if recording is “AVAILABLE” type: integer example: 44 - title: SMS Message description: A message sent via SMS type: object required: - type - from - to - content properties: type: type: string enum: - SMS from: description: phone number of SMS sender type: string format: E.164 example: '+14153335555' to: description: phone number of SMS receiver type: string format: E.164 example: '+12149897676' content: description: text of the SMS message type: string example: >- I haven't received my order yet. Can you check on the status? - title: Topic Change description: >- Record of an agent applying or removing a topic from the conversation type: object required: - type properties: type: type: string enum: - TOPIC_CHANGE addedTopicIds: description: ids of topics added to the conversation type: array items: type: string example: uu4t00vITaKQ3bVjU2UrGQ removedTopicIds: description: ids of topics removed from the conversation type: array items: type: string example: uu4t00vITaKQ3bVjU2UrGQ - title: Voicemail description: Record of a voicemail left by customer in Gladly type: object required: - type properties: type: type: string enum: - VOICEMAIL startedAt: description: Start time of the voicemail type: string format: RFC3339 example: '2020-03-15T06:13:00.125Z' recordingStatus: description: >- Status of the voicemail recording
AVAILABLE : Recording is available for download
DELETED : Recording was deleted by the user
ERROR : An error occurred while recording. Please contact Gladly Support Team type: string enum: - AVAILABLE - DELETED - ERROR recordingURL: description: >- URL to retrieve media for the voicemail in single-channel 32-kbps MP3 format. Present if recording status is “AVAILABLE” type: string recordingDuration: description: >- Duration of the voicemail in seconds. Present if recording status is “AVAILABLE” type: integer example: 44 - title: WhatsApp Message description: '' type: object required: - type - content properties: type: type: string enum: - WHATSAPP content: description: text of the message type: string example: I love your brand! Do you have a loyalty program? - title: Instagram Message description: '' type: object required: - type - content properties: type: type: string enum: - INSTAGRAM_DIRECT content: description: text of the message type: string example: I love your brand! Do you have a loyalty program? - title: >- Twitter Message (decommissioned as of 04/20/23 but can still be retrieved) description: '' type: object required: - type - content properties: type: type: string enum: - TWITTER content: description: text of the message type: string example: I love your brand! Do you have a loyalty program? ConversationsGetRecordingResponse: description: Single channel 32-kbps MP3 audio file type: string format: binary ConversationsListItemsInConversationResponse: title: Conversation Items type: array items: $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema ConversationsGetNoteResponse: title: Conversation Note type: object required: - id - customerId - content - timestamp properties: id: description: the id of the item type: string example: pOVVdzweSumI4bFxjlT8LA customerId: description: the id of the customer profile that this item belongs to type: string example: gHufx-U3QqOmhvFuViceTw conversationId: description: id of the conversation the item is part of if it is within one type: string example: PmDVUfWfRjKuwb4VgA2zEA timestamp: description: Time the item occurred type: string format: RFC3339 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1api~1v1~1conversation-items/post/responses/200/content/application~1json/schema/properties/initiator responder: $ref: >- #/paths/~1api~1v1~1conversation-items/post/responses/200/content/application~1json/schema/properties/responder content: title: Note description: '' type: object required: - type properties: type: type: string enum: - CONVERSATION_NOTE body: description: text of the note type: string example: >- Customer has requested more information about our loyalty program. MessageAutomationGetSessionResponse: title: Automation Session type: object properties: id: description: The id of the automation session. type: string example: hyLceTJzT5yTAxz1SYJ65A companyAddress: description: Company address. type: string example: 606b52ba0b806d00d28f841b conversationId: description: The id of the conversation. type: string example: wcIVaRWxQKC1PuKYIyruKQ customerAddress: description: Customer address. type: string example: x9CubuE1T5q40ULjoFW0iQ customerId: description: The id of the customer. type: string example: qe4WxGejR2miAtCcTAaA4w endpointType: description: Type of the communication endpoint. type: string example: CHAT enum: - CHAT createdAt: description: Time when the automation session was created. type: string format: RFC3339 with millis example: '2022-05-04T06:36:23.944Z' updatedAt: description: Time when the automation session was last updated. type: string format: RFC3339 with millis example: '2022-05-04T06:36:23.944Z' target: description: Identify the target of the message. type: object properties: targetType: description: Identify the type of the target. type: string example: AUTOMATION enum: - AGENT - AUTOMATION MessageAutomationGetSessionMessagesResponse: title: Automation session messages type: array items: $ref: >- #/paths/~1api~1v1~1message-automation~1sessions~1%7BsessionId%7D~1messages/post/responses/200/content/application~1json/schema MessageAutomationOutboundMessageResponse: title: Automation session message type: object properties: id: description: The id of the message. type: string example: 626c058b82388c00f4770ede content: title: Content of Message oneOf: - title: Content of Text description: Send text based message to user client. type: object properties: value: description: Message content and body. type: string example: How can I help you? - title: Content of Menu description: Prompt and menu options that will be sent to user client. properties: prompt: description: Text message sent with menu items. type: string example: What is your favorite food? menuItems: description: >- An array of items that describe the menu items that will be displayed in user client. type: array items: title: Menu Item description: Menu option properties: id: description: Unique identifier. type: string label: description: Menu item label. type: string createdAt: description: Time when the message was sent. type: string format: RFC3339 with millis example: '2022-05-04T06:36:23.944Z' from: type: object properties: type: description: The type of the communicator who sent the message. type: string example: CUSTOMER enum: - AGENT - API - AUTOMATION - CUSTOMER - EXTERNAL - INTERNAL id: description: The id of the communicator. type: string example: qe4WxGejR2miAtCcTAaA4w sessionId: description: The id of the automation session the message belongs to. type: string example: dGwbXv5RR8SjbEln5YlKaQ type: description: The type of the automation message content. type: string example: TEXT enum: - TEXT - MENU context: description: > Context of event as a map. Properties are specific to certain types of channel. | Channel | Property Name | Description | |-----|-----|-----| | Chat | URL | The URL where the chat originated from | | Chat | IsAuthenticated | If the chat session where the message originated from is authenticated | type: object additionalProperties: type: string enum: - URL - IsAuthenticated example: URL: https://developer.gladly.com IsAuthenticated: 'true' TasksGetCustomerTasksResponse: title: Tasks type: array items: $ref: >- #/paths/~1api~1v1~1tasks~1%7BtaskId%7D/get/responses/200/content/application~1json/schema TasksGetTaskResponse: title: Task type: object required: - customerId - content - timestamp properties: id: description: the id of the task type: string example: pOVVdzweSumI4bFxjlT8LA customerId: description: The Id of the customer profile to which the task is associated. type: string example: gHufx-U3QqOmhvFuViceTw timestamp: description: Time the task occurred type: string format: RFC3339 example: '2019-07-03T04:30:12.07Z' createdBy: allOf: - title: Describes the communicator initiating the task type: object properties: id: description: id of the communicator type: string example: zGaHXjD4SR-moMR9LbULDa type: description: >- type of communicator which can be an agent, customer, rule, or application type: string enum: - AGENT - API - AUTOMATION - CUSTOMER example: AGENT - example: id: gHufx-U3QqOmhvFuViceTwX type: CUSTOMER assignee: $ref: >- #/paths/~1api~1v1~1tasks/post/requestBody/content/application~1json/schema/properties/assignee body: description: >- Text to describe what task to complete. Constrained HTML [Rich Content](https://developer.gladly.com/rest/) is supported. maxLength: 10000 type: string example: Call customer back with information about booking dueAt: description: >- Time when the task will be due. This must be set to a time in the future. type: string format: RFC3339 example: '2020-03-15T06:13:00.125Z' status: type: string enum: - OPEN - CLOSED TasksGetTaskCommentsResponse: title: Task Comments type: array items: $ref: >- #/paths/~1api~1v1~1tasks~1%7BtaskId%7D~1comments~1%7BcommentId%7D/get/responses/200/content/application~1json/schema TasksGetCommentResponse: title: Task Comment type: object properties: id: description: The id of the comment. type: string example: pOVVdzweSumI4bFxjlT8LA agentId: description: The id of the agent who owns the message. type: string example: dzweSumI4bFxjlT8LApOVV comment: description: Comment body. type: string example: Return call to customer. taskId: description: The id of the task being commented on. type: string example: dzweSumI4bFxjlT8LApOVV createdAt: description: The time this comment was created type: string format: RFC3339 example: '2020-03-15T06:13:00.125Z' FreeformTopicsGetAttributeResponse: type: object properties: id: description: id of the Custom Attribute type: string example: 1grfSzATQLa334VDLCWc4A key: description: key of the Custom Attribute type: string example: orderId label: description: label of the Custom Attribute type: string example: Order ID deactivated: description: whether the Custom Attribute is deactivated type: boolean example: true createdAt: description: time the Custom Attribute was created type: string format: RFC3339 example: '2020-05-20T15:00:00.000Z' createdBy: description: id of user who created the Custom Attribute type: string example: 7MRwXOeWRaGatwYCbBLLA CustomersFindProfilesResponse: type: array items: $ref: >- #/paths/~1api~1v1~1customer-profiles~1%7BcustomerId%7D/get/responses/200/content/application~1json/schema CustomersGetProfileByIdResponse: title: Customer allOf: - $ref: >- #/paths/~1api~1v1~1customer-profiles/post/requestBody/content/application~1json/schema - type: object properties: createdAt: description: Time the customer was created type: string format: RFC3339 example: '2019-02-21T07:15:18.07272933Z' updatedAt: description: Time of last update type: string format: RFC3339 example: '2019-02-21T19:50:23.486566336Z' - type: object properties: externalCustomerIds: description: > Customer ID in your system of record for Customer Profiles linked to a Lookup Adaptor installed after 05/12/21. If Customer Profile is linked to a Lookup Adaptor built prior to 05/12/21, this field will not exist. type: object example: ABC12345: '54321' UserIdentityGenerateJwtResponse: type: object properties: token: description: The JWT created type: string AnswersSearchResultsResponse: type: array items: properties: id: description: unique answer id type: string example: 1grfSzATQLa334VDLCWc4A name: description: Customer facing answer name type: string example: How to reset your password AnswersListPublicResponse: type: array items: $ref: >- #/paths/~1api~1v1~1orgs~1%7BorgId%7D~1answers~1%7BanswerId%7D/get/responses/200/content/application~1json/schema AnswersListAnswerTitlesResponse: type: array items: properties: id: description: unique answer id type: string example: 1grfSzATQLa334VDLCWc4A name: description: Customer facing answer name type: string example: How to reset your password AnswersGetByIdResponse: type: object properties: {} example: {} AgentsListResponse: title: Agents type: array items: $ref: >- #/paths/~1api~1v1~1agents~1%7BagentId%7D/get/responses/200/content/application~1json/schema AgentsGetAgentProfileResponse: title: Agent type: object properties: id: description: Id of the agent type: string example: WmeA3Y51Q5ayCAaZ1AotIA name: description: First and last name of the agent type: string example: Amy Agent emailAddress: description: Agent's login email address type: string example: amy.agent@company.com OrganizationGetMetadataResponse: title: Organization type: object properties: id: description: Id of your organization type: string example: ihKsWxiZCDVtXg1iwVmT9Q loginDomain: description: Email domain of your organization type: string example: organization.com name: description: Name of your organization type: string example: My Organization timezone: description: Timezone for your organization type: string example: America/Los_Angeles gladlyUrl: description: Url for your organization type: string example: https://organization.gladly.com InboxesListMetadataResponse: title: Inboxes type: array items: $ref: >- #/paths/~1api~1v1~1inboxes~1%7BinboxId%7D/get/responses/200/content/application~1json/schema InboxesGetMetadataResponse: title: Inbox type: object properties: id: description: Id of the inbox type: string example: vZgCEQlDR6aQz_0HeWZ9_Q name: description: Name of your inbox type: string example: Email Inbox disabled: description: Marks the inbox as disabled type: boolean example: false TeamsListTeamsResponse: title: Teams type: array items: $ref: >- #/paths/~1api~1v1~1teams~1%7BteamId%7D/get/responses/200/content/application~1json/schema TeamsGetByIdResponse: title: Team type: object properties: description: description: Description of the team type: string example: Team to answer customer questions about new bookings id: description: Id of the team type: string example: ovg2jQCQS9ScsDkBxG-o2Q name: description: Name of the team type: string example: Stay Advisors agentIds: description: Ids of the agents in the team type: string example: - WmeA3Y51Q5ayCAaZ1AotIA items: type: string TopicsListResponse: title: Topics type: array items: $ref: >- #/paths/~1api~1v1~1topics~1%7BtopicId%7D/get/responses/200/content/application~1json/schema TopicsGetByIdResponse: title: Topic type: object properties: id: description: Id of the topic type: string example: uu4t00vITaKQ3bVjU2UrGQ name: description: Name of the topic type: string example: Order Returns disabled: description: If the topic is disabled and no longer in use type: boolean example: false parentId: description: >- If the topic is nested under another topic, parentId is the Id of the parent topic. For more information about topic hierarchy, please visit the [help docs](https://help.gladly.com/docs/en/principles-of-hierarchical-topics) type: string example: ChefeoTHSlaIbKg57H5R9Q ExportListSchedulesResponse: type: array items: title: Schedule description: schedule type: object properties: id: description: Unique schedule id type: string example: vZgCEQlDR6aQz_0HeWZ9_Q frequency: description: Frequency for running export jobs type: string example: HOURLY enum: - HOURLY - DAILY type: description: Type of export schedule type: string example: CONVERSATIONS enum: - CONVERSATIONS nextStartAt: description: Start time for the next export job type: string format: RFC3339 example: '2019-01-21T08:00:00.00Z' updatedAt: description: Time the schedule was last updated type: string format: RFC3339 example: '2019-01-21T07:15:18.07272933Z' ExportJobsListResponse: type: array items: $ref: >- #/paths/~1api~1v1~1export~1jobs~1%7BjobId%7D/get/responses/200/content/application~1json/schema ExportJobByIdResponse: title: Export Job description: Export job type: object properties: parameters: title: JobParameters description: Export job parameters type: object properties: type: description: Type of export job type: string example: CONVERSATIONS enum: - CONVERSATIONS startAt: description: Start time for the export query type: string format: RFC3339 example: '2019-01-21T07:15:18.07272933Z' endAt: description: End time for the export query type: string format: RFC3339 example: '2019-01-22T07:15:18.07272933Z' id: description: Unique job id type: string example: vZgCEQlDR6aQz_0HeWZ9_Q scheduleId: description: Schedule id the job belongs to type: string example: OOrlNMXeS72gs_WEX2TtMg status: description: Current status of the job type: string example: COMPLETED enum: - PENDING - IN_PROGRESS - COMPLETED - FAILED updatedAt: description: Time the job was updated type: string format: RFC3339 example: '2019-02-21T07:15:19.07272933Z' files: description: An array of filenames associated with the job type: array items: type: string default: [] example: - agents.jsonl - conversation_items.jsonl - customers.jsonl - topics.jsonl ExportDownloadFileResponse: oneOf: - title: agents.jsonl type: array items: $ref: >- #/paths/~1api~1v1~1agents~1%7BagentId%7D/get/responses/200/content/application~1json/schema - title: conversation_items.jsonl allOf: - title: Conversation Items type: array items: title: Conversation Item type: object required: - id - customerId - content - timestamp properties: id: description: the id of the item type: string example: pOVVdzweSumI4bFxjlT8LA customerId: description: the id of the profile that this item belongs to type: string example: gHufx-U3QqOmhvFuViceTw conversationId: description: >- id of the conversation the item is part of if it is within one type: string example: PmDVUfWfRjKuwb4VgA2zEA timestamp: description: Time the item occurred type: string format: RFC3339 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1api~1v1~1conversation-items/post/responses/200/content/application~1json/schema/properties/initiator responder: $ref: >- #/paths/~1api~1v1~1conversation-items/post/responses/200/content/application~1json/schema/properties/responder content: title: Conversation Item Content oneOf: - $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema/properties/content/oneOf/0 - $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema/properties/content/oneOf/1 - $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema/properties/content/oneOf/2 - $ref: >- #/paths/~1api~1v1~1conversation-items/post/requestBody/content/application~1json/schema/properties/content/oneOf/0 - $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema/properties/content/oneOf/4 - $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema/properties/content/oneOf/5 - $ref: >- #/paths/~1api~1v1~1conversations~1%7BconversationId%7D~1notes~1%7BnoteId%7D/get/responses/200/content/application~1json/schema/properties/content - $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema/properties/content/oneOf/7 - $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema/properties/content/oneOf/8 - $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema/properties/content/oneOf/9 - $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema/properties/content/oneOf/10 - $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema/properties/content/oneOf/13 - $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema/properties/content/oneOf/12 - $ref: >- #/paths/~1api~1v1~1conversation-items~1%7BitemId%7D/get/responses/200/content/application~1json/schema/properties/content/oneOf/11 - title: customers.jsonl type: array items: title: Customer Profile description: Customer profile type: object properties: name: description: Customer's name type: string address: description: Customer's street address type: string emailAddresses: title: email addresses description: Customer's email addresses type: array items: type: string phoneNumbers: title: phone numbers description: Customer's phone numbers type: array items: type: string externalCustomerId: description: >- CCustomer ID in your system of record for Customer Profiles linked to a Lookup Adaptor installed prior to 05/12/21. If Customer Profile is linked to a Lookup Adaptor installed on or after 05/12/21, this field will not exist. type: string externalCustomerIds: description: > Customer ID in your system of record for Customer Profiles linked to a Lookup Adaptor installed after 05/12/21. If Customer Profile is linked to a Lookup Adaptor built prior to 05/12/21, this field will not exist. type: object example: ABC12345: '54321' - $ref: >- #/paths/~1api~1v1~1topics/get/responses/200/content/application~1json/schema ReportsGenerateReportCsvResponse: description: CSV report format: binary WebhooksListResponse: title: Webhooks type: array items: $ref: >- #/paths/~1api~1v1~1webhooks~1%7BwebhookId%7D/patch/requestBody/content/application~1json/schema ReportsGenerateWorkSessionReportResponse: description: Work Session Report CSV format: binary EventsListStreamOfEventsResponse: title: Event Response Schemas oneOf: - title: Agent Availability Focus Entered type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: zGaHXjD4SR-moMR9LbULDa type: type: string example: AGENT_AVAILABILITY/FOCUS_ENTERED enum: - AGENT_AVAILABILITY/FOCUS_ENTERED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: title: Content description: Content for event required: - agentId - context properties: agentId: description: ID of the agent who entered or exited focus. type: string example: zGaHXjD4SR-moMR9LbULDa context: description: >- The state of the agent immediately before the event occurred. required: - availableFor properties: availableFor: description: > The set of channel types for which the agent is available for. type: array enum: - MAIL - MESSAGING - TASK - VOICE example: - MAIL - TASK - VOICE items: description: >- WARNING: Missing items property in array schema. Missing items property has been filled with this AnyType schema. - title: Agent Availability Focus Exited type: object required: - id - type - timestamp - initiator - content properties: id: description: Unique event ID type: string example: zGaHXjD4SR-moMR9LbULDa type: type: string example: AGENT_AVAILABILITY/FOCUS_EXITED enum: - AGENT_AVAILABILITY/FOCUS_EXITED timestamp: description: Time the event was recorded type: string format: ISO 8601 example: '2019-07-03T04:30:12.07Z' initiator: $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0/properties/initiator content: $ref: >- #/paths/~1api~1v1~1events/get/responses/200/content/application~1x-jsonlines/schema/oneOf/0/properties/content - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/0 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/1 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/2 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/3 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/4 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/5 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/7 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/8 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/9 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/10 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/11 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/12 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/13 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/14 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/15 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/16 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/17 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/18 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/19 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/20 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/21 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/22 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/23 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/24 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/25 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/27 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/28 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/29 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/30 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/39 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/40 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/41 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/42 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/43 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/44 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/45 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/46 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/47 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/48 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/49 - $ref: >- #/paths/~1gladly~1webhook/post/requestBody/content/application~1json/schema/oneOf/50 x-tagGroups: - tags: - Agents - Answers - Communications - Conversations - Customers - Events - Export - Freeform Topics - Inboxes - Message Automation - Organization - Reports - Tasks - Teams - User Identity - Topics - Webhooks name: REST API - tags: - Summary - Payloads name: Webhooks - tags: - Customer Lookup name: Lookup API - tags: - Versioning - Error Handling - Rate Limit - Rich Content - Launching Soon name: Resources