> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pinkfish.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# gorgias-tickets

> Gorgias Tickets - manage tickets, messages, tags, surveys, and voice calls

**Server path:** `/gorgias-tickets` | **Type:** Application | **PCID required:** Yes

## Tools

| Tool                                                                                                | Description                     |
| --------------------------------------------------------------------------------------------------- | ------------------------------- |
| [`gorgias_tickets_create_satisfaction_survey`](#gorgias_tickets_create_satisfaction_survey)         | Create a survey                 |
| [`gorgias_tickets_create_tag`](#gorgias_tickets_create_tag)                                         | Create a tag                    |
| [`gorgias_tickets_create_ticket`](#gorgias_tickets_create_ticket)                                   | Create a ticket                 |
| [`gorgias_tickets_create_ticket_message`](#gorgias_tickets_create_ticket_message)                   | Create a message                |
| [`gorgias_tickets_create_ticket_tags`](#gorgias_tickets_create_ticket_tags)                         | Add ticket tags                 |
| [`gorgias_tickets_delete_tag`](#gorgias_tickets_delete_tag)                                         | Delete a tag                    |
| [`gorgias_tickets_delete_tags`](#gorgias_tickets_delete_tags)                                       | Delete tags                     |
| [`gorgias_tickets_delete_ticket`](#gorgias_tickets_delete_ticket)                                   | Delete a ticket                 |
| [`gorgias_tickets_delete_ticket_custom_field`](#gorgias_tickets_delete_ticket_custom_field)         | Delete ticket field value       |
| [`gorgias_tickets_delete_ticket_message`](#gorgias_tickets_delete_ticket_message)                   | Delete a message                |
| [`gorgias_tickets_delete_ticket_tags`](#gorgias_tickets_delete_ticket_tags)                         | Remove ticket tags              |
| [`gorgias_tickets_delete_voice_call_recording`](#gorgias_tickets_delete_voice_call_recording)       | Delete a voice call recording   |
| [`gorgias_tickets_get_api_tickets_ticket_id_tags`](#gorgias_tickets_get_api_tickets_ticket_id_tags) | List ticket tags                |
| [`gorgias_tickets_get_satisfaction_survey`](#gorgias_tickets_get_satisfaction_survey)               | Retrieve a survey               |
| [`gorgias_tickets_get_tag`](#gorgias_tickets_get_tag)                                               | Retrieve a tag                  |
| [`gorgias_tickets_get_ticket`](#gorgias_tickets_get_ticket)                                         | Retrieve a ticket               |
| [`gorgias_tickets_get_ticket_message`](#gorgias_tickets_get_ticket_message)                         | Retrieve a message              |
| [`gorgias_tickets_get_voice_call`](#gorgias_tickets_get_voice_call)                                 | Retrieve a voice call           |
| [`gorgias_tickets_get_voice_call_event`](#gorgias_tickets_get_voice_call_event)                     | Retrieve a voice call event     |
| [`gorgias_tickets_get_voice_call_recording`](#gorgias_tickets_get_voice_call_recording)             | Retrieve a voice call recording |
| [`gorgias_tickets_list_messages`](#gorgias_tickets_list_messages)                                   | List messages                   |
| [`gorgias_tickets_list_satisfaction_surveys`](#gorgias_tickets_list_satisfaction_surveys)           | List surveys                    |
| [`gorgias_tickets_list_tags`](#gorgias_tickets_list_tags)                                           | List tags                       |
| [`gorgias_tickets_list_ticket_custom_fields`](#gorgias_tickets_list_ticket_custom_fields)           | List ticket field values        |
| [`gorgias_tickets_list_tickets`](#gorgias_tickets_list_tickets)                                     | List tickets                    |
| [`gorgias_tickets_list_voice_call_events`](#gorgias_tickets_list_voice_call_events)                 | List voice call events          |
| [`gorgias_tickets_list_voice_call_recordings`](#gorgias_tickets_list_voice_call_recordings)         | List voice call recordings      |
| [`gorgias_tickets_list_voice_calls`](#gorgias_tickets_list_voice_calls)                             | List voice calls                |
| [`gorgias_tickets_merge_tags`](#gorgias_tickets_merge_tags)                                         | Merge tags                      |
| [`gorgias_tickets_update_satisfaction_survey`](#gorgias_tickets_update_satisfaction_survey)         | Update a survey                 |
| [`gorgias_tickets_update_tag`](#gorgias_tickets_update_tag)                                         | Update a tag                    |
| [`gorgias_tickets_update_ticket`](#gorgias_tickets_update_ticket)                                   | Update a ticket                 |
| [`gorgias_tickets_update_ticket_custom_field`](#gorgias_tickets_update_ticket_custom_field)         | Update ticket field value       |
| [`gorgias_tickets_update_ticket_custom_fields`](#gorgias_tickets_update_ticket_custom_fields)       | Update ticket fields values     |
| [`gorgias_tickets_update_ticket_message`](#gorgias_tickets_update_ticket_message)                   | Update a message                |
| [`gorgias_tickets_update_ticket_tags`](#gorgias_tickets_update_ticket_tags)                         | Set ticket tags                 |

***

## gorgias\_tickets\_create\_satisfaction\_survey

Create a survey

**Parameters:**

| Parameter              | Type    | Required | Default | Description                                                                                                                                                                                 |                                                                                         |
| ---------------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `body_text`            | string  | null     | No      | —                                                                                                                                                                                           | The comment sent by the customer.                                                       |
| `created_datetime`     | string  | null     | No      | —                                                                                                                                                                                           | When the survey was created.                                                            |
| `customer_id`          | integer | Yes      | —       | The ID of the customer who filled the survey.                                                                                                                                               |                                                                                         |
| `meta`                 | object  | No       | —       | Data associated with the satisfaction survey. You can use this parameter to store structured information (key-value data) about the satisfaction survey. This field is not used by Gorgias. |                                                                                         |
| `score`                | integer | null     | No      | —                                                                                                                                                                                           | The level of satisfaction. Scores range from 1 to 5.                                    |
| `scored_datetime`      | string  | null     | No      | —                                                                                                                                                                                           | When the survey was filled by the customer.                                             |
| `sent_datetime`        | string  | null     | No      | —                                                                                                                                                                                           | When the survey was sent. If is not set it means that it was not sent yet.              |
| `should_send_datetime` | string  | null     | No      | —                                                                                                                                                                                           | When the survey should be sent. If not set then the survey will not be sent by Gorgias. |
| `ticket_id`            | integer | Yes      | —       | The ID of the ticket the survey is associated with.                                                                                                                                         |                                                                                         |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "body_text": {
        "type": [
          "string",
          "null"
        ],
        "description": "The comment sent by the customer."
      },
      "created_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the survey was created."
      },
      "customer_id": {
        "type": "integer",
        "description": "The ID of the customer who filled the survey."
      },
      "meta": {
        "type": "object",
        "description": "Data associated with the satisfaction survey. You can use this parameter to store structured information (key-value data) about the satisfaction survey. This field is not used by Gorgias."
      },
      "score": {
        "type": [
          "integer",
          "null"
        ],
        "description": "The level of satisfaction. Scores range from 1 to 5."
      },
      "scored_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the survey was filled by the customer."
      },
      "sent_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the survey was sent. If is not set it means that it was not sent yet."
      },
      "should_send_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the survey should be sent. If not set then the survey will not be sent by Gorgias."
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket the survey is associated with."
      }
    },
    "required": [
      "PCID",
      "customer_id",
      "ticket_id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_create\_tag

Create a tag

**Parameters:**

| Parameter     | Type   | Required | Default | Description                                      |
| ------------- | ------ | -------- | ------- | ------------------------------------------------ |
| `decoration`  | object | No       | —       | Information related to the style of the tag.     |
| `description` | string | No       | —       | Short description of the tag.                    |
| `name`        | string | Yes      | —       | Name of the tag. Tags' names are case sensitive. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "decoration": {
        "type": "object",
        "description": "Information related to the style of the tag.",
        "properties": {
          "color": {
            "type": "string",
            "description": "The color of the tag (Hex color code)."
          }
        },
        "required": [
          "color"
        ]
      },
      "description": {
        "type": "string",
        "description": "Short description of the tag."
      },
      "name": {
        "type": "string",
        "description": "Name of the tag. Tags' names are case sensitive."
      }
    },
    "required": [
      "PCID",
      "name"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_create\_ticket

Create a ticket

**Parameters:**

| Parameter                        | Type      | Required | Default | Description                                                                                                                 |                                                                                                                                                                                                                         |
| -------------------------------- | --------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `assignee_team`                  | object    | No       | —       | Team assigned to the ticket                                                                                                 |                                                                                                                                                                                                                         |
| `assignee_user`                  | object    | No       | —       | User assigned to this ticket                                                                                                |                                                                                                                                                                                                                         |
| `channel`                        | object    | No       | —       | Channel used to initiate the conversation with the customer                                                                 |                                                                                                                                                                                                                         |
| `closed_datetime`                | string    | null     | No      | —                                                                                                                           | When the ticket was closed                                                                                                                                                                                              |
| `created_datetime`               | string    | null     | No      | —                                                                                                                           | When the ticket was created                                                                                                                                                                                             |
| `custom_fields`                  | object\[] | No       | —       | Custom fields associated with the ticket                                                                                    |                                                                                                                                                                                                                         |
| `customer`                       | object    | No       | —       | Customer associated with the ticket                                                                                         |                                                                                                                                                                                                                         |
| `external_id`                    | string    | null     | No      | —                                                                                                                           | ID of the ticket in a foreign system. This field is not used by Gorgias, feel free to set it as you wish.                                                                                                               |
| `from_agent`                     | boolean   | null     | No      | —                                                                                                                           | Whether the first message of the ticket was sent by your company to a customer, or the opposite                                                                                                                         |
| `language`                       | string    | null     | No      | —                                                                                                                           | Language primarily used in the ticket. The language is automatically detected on the first messages by Gorgias if not set explicitly. Once the language has been set, it won't be updated according to future messages. |
| `last_message_datetime`          | string    | null     | No      | —                                                                                                                           | When the last message was sent                                                                                                                                                                                          |
| `last_received_message_datetime` | string    | null     | No      | —                                                                                                                           | When the last customer's message was received                                                                                                                                                                           |
| `messages`                       | object\[] | Yes      | —       | Messages of the ticket                                                                                                      |                                                                                                                                                                                                                         |
| `meta`                           | object    | No       | —       | Metadata associated with the ticketYou can use this field to store structured information (key-value data) about the ticket |                                                                                                                                                                                                                         |
| `opened_datetime`                | string    | null     | No      | —                                                                                                                           | When the ticket was opened for the first time by a User                                                                                                                                                                 |
| `priority`                       | string    | No       | —       | The priority value                                                                                                          |                                                                                                                                                                                                                         |
| `snooze_datetime`                | string    | null     | No      | —                                                                                                                           | When the ticket will be re-opened automatically                                                                                                                                                                         |
| `spam`                           | boolean   | null     | No      | —                                                                                                                           | Whether the ticket is considered as spam                                                                                                                                                                                |
| `status`                         | string    | No       | —       | The status value                                                                                                            |                                                                                                                                                                                                                         |
| `subject`                        | string    | null     | No      | —                                                                                                                           | Subject of the ticket                                                                                                                                                                                                   |
| `tags`                           | object\[] | No       | —       | The tags associated with the ticket                                                                                         |                                                                                                                                                                                                                         |
| `trashed_datetime`               | string    | null     | No      | —                                                                                                                           | When the ticket was moved to the trash                                                                                                                                                                                  |
| `updated_datetime`               | string    | null     | No      | —                                                                                                                           | When the ticket was lastly updated                                                                                                                                                                                      |
| `via`                            | string    | Yes      | —       | The via value                                                                                                               |                                                                                                                                                                                                                         |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "assignee_team": {
        "type": "object",
        "description": "Team assigned to the ticket",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the user or team assigned to the ticket"
          }
        }
      },
      "assignee_user": {
        "type": "object",
        "description": "User assigned to this ticket",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the user or team assigned to the ticket"
          }
        }
      },
      "channel": {
        "description": "Channel used to initiate the conversation with the customer"
      },
      "closed_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the ticket was closed"
      },
      "created_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the ticket was created"
      },
      "custom_fields": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "ID of the custom field"
            },
            "value": {
              "description": "Value of the custom field"
            }
          },
          "required": [
            "id",
            "value"
          ]
        },
        "description": "Custom fields associated with the ticket"
      },
      "customer": {
        "type": "object",
        "description": "Customer associated with the ticket",
        "properties": {
          "email": {
            "type": "string",
            "description": "Primary email of the customer"
          },
          "id": {
            "type": "integer",
            "description": "ID of the customer"
          },
          "name": {
            "type": "string",
            "description": "Name of the customer"
          }
        }
      },
      "external_id": {
        "type": [
          "string",
          "null"
        ],
        "description": "ID of the ticket in a foreign system. This field is not used by Gorgias, feel free to set it as you wish."
      },
      "from_agent": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "Whether the first message of the ticket was sent by your company to a customer, or the opposite"
      },
      "language": {
        "type": [
          "string",
          "null"
        ],
        "description": "Language primarily used in the ticket. The language is automatically detected on the first messages by Gorgias if not set explicitly. Once the language has been set, it won't be updated according to future messages."
      },
      "last_message_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the last message was sent"
      },
      "last_received_message_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the last customer's message was received"
      },
      "messages": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "actions": {
              "type": "array",
              "description": "Actions associated with the message"
            },
            "attachments": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "content_type": {
                    "type": "string"
                  },
                  "extra": {},
                  "name": {
                    "type": "string"
                  },
                  "public": {
                    "type": "boolean"
                  },
                  "size": {
                    "type": "integer"
                  },
                  "url": {
                    "type": "string"
                  }
                }
              },
              "description": "Attachments associated with the message"
            },
            "body_html": {
              "type": "string",
              "description": "HTML version of the body of the message"
            },
            "body_text": {
              "type": "string",
              "description": "Text version of the body of the message"
            },
            "channel": {
              "description": "Channel used to send the message"
            },
            "created_datetime": {
              "type": "string",
              "format": "date-time",
              "description": "When the message was created"
            },
            "deleted_datetime": {
              "type": "string",
              "format": "date-time",
              "description": "When the message was deleted"
            },
            "external_id": {
              "type": "string",
              "description": "ID of the message in a foreign system (Aircall, Zendesk, etc...). This field is not used by Gorgias, feel free to set it as you wish."
            },
            "failed_datetime": {
              "type": "string",
              "format": "date-time",
              "description": "When the message failed to be sent. Messages that couldn't be sent can be resend."
            },
            "from_agent": {
              "type": "boolean",
              "description": "Whether the message was sent by your company"
            },
            "headers": {
              "type": "object",
              "description": "Headers of the message"
            },
            "integration_id": {
              "type": "integer",
              "description": "ID of the Integration used to send the message"
            },
            "last_sending_error": {
              "type": "object",
              "description": "Details of the last error encountered when Gorgias attempted to send the message"
            },
            "macros": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  }
                }
              },
              "description": "Macros used to compose the message"
            },
            "mention_ids": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "List of User IDs to mention along with the internal note."
            },
            "message_id": {
              "type": "string",
              "description": "ID of the message on the service that send the message. It can be the ID of an email, a Messenger message, a Facebook comment, etc..."
            },
            "meta": {
              "type": "object",
              "description": "Metadata associated with the ticket.You can use this field to store structured information (key-value data) about the ticket."
            },
            "opened_datetime": {
              "type": "string",
              "format": "date-time",
              "description": "When the message was seen by their recipient"
            },
            "public": {
              "type": "boolean",
              "description": "Whether the message is public. Only internal notes are private."
            },
            "receiver": {
              "type": "object",
              "description": "Primary receiver of the message. It can be a user or a customer. Optional when the source type is \"internal-note\"."
            },
            "sender": {
              "type": "object",
              "description": "Person who sent the message. It can be a user or a customer."
            },
            "sent_datetime": {
              "type": "string",
              "format": "date-time",
              "description": "When the message was sent. If ommited, the message will be sent by Gorgias."
            },
            "source": {
              "type": "object",
              "description": "Information used to route the message. It contains the names and the addresses of the sender and receivers."
            },
            "stripped_html": {
              "type": "string",
              "description": "HTML version of the body of the message without email signatures and previous replies."
            },
            "stripped_signature": {
              "type": "string",
              "description": "signature stripped from the body of the message"
            },
            "stripped_text": {
              "type": "string",
              "description": "Text version of the body of the message without email signatures and previous replies."
            },
            "subject": {
              "type": "string",
              "description": "Subject of the message"
            },
            "via": {
              "type": "string",
              "enum": [
                "aircall",
                "api",
                "chat",
                "contact_form",
                "email",
                "facebook",
                "facebook-mention",
                "facebook-messenger",
                "facebook-recommendations",
                "form",
                "gorgias_chat",
                "help-center",
                "helpdesk",
                "instagram",
                "instagram-ad-comment",
                "instagram-comment",
                "instagram-direct-message",
                "instagram-mention",
                "internal-note",
                "offline_capture",
                "phone",
                "rule",
                "self_service",
                "shopify",
                "sms",
                "twilio",
                "twitter",
                "twitter-direct-message",
                "whatsapp",
                "yotpo",
                "yotpo-review",
                "zendesk"
              ],
              "description": "The via value"
            }
          },
          "required": [
            "channel",
            "from_agent",
            "via"
          ]
        },
        "description": "Messages of the ticket"
      },
      "meta": {
        "type": "object",
        "description": "Metadata associated with the ticketYou can use this field to store structured information (key-value data) about the ticket"
      },
      "opened_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the ticket was opened for the first time by a User"
      },
      "priority": {
        "type": "string",
        "description": "The priority value",
        "enum": [
          "critical",
          "high",
          "normal",
          "low"
        ]
      },
      "snooze_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the ticket will be re-opened automatically"
      },
      "spam": {
        "type": [
          "boolean",
          "null"
        ],
        "description": "Whether the ticket is considered as spam"
      },
      "status": {
        "type": "string",
        "description": "The status value",
        "enum": [
          "open",
          "closed"
        ]
      },
      "subject": {
        "type": [
          "string",
          "null"
        ],
        "description": "Subject of the ticket"
      },
      "tags": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "decoration": {
              "type": "object",
              "description": "The decoration value"
            },
            "name": {
              "type": "string",
              "description": "Name of the tag"
            }
          },
          "required": [
            "name"
          ]
        },
        "description": "The tags associated with the ticket"
      },
      "trashed_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the ticket was moved to the trash"
      },
      "updated_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the ticket was lastly updated"
      },
      "via": {
        "type": "string",
        "description": "The via value",
        "enum": [
          "aircall",
          "api",
          "chat",
          "contact_form",
          "email",
          "facebook",
          "facebook-mention",
          "facebook-messenger",
          "facebook-recommendations",
          "form",
          "gorgias_chat",
          "help-center",
          "helpdesk",
          "instagram",
          "instagram-ad-comment",
          "instagram-comment",
          "instagram-direct-message",
          "instagram-mention",
          "internal-note",
          "offline_capture",
          "phone",
          "rule",
          "self_service",
          "shopify",
          "sms",
          "twilio",
          "twitter",
          "twitter-direct-message",
          "whatsapp",
          "yotpo",
          "yotpo-review",
          "zendesk"
        ]
      }
    },
    "required": [
      "PCID",
      "messages",
      "via"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_create\_ticket\_message

Create a message

**Parameters:**

| Parameter            | Type       | Required | Default | Description                                                                                                                                                                                                                                                                         |                                                                                                                                       |
| -------------------- | ---------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `ticket_id`          | integer    | Yes      | —       | The ID of the ticket to create a message in.                                                                                                                                                                                                                                        |                                                                                                                                       |
| `action`             | string     | No       | —       | Policy applied on external actions associated with the message if they failed. Three actions are possible:   - force: bypass the failed action and try to execute the remaining one and to send the message   - retry: retry the failed action   - cancel: delete the TicketMessage |                                                                                                                                       |
| `actions`            | any\[]     | No       | —       | Actions associated with the message                                                                                                                                                                                                                                                 |                                                                                                                                       |
| `attachments`        | object\[]  | No       | —       | Attachments associated with the message                                                                                                                                                                                                                                             |                                                                                                                                       |
| `body_html`          | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | HTML version of the body of the message                                                                                               |
| `body_text`          | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | Text version of the body of the message                                                                                               |
| `channel`            | object     | Yes      | —       | Channel used to send the message                                                                                                                                                                                                                                                    |                                                                                                                                       |
| `created_datetime`   | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | When the message was created                                                                                                          |
| `deleted_datetime`   | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | When the message was deleted                                                                                                          |
| `external_id`        | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | ID of the message in a foreign system (Aircall, Zendesk, etc...). This field is not used by Gorgias, feel free to set it as you wish. |
| `failed_datetime`    | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | When the message failed to be sent. Messages that couldn't be sent can be resend.                                                     |
| `from_agent`         | boolean    | Yes      | —       | Whether the message was sent by your company                                                                                                                                                                                                                                        |                                                                                                                                       |
| `headers`            | object     | No       | —       | Headers of the message                                                                                                                                                                                                                                                              |                                                                                                                                       |
| `integration_id`     | integer    | null     | No      | —                                                                                                                                                                                                                                                                                   | ID of the Integration used to send the message                                                                                        |
| `last_sending_error` | object     | No       | —       | Details of the last error encountered when Gorgias attempted to send the message                                                                                                                                                                                                    |                                                                                                                                       |
| `macros`             | object\[]  | No       | —       | Macros used to compose the message                                                                                                                                                                                                                                                  |                                                                                                                                       |
| `mention_ids`        | integer\[] | No       | —       | List of User IDs to mention along with the internal note.                                                                                                                                                                                                                           |                                                                                                                                       |
| `message_id`         | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | ID of the message on the service that send the message. It can be the ID of an email, a Messenger message, a Facebook comment, etc... |
| `meta`               | object     | No       | —       | Metadata associated with the ticket.You can use this field to store structured information (key-value data) about the ticket.                                                                                                                                                       |                                                                                                                                       |
| `opened_datetime`    | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | When the message was seen by their recipient                                                                                          |
| `public`             | boolean    | No       | —       | Whether the message is public. Only internal notes are private.                                                                                                                                                                                                                     |                                                                                                                                       |
| `receiver`           | object     | No       | —       | Primary receiver of the message. It can be a user or a customer. Optional when the source type is "internal-note".                                                                                                                                                                  |                                                                                                                                       |
| `sender`             | object     | No       | —       | Person who sent the message. It can be a user or a customer.                                                                                                                                                                                                                        |                                                                                                                                       |
| `sent_datetime`      | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | When the message was sent. If ommited, the message will be sent by Gorgias.                                                           |
| `source`             | object     | No       | —       | Information used to route the message. It contains the names and the addresses of the sender and receivers.                                                                                                                                                                         |                                                                                                                                       |
| `stripped_html`      | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | HTML version of the body of the message without email signatures and previous replies.                                                |
| `stripped_signature` | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | signature stripped from the body of the message                                                                                       |
| `stripped_text`      | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | Text version of the body of the message without email signatures and previous replies.                                                |
| `subject`            | string     | null     | No      | —                                                                                                                                                                                                                                                                                   | Subject of the message                                                                                                                |
| `via`                | string     | Yes      | —       | The via value                                                                                                                                                                                                                                                                       |                                                                                                                                       |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket to create a message in."
      },
      "action": {
        "type": "string",
        "description": "Policy applied on external actions associated with the message if they failed. Three actions are possible:   - force: bypass the failed action and try to execute the remaining one and to send the message   - retry: retry the failed action   - cancel: delete the TicketMessage",
        "enum": [
          "force",
          "retry",
          "cancel"
        ]
      },
      "actions": {
        "type": "array",
        "description": "Actions associated with the message"
      },
      "attachments": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "content_type": {
              "type": "string",
              "description": "Content Type"
            },
            "extra": {
              "description": "The extra value"
            },
            "name": {
              "type": "string",
              "description": "The name value"
            },
            "public": {
              "type": "boolean",
              "description": "The public value"
            },
            "size": {
              "type": "integer",
              "description": "The size value"
            },
            "url": {
              "type": "string",
              "format": "uri",
              "description": "The url value"
            }
          },
          "required": [
            "url",
            "name",
            "content_type"
          ]
        },
        "description": "Attachments associated with the message"
      },
      "body_html": {
        "type": [
          "string",
          "null"
        ],
        "description": "HTML version of the body of the message"
      },
      "body_text": {
        "type": [
          "string",
          "null"
        ],
        "description": "Text version of the body of the message"
      },
      "channel": {
        "description": "Channel used to send the message"
      },
      "created_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the message was created"
      },
      "deleted_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the message was deleted"
      },
      "external_id": {
        "type": [
          "string",
          "null"
        ],
        "description": "ID of the message in a foreign system (Aircall, Zendesk, etc...). This field is not used by Gorgias, feel free to set it as you wish."
      },
      "failed_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the message failed to be sent. Messages that couldn't be sent can be resend."
      },
      "from_agent": {
        "type": "boolean",
        "description": "Whether the message was sent by your company"
      },
      "headers": {
        "type": "object",
        "description": "Headers of the message"
      },
      "integration_id": {
        "type": [
          "integer",
          "null"
        ],
        "description": "ID of the Integration used to send the message"
      },
      "last_sending_error": {
        "type": "object",
        "description": "Details of the last error encountered when Gorgias attempted to send the message",
        "properties": {
          "error": {
            "type": "string",
            "description": "The error value"
          }
        },
        "required": [
          "error"
        ]
      },
      "macros": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "The id value"
            }
          },
          "required": [
            "id"
          ]
        },
        "description": "Macros used to compose the message"
      },
      "mention_ids": {
        "type": "array",
        "items": {
          "type": "integer"
        },
        "description": "List of User IDs to mention along with the internal note."
      },
      "message_id": {
        "type": [
          "string",
          "null"
        ],
        "description": "ID of the message on the service that send the message. It can be the ID of an email, a Messenger message, a Facebook comment, etc..."
      },
      "meta": {
        "type": "object",
        "description": "Metadata associated with the ticket.You can use this field to store structured information (key-value data) about the ticket.",
        "properties": {
          "relevant_content_indexes": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Relevant Content Indexes"
          }
        }
      },
      "opened_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the message was seen by their recipient"
      },
      "public": {
        "type": "boolean",
        "description": "Whether the message is public. Only internal notes are private."
      },
      "receiver": {
        "type": "object",
        "description": "Primary receiver of the message. It can be a user or a customer. Optional when the source type is \"internal-note\".",
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The channels value"
          },
          "email": {
            "type": "string",
            "description": "Email of the Customer or User"
          },
          "external_id": {
            "type": "string",
            "description": "External Id"
          },
          "id": {
            "type": "integer",
            "description": "ID of the customer or user"
          },
          "language": {
            "type": "string",
            "description": "The language value"
          },
          "meta": {
            "type": "object",
            "description": "The meta value"
          },
          "name": {
            "type": "string",
            "description": "The name value"
          },
          "note": {
            "type": "string",
            "description": "The note value"
          },
          "timezone": {
            "type": "string",
            "description": "Timezone identifier"
          }
        }
      },
      "sender": {
        "type": "object",
        "description": "Person who sent the message. It can be a user or a customer.",
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The channels value"
          },
          "email": {
            "type": "string",
            "description": "Email of the Customer or User"
          },
          "external_id": {
            "type": "string",
            "description": "External Id"
          },
          "id": {
            "type": "integer",
            "description": "ID of the customer or user"
          },
          "language": {
            "type": "string",
            "description": "The language value"
          },
          "meta": {
            "type": "object",
            "description": "The meta value"
          },
          "name": {
            "type": "string",
            "description": "The name value"
          },
          "note": {
            "type": "string",
            "description": "The note value"
          },
          "timezone": {
            "type": "string",
            "description": "Timezone identifier"
          }
        }
      },
      "sent_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the message was sent. If ommited, the message will be sent by Gorgias."
      },
      "source": {
        "type": "object",
        "description": "Information used to route the message. It contains the names and the addresses of the sender and receivers.",
        "properties": {
          "bcc": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The bcc value"
          },
          "cc": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The cc value"
          },
          "extra": {
            "description": "The extra value"
          },
          "from": {
            "type": "object",
            "description": "The from value"
          },
          "to": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "The to value"
          },
          "type": {
            "type": "string",
            "description": "The type value",
            "enum": [
              "aircall",
              "api",
              "app",
              "custom-chat",
              "chat",
              "chat-contact-form",
              "chat-offline-capture",
              "contact-form",
              "email",
              "facebook",
              "facebook-comment",
              "facebook-mention-comment",
              "facebook-mention-post",
              "facebook-message",
              "facebook-messenger",
              "facebook-post",
              "facebook-review",
              "facebook-review-comment",
              "form",
              "google-business-messages",
              "help-center",
              "help-center-contact-form",
              "helpdesk",
              "instagram",
              "instagram-ad-comment",
              "instagram-ad-media",
              "instagram-comment",
              "instagram-direct-message",
              "instagram-media",
              "instagram-mention-comment",
              "instagram-mention-media",
              "internal-note",
              "ottspott-call",
              "phone",
              "rule",
              "self_service",
              "shopify",
              "sms",
              "system-message",
              "tiktok-shop",
              "twilio",
              "twitter-direct-message",
              "twitter-mention-tweet",
              "twitter-quoted-tweet",
              "twitter-tweet",
              "whatsapp-message",
              "yotpo-review",
              "yotpo-review-private-comment",
              "yotpo-review-public-comment"
            ]
          }
        }
      },
      "stripped_html": {
        "type": [
          "string",
          "null"
        ],
        "description": "HTML version of the body of the message without email signatures and previous replies."
      },
      "stripped_signature": {
        "type": [
          "string",
          "null"
        ],
        "description": "signature stripped from the body of the message"
      },
      "stripped_text": {
        "type": [
          "string",
          "null"
        ],
        "description": "Text version of the body of the message without email signatures and previous replies."
      },
      "subject": {
        "type": [
          "string",
          "null"
        ],
        "description": "Subject of the message"
      },
      "via": {
        "type": "string",
        "description": "The via value",
        "enum": [
          "aircall",
          "api",
          "chat",
          "contact_form",
          "email",
          "facebook",
          "facebook-mention",
          "facebook-messenger",
          "facebook-recommendations",
          "form",
          "gorgias_chat",
          "help-center",
          "helpdesk",
          "instagram",
          "instagram-ad-comment",
          "instagram-comment",
          "instagram-direct-message",
          "instagram-mention",
          "internal-note",
          "offline_capture",
          "phone",
          "rule",
          "self_service",
          "shopify",
          "sms",
          "twilio",
          "twitter",
          "twitter-direct-message",
          "whatsapp",
          "yotpo",
          "yotpo-review",
          "zendesk"
        ]
      }
    },
    "required": [
      "PCID",
      "ticket_id",
      "channel",
      "from_agent",
      "via"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_create\_ticket\_tags

Add ticket tags

**Parameters:**

| Parameter   | Type       | Required | Default | Description            |
| ----------- | ---------- | -------- | ------- | ---------------------- |
| `ticket_id` | integer    | Yes      | —       | The ID of the ticket.  |
| `ids`       | integer\[] | No       | —       | The IDs of the tags.   |
| `names`     | string\[]  | No       | —       | The names of the tags. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket."
      },
      "ids": {
        "type": "array",
        "items": {
          "type": "integer"
        },
        "description": "The IDs of the tags."
      },
      "names": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The names of the tags."
      }
    },
    "required": [
      "PCID",
      "ticket_id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_delete\_tag

Delete a tag

**Parameters:**

| Parameter | Type    | Required | Default | Description                  |
| --------- | ------- | -------- | ------- | ---------------------------- |
| `id`      | integer | Yes      | —       | The ID of the tag to delete. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "The ID of the tag to delete."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_delete\_tags

Delete tags

**Parameters:**

| Parameter | Type       | Required | Default | Description               |
| --------- | ---------- | -------- | ------- | ------------------------- |
| `ids`     | integer\[] | Yes      | —       | IDs of the tags to delete |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ids": {
        "type": "array",
        "items": {
          "type": "integer"
        },
        "description": "IDs of the tags to delete"
      }
    },
    "required": [
      "PCID",
      "ids"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_delete\_ticket

Delete a ticket

**Parameters:**

| Parameter | Type    | Required | Default | Description                     |
| --------- | ------- | -------- | ------- | ------------------------------- |
| `id`      | integer | Yes      | —       | The ID of the ticket to delete. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "The ID of the ticket to delete."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_delete\_ticket\_custom\_field

Delete ticket field value

**Parameters:**

| Parameter   | Type    | Required | Default | Description                 |
| ----------- | ------- | -------- | ------- | --------------------------- |
| `ticket_id` | integer | Yes      | —       | The ID of the ticket.       |
| `id`        | integer | Yes      | —       | The ID of the custom field. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket."
      },
      "id": {
        "type": "integer",
        "description": "The ID of the custom field."
      }
    },
    "required": [
      "PCID",
      "ticket_id",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_delete\_ticket\_message

Delete a message

**Parameters:**

| Parameter   | Type    | Required | Default | Description                                       |
| ----------- | ------- | -------- | ------- | ------------------------------------------------- |
| `ticket_id` | integer | Yes      | —       | The ID of the ticket associated with the message. |
| `id`        | integer | Yes      | —       | The ID of the message to delete.                  |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket associated with the message."
      },
      "id": {
        "type": "integer",
        "description": "The ID of the message to delete."
      }
    },
    "required": [
      "PCID",
      "ticket_id",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_delete\_ticket\_tags

Remove ticket tags

**Parameters:**

| Parameter   | Type       | Required | Default | Description            |
| ----------- | ---------- | -------- | ------- | ---------------------- |
| `ticket_id` | integer    | Yes      | —       | The ID of the ticket.  |
| `ids`       | integer\[] | No       | —       | The IDs of the tags.   |
| `names`     | string\[]  | No       | —       | The names of the tags. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket."
      },
      "ids": {
        "type": "array",
        "items": {
          "type": "integer"
        },
        "description": "The IDs of the tags."
      },
      "names": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The names of the tags."
      }
    },
    "required": [
      "PCID",
      "ticket_id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_delete\_voice\_call\_recording

Delete a voice call recording

**Parameters:**

| Parameter | Type    | Required | Default | Description                                   |
| --------- | ------- | -------- | ------- | --------------------------------------------- |
| `id`      | integer | Yes      | —       | The ID of the voice call recording to delete. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "The ID of the voice call recording to delete."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_get\_api\_tickets\_ticket\_id\_tags

List ticket tags

**Parameters:**

| Parameter   | Type    | Required | Default | Description           |
| ----------- | ------- | -------- | ------- | --------------------- |
| `ticket_id` | integer | Yes      | —       | The ID of the ticket. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket."
      }
    },
    "required": [
      "PCID",
      "ticket_id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_get\_satisfaction\_survey

Retrieve a survey

**Parameters:**

| Parameter | Type    | Required | Default | Description                       |
| --------- | ------- | -------- | ------- | --------------------------------- |
| `id`      | integer | Yes      | —       | The ID of the survey to retrieve. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "The ID of the survey to retrieve."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_get\_tag

Retrieve a tag

**Parameters:**

| Parameter | Type    | Required | Default | Description                    |
| --------- | ------- | -------- | ------- | ------------------------------ |
| `id`      | integer | Yes      | —       | The ID of the tag to retrieve. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "The ID of the tag to retrieve."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_get\_ticket

Retrieve a ticket

**Parameters:**

| Parameter       | Type      | Required | Default | Description                                                  |
| --------------- | --------- | -------- | ------- | ------------------------------------------------------------ |
| `id`            | integer   | Yes      | —       | The ID of the ticket to retrieve.                            |
| `relationships` | string\[] | No       | —       | Names of relations that should be included in returned data. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "The ID of the ticket to retrieve."
      },
      "relationships": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "custom_fields"
          ]
        },
        "description": "Names of relations that should be included in returned data."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_get\_ticket\_message

Retrieve a message

**Parameters:**

| Parameter   | Type    | Required | Default | Description                                       |
| ----------- | ------- | -------- | ------- | ------------------------------------------------- |
| `ticket_id` | integer | Yes      | —       | The ID of the ticket associated with the message. |
| `id`        | integer | Yes      | —       | The ID of the message to retrieve.                |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket associated with the message."
      },
      "id": {
        "type": "integer",
        "description": "The ID of the message to retrieve."
      }
    },
    "required": [
      "PCID",
      "ticket_id",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_get\_voice\_call

Retrieve a voice call

**Parameters:**

| Parameter | Type    | Required | Default | Description                           |
| --------- | ------- | -------- | ------- | ------------------------------------- |
| `id`      | integer | Yes      | —       | The ID of the voice call to retrieve. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "The ID of the voice call to retrieve."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_get\_voice\_call\_event

Retrieve a voice call event

**Parameters:**

| Parameter | Type    | Required | Default | Description                            |
| --------- | ------- | -------- | ------- | -------------------------------------- |
| `id`      | integer | Yes      | —       | The ID of the voice event to retrieve. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "The ID of the voice event to retrieve."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_get\_voice\_call\_recording

Retrieve a voice call recording

**Parameters:**

| Parameter | Type    | Required | Default | Description                                     |
| --------- | ------- | -------- | ------- | ----------------------------------------------- |
| `id`      | integer | Yes      | —       | The ID of the voice call recording to retrieve. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "The ID of the voice call recording to retrieve."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_list\_messages

List messages

**Parameters:**

| Parameter   | Type    | Required | Default | Description                                                                                                              |
| ----------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------ |
| `cursor`    | string  | No       | —       | Value indicating your position in the list of all messages. If omitted, the first messages of the list will be returned. |
| `limit`     | integer | No       | —       | Maximum number of messages to return.                                                                                    |
| `order_by`  | string  | No       | —       | Attribute used to order messages.                                                                                        |
| `ticket_id` | integer | No       | —       | The ID of the ticket the messages are associated with.                                                                   |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cursor": {
        "type": "string",
        "description": "Value indicating your position in the list of all messages. If omitted, the first messages of the list will be returned."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of messages to return."
      },
      "order_by": {
        "type": "string",
        "description": "Attribute used to order messages.",
        "enum": [
          "created_datetime:asc",
          "created_datetime:desc"
        ]
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket the messages are associated with."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_list\_satisfaction\_surveys

List surveys

**Parameters:**

| Parameter   | Type    | Required | Default | Description                                                                                                                                     |
| ----------- | ------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `cursor`    | string  | No       | —       | Value indicating your position in the list of all satisfaction surveys. If omitted, the first satisfaction survey of the list will be returned. |
| `limit`     | integer | No       | —       | Maximum number of satisfaction surveys to return.                                                                                               |
| `order_by`  | string  | No       | —       | Attribute used to order satisfaction surveys.                                                                                                   |
| `ticket_id` | integer | No       | —       | The ID of the ticket the satisfaction surveys are associated with.                                                                              |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cursor": {
        "type": "string",
        "description": "Value indicating your position in the list of all satisfaction surveys. If omitted, the first satisfaction survey of the list will be returned."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of satisfaction surveys to return."
      },
      "order_by": {
        "type": "string",
        "description": "Attribute used to order satisfaction surveys.",
        "enum": [
          "created_datetime:asc",
          "created_datetime:desc"
        ]
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket the satisfaction surveys are associated with."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_list\_tags

List tags

**Parameters:**

| Parameter  | Type    | Required | Default | Description                                                                                                                                                                                 |
| ---------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `order_by` | string  | No       | —       | Order tags by the given attribute.\<br>Values \<span style="color:red">`name`, `created_datetime`, `name`, `usage` have been deprecated\</span>. Use values with `:asc` or `:desc` instead. |
| `search`   | string  | No       | —       | Search for tags' names matching the given text query (case insensitive).                                                                                                                    |
| `cursor`   | string  | No       | —       | Value indicating your position in the list of all items. If omitted, the first items of the list will be returned.                                                                          |
| `limit`    | integer | No       | —       | Maximum number of items to return.                                                                                                                                                          |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_by": {
        "type": "string",
        "description": "Order tags by the given attribute.<br>Values <span style=\"color:red\">`name`, `created_datetime`, `name`, `usage` have been deprecated</span>. Use values with `:asc` or `:desc` instead.",
        "enum": [
          "created_datetime",
          "name",
          "usage",
          "created_datetime:asc",
          "created_datetime:desc",
          "name:asc",
          "name:desc",
          "usage:asc,name:asc",
          "usage:desc,name:desc"
        ]
      },
      "search": {
        "type": "string",
        "description": "Search for tags' names matching the given text query (case insensitive)."
      },
      "cursor": {
        "type": "string",
        "description": "Value indicating your position in the list of all items. If omitted, the first items of the list will be returned."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of items to return."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_list\_ticket\_custom\_fields

List ticket field values

**Parameters:**

| Parameter   | Type    | Required | Default | Description           |
| ----------- | ------- | -------- | ------- | --------------------- |
| `ticket_id` | integer | Yes      | —       | The ID of the ticket. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket."
      }
    },
    "required": [
      "PCID",
      "ticket_id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_list\_tickets

List tickets

**Parameters:**

| Parameter     | Type       | Required | Default | Description                                                                                                            |
| ------------- | ---------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------- |
| `order_by`    | string     | No       | —       | Attribute used to order tickets.                                                                                       |
| `cursor`      | string     | No       | —       | Value indicating your position in the list of all tickets. If omitted, the first tickets of the list will be returned. |
| `customer_id` | integer    | No       | —       | The ID of a customer used to select their tickets.                                                                     |
| `trashed`     | boolean    | No       | —       | Whether to include trashed tickets in the response.                                                                    |
| `external_id` | string     | No       | —       | ID of the ticket in a foreign system you're looking for.                                                               |
| `limit`       | integer    | No       | —       | Maximum number of tickets to return.                                                                                   |
| `view_id`     | integer    | No       | —       | The ID of a view used to select tickets matching the filters of this one.                                              |
| `rule_id`     | integer    | No       | —       | The ID of a rule used to select tickets matching the filters of this one.                                              |
| `ticket_ids`  | integer\[] | No       | —       | The IDs of tickets to select.                                                                                          |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "order_by": {
        "type": "string",
        "description": "Attribute used to order tickets.",
        "enum": [
          "created_datetime:asc",
          "created_datetime:desc",
          "updated_datetime:asc",
          "updated_datetime:desc"
        ]
      },
      "cursor": {
        "type": "string",
        "description": "Value indicating your position in the list of all tickets. If omitted, the first tickets of the list will be returned."
      },
      "customer_id": {
        "type": "integer",
        "description": "The ID of a [customer](#the-customer-object) used to select their tickets."
      },
      "trashed": {
        "type": "boolean",
        "description": "Whether to include trashed tickets in the response."
      },
      "external_id": {
        "type": "string",
        "description": "ID of the ticket in a foreign system you're looking for."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of tickets to return."
      },
      "view_id": {
        "type": "integer",
        "description": "The ID of a [view](#the-view-object) used to select tickets matching the filters of this one."
      },
      "rule_id": {
        "type": "integer",
        "description": "The ID of a [rule](#the-rule-object) used to select tickets matching the filters of this one."
      },
      "ticket_ids": {
        "type": "array",
        "items": {
          "type": "integer"
        },
        "description": "The IDs of tickets to select."
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_list\_voice\_call\_events

List voice call events

**Parameters:**

| Parameter | Type    | Required | Default | Description                                                                                                        |
| --------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
| `cursor`  | string  | No       | —       | Value indicating your position in the list of all items. If omitted, the first items of the list will be returned. |
| `limit`   | integer | No       | —       | Maximum number of items to return.                                                                                 |
| `call_id` | integer | No       | —       | Call Id                                                                                                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cursor": {
        "type": "string",
        "description": "Value indicating your position in the list of all items. If omitted, the first items of the list will be returned."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of items to return."
      },
      "call_id": {
        "type": "integer",
        "description": "Call Id"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_list\_voice\_call\_recordings

List voice call recordings

**Parameters:**

| Parameter | Type    | Required | Default | Description                                                                                                        |
| --------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
| `cursor`  | string  | No       | —       | Value indicating your position in the list of all items. If omitted, the first items of the list will be returned. |
| `limit`   | integer | No       | —       | Maximum number of items to return.                                                                                 |
| `call_id` | integer | No       | —       | Call Id                                                                                                            |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cursor": {
        "type": "string",
        "description": "Value indicating your position in the list of all items. If omitted, the first items of the list will be returned."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of items to return."
      },
      "call_id": {
        "type": "integer",
        "description": "Call Id"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_list\_voice\_calls

List voice calls

**Parameters:**

| Parameter   | Type    | Required | Default | Description                                                                                                        |
| ----------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
| `cursor`    | string  | No       | —       | Value indicating your position in the list of all items. If omitted, the first items of the list will be returned. |
| `limit`     | integer | No       | —       | Maximum number of items to return.                                                                                 |
| `ticket_id` | integer | No       | —       | Ticket Id                                                                                                          |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "cursor": {
        "type": "string",
        "description": "Value indicating your position in the list of all items. If omitted, the first items of the list will be returned."
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of items to return."
      },
      "ticket_id": {
        "type": "integer",
        "description": "Ticket Id"
      }
    },
    "required": [
      "PCID"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_merge\_tags

Merge tags

**Parameters:**

| Parameter            | Type       | Required | Default | Description                                                   |
| -------------------- | ---------- | -------- | ------- | ------------------------------------------------------------- |
| `destination_tag_id` | integer    | Yes      | —       | The ID of the tag that will serve as base for the merge.      |
| `source_tags_ids`    | integer\[] | No       | —       | IDs of the tags that will be merged into the destination tag. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "destination_tag_id": {
        "type": "integer",
        "description": "The ID of the tag that will serve as base for the merge."
      },
      "source_tags_ids": {
        "type": "array",
        "items": {
          "type": "integer"
        },
        "description": "IDs of the tags that will be merged into the destination tag."
      }
    },
    "required": [
      "PCID",
      "destination_tag_id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_update\_satisfaction\_survey

Update a survey

**Parameters:**

| Parameter              | Type    | Required | Default | Description                                                                                                                                                                                 |                                                                                         |
| ---------------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| `id`                   | integer | Yes      | —       | The ID of the survey to update.                                                                                                                                                             |                                                                                         |
| `body_text`            | string  | null     | No      | —                                                                                                                                                                                           | The comment sent by the customer.                                                       |
| `created_datetime`     | string  | null     | No      | —                                                                                                                                                                                           | When the survey was created.                                                            |
| `customer_id`          | integer | No       | —       | The ID of the customer who filled the survey.                                                                                                                                               |                                                                                         |
| `meta`                 | object  | No       | —       | Data associated with the satisfaction survey. You can use this parameter to store structured information (key-value data) about the satisfaction survey. This field is not used by Gorgias. |                                                                                         |
| `score`                | integer | null     | No      | —                                                                                                                                                                                           | The level of satisfaction. Scores range from 1 to 5.                                    |
| `scored_datetime`      | string  | null     | No      | —                                                                                                                                                                                           | When the survey was filled by the customer.                                             |
| `sent_datetime`        | string  | null     | No      | —                                                                                                                                                                                           | When the survey was sent. If is not set it means that it was not sent yet.              |
| `should_send_datetime` | string  | null     | No      | —                                                                                                                                                                                           | When the survey should be sent. If not set then the survey will not be sent by Gorgias. |
| `ticket_id`            | integer | No       | —       | The ID of the ticket the survey is associated with.                                                                                                                                         |                                                                                         |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "The ID of the survey to update."
      },
      "body_text": {
        "type": [
          "string",
          "null"
        ],
        "description": "The comment sent by the customer."
      },
      "created_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the survey was created."
      },
      "customer_id": {
        "type": "integer",
        "description": "The ID of the customer who filled the survey."
      },
      "meta": {
        "type": "object",
        "description": "Data associated with the satisfaction survey. You can use this parameter to store structured information (key-value data) about the satisfaction survey. This field is not used by Gorgias."
      },
      "score": {
        "type": [
          "integer",
          "null"
        ],
        "description": "The level of satisfaction. Scores range from 1 to 5."
      },
      "scored_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the survey was filled by the customer."
      },
      "sent_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the survey was sent. If is not set it means that it was not sent yet."
      },
      "should_send_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the survey should be sent. If not set then the survey will not be sent by Gorgias."
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket the survey is associated with."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_update\_tag

Update a tag

**Parameters:**

| Parameter     | Type    | Required | Default | Description                                      |
| ------------- | ------- | -------- | ------- | ------------------------------------------------ |
| `id`          | integer | Yes      | —       | The ID of the tag to update.                     |
| `decoration`  | object  | No       | —       | Information related to the style of the tag.     |
| `description` | string  | No       | —       | Short description of the tag.                    |
| `name`        | string  | No       | —       | Name of the tag. Tags' names are case sensitive. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "The ID of the tag to update."
      },
      "decoration": {
        "type": "object",
        "description": "Information related to the style of the tag.",
        "properties": {
          "color": {
            "type": "string",
            "description": "The color of the tag (Hex color code)."
          }
        },
        "required": [
          "color"
        ]
      },
      "description": {
        "type": "string",
        "description": "Short description of the tag."
      },
      "name": {
        "type": "string",
        "description": "Name of the tag. Tags' names are case sensitive."
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_update\_ticket

Update a ticket

**Parameters:**

| Parameter                        | Type      | Required | Default | Description                                                                                                                 |                                                                                                           |
| -------------------------------- | --------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `id`                             | integer   | Yes      | —       | The ID of the ticket to update.                                                                                             |                                                                                                           |
| `assignee_team`                  | object    | No       | —       | The team to assign to the ticket                                                                                            |                                                                                                           |
| `assignee_user`                  | object    | No       | —       | The user to assign to the ticket                                                                                            |                                                                                                           |
| `channel`                        | object    | No       | —       | Channel used to initiate the conversation with the customer                                                                 |                                                                                                           |
| `closed_datetime`                | string    | null     | No      | —                                                                                                                           | When the ticket was closed                                                                                |
| `custom_fields`                  | object\[] | No       | —       | Custom fields associated with the ticket                                                                                    |                                                                                                           |
| `customer`                       | object    | No       | —       | The customer value                                                                                                          |                                                                                                           |
| `external_id`                    | string    | null     | No      | —                                                                                                                           | ID of the ticket in a foreign system. This field is not used by Gorgias, feel free to set it as you wish. |
| `from_agent`                     | boolean   | No       | —       | Whether the first message of the ticket was sent by your company to a customer, or the opposite                             |                                                                                                           |
| `is_unread`                      | boolean   | No       | —       | Mark the ticket as read/unread                                                                                              |                                                                                                           |
| `language`                       | string    | null     | No      | —                                                                                                                           | Language primarily used in the ticket                                                                     |
| `last_message_datetime`          | string    | null     | No      | —                                                                                                                           | When the last message was sent                                                                            |
| `last_received_message_datetime` | string    | null     | No      | —                                                                                                                           | When the last customer's message was received                                                             |
| `meta`                           | object    | No       | —       | Metadata associated with the ticketYou can use this field to store structured information (key-value data) about the ticket |                                                                                                           |
| `opened_datetime`                | string    | null     | No      | —                                                                                                                           | Priority of the ticket                                                                                    |
| `priority`                       | string    | No       | —       | The priority value                                                                                                          |                                                                                                           |
| `snooze_datetime`                | string    | null     | No      | —                                                                                                                           | When the ticket will be re-opened automatically                                                           |
| `spam`                           | boolean   | No       | —       | Whether the ticket is considered as spam                                                                                    |                                                                                                           |
| `status`                         | string    | No       | —       | The status value                                                                                                            |                                                                                                           |
| `subject`                        | string    | null     | No      | —                                                                                                                           | Subject of the ticket                                                                                     |
| `tags`                           | object\[] | No       | —       | Tags of the ticket                                                                                                          |                                                                                                           |
| `trashed_datetime`               | string    | null     | No      | —                                                                                                                           | A datetime will move the ticket to the trash, `null` will move the ticket out of the trash                |
| `updated_datetime`               | string    | No       | —       | When the ticket was lastly updated                                                                                          |                                                                                                           |
| `via`                            | string    | No       | —       | The via value                                                                                                               |                                                                                                           |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "id": {
        "type": "integer",
        "description": "The ID of the ticket to update."
      },
      "assignee_team": {
        "type": "object",
        "description": "The team to assign to the ticket",
        "properties": {
          "id": {
            "type": "integer",
            "description": "ID of the user or team to assign to the ticket"
          }
        }
      },
      "assignee_user": {
        "type": "object",
        "description": "The user to assign to the ticket",
        "properties": {
          "id": {
            "type": "integer",
            "description": "The id value"
          }
        }
      },
      "channel": {
        "description": "Channel used to initiate the conversation with the customer"
      },
      "closed_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the ticket was closed"
      },
      "custom_fields": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "ID of the custom field"
            },
            "value": {
              "description": "Value of the custom field"
            }
          },
          "required": [
            "id",
            "value"
          ]
        },
        "description": "Custom fields associated with the ticket"
      },
      "customer": {
        "type": "object",
        "description": "The customer value",
        "properties": {
          "email": {
            "type": "string",
            "description": "Primary email of the customer"
          },
          "id": {
            "type": "integer",
            "description": "ID of the customer"
          },
          "name": {
            "type": "string",
            "description": "Name of the customer"
          }
        }
      },
      "external_id": {
        "type": [
          "string",
          "null"
        ],
        "description": "ID of the ticket in a foreign system. This field is not used by Gorgias, feel free to set it as you wish."
      },
      "from_agent": {
        "type": "boolean",
        "description": "Whether the first message of the ticket was sent by your company to a customer, or the opposite"
      },
      "is_unread": {
        "type": "boolean",
        "description": "Mark the ticket as read/unread"
      },
      "language": {
        "type": [
          "string",
          "null"
        ],
        "description": "Language primarily used in the ticket"
      },
      "last_message_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the last message was sent"
      },
      "last_received_message_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the last customer's message was received"
      },
      "meta": {
        "type": "object",
        "description": "Metadata associated with the ticketYou can use this field to store structured information (key-value data) about the ticket"
      },
      "opened_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "Priority of the ticket"
      },
      "priority": {
        "type": "string",
        "description": "The priority value",
        "enum": [
          "critical",
          "high",
          "normal",
          "low"
        ]
      },
      "snooze_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the ticket will be re-opened automatically"
      },
      "spam": {
        "type": "boolean",
        "description": "Whether the ticket is considered as spam"
      },
      "status": {
        "type": "string",
        "description": "The status value",
        "enum": [
          "open",
          "closed"
        ]
      },
      "subject": {
        "type": [
          "string",
          "null"
        ],
        "description": "Subject of the ticket"
      },
      "tags": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "decoration": {
              "type": "object",
              "description": "The decoration value"
            },
            "name": {
              "type": "string",
              "description": "Name of the tag"
            }
          },
          "required": [
            "name"
          ]
        },
        "description": "Tags of the ticket"
      },
      "trashed_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "A datetime will move the ticket to the trash, `null` will move the ticket out of the trash"
      },
      "updated_datetime": {
        "type": "string",
        "description": "When the ticket was lastly updated"
      },
      "via": {
        "type": "string",
        "description": "The via value",
        "enum": [
          "aircall",
          "api",
          "chat",
          "contact_form",
          "email",
          "facebook",
          "facebook-mention",
          "facebook-messenger",
          "facebook-recommendations",
          "form",
          "gorgias_chat",
          "help-center",
          "helpdesk",
          "instagram",
          "instagram-ad-comment",
          "instagram-comment",
          "instagram-direct-message",
          "instagram-mention",
          "internal-note",
          "offline_capture",
          "phone",
          "rule",
          "self_service",
          "shopify",
          "sms",
          "twilio",
          "twitter",
          "twitter-direct-message",
          "whatsapp",
          "yotpo",
          "yotpo-review",
          "zendesk"
        ]
      }
    },
    "required": [
      "PCID",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_update\_ticket\_custom\_field

Update ticket field value

**Parameters:**

| Parameter   | Type    | Required | Default | Description                 |
| ----------- | ------- | -------- | ------- | --------------------------- |
| `ticket_id` | integer | Yes      | —       | The ID of the ticket.       |
| `id`        | integer | Yes      | —       | The ID of the custom field. |
| `body`      | object  | Yes      | —       | Request body                |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket."
      },
      "id": {
        "type": "integer",
        "description": "The ID of the custom field."
      },
      "body": {
        "description": "Request body"
      }
    },
    "required": [
      "PCID",
      "ticket_id",
      "id",
      "body"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_update\_ticket\_custom\_fields

Update ticket fields values

**Parameters:**

| Parameter   | Type      | Required | Default | Description           |
| ----------- | --------- | -------- | ------- | --------------------- |
| `ticket_id` | integer   | Yes      | —       | The ID of the ticket. |
| `body`      | object\[] | Yes      | —       | Request body          |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket."
      },
      "body": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "integer",
              "description": "ID of the custom field for which to set a value."
            },
            "value": {
              "description": "The value of the custom field for the particular ticket."
            }
          },
          "required": [
            "id",
            "value"
          ]
        },
        "description": "Request body"
      }
    },
    "required": [
      "PCID",
      "ticket_id",
      "body"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_update\_ticket\_message

Update a message

**Parameters:**

| Parameter         | Type      | Required | Default | Description                                                                                                                                                                                                                                                                         |                                                                                                                                       |
| ----------------- | --------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `ticket_id`       | integer   | Yes      | —       | The ID of the ticket associated with the message.                                                                                                                                                                                                                                   |                                                                                                                                       |
| `id`              | integer   | Yes      | —       | The ID of the message to update.                                                                                                                                                                                                                                                    |                                                                                                                                       |
| `action`          | string    | No       | —       | Policy applied on external actions associated with the message if they failed. Three actions are possible:   - force: bypass the failed action and try to execute the remaining one and to send the message   - retry: retry the failed action   - cancel: delete the TicketMessage |                                                                                                                                       |
| `attachments`     | object\[] | No       | —       | A list of files attached to the message.                                                                                                                                                                                                                                            |                                                                                                                                       |
| `body_html`       | string    | null     | No      | —                                                                                                                                                                                                                                                                                   | The full HTML version of the body of the message, if any.                                                                             |
| `body_text`       | string    | null     | No      | —                                                                                                                                                                                                                                                                                   | The full text version of the body of the message, if any.                                                                             |
| `channel`         | string    | No       | —       | The channel used to send the message.                                                                                                                                                                                                                                               |                                                                                                                                       |
| `external_id`     | string    | null     | No      | —                                                                                                                                                                                                                                                                                   | ID of the message in a foreign system (Aircall, Zendesk, etc...). This field is not used by Gorgias, feel free to set it as you wish. |
| `failed_datetime` | string    | null     | No      | —                                                                                                                                                                                                                                                                                   | When the message failed to be sent. Messages that couldn't be sent can be resend.                                                     |
| `from_agent`      | boolean   | No       | —       | Whether the message was sent by your company to a customer, or the opposite.                                                                                                                                                                                                        |                                                                                                                                       |
| `message_id`      | string    | null     | No      | —                                                                                                                                                                                                                                                                                   | ID of the message on the service that send the message.It can be the ID of an email, a Messenger message, a Facebook comment, etc...  |
| `receiver`        | object    | No       | —       | The primary receiver of the message. It can be a user or a customer. Optional when the source type is "internal-note".                                                                                                                                                              |                                                                                                                                       |
| `sender`          | object    | No       | —       | The person who sent the message. It can be a user or a customer.                                                                                                                                                                                                                    |                                                                                                                                       |
| `sent_datetime`   | string    | null     | No      | —                                                                                                                                                                                                                                                                                   | When the message was sent. If ommited, the message will be sent by Gorgias.                                                           |
| `source`          | object    | No       | —       | Information used to route the message. It contains the names and the addresses of the sender and receivers.                                                                                                                                                                         |                                                                                                                                       |
| `subject`         | string    | null     | No      | —                                                                                                                                                                                                                                                                                   | The subject of the message.                                                                                                           |
| `via`             | string    | No       | —       | How the message has been received, or sent from Gorgias.                                                                                                                                                                                                                            |                                                                                                                                       |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket associated with the message."
      },
      "id": {
        "type": "integer",
        "description": "The ID of the message to update."
      },
      "action": {
        "type": "string",
        "description": "Policy applied on external actions associated with the message if they failed. Three actions are possible:   - force: bypass the failed action and try to execute the remaining one and to send the message   - retry: retry the failed action   - cancel: delete the TicketMessage",
        "enum": [
          "force",
          "retry",
          "cancel"
        ]
      },
      "attachments": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "content_type": {
              "type": "string",
              "description": "The MIME type of the file."
            },
            "extra": {
              "description": "Extra information for custom content type attachment"
            },
            "name": {
              "type": "string",
              "description": "The name of the file."
            },
            "public": {
              "type": "boolean",
              "description": "Whether or not the attachment can be accessed."
            },
            "size": {
              "type": "integer",
              "description": "The size of the file, in bytes."
            },
            "url": {
              "type": "string",
              "format": "url",
              "description": "The URL to access to the attached file."
            }
          },
          "required": [
            "content_type",
            "name",
            "size",
            "url"
          ]
        },
        "description": "A list of files attached to the message."
      },
      "body_html": {
        "type": [
          "string",
          "null"
        ],
        "description": "The full HTML version of the body of the message, if any."
      },
      "body_text": {
        "type": [
          "string",
          "null"
        ],
        "description": "The full text version of the body of the message, if any."
      },
      "channel": {
        "type": "string",
        "description": "The channel used to send the message.",
        "enum": [
          "aircall",
          "api",
          "chat",
          "contact_form",
          "email",
          "facebook",
          "facebook-mention",
          "facebook-messenger",
          "facebook-recommendations",
          "help-center",
          "instagram-ad-comment",
          "instagram-comment",
          "instagram-direct-message",
          "instagram-mention",
          "internal-note",
          "phone",
          "sms",
          "twitter",
          "twitter-direct-message",
          "whatsapp",
          "yotpo-review"
        ]
      },
      "external_id": {
        "type": [
          "string",
          "null"
        ],
        "description": "ID of the message in a foreign system (Aircall, Zendesk, etc...). This field is not used by Gorgias, feel free to set it as you wish."
      },
      "failed_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the message failed to be sent. Messages that couldn't be sent can be resend."
      },
      "from_agent": {
        "type": "boolean",
        "description": "Whether the message was sent by your company to a customer, or the opposite."
      },
      "message_id": {
        "type": [
          "string",
          "null"
        ],
        "description": "ID of the message on the service that send the message.It can be the ID of an email, a Messenger message, a Facebook comment, etc..."
      },
      "receiver": {
        "type": "object",
        "description": "The primary receiver of the message. It can be a user or a customer. Optional when the source type is \"internal-note\".",
        "properties": {
          "email": {
            "type": "string",
            "description": "Primary email address of the customer or user."
          },
          "id": {
            "type": "integer",
            "description": "ID of the customer or user."
          }
        }
      },
      "sender": {
        "type": "object",
        "description": "The person who sent the message. It can be a user or a customer.",
        "properties": {
          "email": {
            "type": "string",
            "description": "Primary email address of the customer or user."
          },
          "id": {
            "type": "integer",
            "description": "ID of the customer or user."
          }
        }
      },
      "sent_datetime": {
        "type": [
          "string",
          "null"
        ],
        "description": "When the message was sent. If ommited, the message will be sent by Gorgias."
      },
      "source": {
        "type": "object",
        "description": "Information used to route the message. It contains the names and the addresses of the sender and receivers.",
        "properties": {
          "bcc": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "A list of BCC addresses. Only present in an email context."
          },
          "cc": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "A list of CC addresses. Only present in an email context."
          },
          "from": {
            "type": "object",
            "description": "A single From address. To and From are usually present for most channel types."
          },
          "to": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "A list of To addresses. To and From are usually present for most channel types."
          },
          "type": {
            "type": "string",
            "description": "Describes a more detailed channel information of how the message was sent/received. Either the slug of a non-legacy channel or one of aircall,api,app,chat,chat-contact-form,chat-offline-capture,contact-form,email,facebook-comment,facebook-message,facebook-messenger,facebook-post,facebook-mention-post,facebook-mention-comment,facebook,facebook-review,facebook-review-comment,form,help-center,helpdesk,instagram-ad-comment,instagram-ad-media,instagram-comment,instagram-mention-comment,instagram-media,instagram-mention-media,instagram,instagram-direct-message,internal-note,ottspott-call,phone,rule,self_service,shopify,sms,system-message,twilio,yotpo-review,yotpo-review-public-comment,yotpo-review-private-comment,twitter-tweet,twitter-quoted-tweet,twitter-mention-tweet,twitter-direct-message,help-center-contact-form,whatsapp-message."
          }
        }
      },
      "subject": {
        "type": [
          "string",
          "null"
        ],
        "description": "The subject of the message."
      },
      "via": {
        "type": "string",
        "description": "How the message has been received, or sent from Gorgias.",
        "enum": [
          "aircall",
          "api",
          "chat",
          "contact_form",
          "email",
          "facebook",
          "facebook-mention",
          "facebook-messenger",
          "facebook-recommendations",
          "form",
          "gorgias_chat",
          "help-center",
          "helpdesk",
          "instagram",
          "instagram-ad-comment",
          "instagram-comment",
          "instagram-direct-message",
          "instagram-mention",
          "internal-note",
          "offline_capture",
          "phone",
          "rule",
          "self_service",
          "shopify",
          "sms",
          "twilio",
          "twitter",
          "twitter-direct-message",
          "whatsapp",
          "yotpo",
          "yotpo-review",
          "zendesk"
        ]
      }
    },
    "required": [
      "PCID",
      "ticket_id",
      "id"
    ]
  }
  ```
</Expandable>

***

## gorgias\_tickets\_update\_ticket\_tags

Set ticket tags

**Parameters:**

| Parameter   | Type       | Required | Default | Description            |
| ----------- | ---------- | -------- | ------- | ---------------------- |
| `ticket_id` | integer    | Yes      | —       | The ID of the ticket.  |
| `ids`       | integer\[] | No       | —       | The IDs of the tags.   |
| `names`     | string\[]  | No       | —       | The names of the tags. |

<Expandable title="inputSchema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "PCID": {
        "type": "string",
        "description": "Pink Connect ID for the authenticated connection"
      },
      "ticket_id": {
        "type": "integer",
        "description": "The ID of the ticket."
      },
      "ids": {
        "type": "array",
        "items": {
          "type": "integer"
        },
        "description": "The IDs of the tags."
      },
      "names": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "The names of the tags."
      }
    },
    "required": [
      "PCID",
      "ticket_id"
    ]
  }
  ```
</Expandable>
