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

# Gorgias API reference

> API reference for the Gorgias plugin in Corsair: every `gorgias.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Account

### createAccountSetting

`account.createAccountSetting`

Gorgias REST: Create a setting.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.account.createAccountSetting({"body":{"type":"x"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   data?: Record<string, JsonValue>,
>   type: string
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   data?: {
>     send_survey_for_chat?: boolean | null,
>     send_survey_for_email?: boolean | null,
>     send_survey_for_contact_form?: boolean | null,
>     send_survey_for_help_center?: boolean | null,
>     survey_email_html?: string | null,
>     survey_email_text?: string | null,
>     survey_interval?: number | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     tickets?: {
>       enabled?: boolean | null,
>       merging_window_days?: number | null
>     } | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     email?: {
>       enabled?: boolean | null,
>       split_after_days?: number | null
>     } | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     business_hours?: {
>       days?: string | null,
>       from_time?: string | null,
>       to_time?: string | null
>     }[] | null,
>     timezone?: Africa/Abidjan | Africa/Accra | Africa/Addis_Ababa | Africa/Algiers | Africa/Asmara | Africa/Asmera | Africa/Bamako | Africa/Bangui | Africa/Banjul | Africa/Bissau | Africa/Blantyre | Africa/Brazzaville | Africa/Bujumbura | Africa/Cairo | Africa/Casablanca | Africa/Ceuta | Africa/Conakry | Africa/Dakar | Africa/Dar_es_Salaam | Africa/Djibouti | Africa/Douala | Africa/El_Aaiun | Africa/Freetown | Africa/Gaborone | Africa/Harare | Africa/Johannesburg | Africa/Juba | Africa/Kampala | Africa/Khartoum | Africa/Kigali | Africa/Kinshasa | Africa/Lagos | Africa/Libreville | Africa/Lome | Africa/Luanda | Africa/Lubumbashi | Africa/Lusaka | Africa/Malabo | Africa/Maputo | Africa/Maseru | Africa/Mbabane | Africa/Mogadishu | Africa/Monrovia | Africa/Nairobi | Africa/Ndjamena | Africa/Niamey | Africa/Nouakchott | Africa/Ouagadougou | Africa/Porto-Novo | Africa/Sao_Tome | Africa/Timbuktu | Africa/Tripoli | Africa/Tunis | Africa/Windhoek | America/Adak | America/Anchorage | America/Anguilla | America/Antigua | America/Araguaina | America/Argentina/Buenos_Aires | America/Argentina/Catamarca | America/Argentina/ComodRivadavia | America/Argentina/Cordoba | America/Argentina/Jujuy | America/Argentina/La_Rioja | America/Argentina/Mendoza | America/Argentina/Rio_Gallegos | America/Argentina/Salta | America/Argentina/San_Juan | America/Argentina/San_Luis | America/Argentina/Tucuman | America/Argentina/Ushuaia | America/Aruba | America/Asuncion | America/Atikokan | America/Atka | America/Bahia | America/Bahia_Banderas | America/Barbados | America/Belem | America/Belize | America/Blanc-Sablon | America/Boa_Vista | America/Bogota | America/Boise | America/Buenos_Aires | America/Cambridge_Bay | America/Campo_Grande | America/Cancun | America/Caracas | America/Catamarca | America/Cayenne | America/Cayman | America/Chicago | America/Chihuahua | America/Ciudad_Juarez | America/Coral_Harbour | America/Cordoba | America/Costa_Rica | America/Coyhaique | America/Creston | America/Cuiaba | America/Curacao | America/Danmarkshavn | America/Dawson | America/Dawson_Creek | America/Denver | America/Detroit | America/Dominica | America/Edmonton | America/Eirunepe | America/El_Salvador | America/Ensenada | America/Fort_Nelson | America/Fort_Wayne | America/Fortaleza | America/Glace_Bay | America/Godthab | America/Goose_Bay | America/Grand_Turk | America/Grenada | America/Guadeloupe | America/Guatemala | America/Guayaquil | America/Guyana | America/Halifax | America/Havana | America/Hermosillo | America/Indiana/Indianapolis | America/Indiana/Knox | America/Indiana/Marengo | America/Indiana/Petersburg | America/Indiana/Tell_City | America/Indiana/Vevay | America/Indiana/Vincennes | America/Indiana/Winamac | America/Indianapolis | America/Inuvik | America/Iqaluit | America/Jamaica | America/Jujuy | America/Juneau | America/Kentucky/Louisville | America/Kentucky/Monticello | America/Knox_IN | America/Kralendijk | America/La_Paz | America/Lima | America/Los_Angeles | America/Louisville | America/Lower_Princes | America/Maceio | America/Managua | America/Manaus | America/Marigot | America/Martinique | America/Matamoros | America/Mazatlan | America/Mendoza | America/Menominee | America/Merida | America/Metlakatla | America/Mexico_City | America/Miquelon | America/Moncton | America/Monterrey | America/Montevideo | America/Montreal | America/Montserrat | America/Nassau | America/New_York | America/Nipigon | America/Nome | America/Noronha | America/North_Dakota/Beulah | America/North_Dakota/Center | America/North_Dakota/New_Salem | America/Nuuk | America/Ojinaga | America/Panama | America/Pangnirtung | America/Paramaribo | America/Phoenix | America/Port-au-Prince | America/Port_of_Spain | America/Porto_Acre | America/Porto_Velho | America/Puerto_Rico | America/Punta_Arenas | America/Rainy_River | America/Rankin_Inlet | America/Recife | America/Regina | America/Resolute | America/Rio_Branco | America/Rosario | America/Santa_Isabel | America/Santarem | America/Santiago | America/Santo_Domingo | America/Sao_Paulo | America/Scoresbysund | America/Shiprock | America/Sitka | America/St_Barthelemy | America/St_Johns | America/St_Kitts | America/St_Lucia | America/St_Thomas | America/St_Vincent | America/Swift_Current | America/Tegucigalpa | America/Thule | America/Thunder_Bay | America/Tijuana | America/Toronto | America/Tortola | America/Vancouver | America/Virgin | America/Whitehorse | America/Winnipeg | America/Yakutat | America/Yellowknife | Antarctica/Casey | Antarctica/Davis | Antarctica/DumontDUrville | Antarctica/Macquarie | Antarctica/Mawson | Antarctica/McMurdo | Antarctica/Palmer | Antarctica/Rothera | Antarctica/South_Pole | Antarctica/Syowa | Antarctica/Troll | Antarctica/Vostok | Arctic/Longyearbyen | Asia/Aden | Asia/Almaty | Asia/Amman | Asia/Anadyr | Asia/Aqtau | Asia/Aqtobe | Asia/Ashgabat | Asia/Ashkhabad | Asia/Atyrau | Asia/Baghdad | Asia/Bahrain | Asia/Baku | Asia/Bangkok | Asia/Barnaul | Asia/Beirut | Asia/Bishkek | Asia/Brunei | Asia/Calcutta | Asia/Chita | Asia/Choibalsan | Asia/Chongqing | Asia/Chungking | Asia/Colombo | Asia/Dacca | Asia/Damascus | Asia/Dhaka | Asia/Dili | Asia/Dubai | Asia/Dushanbe | Asia/Famagusta | Asia/Gaza | Asia/Harbin | Asia/Hebron | Asia/Ho_Chi_Minh | Asia/Hong_Kong | Asia/Hovd | Asia/Irkutsk | Asia/Istanbul | Asia/Jakarta | Asia/Jayapura | Asia/Jerusalem | Asia/Kabul | Asia/Kamchatka | Asia/Karachi | Asia/Kashgar | Asia/Kathmandu | Asia/Katmandu | Asia/Khandyga | Asia/Kolkata | Asia/Krasnoyarsk | Asia/Kuala_Lumpur | Asia/Kuching | Asia/Kuwait | Asia/Macao | Asia/Macau | Asia/Magadan | Asia/Makassar | Asia/Manila | Asia/Muscat | Asia/Nicosia | Asia/Novokuznetsk | Asia/Novosibirsk | Asia/Omsk | Asia/Oral | Asia/Phnom_Penh | Asia/Pontianak | Asia/Pyongyang | Asia/Qatar | Asia/Qostanay | Asia/Qyzylorda | Asia/Rangoon | Asia/Riyadh | Asia/Saigon | Asia/Sakhalin | Asia/Samarkand | Asia/Seoul | Asia/Shanghai | Asia/Singapore | Asia/Srednekolymsk | Asia/Taipei | Asia/Tashkent | Asia/Tbilisi | Asia/Tehran | Asia/Tel_Aviv | Asia/Thimbu | Asia/Thimphu | Asia/Tokyo | Asia/Tomsk | Asia/Ujung_Pandang | Asia/Ulaanbaatar | Asia/Ulan_Bator | Asia/Urumqi | Asia/Ust-Nera | Asia/Vientiane | Asia/Vladivostok | Asia/Yakutsk | Asia/Yangon | Asia/Yekaterinburg | Asia/Yerevan | Atlantic/Azores | Atlantic/Bermuda | Atlantic/Canary | Atlantic/Cape_Verde | Atlantic/Faeroe | Atlantic/Faroe | Atlantic/Jan_Mayen | Atlantic/Madeira | Atlantic/Reykjavik | Atlantic/South_Georgia | Atlantic/St_Helena | Atlantic/Stanley | Australia/ACT | Australia/Adelaide | Australia/Brisbane | Australia/Broken_Hill | Australia/Canberra | Australia/Currie | Australia/Darwin | Australia/Eucla | Australia/Hobart | Australia/LHI | Australia/Lindeman | Australia/Lord_Howe | Australia/Melbourne | Australia/NSW | Australia/North | Australia/Perth | Australia/Queensland | Australia/South | Australia/Sydney | Australia/Tasmania | Australia/Victoria | Australia/West | Australia/Yancowinna | Brazil/Acre | Brazil/DeNoronha | Brazil/East | Brazil/West | CET | CST6CDT | Canada/Atlantic | Canada/Central | Canada/Eastern | Canada/Mountain | Canada/Newfoundland | Canada/Pacific | Canada/Saskatchewan | Canada/Yukon | Chile/Continental | Chile/EasterIsland | Cuba | EET | EST | EST5EDT | Egypt | Eire | Etc/GMT | Etc/GMT+0 | Etc/GMT+1 | Etc/GMT+10 | Etc/GMT+11 | Etc/GMT+12 | Etc/GMT+2 | Etc/GMT+3 | Etc/GMT+4 | Etc/GMT+5 | Etc/GMT+6 | Etc/GMT+7 | Etc/GMT+8 | Etc/GMT+9 | Etc/GMT-0 | Etc/GMT-1 | Etc/GMT-10 | Etc/GMT-11 | Etc/GMT-12 | Etc/GMT-13 | Etc/GMT-14 | Etc/GMT-2 | Etc/GMT-3 | Etc/GMT-4 | Etc/GMT-5 | Etc/GMT-6 | Etc/GMT-7 | Etc/GMT-8 | Etc/GMT-9 | Etc/GMT0 | Etc/Greenwich | Etc/UCT | Etc/UTC | Etc/Universal | Etc/Zulu | Europe/Amsterdam | Europe/Andorra | Europe/Astrakhan | Europe/Athens | Europe/Belfast | Europe/Belgrade | Europe/Berlin | Europe/Bratislava | Europe/Brussels | Europe/Bucharest | Europe/Budapest | Europe/Busingen | Europe/Chisinau | Europe/Copenhagen | Europe/Dublin | Europe/Gibraltar | Europe/Guernsey | Europe/Helsinki | Europe/Isle_of_Man | Europe/Istanbul | Europe/Jersey | Europe/Kaliningrad | Europe/Kiev | Europe/Kirov | Europe/Kyiv | Europe/Lisbon | Europe/Ljubljana | Europe/London | Europe/Luxembourg | Europe/Madrid | Europe/Malta | Europe/Mariehamn | Europe/Minsk | Europe/Monaco | Europe/Moscow | Europe/Nicosia | Europe/Oslo | Europe/Paris | Europe/Podgorica | Europe/Prague | Europe/Riga | Europe/Rome | Europe/Samara | Europe/San_Marino | Europe/Sarajevo | Europe/Saratov | Europe/Simferopol | Europe/Skopje | Europe/Sofia | Europe/Stockholm | Europe/Tallinn | Europe/Tirane | Europe/Tiraspol | Europe/Ulyanovsk | Europe/Uzhgorod | Europe/Vaduz | Europe/Vatican | Europe/Vienna | Europe/Vilnius | Europe/Volgograd | Europe/Warsaw | Europe/Zagreb | Europe/Zaporozhye | Europe/Zurich | GB | GB-Eire | GMT | GMT+0 | GMT-0 | GMT0 | Greenwich | HST | Hongkong | Iceland | Indian/Antananarivo | Indian/Chagos | Indian/Christmas | Indian/Cocos | Indian/Comoro | Indian/Kerguelen | Indian/Mahe | Indian/Maldives | Indian/Mauritius | Indian/Mayotte | Indian/Reunion | Iran | Israel | Jamaica | Japan | Kwajalein | Libya | MET | MST | MST7MDT | Mexico/BajaNorte | Mexico/BajaSur | Mexico/General | NZ | NZ-CHAT | Navajo | PRC | PST8PDT | Pacific/Apia | Pacific/Auckland | Pacific/Bougainville | Pacific/Chatham | Pacific/Chuuk | Pacific/Easter | Pacific/Efate | Pacific/Enderbury | Pacific/Fakaofo | Pacific/Fiji | Pacific/Funafuti | Pacific/Galapagos | Pacific/Gambier | Pacific/Guadalcanal | Pacific/Guam | Pacific/Honolulu | Pacific/Johnston | Pacific/Kanton | Pacific/Kiritimati | Pacific/Kosrae | Pacific/Kwajalein | Pacific/Majuro | Pacific/Marquesas | Pacific/Midway | Pacific/Nauru | Pacific/Niue | Pacific/Norfolk | Pacific/Noumea | Pacific/Pago_Pago | Pacific/Palau | Pacific/Pitcairn | Pacific/Pohnpei | Pacific/Ponape | Pacific/Port_Moresby | Pacific/Rarotonga | Pacific/Saipan | Pacific/Samoa | Pacific/Tahiti | Pacific/Tarawa | Pacific/Tongatapu | Pacific/Truk | Pacific/Wake | Pacific/Wallis | Pacific/Yap | Poland | Portugal | ROC | ROK | Singapore | Turkey | UCT | US/Alaska | US/Aleutian | US/Arizona | US/Central | US/East-Indiana | US/Eastern | US/Hawaii | US/Indiana-Starke | US/Michigan | US/Mountain | US/Pacific | US/Samoa | UTC | Universal | W-SU | WET | Zulu | string | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     assignment_channels?: (google-business-messages | tiktok-shop | aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | help-center | instagram-ad-comment | instagram-comment | instagram-mention | instagram-direct-message | internal-note | phone | sms | twitter | twitter-direct-message | yotpo-review | whatsapp | custom-chat | string)[] | null,
>     auto_assign_to_teams?: boolean | null,
>     unassign_on_reply?: boolean | null,
>     unassign_on_user_unavailability?: (chat | string)[] | null,
>     can_exceed_max_agent_capacity?: boolean | null,
>     auto_assign_ticket_to_responding_agent?: boolean | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     views?: Record<string, JsonValue> | null,
>     view_sections?: Record<string, JsonValue> | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     signup_mode?: invite | allowed-domains | string | null,
>     allowed_domains?: string[] | null,
>     google_sso_enabled?: boolean | null,
>     office365_sso_enabled?: boolean | null,
>     two_fa_enforced_datetime?: string | null,
>     skip_2fa_after_sso_datetime?: string | null,
>     sso_enforced_datetime?: string | null,
>     custom_sso_providers?: Record<string, {
>       name?: string | null,
>       client_id?: string | null,
>       client_secret?: string | null,
>       server_metadata_url?: string | null
>     }> | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     hidden_views?: number[] | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     active_view?: string | null,
>     views?: {
>       id?: string | null,
>       name?: string | null,
>       metrics?: {
>         id?: string | null,
>         visibility?: boolean | null
>       }[] | null,
>       rows?: Record<string, JsonValue> | null
>     }[] | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     active_view?: string | null,
>     views?: {
>       id?: string | null,
>       name?: string | null,
>       metrics?: {
>         id?: string | null,
>         visibility?: boolean | null
>       }[] | null,
>       rows?: Record<string, JsonValue> | null
>     }[] | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     active_view?: string | null,
>     views?: {
>       id?: string | null,
>       name?: string | null,
>       metrics?: {
>         id?: string | null,
>         visibility?: boolean | null
>       }[] | null,
>       rows?: Record<string, JsonValue> | null
>     }[] | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     active_view?: string | null,
>     views?: {
>       id?: string | null,
>       name?: string | null,
>       metrics?: {
>         id?: string | null,
>         visibility?: boolean | null
>       }[] | null,
>       rows?: Record<string, JsonValue> | null
>     }[] | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     is_demo_hidden?: boolean | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     agent_cost_type?: yearly | hourly | string | null,
>     agent_cost_per_ticket?: number | null,
>     agent_ticket_per_hour?: number | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     max_integrations?: number | null,
>     max_active_rules?: number | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: Record<string, JsonValue> | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     gaia?: number | null
>   } | null,
>   type?: string | null
> }
> ```

***

### getAccount

`account.getAccount`

Gorgias REST: Retrieve your account.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.account.getAccount({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `domain` | `string \| null` | No | — |
| `settings` | `object[] \| null` | No | — |
| `status` | `Record<string, JsonValue> \| null` | No | — |

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   data?: Record<string, JsonValue> | null,
>   type?: string | null
> }[] | null
> ```

***

### listAccountSettings

`account.listAccountSettings`

Gorgias REST: List settings.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.account.listAccountSettings({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   type?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> (
>   {
>     id?: number | null,
>     data?: {
>       send_survey_for_chat?: boolean | null,
>       send_survey_for_email?: boolean | null,
>       send_survey_for_contact_form?: boolean | null,
>       send_survey_for_help_center?: boolean | null,
>       survey_email_html?: string | null,
>       survey_email_text?: string | null,
>       survey_interval?: number | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       tickets?: {
>         enabled?: boolean | null,
>         merging_window_days?: number | null
>       } | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       email?: {
>         enabled?: boolean | null,
>         split_after_days?: number | null
>       } | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       business_hours?: {
>         days?: string | null,
>         from_time?: string | null,
>         to_time?: string | null
>       }[] | null,
>       timezone?: Africa/Abidjan | Africa/Accra | Africa/Addis_Ababa | Africa/Algiers | Africa/Asmara | Africa/Asmera | Africa/Bamako | Africa/Bangui | Africa/Banjul | Africa/Bissau | Africa/Blantyre | Africa/Brazzaville | Africa/Bujumbura | Africa/Cairo | Africa/Casablanca | Africa/Ceuta | Africa/Conakry | Africa/Dakar | Africa/Dar_es_Salaam | Africa/Djibouti | Africa/Douala | Africa/El_Aaiun | Africa/Freetown | Africa/Gaborone | Africa/Harare | Africa/Johannesburg | Africa/Juba | Africa/Kampala | Africa/Khartoum | Africa/Kigali | Africa/Kinshasa | Africa/Lagos | Africa/Libreville | Africa/Lome | Africa/Luanda | Africa/Lubumbashi | Africa/Lusaka | Africa/Malabo | Africa/Maputo | Africa/Maseru | Africa/Mbabane | Africa/Mogadishu | Africa/Monrovia | Africa/Nairobi | Africa/Ndjamena | Africa/Niamey | Africa/Nouakchott | Africa/Ouagadougou | Africa/Porto-Novo | Africa/Sao_Tome | Africa/Timbuktu | Africa/Tripoli | Africa/Tunis | Africa/Windhoek | America/Adak | America/Anchorage | America/Anguilla | America/Antigua | America/Araguaina | America/Argentina/Buenos_Aires | America/Argentina/Catamarca | America/Argentina/ComodRivadavia | America/Argentina/Cordoba | America/Argentina/Jujuy | America/Argentina/La_Rioja | America/Argentina/Mendoza | America/Argentina/Rio_Gallegos | America/Argentina/Salta | America/Argentina/San_Juan | America/Argentina/San_Luis | America/Argentina/Tucuman | America/Argentina/Ushuaia | America/Aruba | America/Asuncion | America/Atikokan | America/Atka | America/Bahia | America/Bahia_Banderas | America/Barbados | America/Belem | America/Belize | America/Blanc-Sablon | America/Boa_Vista | America/Bogota | America/Boise | America/Buenos_Aires | America/Cambridge_Bay | America/Campo_Grande | America/Cancun | America/Caracas | America/Catamarca | America/Cayenne | America/Cayman | America/Chicago | America/Chihuahua | America/Ciudad_Juarez | America/Coral_Harbour | America/Cordoba | America/Costa_Rica | America/Coyhaique | America/Creston | America/Cuiaba | America/Curacao | America/Danmarkshavn | America/Dawson | America/Dawson_Creek | America/Denver | America/Detroit | America/Dominica | America/Edmonton | America/Eirunepe | America/El_Salvador | America/Ensenada | America/Fort_Nelson | America/Fort_Wayne | America/Fortaleza | America/Glace_Bay | America/Godthab | America/Goose_Bay | America/Grand_Turk | America/Grenada | America/Guadeloupe | America/Guatemala | America/Guayaquil | America/Guyana | America/Halifax | America/Havana | America/Hermosillo | America/Indiana/Indianapolis | America/Indiana/Knox | America/Indiana/Marengo | America/Indiana/Petersburg | America/Indiana/Tell_City | America/Indiana/Vevay | America/Indiana/Vincennes | America/Indiana/Winamac | America/Indianapolis | America/Inuvik | America/Iqaluit | America/Jamaica | America/Jujuy | America/Juneau | America/Kentucky/Louisville | America/Kentucky/Monticello | America/Knox_IN | America/Kralendijk | America/La_Paz | America/Lima | America/Los_Angeles | America/Louisville | America/Lower_Princes | America/Maceio | America/Managua | America/Manaus | America/Marigot | America/Martinique | America/Matamoros | America/Mazatlan | America/Mendoza | America/Menominee | America/Merida | America/Metlakatla | America/Mexico_City | America/Miquelon | America/Moncton | America/Monterrey | America/Montevideo | America/Montreal | America/Montserrat | America/Nassau | America/New_York | America/Nipigon | America/Nome | America/Noronha | America/North_Dakota/Beulah | America/North_Dakota/Center | America/North_Dakota/New_Salem | America/Nuuk | America/Ojinaga | America/Panama | America/Pangnirtung | America/Paramaribo | America/Phoenix | America/Port-au-Prince | America/Port_of_Spain | America/Porto_Acre | America/Porto_Velho | America/Puerto_Rico | America/Punta_Arenas | America/Rainy_River | America/Rankin_Inlet | America/Recife | America/Regina | America/Resolute | America/Rio_Branco | America/Rosario | America/Santa_Isabel | America/Santarem | America/Santiago | America/Santo_Domingo | America/Sao_Paulo | America/Scoresbysund | America/Shiprock | America/Sitka | America/St_Barthelemy | America/St_Johns | America/St_Kitts | America/St_Lucia | America/St_Thomas | America/St_Vincent | America/Swift_Current | America/Tegucigalpa | America/Thule | America/Thunder_Bay | America/Tijuana | America/Toronto | America/Tortola | America/Vancouver | America/Virgin | America/Whitehorse | America/Winnipeg | America/Yakutat | America/Yellowknife | Antarctica/Casey | Antarctica/Davis | Antarctica/DumontDUrville | Antarctica/Macquarie | Antarctica/Mawson | Antarctica/McMurdo | Antarctica/Palmer | Antarctica/Rothera | Antarctica/South_Pole | Antarctica/Syowa | Antarctica/Troll | Antarctica/Vostok | Arctic/Longyearbyen | Asia/Aden | Asia/Almaty | Asia/Amman | Asia/Anadyr | Asia/Aqtau | Asia/Aqtobe | Asia/Ashgabat | Asia/Ashkhabad | Asia/Atyrau | Asia/Baghdad | Asia/Bahrain | Asia/Baku | Asia/Bangkok | Asia/Barnaul | Asia/Beirut | Asia/Bishkek | Asia/Brunei | Asia/Calcutta | Asia/Chita | Asia/Choibalsan | Asia/Chongqing | Asia/Chungking | Asia/Colombo | Asia/Dacca | Asia/Damascus | Asia/Dhaka | Asia/Dili | Asia/Dubai | Asia/Dushanbe | Asia/Famagusta | Asia/Gaza | Asia/Harbin | Asia/Hebron | Asia/Ho_Chi_Minh | Asia/Hong_Kong | Asia/Hovd | Asia/Irkutsk | Asia/Istanbul | Asia/Jakarta | Asia/Jayapura | Asia/Jerusalem | Asia/Kabul | Asia/Kamchatka | Asia/Karachi | Asia/Kashgar | Asia/Kathmandu | Asia/Katmandu | Asia/Khandyga | Asia/Kolkata | Asia/Krasnoyarsk | Asia/Kuala_Lumpur | Asia/Kuching | Asia/Kuwait | Asia/Macao | Asia/Macau | Asia/Magadan | Asia/Makassar | Asia/Manila | Asia/Muscat | Asia/Nicosia | Asia/Novokuznetsk | Asia/Novosibirsk | Asia/Omsk | Asia/Oral | Asia/Phnom_Penh | Asia/Pontianak | Asia/Pyongyang | Asia/Qatar | Asia/Qostanay | Asia/Qyzylorda | Asia/Rangoon | Asia/Riyadh | Asia/Saigon | Asia/Sakhalin | Asia/Samarkand | Asia/Seoul | Asia/Shanghai | Asia/Singapore | Asia/Srednekolymsk | Asia/Taipei | Asia/Tashkent | Asia/Tbilisi | Asia/Tehran | Asia/Tel_Aviv | Asia/Thimbu | Asia/Thimphu | Asia/Tokyo | Asia/Tomsk | Asia/Ujung_Pandang | Asia/Ulaanbaatar | Asia/Ulan_Bator | Asia/Urumqi | Asia/Ust-Nera | Asia/Vientiane | Asia/Vladivostok | Asia/Yakutsk | Asia/Yangon | Asia/Yekaterinburg | Asia/Yerevan | Atlantic/Azores | Atlantic/Bermuda | Atlantic/Canary | Atlantic/Cape_Verde | Atlantic/Faeroe | Atlantic/Faroe | Atlantic/Jan_Mayen | Atlantic/Madeira | Atlantic/Reykjavik | Atlantic/South_Georgia | Atlantic/St_Helena | Atlantic/Stanley | Australia/ACT | Australia/Adelaide | Australia/Brisbane | Australia/Broken_Hill | Australia/Canberra | Australia/Currie | Australia/Darwin | Australia/Eucla | Australia/Hobart | Australia/LHI | Australia/Lindeman | Australia/Lord_Howe | Australia/Melbourne | Australia/NSW | Australia/North | Australia/Perth | Australia/Queensland | Australia/South | Australia/Sydney | Australia/Tasmania | Australia/Victoria | Australia/West | Australia/Yancowinna | Brazil/Acre | Brazil/DeNoronha | Brazil/East | Brazil/West | CET | CST6CDT | Canada/Atlantic | Canada/Central | Canada/Eastern | Canada/Mountain | Canada/Newfoundland | Canada/Pacific | Canada/Saskatchewan | Canada/Yukon | Chile/Continental | Chile/EasterIsland | Cuba | EET | EST | EST5EDT | Egypt | Eire | Etc/GMT | Etc/GMT+0 | Etc/GMT+1 | Etc/GMT+10 | Etc/GMT+11 | Etc/GMT+12 | Etc/GMT+2 | Etc/GMT+3 | Etc/GMT+4 | Etc/GMT+5 | Etc/GMT+6 | Etc/GMT+7 | Etc/GMT+8 | Etc/GMT+9 | Etc/GMT-0 | Etc/GMT-1 | Etc/GMT-10 | Etc/GMT-11 | Etc/GMT-12 | Etc/GMT-13 | Etc/GMT-14 | Etc/GMT-2 | Etc/GMT-3 | Etc/GMT-4 | Etc/GMT-5 | Etc/GMT-6 | Etc/GMT-7 | Etc/GMT-8 | Etc/GMT-9 | Etc/GMT0 | Etc/Greenwich | Etc/UCT | Etc/UTC | Etc/Universal | Etc/Zulu | Europe/Amsterdam | Europe/Andorra | Europe/Astrakhan | Europe/Athens | Europe/Belfast | Europe/Belgrade | Europe/Berlin | Europe/Bratislava | Europe/Brussels | Europe/Bucharest | Europe/Budapest | Europe/Busingen | Europe/Chisinau | Europe/Copenhagen | Europe/Dublin | Europe/Gibraltar | Europe/Guernsey | Europe/Helsinki | Europe/Isle_of_Man | Europe/Istanbul | Europe/Jersey | Europe/Kaliningrad | Europe/Kiev | Europe/Kirov | Europe/Kyiv | Europe/Lisbon | Europe/Ljubljana | Europe/London | Europe/Luxembourg | Europe/Madrid | Europe/Malta | Europe/Mariehamn | Europe/Minsk | Europe/Monaco | Europe/Moscow | Europe/Nicosia | Europe/Oslo | Europe/Paris | Europe/Podgorica | Europe/Prague | Europe/Riga | Europe/Rome | Europe/Samara | Europe/San_Marino | Europe/Sarajevo | Europe/Saratov | Europe/Simferopol | Europe/Skopje | Europe/Sofia | Europe/Stockholm | Europe/Tallinn | Europe/Tirane | Europe/Tiraspol | Europe/Ulyanovsk | Europe/Uzhgorod | Europe/Vaduz | Europe/Vatican | Europe/Vienna | Europe/Vilnius | Europe/Volgograd | Europe/Warsaw | Europe/Zagreb | Europe/Zaporozhye | Europe/Zurich | GB | GB-Eire | GMT | GMT+0 | GMT-0 | GMT0 | Greenwich | HST | Hongkong | Iceland | Indian/Antananarivo | Indian/Chagos | Indian/Christmas | Indian/Cocos | Indian/Comoro | Indian/Kerguelen | Indian/Mahe | Indian/Maldives | Indian/Mauritius | Indian/Mayotte | Indian/Reunion | Iran | Israel | Jamaica | Japan | Kwajalein | Libya | MET | MST | MST7MDT | Mexico/BajaNorte | Mexico/BajaSur | Mexico/General | NZ | NZ-CHAT | Navajo | PRC | PST8PDT | Pacific/Apia | Pacific/Auckland | Pacific/Bougainville | Pacific/Chatham | Pacific/Chuuk | Pacific/Easter | Pacific/Efate | Pacific/Enderbury | Pacific/Fakaofo | Pacific/Fiji | Pacific/Funafuti | Pacific/Galapagos | Pacific/Gambier | Pacific/Guadalcanal | Pacific/Guam | Pacific/Honolulu | Pacific/Johnston | Pacific/Kanton | Pacific/Kiritimati | Pacific/Kosrae | Pacific/Kwajalein | Pacific/Majuro | Pacific/Marquesas | Pacific/Midway | Pacific/Nauru | Pacific/Niue | Pacific/Norfolk | Pacific/Noumea | Pacific/Pago_Pago | Pacific/Palau | Pacific/Pitcairn | Pacific/Pohnpei | Pacific/Ponape | Pacific/Port_Moresby | Pacific/Rarotonga | Pacific/Saipan | Pacific/Samoa | Pacific/Tahiti | Pacific/Tarawa | Pacific/Tongatapu | Pacific/Truk | Pacific/Wake | Pacific/Wallis | Pacific/Yap | Poland | Portugal | ROC | ROK | Singapore | Turkey | UCT | US/Alaska | US/Aleutian | US/Arizona | US/Central | US/East-Indiana | US/Eastern | US/Hawaii | US/Indiana-Starke | US/Michigan | US/Mountain | US/Pacific | US/Samoa | UTC | Universal | W-SU | WET | Zulu | string | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       assignment_channels?: (google-business-messages | tiktok-shop | aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | help-center | instagram-ad-comment | instagram-comment | instagram-mention | instagram-direct-message | internal-note | phone | sms | twitter | twitter-direct-message | yotpo-review | whatsapp | custom-chat | string)[] | null,
>       auto_assign_to_teams?: boolean | null,
>       unassign_on_reply?: boolean | null,
>       unassign_on_user_unavailability?: (chat | string)[] | null,
>       can_exceed_max_agent_capacity?: boolean | null,
>       auto_assign_ticket_to_responding_agent?: boolean | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       views?: Record<string, JsonValue> | null,
>       view_sections?: Record<string, JsonValue> | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       signup_mode?: invite | allowed-domains | string | null,
>       allowed_domains?: string[] | null,
>       google_sso_enabled?: boolean | null,
>       office365_sso_enabled?: boolean | null,
>       two_fa_enforced_datetime?: string | null,
>       skip_2fa_after_sso_datetime?: string | null,
>       sso_enforced_datetime?: string | null,
>       custom_sso_providers?: Record<string, {
>         name?: string | null,
>         client_id?: string | null,
>         client_secret?: string | null,
>         server_metadata_url?: string | null
>       }> | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       hidden_views?: number[] | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       active_view?: string | null,
>       views?: {
>         id?: string | null,
>         name?: string | null,
>         metrics?: {
>           id?: string | null,
>           visibility?: boolean | null
>         }[] | null,
>         rows?: Record<string, JsonValue> | null
>       }[] | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       active_view?: string | null,
>       views?: {
>         id?: string | null,
>         name?: string | null,
>         metrics?: {
>           id?: string | null,
>           visibility?: boolean | null
>         }[] | null,
>         rows?: Record<string, JsonValue> | null
>       }[] | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       active_view?: string | null,
>       views?: {
>         id?: string | null,
>         name?: string | null,
>         metrics?: {
>           id?: string | null,
>           visibility?: boolean | null
>         }[] | null,
>         rows?: Record<string, JsonValue> | null
>       }[] | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       active_view?: string | null,
>       views?: {
>         id?: string | null,
>         name?: string | null,
>         metrics?: {
>           id?: string | null,
>           visibility?: boolean | null
>         }[] | null,
>         rows?: Record<string, JsonValue> | null
>       }[] | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       is_demo_hidden?: boolean | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       agent_cost_type?: yearly | hourly | string | null,
>       agent_cost_per_ticket?: number | null,
>       agent_ticket_per_hour?: number | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       max_integrations?: number | null,
>       max_active_rules?: number | null
>     } | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: Record<string, JsonValue> | null,
>     type?: string | null
>   } | {
>     id?: number | null,
>     data?: {
>       gaia?: number | null
>     } | null,
>     type?: string | null
>   }
> )[] | null
> ```

***

### updateAccountSetting

`account.updateAccountSetting`

Gorgias REST: Update a setting.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.account.updateAccountSetting({"path":{"id":1},"body":{"type":"x"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   data?: Record<string, JsonValue>,
>   type: string
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   data?: {
>     send_survey_for_chat?: boolean | null,
>     send_survey_for_email?: boolean | null,
>     send_survey_for_contact_form?: boolean | null,
>     send_survey_for_help_center?: boolean | null,
>     survey_email_html?: string | null,
>     survey_email_text?: string | null,
>     survey_interval?: number | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     tickets?: {
>       enabled?: boolean | null,
>       merging_window_days?: number | null
>     } | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     email?: {
>       enabled?: boolean | null,
>       split_after_days?: number | null
>     } | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     business_hours?: {
>       days?: string | null,
>       from_time?: string | null,
>       to_time?: string | null
>     }[] | null,
>     timezone?: Africa/Abidjan | Africa/Accra | Africa/Addis_Ababa | Africa/Algiers | Africa/Asmara | Africa/Asmera | Africa/Bamako | Africa/Bangui | Africa/Banjul | Africa/Bissau | Africa/Blantyre | Africa/Brazzaville | Africa/Bujumbura | Africa/Cairo | Africa/Casablanca | Africa/Ceuta | Africa/Conakry | Africa/Dakar | Africa/Dar_es_Salaam | Africa/Djibouti | Africa/Douala | Africa/El_Aaiun | Africa/Freetown | Africa/Gaborone | Africa/Harare | Africa/Johannesburg | Africa/Juba | Africa/Kampala | Africa/Khartoum | Africa/Kigali | Africa/Kinshasa | Africa/Lagos | Africa/Libreville | Africa/Lome | Africa/Luanda | Africa/Lubumbashi | Africa/Lusaka | Africa/Malabo | Africa/Maputo | Africa/Maseru | Africa/Mbabane | Africa/Mogadishu | Africa/Monrovia | Africa/Nairobi | Africa/Ndjamena | Africa/Niamey | Africa/Nouakchott | Africa/Ouagadougou | Africa/Porto-Novo | Africa/Sao_Tome | Africa/Timbuktu | Africa/Tripoli | Africa/Tunis | Africa/Windhoek | America/Adak | America/Anchorage | America/Anguilla | America/Antigua | America/Araguaina | America/Argentina/Buenos_Aires | America/Argentina/Catamarca | America/Argentina/ComodRivadavia | America/Argentina/Cordoba | America/Argentina/Jujuy | America/Argentina/La_Rioja | America/Argentina/Mendoza | America/Argentina/Rio_Gallegos | America/Argentina/Salta | America/Argentina/San_Juan | America/Argentina/San_Luis | America/Argentina/Tucuman | America/Argentina/Ushuaia | America/Aruba | America/Asuncion | America/Atikokan | America/Atka | America/Bahia | America/Bahia_Banderas | America/Barbados | America/Belem | America/Belize | America/Blanc-Sablon | America/Boa_Vista | America/Bogota | America/Boise | America/Buenos_Aires | America/Cambridge_Bay | America/Campo_Grande | America/Cancun | America/Caracas | America/Catamarca | America/Cayenne | America/Cayman | America/Chicago | America/Chihuahua | America/Ciudad_Juarez | America/Coral_Harbour | America/Cordoba | America/Costa_Rica | America/Coyhaique | America/Creston | America/Cuiaba | America/Curacao | America/Danmarkshavn | America/Dawson | America/Dawson_Creek | America/Denver | America/Detroit | America/Dominica | America/Edmonton | America/Eirunepe | America/El_Salvador | America/Ensenada | America/Fort_Nelson | America/Fort_Wayne | America/Fortaleza | America/Glace_Bay | America/Godthab | America/Goose_Bay | America/Grand_Turk | America/Grenada | America/Guadeloupe | America/Guatemala | America/Guayaquil | America/Guyana | America/Halifax | America/Havana | America/Hermosillo | America/Indiana/Indianapolis | America/Indiana/Knox | America/Indiana/Marengo | America/Indiana/Petersburg | America/Indiana/Tell_City | America/Indiana/Vevay | America/Indiana/Vincennes | America/Indiana/Winamac | America/Indianapolis | America/Inuvik | America/Iqaluit | America/Jamaica | America/Jujuy | America/Juneau | America/Kentucky/Louisville | America/Kentucky/Monticello | America/Knox_IN | America/Kralendijk | America/La_Paz | America/Lima | America/Los_Angeles | America/Louisville | America/Lower_Princes | America/Maceio | America/Managua | America/Manaus | America/Marigot | America/Martinique | America/Matamoros | America/Mazatlan | America/Mendoza | America/Menominee | America/Merida | America/Metlakatla | America/Mexico_City | America/Miquelon | America/Moncton | America/Monterrey | America/Montevideo | America/Montreal | America/Montserrat | America/Nassau | America/New_York | America/Nipigon | America/Nome | America/Noronha | America/North_Dakota/Beulah | America/North_Dakota/Center | America/North_Dakota/New_Salem | America/Nuuk | America/Ojinaga | America/Panama | America/Pangnirtung | America/Paramaribo | America/Phoenix | America/Port-au-Prince | America/Port_of_Spain | America/Porto_Acre | America/Porto_Velho | America/Puerto_Rico | America/Punta_Arenas | America/Rainy_River | America/Rankin_Inlet | America/Recife | America/Regina | America/Resolute | America/Rio_Branco | America/Rosario | America/Santa_Isabel | America/Santarem | America/Santiago | America/Santo_Domingo | America/Sao_Paulo | America/Scoresbysund | America/Shiprock | America/Sitka | America/St_Barthelemy | America/St_Johns | America/St_Kitts | America/St_Lucia | America/St_Thomas | America/St_Vincent | America/Swift_Current | America/Tegucigalpa | America/Thule | America/Thunder_Bay | America/Tijuana | America/Toronto | America/Tortola | America/Vancouver | America/Virgin | America/Whitehorse | America/Winnipeg | America/Yakutat | America/Yellowknife | Antarctica/Casey | Antarctica/Davis | Antarctica/DumontDUrville | Antarctica/Macquarie | Antarctica/Mawson | Antarctica/McMurdo | Antarctica/Palmer | Antarctica/Rothera | Antarctica/South_Pole | Antarctica/Syowa | Antarctica/Troll | Antarctica/Vostok | Arctic/Longyearbyen | Asia/Aden | Asia/Almaty | Asia/Amman | Asia/Anadyr | Asia/Aqtau | Asia/Aqtobe | Asia/Ashgabat | Asia/Ashkhabad | Asia/Atyrau | Asia/Baghdad | Asia/Bahrain | Asia/Baku | Asia/Bangkok | Asia/Barnaul | Asia/Beirut | Asia/Bishkek | Asia/Brunei | Asia/Calcutta | Asia/Chita | Asia/Choibalsan | Asia/Chongqing | Asia/Chungking | Asia/Colombo | Asia/Dacca | Asia/Damascus | Asia/Dhaka | Asia/Dili | Asia/Dubai | Asia/Dushanbe | Asia/Famagusta | Asia/Gaza | Asia/Harbin | Asia/Hebron | Asia/Ho_Chi_Minh | Asia/Hong_Kong | Asia/Hovd | Asia/Irkutsk | Asia/Istanbul | Asia/Jakarta | Asia/Jayapura | Asia/Jerusalem | Asia/Kabul | Asia/Kamchatka | Asia/Karachi | Asia/Kashgar | Asia/Kathmandu | Asia/Katmandu | Asia/Khandyga | Asia/Kolkata | Asia/Krasnoyarsk | Asia/Kuala_Lumpur | Asia/Kuching | Asia/Kuwait | Asia/Macao | Asia/Macau | Asia/Magadan | Asia/Makassar | Asia/Manila | Asia/Muscat | Asia/Nicosia | Asia/Novokuznetsk | Asia/Novosibirsk | Asia/Omsk | Asia/Oral | Asia/Phnom_Penh | Asia/Pontianak | Asia/Pyongyang | Asia/Qatar | Asia/Qostanay | Asia/Qyzylorda | Asia/Rangoon | Asia/Riyadh | Asia/Saigon | Asia/Sakhalin | Asia/Samarkand | Asia/Seoul | Asia/Shanghai | Asia/Singapore | Asia/Srednekolymsk | Asia/Taipei | Asia/Tashkent | Asia/Tbilisi | Asia/Tehran | Asia/Tel_Aviv | Asia/Thimbu | Asia/Thimphu | Asia/Tokyo | Asia/Tomsk | Asia/Ujung_Pandang | Asia/Ulaanbaatar | Asia/Ulan_Bator | Asia/Urumqi | Asia/Ust-Nera | Asia/Vientiane | Asia/Vladivostok | Asia/Yakutsk | Asia/Yangon | Asia/Yekaterinburg | Asia/Yerevan | Atlantic/Azores | Atlantic/Bermuda | Atlantic/Canary | Atlantic/Cape_Verde | Atlantic/Faeroe | Atlantic/Faroe | Atlantic/Jan_Mayen | Atlantic/Madeira | Atlantic/Reykjavik | Atlantic/South_Georgia | Atlantic/St_Helena | Atlantic/Stanley | Australia/ACT | Australia/Adelaide | Australia/Brisbane | Australia/Broken_Hill | Australia/Canberra | Australia/Currie | Australia/Darwin | Australia/Eucla | Australia/Hobart | Australia/LHI | Australia/Lindeman | Australia/Lord_Howe | Australia/Melbourne | Australia/NSW | Australia/North | Australia/Perth | Australia/Queensland | Australia/South | Australia/Sydney | Australia/Tasmania | Australia/Victoria | Australia/West | Australia/Yancowinna | Brazil/Acre | Brazil/DeNoronha | Brazil/East | Brazil/West | CET | CST6CDT | Canada/Atlantic | Canada/Central | Canada/Eastern | Canada/Mountain | Canada/Newfoundland | Canada/Pacific | Canada/Saskatchewan | Canada/Yukon | Chile/Continental | Chile/EasterIsland | Cuba | EET | EST | EST5EDT | Egypt | Eire | Etc/GMT | Etc/GMT+0 | Etc/GMT+1 | Etc/GMT+10 | Etc/GMT+11 | Etc/GMT+12 | Etc/GMT+2 | Etc/GMT+3 | Etc/GMT+4 | Etc/GMT+5 | Etc/GMT+6 | Etc/GMT+7 | Etc/GMT+8 | Etc/GMT+9 | Etc/GMT-0 | Etc/GMT-1 | Etc/GMT-10 | Etc/GMT-11 | Etc/GMT-12 | Etc/GMT-13 | Etc/GMT-14 | Etc/GMT-2 | Etc/GMT-3 | Etc/GMT-4 | Etc/GMT-5 | Etc/GMT-6 | Etc/GMT-7 | Etc/GMT-8 | Etc/GMT-9 | Etc/GMT0 | Etc/Greenwich | Etc/UCT | Etc/UTC | Etc/Universal | Etc/Zulu | Europe/Amsterdam | Europe/Andorra | Europe/Astrakhan | Europe/Athens | Europe/Belfast | Europe/Belgrade | Europe/Berlin | Europe/Bratislava | Europe/Brussels | Europe/Bucharest | Europe/Budapest | Europe/Busingen | Europe/Chisinau | Europe/Copenhagen | Europe/Dublin | Europe/Gibraltar | Europe/Guernsey | Europe/Helsinki | Europe/Isle_of_Man | Europe/Istanbul | Europe/Jersey | Europe/Kaliningrad | Europe/Kiev | Europe/Kirov | Europe/Kyiv | Europe/Lisbon | Europe/Ljubljana | Europe/London | Europe/Luxembourg | Europe/Madrid | Europe/Malta | Europe/Mariehamn | Europe/Minsk | Europe/Monaco | Europe/Moscow | Europe/Nicosia | Europe/Oslo | Europe/Paris | Europe/Podgorica | Europe/Prague | Europe/Riga | Europe/Rome | Europe/Samara | Europe/San_Marino | Europe/Sarajevo | Europe/Saratov | Europe/Simferopol | Europe/Skopje | Europe/Sofia | Europe/Stockholm | Europe/Tallinn | Europe/Tirane | Europe/Tiraspol | Europe/Ulyanovsk | Europe/Uzhgorod | Europe/Vaduz | Europe/Vatican | Europe/Vienna | Europe/Vilnius | Europe/Volgograd | Europe/Warsaw | Europe/Zagreb | Europe/Zaporozhye | Europe/Zurich | GB | GB-Eire | GMT | GMT+0 | GMT-0 | GMT0 | Greenwich | HST | Hongkong | Iceland | Indian/Antananarivo | Indian/Chagos | Indian/Christmas | Indian/Cocos | Indian/Comoro | Indian/Kerguelen | Indian/Mahe | Indian/Maldives | Indian/Mauritius | Indian/Mayotte | Indian/Reunion | Iran | Israel | Jamaica | Japan | Kwajalein | Libya | MET | MST | MST7MDT | Mexico/BajaNorte | Mexico/BajaSur | Mexico/General | NZ | NZ-CHAT | Navajo | PRC | PST8PDT | Pacific/Apia | Pacific/Auckland | Pacific/Bougainville | Pacific/Chatham | Pacific/Chuuk | Pacific/Easter | Pacific/Efate | Pacific/Enderbury | Pacific/Fakaofo | Pacific/Fiji | Pacific/Funafuti | Pacific/Galapagos | Pacific/Gambier | Pacific/Guadalcanal | Pacific/Guam | Pacific/Honolulu | Pacific/Johnston | Pacific/Kanton | Pacific/Kiritimati | Pacific/Kosrae | Pacific/Kwajalein | Pacific/Majuro | Pacific/Marquesas | Pacific/Midway | Pacific/Nauru | Pacific/Niue | Pacific/Norfolk | Pacific/Noumea | Pacific/Pago_Pago | Pacific/Palau | Pacific/Pitcairn | Pacific/Pohnpei | Pacific/Ponape | Pacific/Port_Moresby | Pacific/Rarotonga | Pacific/Saipan | Pacific/Samoa | Pacific/Tahiti | Pacific/Tarawa | Pacific/Tongatapu | Pacific/Truk | Pacific/Wake | Pacific/Wallis | Pacific/Yap | Poland | Portugal | ROC | ROK | Singapore | Turkey | UCT | US/Alaska | US/Aleutian | US/Arizona | US/Central | US/East-Indiana | US/Eastern | US/Hawaii | US/Indiana-Starke | US/Michigan | US/Mountain | US/Pacific | US/Samoa | UTC | Universal | W-SU | WET | Zulu | string | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     assignment_channels?: (google-business-messages | tiktok-shop | aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | help-center | instagram-ad-comment | instagram-comment | instagram-mention | instagram-direct-message | internal-note | phone | sms | twitter | twitter-direct-message | yotpo-review | whatsapp | custom-chat | string)[] | null,
>     auto_assign_to_teams?: boolean | null,
>     unassign_on_reply?: boolean | null,
>     unassign_on_user_unavailability?: (chat | string)[] | null,
>     can_exceed_max_agent_capacity?: boolean | null,
>     auto_assign_ticket_to_responding_agent?: boolean | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     views?: Record<string, JsonValue> | null,
>     view_sections?: Record<string, JsonValue> | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     signup_mode?: invite | allowed-domains | string | null,
>     allowed_domains?: string[] | null,
>     google_sso_enabled?: boolean | null,
>     office365_sso_enabled?: boolean | null,
>     two_fa_enforced_datetime?: string | null,
>     skip_2fa_after_sso_datetime?: string | null,
>     sso_enforced_datetime?: string | null,
>     custom_sso_providers?: Record<string, {
>       name?: string | null,
>       client_id?: string | null,
>       client_secret?: string | null,
>       server_metadata_url?: string | null
>     }> | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     hidden_views?: number[] | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     active_view?: string | null,
>     views?: {
>       id?: string | null,
>       name?: string | null,
>       metrics?: {
>         id?: string | null,
>         visibility?: boolean | null
>       }[] | null,
>       rows?: Record<string, JsonValue> | null
>     }[] | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     active_view?: string | null,
>     views?: {
>       id?: string | null,
>       name?: string | null,
>       metrics?: {
>         id?: string | null,
>         visibility?: boolean | null
>       }[] | null,
>       rows?: Record<string, JsonValue> | null
>     }[] | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     active_view?: string | null,
>     views?: {
>       id?: string | null,
>       name?: string | null,
>       metrics?: {
>         id?: string | null,
>         visibility?: boolean | null
>       }[] | null,
>       rows?: Record<string, JsonValue> | null
>     }[] | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     active_view?: string | null,
>     views?: {
>       id?: string | null,
>       name?: string | null,
>       metrics?: {
>         id?: string | null,
>         visibility?: boolean | null
>       }[] | null,
>       rows?: Record<string, JsonValue> | null
>     }[] | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     is_demo_hidden?: boolean | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     agent_cost_type?: yearly | hourly | string | null,
>     agent_cost_per_ticket?: number | null,
>     agent_ticket_per_hour?: number | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     max_integrations?: number | null,
>     max_active_rules?: number | null
>   } | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: Record<string, JsonValue> | null,
>   type?: string | null
> } | {
>   id?: number | null,
>   data?: {
>     gaia?: number | null
>   } | null,
>   type?: string | null
> }
> ```

***

## Customers

### createCustomer

`customers.createCustomer`

Gorgias REST: Create a customer.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.customers.createCustomer({"body":{"channels":[]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   channels: {
>     type: string,
>     address: string,
>     preferred: boolean
>   }[],
>   email?: string | null,
>   external_id?: string | null,
>   language?: aa | ab | af | ak | sq | am | ar | an | hy | as | av | ae | ay | az | ba | bm | eu | be | bn | bh | bi | bs | br | bg | my | ca | ch | ce | zh | cu | cv | kw | co | cr | cs | da | dv | nl | dz | en | eo | et | ee | fo | fj | fi | fr | fy | ff | ka | de | gd | ga | gl | gv | el | gn | gu | ht | ha | he | hz | hi | ho | hr | hu | ig | is | io | ii | iu | ie | ia | id | ik | it | jv | ja | kl | kn | ks | kr | kk | km | ki | rw | ky | kv | kg | ko | kj | ku | lo | la | lv | li | ln | lt | lb | lu | lg | mk | mh | ml | mi | mr | ms | mg | mt | mn | na | nv | nr | nd | ng | ne | nn | nb | no | ny | oc | oj | or | om | os | pa | fa | pi | pl | pt | ps | qu | rc | rm | ro | rn | ru | sg | sa | si | sk | sl | se | sm | sn | sd | so | st | es | sc | sr | ss | su | sw | sv | ty | ta | tt | te | tg | tl | th | bo | ti | to | tn | ts | tk | tr | tw | ug | uk | ur | uz | ve | vi | vo | cy | wa | wo | xh | yi | yo | za | zu,
>   name?: string | null,
>   timezone?: Africa/Abidjan | Africa/Accra | Africa/Addis_Ababa | Africa/Algiers | Africa/Asmara | Africa/Asmera | Africa/Bamako | Africa/Bangui | Africa/Banjul | Africa/Bissau | Africa/Blantyre | Africa/Brazzaville | Africa/Bujumbura | Africa/Cairo | Africa/Casablanca | Africa/Ceuta | Africa/Conakry | Africa/Dakar | Africa/Dar_es_Salaam | Africa/Djibouti | Africa/Douala | Africa/El_Aaiun | Africa/Freetown | Africa/Gaborone | Africa/Harare | Africa/Johannesburg | Africa/Juba | Africa/Kampala | Africa/Khartoum | Africa/Kigali | Africa/Kinshasa | Africa/Lagos | Africa/Libreville | Africa/Lome | Africa/Luanda | Africa/Lubumbashi | Africa/Lusaka | Africa/Malabo | Africa/Maputo | Africa/Maseru | Africa/Mbabane | Africa/Mogadishu | Africa/Monrovia | Africa/Nairobi | Africa/Ndjamena | Africa/Niamey | Africa/Nouakchott | Africa/Ouagadougou | Africa/Porto-Novo | Africa/Sao_Tome | Africa/Timbuktu | Africa/Tripoli | Africa/Tunis | Africa/Windhoek | America/Adak | America/Anchorage | America/Anguilla | America/Antigua | America/Araguaina | America/Argentina/Buenos_Aires | America/Argentina/Catamarca | America/Argentina/ComodRivadavia | America/Argentina/Cordoba | America/Argentina/Jujuy | America/Argentina/La_Rioja | America/Argentina/Mendoza | America/Argentina/Rio_Gallegos | America/Argentina/Salta | America/Argentina/San_Juan | America/Argentina/San_Luis | America/Argentina/Tucuman | America/Argentina/Ushuaia | America/Aruba | America/Asuncion | America/Atikokan | America/Atka | America/Bahia | America/Bahia_Banderas | America/Barbados | America/Belem | America/Belize | America/Blanc-Sablon | America/Boa_Vista | America/Bogota | America/Boise | America/Buenos_Aires | America/Cambridge_Bay | America/Campo_Grande | America/Cancun | America/Caracas | America/Catamarca | America/Cayenne | America/Cayman | America/Chicago | America/Chihuahua | America/Ciudad_Juarez | America/Coral_Harbour | America/Cordoba | America/Costa_Rica | America/Coyhaique | America/Creston | America/Cuiaba | America/Curacao | America/Danmarkshavn | America/Dawson | America/Dawson_Creek | America/Denver | America/Detroit | America/Dominica | America/Edmonton | America/Eirunepe | America/El_Salvador | America/Ensenada | America/Fort_Nelson | America/Fort_Wayne | America/Fortaleza | America/Glace_Bay | America/Godthab | America/Goose_Bay | America/Grand_Turk | America/Grenada | America/Guadeloupe | America/Guatemala | America/Guayaquil | America/Guyana | America/Halifax | America/Havana | America/Hermosillo | America/Indiana/Indianapolis | America/Indiana/Knox | America/Indiana/Marengo | America/Indiana/Petersburg | America/Indiana/Tell_City | America/Indiana/Vevay | America/Indiana/Vincennes | America/Indiana/Winamac | America/Indianapolis | America/Inuvik | America/Iqaluit | America/Jamaica | America/Jujuy | America/Juneau | America/Kentucky/Louisville | America/Kentucky/Monticello | America/Knox_IN | America/Kralendijk | America/La_Paz | America/Lima | America/Los_Angeles | America/Louisville | America/Lower_Princes | America/Maceio | America/Managua | America/Manaus | America/Marigot | America/Martinique | America/Matamoros | America/Mazatlan | America/Mendoza | America/Menominee | America/Merida | America/Metlakatla | America/Mexico_City | America/Miquelon | America/Moncton | America/Monterrey | America/Montevideo | America/Montreal | America/Montserrat | America/Nassau | America/New_York | America/Nipigon | America/Nome | America/Noronha | America/North_Dakota/Beulah | America/North_Dakota/Center | America/North_Dakota/New_Salem | America/Nuuk | America/Ojinaga | America/Panama | America/Pangnirtung | America/Paramaribo | America/Phoenix | America/Port-au-Prince | America/Port_of_Spain | America/Porto_Acre | America/Porto_Velho | America/Puerto_Rico | America/Punta_Arenas | America/Rainy_River | America/Rankin_Inlet | America/Recife | America/Regina | America/Resolute | America/Rio_Branco | America/Rosario | America/Santa_Isabel | America/Santarem | America/Santiago | America/Santo_Domingo | America/Sao_Paulo | America/Scoresbysund | America/Shiprock | America/Sitka | America/St_Barthelemy | America/St_Johns | America/St_Kitts | America/St_Lucia | America/St_Thomas | America/St_Vincent | America/Swift_Current | America/Tegucigalpa | America/Thule | America/Thunder_Bay | America/Tijuana | America/Toronto | America/Tortola | America/Vancouver | America/Virgin | America/Whitehorse | America/Winnipeg | America/Yakutat | America/Yellowknife | Antarctica/Casey | Antarctica/Davis | Antarctica/DumontDUrville | Antarctica/Macquarie | Antarctica/Mawson | Antarctica/McMurdo | Antarctica/Palmer | Antarctica/Rothera | Antarctica/South_Pole | Antarctica/Syowa | Antarctica/Troll | Antarctica/Vostok | Arctic/Longyearbyen | Asia/Aden | Asia/Almaty | Asia/Amman | Asia/Anadyr | Asia/Aqtau | Asia/Aqtobe | Asia/Ashgabat | Asia/Ashkhabad | Asia/Atyrau | Asia/Baghdad | Asia/Bahrain | Asia/Baku | Asia/Bangkok | Asia/Barnaul | Asia/Beirut | Asia/Bishkek | Asia/Brunei | Asia/Calcutta | Asia/Chita | Asia/Choibalsan | Asia/Chongqing | Asia/Chungking | Asia/Colombo | Asia/Dacca | Asia/Damascus | Asia/Dhaka | Asia/Dili | Asia/Dubai | Asia/Dushanbe | Asia/Famagusta | Asia/Gaza | Asia/Harbin | Asia/Hebron | Asia/Ho_Chi_Minh | Asia/Hong_Kong | Asia/Hovd | Asia/Irkutsk | Asia/Istanbul | Asia/Jakarta | Asia/Jayapura | Asia/Jerusalem | Asia/Kabul | Asia/Kamchatka | Asia/Karachi | Asia/Kashgar | Asia/Kathmandu | Asia/Katmandu | Asia/Khandyga | Asia/Kolkata | Asia/Krasnoyarsk | Asia/Kuala_Lumpur | Asia/Kuching | Asia/Kuwait | Asia/Macao | Asia/Macau | Asia/Magadan | Asia/Makassar | Asia/Manila | Asia/Muscat | Asia/Nicosia | Asia/Novokuznetsk | Asia/Novosibirsk | Asia/Omsk | Asia/Oral | Asia/Phnom_Penh | Asia/Pontianak | Asia/Pyongyang | Asia/Qatar | Asia/Qostanay | Asia/Qyzylorda | Asia/Rangoon | Asia/Riyadh | Asia/Saigon | Asia/Sakhalin | Asia/Samarkand | Asia/Seoul | Asia/Shanghai | Asia/Singapore | Asia/Srednekolymsk | Asia/Taipei | Asia/Tashkent | Asia/Tbilisi | Asia/Tehran | Asia/Tel_Aviv | Asia/Thimbu | Asia/Thimphu | Asia/Tokyo | Asia/Tomsk | Asia/Ujung_Pandang | Asia/Ulaanbaatar | Asia/Ulan_Bator | Asia/Urumqi | Asia/Ust-Nera | Asia/Vientiane | Asia/Vladivostok | Asia/Yakutsk | Asia/Yangon | Asia/Yekaterinburg | Asia/Yerevan | Atlantic/Azores | Atlantic/Bermuda | Atlantic/Canary | Atlantic/Cape_Verde | Atlantic/Faeroe | Atlantic/Faroe | Atlantic/Jan_Mayen | Atlantic/Madeira | Atlantic/Reykjavik | Atlantic/South_Georgia | Atlantic/St_Helena | Atlantic/Stanley | Australia/ACT | Australia/Adelaide | Australia/Brisbane | Australia/Broken_Hill | Australia/Canberra | Australia/Currie | Australia/Darwin | Australia/Eucla | Australia/Hobart | Australia/LHI | Australia/Lindeman | Australia/Lord_Howe | Australia/Melbourne | Australia/NSW | Australia/North | Australia/Perth | Australia/Queensland | Australia/South | Australia/Sydney | Australia/Tasmania | Australia/Victoria | Australia/West | Australia/Yancowinna | Brazil/Acre | Brazil/DeNoronha | Brazil/East | Brazil/West | CET | CST6CDT | Canada/Atlantic | Canada/Central | Canada/Eastern | Canada/Mountain | Canada/Newfoundland | Canada/Pacific | Canada/Saskatchewan | Canada/Yukon | Chile/Continental | Chile/EasterIsland | Cuba | EET | EST | EST5EDT | Egypt | Eire | Etc/GMT | Etc/GMT+0 | Etc/GMT+1 | Etc/GMT+10 | Etc/GMT+11 | Etc/GMT+12 | Etc/GMT+2 | Etc/GMT+3 | Etc/GMT+4 | Etc/GMT+5 | Etc/GMT+6 | Etc/GMT+7 | Etc/GMT+8 | Etc/GMT+9 | Etc/GMT-0 | Etc/GMT-1 | Etc/GMT-10 | Etc/GMT-11 | Etc/GMT-12 | Etc/GMT-13 | Etc/GMT-14 | Etc/GMT-2 | Etc/GMT-3 | Etc/GMT-4 | Etc/GMT-5 | Etc/GMT-6 | Etc/GMT-7 | Etc/GMT-8 | Etc/GMT-9 | Etc/GMT0 | Etc/Greenwich | Etc/UCT | Etc/UTC | Etc/Universal | Etc/Zulu | Europe/Amsterdam | Europe/Andorra | Europe/Astrakhan | Europe/Athens | Europe/Belfast | Europe/Belgrade | Europe/Berlin | Europe/Bratislava | Europe/Brussels | Europe/Bucharest | Europe/Budapest | Europe/Busingen | Europe/Chisinau | Europe/Copenhagen | Europe/Dublin | Europe/Gibraltar | Europe/Guernsey | Europe/Helsinki | Europe/Isle_of_Man | Europe/Istanbul | Europe/Jersey | Europe/Kaliningrad | Europe/Kiev | Europe/Kirov | Europe/Kyiv | Europe/Lisbon | Europe/Ljubljana | Europe/London | Europe/Luxembourg | Europe/Madrid | Europe/Malta | Europe/Mariehamn | Europe/Minsk | Europe/Monaco | Europe/Moscow | Europe/Nicosia | Europe/Oslo | Europe/Paris | Europe/Podgorica | Europe/Prague | Europe/Riga | Europe/Rome | Europe/Samara | Europe/San_Marino | Europe/Sarajevo | Europe/Saratov | Europe/Simferopol | Europe/Skopje | Europe/Sofia | Europe/Stockholm | Europe/Tallinn | Europe/Tirane | Europe/Tiraspol | Europe/Ulyanovsk | Europe/Uzhgorod | Europe/Vaduz | Europe/Vatican | Europe/Vienna | Europe/Vilnius | Europe/Volgograd | Europe/Warsaw | Europe/Zagreb | Europe/Zaporozhye | Europe/Zurich | GB | GB-Eire | GMT | GMT+0 | GMT-0 | GMT0 | Greenwich | HST | Hongkong | Iceland | Indian/Antananarivo | Indian/Chagos | Indian/Christmas | Indian/Cocos | Indian/Comoro | Indian/Kerguelen | Indian/Mahe | Indian/Maldives | Indian/Mauritius | Indian/Mayotte | Indian/Reunion | Iran | Israel | Jamaica | Japan | Kwajalein | Libya | MET | MST | MST7MDT | Mexico/BajaNorte | Mexico/BajaSur | Mexico/General | NZ | NZ-CHAT | Navajo | PRC | PST8PDT | Pacific/Apia | Pacific/Auckland | Pacific/Bougainville | Pacific/Chatham | Pacific/Chuuk | Pacific/Easter | Pacific/Efate | Pacific/Enderbury | Pacific/Fakaofo | Pacific/Fiji | Pacific/Funafuti | Pacific/Galapagos | Pacific/Gambier | Pacific/Guadalcanal | Pacific/Guam | Pacific/Honolulu | Pacific/Johnston | Pacific/Kanton | Pacific/Kiritimati | Pacific/Kosrae | Pacific/Kwajalein | Pacific/Majuro | Pacific/Marquesas | Pacific/Midway | Pacific/Nauru | Pacific/Niue | Pacific/Norfolk | Pacific/Noumea | Pacific/Pago_Pago | Pacific/Palau | Pacific/Pitcairn | Pacific/Pohnpei | Pacific/Ponape | Pacific/Port_Moresby | Pacific/Rarotonga | Pacific/Saipan | Pacific/Samoa | Pacific/Tahiti | Pacific/Tarawa | Pacific/Tongatapu | Pacific/Truk | Pacific/Wake | Pacific/Wallis | Pacific/Yap | Poland | Portugal | ROC | ROK | Singapore | Turkey | UCT | US/Alaska | US/Aleutian | US/Arizona | US/Central | US/East-Indiana | US/Eastern | US/Hawaii | US/Indiana-Starke | US/Michigan | US/Mountain | US/Pacific | US/Samoa | UTC | Universal | W-SU | WET | Zulu
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `channels` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `firstname` | `string \| null` | No | — |
| `integrations` | `Record<string, JsonValue> \| null` | No | — |
| `language` | `aa \| ab \| af \| ak \| sq \| am \| ar \| an \| hy \| as \| av \| ae \| ay \| az \| ba \| bm \| eu \| be \| bn \| bh \| bi \| bs \| br \| bg \| my \| ca \| ch \| ce \| zh \| cu \| cv \| kw \| co \| cr \| cs \| da \| dv \| nl \| dz \| en \| eo \| et \| ee \| fo \| fj \| fi \| fr \| fy \| ff \| ka \| de \| gd \| ga \| gl \| gv \| el \| gn \| gu \| ht \| ha \| he \| hz \| hi \| ho \| hr \| hu \| ig \| is \| io \| ii \| iu \| ie \| ia \| id \| ik \| it \| jv \| ja \| kl \| kn \| ks \| kr \| kk \| km \| ki \| rw \| ky \| kv \| kg \| ko \| kj \| ku \| lo \| la \| lv \| li \| ln \| lt \| lb \| lu \| lg \| mk \| mh \| ml \| mi \| mr \| ms \| mg \| mt \| mn \| na \| nv \| nr \| nd \| ng \| ne \| nn \| nb \| no \| ny \| oc \| oj \| or \| om \| os \| pa \| fa \| pi \| pl \| pt \| ps \| qu \| rc \| rm \| ro \| rn \| ru \| sg \| sa \| si \| sk \| sl \| se \| sm \| sn \| sd \| so \| st \| es \| sc \| sr \| ss \| su \| sw \| sv \| ty \| ta \| tt \| te \| tg \| tl \| th \| bo \| ti \| to \| tn \| ts \| tk \| tr \| tw \| ug \| uk \| ur \| uz \| ve \| vi \| vo \| cy \| wa \| wo \| xh \| yi \| yo \| za \| zu \| string \| null` | No | — |
| `lastname` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `note` | `string \| null` | No | — |
| `timezone` | `Africa/Abidjan \| Africa/Accra \| Africa/Addis_Ababa \| Africa/Algiers \| Africa/Asmara \| Africa/Asmera \| Africa/Bamako \| Africa/Bangui \| Africa/Banjul \| Africa/Bissau \| Africa/Blantyre \| Africa/Brazzaville \| Africa/Bujumbura \| Africa/Cairo \| Africa/Casablanca \| Africa/Ceuta \| Africa/Conakry \| Africa/Dakar \| Africa/Dar_es_Salaam \| Africa/Djibouti \| Africa/Douala \| Africa/El_Aaiun \| Africa/Freetown \| Africa/Gaborone \| Africa/Harare \| Africa/Johannesburg \| Africa/Juba \| Africa/Kampala \| Africa/Khartoum \| Africa/Kigali \| Africa/Kinshasa \| Africa/Lagos \| Africa/Libreville \| Africa/Lome \| Africa/Luanda \| Africa/Lubumbashi \| Africa/Lusaka \| Africa/Malabo \| Africa/Maputo \| Africa/Maseru \| Africa/Mbabane \| Africa/Mogadishu \| Africa/Monrovia \| Africa/Nairobi \| Africa/Ndjamena \| Africa/Niamey \| Africa/Nouakchott \| Africa/Ouagadougou \| Africa/Porto-Novo \| Africa/Sao_Tome \| Africa/Timbuktu \| Africa/Tripoli \| Africa/Tunis \| Africa/Windhoek \| America/Adak \| America/Anchorage \| America/Anguilla \| America/Antigua \| America/Araguaina \| America/Argentina/Buenos_Aires \| America/Argentina/Catamarca \| America/Argentina/ComodRivadavia \| America/Argentina/Cordoba \| America/Argentina/Jujuy \| America/Argentina/La_Rioja \| America/Argentina/Mendoza \| America/Argentina/Rio_Gallegos \| America/Argentina/Salta \| America/Argentina/San_Juan \| America/Argentina/San_Luis \| America/Argentina/Tucuman \| America/Argentina/Ushuaia \| America/Aruba \| America/Asuncion \| America/Atikokan \| America/Atka \| America/Bahia \| America/Bahia_Banderas \| America/Barbados \| America/Belem \| America/Belize \| America/Blanc-Sablon \| America/Boa_Vista \| America/Bogota \| America/Boise \| America/Buenos_Aires \| America/Cambridge_Bay \| America/Campo_Grande \| America/Cancun \| America/Caracas \| America/Catamarca \| America/Cayenne \| America/Cayman \| America/Chicago \| America/Chihuahua \| America/Ciudad_Juarez \| America/Coral_Harbour \| America/Cordoba \| America/Costa_Rica \| America/Coyhaique \| America/Creston \| America/Cuiaba \| America/Curacao \| America/Danmarkshavn \| America/Dawson \| America/Dawson_Creek \| America/Denver \| America/Detroit \| America/Dominica \| America/Edmonton \| America/Eirunepe \| America/El_Salvador \| America/Ensenada \| America/Fort_Nelson \| America/Fort_Wayne \| America/Fortaleza \| America/Glace_Bay \| America/Godthab \| America/Goose_Bay \| America/Grand_Turk \| America/Grenada \| America/Guadeloupe \| America/Guatemala \| America/Guayaquil \| America/Guyana \| America/Halifax \| America/Havana \| America/Hermosillo \| America/Indiana/Indianapolis \| America/Indiana/Knox \| America/Indiana/Marengo \| America/Indiana/Petersburg \| America/Indiana/Tell_City \| America/Indiana/Vevay \| America/Indiana/Vincennes \| America/Indiana/Winamac \| America/Indianapolis \| America/Inuvik \| America/Iqaluit \| America/Jamaica \| America/Jujuy \| America/Juneau \| America/Kentucky/Louisville \| America/Kentucky/Monticello \| America/Knox_IN \| America/Kralendijk \| America/La_Paz \| America/Lima \| America/Los_Angeles \| America/Louisville \| America/Lower_Princes \| America/Maceio \| America/Managua \| America/Manaus \| America/Marigot \| America/Martinique \| America/Matamoros \| America/Mazatlan \| America/Mendoza \| America/Menominee \| America/Merida \| America/Metlakatla \| America/Mexico_City \| America/Miquelon \| America/Moncton \| America/Monterrey \| America/Montevideo \| America/Montreal \| America/Montserrat \| America/Nassau \| America/New_York \| America/Nipigon \| America/Nome \| America/Noronha \| America/North_Dakota/Beulah \| America/North_Dakota/Center \| America/North_Dakota/New_Salem \| America/Nuuk \| America/Ojinaga \| America/Panama \| America/Pangnirtung \| America/Paramaribo \| America/Phoenix \| America/Port-au-Prince \| America/Port_of_Spain \| America/Porto_Acre \| America/Porto_Velho \| America/Puerto_Rico \| America/Punta_Arenas \| America/Rainy_River \| America/Rankin_Inlet \| America/Recife \| America/Regina \| America/Resolute \| America/Rio_Branco \| America/Rosario \| America/Santa_Isabel \| America/Santarem \| America/Santiago \| America/Santo_Domingo \| America/Sao_Paulo \| America/Scoresbysund \| America/Shiprock \| America/Sitka \| America/St_Barthelemy \| America/St_Johns \| America/St_Kitts \| America/St_Lucia \| America/St_Thomas \| America/St_Vincent \| America/Swift_Current \| America/Tegucigalpa \| America/Thule \| America/Thunder_Bay \| America/Tijuana \| America/Toronto \| America/Tortola \| America/Vancouver \| America/Virgin \| America/Whitehorse \| America/Winnipeg \| America/Yakutat \| America/Yellowknife \| Antarctica/Casey \| Antarctica/Davis \| Antarctica/DumontDUrville \| Antarctica/Macquarie \| Antarctica/Mawson \| Antarctica/McMurdo \| Antarctica/Palmer \| Antarctica/Rothera \| Antarctica/South_Pole \| Antarctica/Syowa \| Antarctica/Troll \| Antarctica/Vostok \| Arctic/Longyearbyen \| Asia/Aden \| Asia/Almaty \| Asia/Amman \| Asia/Anadyr \| Asia/Aqtau \| Asia/Aqtobe \| Asia/Ashgabat \| Asia/Ashkhabad \| Asia/Atyrau \| Asia/Baghdad \| Asia/Bahrain \| Asia/Baku \| Asia/Bangkok \| Asia/Barnaul \| Asia/Beirut \| Asia/Bishkek \| Asia/Brunei \| Asia/Calcutta \| Asia/Chita \| Asia/Choibalsan \| Asia/Chongqing \| Asia/Chungking \| Asia/Colombo \| Asia/Dacca \| Asia/Damascus \| Asia/Dhaka \| Asia/Dili \| Asia/Dubai \| Asia/Dushanbe \| Asia/Famagusta \| Asia/Gaza \| Asia/Harbin \| Asia/Hebron \| Asia/Ho_Chi_Minh \| Asia/Hong_Kong \| Asia/Hovd \| Asia/Irkutsk \| Asia/Istanbul \| Asia/Jakarta \| Asia/Jayapura \| Asia/Jerusalem \| Asia/Kabul \| Asia/Kamchatka \| Asia/Karachi \| Asia/Kashgar \| Asia/Kathmandu \| Asia/Katmandu \| Asia/Khandyga \| Asia/Kolkata \| Asia/Krasnoyarsk \| Asia/Kuala_Lumpur \| Asia/Kuching \| Asia/Kuwait \| Asia/Macao \| Asia/Macau \| Asia/Magadan \| Asia/Makassar \| Asia/Manila \| Asia/Muscat \| Asia/Nicosia \| Asia/Novokuznetsk \| Asia/Novosibirsk \| Asia/Omsk \| Asia/Oral \| Asia/Phnom_Penh \| Asia/Pontianak \| Asia/Pyongyang \| Asia/Qatar \| Asia/Qostanay \| Asia/Qyzylorda \| Asia/Rangoon \| Asia/Riyadh \| Asia/Saigon \| Asia/Sakhalin \| Asia/Samarkand \| Asia/Seoul \| Asia/Shanghai \| Asia/Singapore \| Asia/Srednekolymsk \| Asia/Taipei \| Asia/Tashkent \| Asia/Tbilisi \| Asia/Tehran \| Asia/Tel_Aviv \| Asia/Thimbu \| Asia/Thimphu \| Asia/Tokyo \| Asia/Tomsk \| Asia/Ujung_Pandang \| Asia/Ulaanbaatar \| Asia/Ulan_Bator \| Asia/Urumqi \| Asia/Ust-Nera \| Asia/Vientiane \| Asia/Vladivostok \| Asia/Yakutsk \| Asia/Yangon \| Asia/Yekaterinburg \| Asia/Yerevan \| Atlantic/Azores \| Atlantic/Bermuda \| Atlantic/Canary \| Atlantic/Cape_Verde \| Atlantic/Faeroe \| Atlantic/Faroe \| Atlantic/Jan_Mayen \| Atlantic/Madeira \| Atlantic/Reykjavik \| Atlantic/South_Georgia \| Atlantic/St_Helena \| Atlantic/Stanley \| Australia/ACT \| Australia/Adelaide \| Australia/Brisbane \| Australia/Broken_Hill \| Australia/Canberra \| Australia/Currie \| Australia/Darwin \| Australia/Eucla \| Australia/Hobart \| Australia/LHI \| Australia/Lindeman \| Australia/Lord_Howe \| Australia/Melbourne \| Australia/NSW \| Australia/North \| Australia/Perth \| Australia/Queensland \| Australia/South \| Australia/Sydney \| Australia/Tasmania \| Australia/Victoria \| Australia/West \| Australia/Yancowinna \| Brazil/Acre \| Brazil/DeNoronha \| Brazil/East \| Brazil/West \| CET \| CST6CDT \| Canada/Atlantic \| Canada/Central \| Canada/Eastern \| Canada/Mountain \| Canada/Newfoundland \| Canada/Pacific \| Canada/Saskatchewan \| Canada/Yukon \| Chile/Continental \| Chile/EasterIsland \| Cuba \| EET \| EST \| EST5EDT \| Egypt \| Eire \| Etc/GMT \| Etc/GMT+0 \| Etc/GMT+1 \| Etc/GMT+10 \| Etc/GMT+11 \| Etc/GMT+12 \| Etc/GMT+2 \| Etc/GMT+3 \| Etc/GMT+4 \| Etc/GMT+5 \| Etc/GMT+6 \| Etc/GMT+7 \| Etc/GMT+8 \| Etc/GMT+9 \| Etc/GMT-0 \| Etc/GMT-1 \| Etc/GMT-10 \| Etc/GMT-11 \| Etc/GMT-12 \| Etc/GMT-13 \| Etc/GMT-14 \| Etc/GMT-2 \| Etc/GMT-3 \| Etc/GMT-4 \| Etc/GMT-5 \| Etc/GMT-6 \| Etc/GMT-7 \| Etc/GMT-8 \| Etc/GMT-9 \| Etc/GMT0 \| Etc/Greenwich \| Etc/UCT \| Etc/UTC \| Etc/Universal \| Etc/Zulu \| Europe/Amsterdam \| Europe/Andorra \| Europe/Astrakhan \| Europe/Athens \| Europe/Belfast \| Europe/Belgrade \| Europe/Berlin \| Europe/Bratislava \| Europe/Brussels \| Europe/Bucharest \| Europe/Budapest \| Europe/Busingen \| Europe/Chisinau \| Europe/Copenhagen \| Europe/Dublin \| Europe/Gibraltar \| Europe/Guernsey \| Europe/Helsinki \| Europe/Isle_of_Man \| Europe/Istanbul \| Europe/Jersey \| Europe/Kaliningrad \| Europe/Kiev \| Europe/Kirov \| Europe/Kyiv \| Europe/Lisbon \| Europe/Ljubljana \| Europe/London \| Europe/Luxembourg \| Europe/Madrid \| Europe/Malta \| Europe/Mariehamn \| Europe/Minsk \| Europe/Monaco \| Europe/Moscow \| Europe/Nicosia \| Europe/Oslo \| Europe/Paris \| Europe/Podgorica \| Europe/Prague \| Europe/Riga \| Europe/Rome \| Europe/Samara \| Europe/San_Marino \| Europe/Sarajevo \| Europe/Saratov \| Europe/Simferopol \| Europe/Skopje \| Europe/Sofia \| Europe/Stockholm \| Europe/Tallinn \| Europe/Tirane \| Europe/Tiraspol \| Europe/Ulyanovsk \| Europe/Uzhgorod \| Europe/Vaduz \| Europe/Vatican \| Europe/Vienna \| Europe/Vilnius \| Europe/Volgograd \| Europe/Warsaw \| Europe/Zagreb \| Europe/Zaporozhye \| Europe/Zurich \| GB \| GB-Eire \| GMT \| GMT+0 \| GMT-0 \| GMT0 \| Greenwich \| HST \| Hongkong \| Iceland \| Indian/Antananarivo \| Indian/Chagos \| Indian/Christmas \| Indian/Cocos \| Indian/Comoro \| Indian/Kerguelen \| Indian/Mahe \| Indian/Maldives \| Indian/Mauritius \| Indian/Mayotte \| Indian/Reunion \| Iran \| Israel \| Jamaica \| Japan \| Kwajalein \| Libya \| MET \| MST \| MST7MDT \| Mexico/BajaNorte \| Mexico/BajaSur \| Mexico/General \| NZ \| NZ-CHAT \| Navajo \| PRC \| PST8PDT \| Pacific/Apia \| Pacific/Auckland \| Pacific/Bougainville \| Pacific/Chatham \| Pacific/Chuuk \| Pacific/Easter \| Pacific/Efate \| Pacific/Enderbury \| Pacific/Fakaofo \| Pacific/Fiji \| Pacific/Funafuti \| Pacific/Galapagos \| Pacific/Gambier \| Pacific/Guadalcanal \| Pacific/Guam \| Pacific/Honolulu \| Pacific/Johnston \| Pacific/Kanton \| Pacific/Kiritimati \| Pacific/Kosrae \| Pacific/Kwajalein \| Pacific/Majuro \| Pacific/Marquesas \| Pacific/Midway \| Pacific/Nauru \| Pacific/Niue \| Pacific/Norfolk \| Pacific/Noumea \| Pacific/Pago_Pago \| Pacific/Palau \| Pacific/Pitcairn \| Pacific/Pohnpei \| Pacific/Ponape \| Pacific/Port_Moresby \| Pacific/Rarotonga \| Pacific/Saipan \| Pacific/Samoa \| Pacific/Tahiti \| Pacific/Tarawa \| Pacific/Tongatapu \| Pacific/Truk \| Pacific/Wake \| Pacific/Wallis \| Pacific/Yap \| Poland \| Portugal \| ROC \| ROK \| Singapore \| Turkey \| UCT \| US/Alaska \| US/Aleutian \| US/Arizona \| US/Central \| US/East-Indiana \| US/Eastern \| US/Hawaii \| US/Indiana-Starke \| US/Michigan \| US/Mountain \| US/Pacific \| US/Samoa \| UTC \| Universal \| W-SU \| WET \| Zulu \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |

> [accordion] channels full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   type?: string | null,
>   address?: string | null,
>   preferred?: boolean | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   deleted_datetime?: string | null,
>   user?: {
>     id?: number | null,
>     name?: string | null
>   } | null,
>   customer?: {
>     id?: number | null,
>     name?: string | null
>   } | null
> }[] | null
> ```

***

### deleteCustomer

`customers.deleteCustomer`

Gorgias REST: Delete a customer.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.customers.deleteCustomer({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `void`

***

### deleteCustomerCustomFieldValue

`customers.deleteCustomerCustomFieldValue`

Gorgias REST: Delete customer field value.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.customers.deleteCustomerCustomFieldValue({"path":{"customer_id":1,"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   customer_id: number,
>   id: number
> }
> ```

**Output:** `void`

***

### deleteCustomers

`customers.deleteCustomers`

Gorgias REST: Delete customers.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.customers.deleteCustomers({"body":{"ids":[]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   ids: number[]
> }
> ```

**Output:** `void`

***

### getCustomer

`customers.getCustomer`

Gorgias REST: Retrieve a customer.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.customers.getCustomer({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   relationships?: custom_fields[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `channels` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `firstname` | `string \| null` | No | — |
| `integrations` | `Record<string, JsonValue> \| null` | No | — |
| `language` | `aa \| ab \| af \| ak \| sq \| am \| ar \| an \| hy \| as \| av \| ae \| ay \| az \| ba \| bm \| eu \| be \| bn \| bh \| bi \| bs \| br \| bg \| my \| ca \| ch \| ce \| zh \| cu \| cv \| kw \| co \| cr \| cs \| da \| dv \| nl \| dz \| en \| eo \| et \| ee \| fo \| fj \| fi \| fr \| fy \| ff \| ka \| de \| gd \| ga \| gl \| gv \| el \| gn \| gu \| ht \| ha \| he \| hz \| hi \| ho \| hr \| hu \| ig \| is \| io \| ii \| iu \| ie \| ia \| id \| ik \| it \| jv \| ja \| kl \| kn \| ks \| kr \| kk \| km \| ki \| rw \| ky \| kv \| kg \| ko \| kj \| ku \| lo \| la \| lv \| li \| ln \| lt \| lb \| lu \| lg \| mk \| mh \| ml \| mi \| mr \| ms \| mg \| mt \| mn \| na \| nv \| nr \| nd \| ng \| ne \| nn \| nb \| no \| ny \| oc \| oj \| or \| om \| os \| pa \| fa \| pi \| pl \| pt \| ps \| qu \| rc \| rm \| ro \| rn \| ru \| sg \| sa \| si \| sk \| sl \| se \| sm \| sn \| sd \| so \| st \| es \| sc \| sr \| ss \| su \| sw \| sv \| ty \| ta \| tt \| te \| tg \| tl \| th \| bo \| ti \| to \| tn \| ts \| tk \| tr \| tw \| ug \| uk \| ur \| uz \| ve \| vi \| vo \| cy \| wa \| wo \| xh \| yi \| yo \| za \| zu \| string \| null` | No | — |
| `lastname` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `note` | `string \| null` | No | — |
| `timezone` | `Africa/Abidjan \| Africa/Accra \| Africa/Addis_Ababa \| Africa/Algiers \| Africa/Asmara \| Africa/Asmera \| Africa/Bamako \| Africa/Bangui \| Africa/Banjul \| Africa/Bissau \| Africa/Blantyre \| Africa/Brazzaville \| Africa/Bujumbura \| Africa/Cairo \| Africa/Casablanca \| Africa/Ceuta \| Africa/Conakry \| Africa/Dakar \| Africa/Dar_es_Salaam \| Africa/Djibouti \| Africa/Douala \| Africa/El_Aaiun \| Africa/Freetown \| Africa/Gaborone \| Africa/Harare \| Africa/Johannesburg \| Africa/Juba \| Africa/Kampala \| Africa/Khartoum \| Africa/Kigali \| Africa/Kinshasa \| Africa/Lagos \| Africa/Libreville \| Africa/Lome \| Africa/Luanda \| Africa/Lubumbashi \| Africa/Lusaka \| Africa/Malabo \| Africa/Maputo \| Africa/Maseru \| Africa/Mbabane \| Africa/Mogadishu \| Africa/Monrovia \| Africa/Nairobi \| Africa/Ndjamena \| Africa/Niamey \| Africa/Nouakchott \| Africa/Ouagadougou \| Africa/Porto-Novo \| Africa/Sao_Tome \| Africa/Timbuktu \| Africa/Tripoli \| Africa/Tunis \| Africa/Windhoek \| America/Adak \| America/Anchorage \| America/Anguilla \| America/Antigua \| America/Araguaina \| America/Argentina/Buenos_Aires \| America/Argentina/Catamarca \| America/Argentina/ComodRivadavia \| America/Argentina/Cordoba \| America/Argentina/Jujuy \| America/Argentina/La_Rioja \| America/Argentina/Mendoza \| America/Argentina/Rio_Gallegos \| America/Argentina/Salta \| America/Argentina/San_Juan \| America/Argentina/San_Luis \| America/Argentina/Tucuman \| America/Argentina/Ushuaia \| America/Aruba \| America/Asuncion \| America/Atikokan \| America/Atka \| America/Bahia \| America/Bahia_Banderas \| America/Barbados \| America/Belem \| America/Belize \| America/Blanc-Sablon \| America/Boa_Vista \| America/Bogota \| America/Boise \| America/Buenos_Aires \| America/Cambridge_Bay \| America/Campo_Grande \| America/Cancun \| America/Caracas \| America/Catamarca \| America/Cayenne \| America/Cayman \| America/Chicago \| America/Chihuahua \| America/Ciudad_Juarez \| America/Coral_Harbour \| America/Cordoba \| America/Costa_Rica \| America/Coyhaique \| America/Creston \| America/Cuiaba \| America/Curacao \| America/Danmarkshavn \| America/Dawson \| America/Dawson_Creek \| America/Denver \| America/Detroit \| America/Dominica \| America/Edmonton \| America/Eirunepe \| America/El_Salvador \| America/Ensenada \| America/Fort_Nelson \| America/Fort_Wayne \| America/Fortaleza \| America/Glace_Bay \| America/Godthab \| America/Goose_Bay \| America/Grand_Turk \| America/Grenada \| America/Guadeloupe \| America/Guatemala \| America/Guayaquil \| America/Guyana \| America/Halifax \| America/Havana \| America/Hermosillo \| America/Indiana/Indianapolis \| America/Indiana/Knox \| America/Indiana/Marengo \| America/Indiana/Petersburg \| America/Indiana/Tell_City \| America/Indiana/Vevay \| America/Indiana/Vincennes \| America/Indiana/Winamac \| America/Indianapolis \| America/Inuvik \| America/Iqaluit \| America/Jamaica \| America/Jujuy \| America/Juneau \| America/Kentucky/Louisville \| America/Kentucky/Monticello \| America/Knox_IN \| America/Kralendijk \| America/La_Paz \| America/Lima \| America/Los_Angeles \| America/Louisville \| America/Lower_Princes \| America/Maceio \| America/Managua \| America/Manaus \| America/Marigot \| America/Martinique \| America/Matamoros \| America/Mazatlan \| America/Mendoza \| America/Menominee \| America/Merida \| America/Metlakatla \| America/Mexico_City \| America/Miquelon \| America/Moncton \| America/Monterrey \| America/Montevideo \| America/Montreal \| America/Montserrat \| America/Nassau \| America/New_York \| America/Nipigon \| America/Nome \| America/Noronha \| America/North_Dakota/Beulah \| America/North_Dakota/Center \| America/North_Dakota/New_Salem \| America/Nuuk \| America/Ojinaga \| America/Panama \| America/Pangnirtung \| America/Paramaribo \| America/Phoenix \| America/Port-au-Prince \| America/Port_of_Spain \| America/Porto_Acre \| America/Porto_Velho \| America/Puerto_Rico \| America/Punta_Arenas \| America/Rainy_River \| America/Rankin_Inlet \| America/Recife \| America/Regina \| America/Resolute \| America/Rio_Branco \| America/Rosario \| America/Santa_Isabel \| America/Santarem \| America/Santiago \| America/Santo_Domingo \| America/Sao_Paulo \| America/Scoresbysund \| America/Shiprock \| America/Sitka \| America/St_Barthelemy \| America/St_Johns \| America/St_Kitts \| America/St_Lucia \| America/St_Thomas \| America/St_Vincent \| America/Swift_Current \| America/Tegucigalpa \| America/Thule \| America/Thunder_Bay \| America/Tijuana \| America/Toronto \| America/Tortola \| America/Vancouver \| America/Virgin \| America/Whitehorse \| America/Winnipeg \| America/Yakutat \| America/Yellowknife \| Antarctica/Casey \| Antarctica/Davis \| Antarctica/DumontDUrville \| Antarctica/Macquarie \| Antarctica/Mawson \| Antarctica/McMurdo \| Antarctica/Palmer \| Antarctica/Rothera \| Antarctica/South_Pole \| Antarctica/Syowa \| Antarctica/Troll \| Antarctica/Vostok \| Arctic/Longyearbyen \| Asia/Aden \| Asia/Almaty \| Asia/Amman \| Asia/Anadyr \| Asia/Aqtau \| Asia/Aqtobe \| Asia/Ashgabat \| Asia/Ashkhabad \| Asia/Atyrau \| Asia/Baghdad \| Asia/Bahrain \| Asia/Baku \| Asia/Bangkok \| Asia/Barnaul \| Asia/Beirut \| Asia/Bishkek \| Asia/Brunei \| Asia/Calcutta \| Asia/Chita \| Asia/Choibalsan \| Asia/Chongqing \| Asia/Chungking \| Asia/Colombo \| Asia/Dacca \| Asia/Damascus \| Asia/Dhaka \| Asia/Dili \| Asia/Dubai \| Asia/Dushanbe \| Asia/Famagusta \| Asia/Gaza \| Asia/Harbin \| Asia/Hebron \| Asia/Ho_Chi_Minh \| Asia/Hong_Kong \| Asia/Hovd \| Asia/Irkutsk \| Asia/Istanbul \| Asia/Jakarta \| Asia/Jayapura \| Asia/Jerusalem \| Asia/Kabul \| Asia/Kamchatka \| Asia/Karachi \| Asia/Kashgar \| Asia/Kathmandu \| Asia/Katmandu \| Asia/Khandyga \| Asia/Kolkata \| Asia/Krasnoyarsk \| Asia/Kuala_Lumpur \| Asia/Kuching \| Asia/Kuwait \| Asia/Macao \| Asia/Macau \| Asia/Magadan \| Asia/Makassar \| Asia/Manila \| Asia/Muscat \| Asia/Nicosia \| Asia/Novokuznetsk \| Asia/Novosibirsk \| Asia/Omsk \| Asia/Oral \| Asia/Phnom_Penh \| Asia/Pontianak \| Asia/Pyongyang \| Asia/Qatar \| Asia/Qostanay \| Asia/Qyzylorda \| Asia/Rangoon \| Asia/Riyadh \| Asia/Saigon \| Asia/Sakhalin \| Asia/Samarkand \| Asia/Seoul \| Asia/Shanghai \| Asia/Singapore \| Asia/Srednekolymsk \| Asia/Taipei \| Asia/Tashkent \| Asia/Tbilisi \| Asia/Tehran \| Asia/Tel_Aviv \| Asia/Thimbu \| Asia/Thimphu \| Asia/Tokyo \| Asia/Tomsk \| Asia/Ujung_Pandang \| Asia/Ulaanbaatar \| Asia/Ulan_Bator \| Asia/Urumqi \| Asia/Ust-Nera \| Asia/Vientiane \| Asia/Vladivostok \| Asia/Yakutsk \| Asia/Yangon \| Asia/Yekaterinburg \| Asia/Yerevan \| Atlantic/Azores \| Atlantic/Bermuda \| Atlantic/Canary \| Atlantic/Cape_Verde \| Atlantic/Faeroe \| Atlantic/Faroe \| Atlantic/Jan_Mayen \| Atlantic/Madeira \| Atlantic/Reykjavik \| Atlantic/South_Georgia \| Atlantic/St_Helena \| Atlantic/Stanley \| Australia/ACT \| Australia/Adelaide \| Australia/Brisbane \| Australia/Broken_Hill \| Australia/Canberra \| Australia/Currie \| Australia/Darwin \| Australia/Eucla \| Australia/Hobart \| Australia/LHI \| Australia/Lindeman \| Australia/Lord_Howe \| Australia/Melbourne \| Australia/NSW \| Australia/North \| Australia/Perth \| Australia/Queensland \| Australia/South \| Australia/Sydney \| Australia/Tasmania \| Australia/Victoria \| Australia/West \| Australia/Yancowinna \| Brazil/Acre \| Brazil/DeNoronha \| Brazil/East \| Brazil/West \| CET \| CST6CDT \| Canada/Atlantic \| Canada/Central \| Canada/Eastern \| Canada/Mountain \| Canada/Newfoundland \| Canada/Pacific \| Canada/Saskatchewan \| Canada/Yukon \| Chile/Continental \| Chile/EasterIsland \| Cuba \| EET \| EST \| EST5EDT \| Egypt \| Eire \| Etc/GMT \| Etc/GMT+0 \| Etc/GMT+1 \| Etc/GMT+10 \| Etc/GMT+11 \| Etc/GMT+12 \| Etc/GMT+2 \| Etc/GMT+3 \| Etc/GMT+4 \| Etc/GMT+5 \| Etc/GMT+6 \| Etc/GMT+7 \| Etc/GMT+8 \| Etc/GMT+9 \| Etc/GMT-0 \| Etc/GMT-1 \| Etc/GMT-10 \| Etc/GMT-11 \| Etc/GMT-12 \| Etc/GMT-13 \| Etc/GMT-14 \| Etc/GMT-2 \| Etc/GMT-3 \| Etc/GMT-4 \| Etc/GMT-5 \| Etc/GMT-6 \| Etc/GMT-7 \| Etc/GMT-8 \| Etc/GMT-9 \| Etc/GMT0 \| Etc/Greenwich \| Etc/UCT \| Etc/UTC \| Etc/Universal \| Etc/Zulu \| Europe/Amsterdam \| Europe/Andorra \| Europe/Astrakhan \| Europe/Athens \| Europe/Belfast \| Europe/Belgrade \| Europe/Berlin \| Europe/Bratislava \| Europe/Brussels \| Europe/Bucharest \| Europe/Budapest \| Europe/Busingen \| Europe/Chisinau \| Europe/Copenhagen \| Europe/Dublin \| Europe/Gibraltar \| Europe/Guernsey \| Europe/Helsinki \| Europe/Isle_of_Man \| Europe/Istanbul \| Europe/Jersey \| Europe/Kaliningrad \| Europe/Kiev \| Europe/Kirov \| Europe/Kyiv \| Europe/Lisbon \| Europe/Ljubljana \| Europe/London \| Europe/Luxembourg \| Europe/Madrid \| Europe/Malta \| Europe/Mariehamn \| Europe/Minsk \| Europe/Monaco \| Europe/Moscow \| Europe/Nicosia \| Europe/Oslo \| Europe/Paris \| Europe/Podgorica \| Europe/Prague \| Europe/Riga \| Europe/Rome \| Europe/Samara \| Europe/San_Marino \| Europe/Sarajevo \| Europe/Saratov \| Europe/Simferopol \| Europe/Skopje \| Europe/Sofia \| Europe/Stockholm \| Europe/Tallinn \| Europe/Tirane \| Europe/Tiraspol \| Europe/Ulyanovsk \| Europe/Uzhgorod \| Europe/Vaduz \| Europe/Vatican \| Europe/Vienna \| Europe/Vilnius \| Europe/Volgograd \| Europe/Warsaw \| Europe/Zagreb \| Europe/Zaporozhye \| Europe/Zurich \| GB \| GB-Eire \| GMT \| GMT+0 \| GMT-0 \| GMT0 \| Greenwich \| HST \| Hongkong \| Iceland \| Indian/Antananarivo \| Indian/Chagos \| Indian/Christmas \| Indian/Cocos \| Indian/Comoro \| Indian/Kerguelen \| Indian/Mahe \| Indian/Maldives \| Indian/Mauritius \| Indian/Mayotte \| Indian/Reunion \| Iran \| Israel \| Jamaica \| Japan \| Kwajalein \| Libya \| MET \| MST \| MST7MDT \| Mexico/BajaNorte \| Mexico/BajaSur \| Mexico/General \| NZ \| NZ-CHAT \| Navajo \| PRC \| PST8PDT \| Pacific/Apia \| Pacific/Auckland \| Pacific/Bougainville \| Pacific/Chatham \| Pacific/Chuuk \| Pacific/Easter \| Pacific/Efate \| Pacific/Enderbury \| Pacific/Fakaofo \| Pacific/Fiji \| Pacific/Funafuti \| Pacific/Galapagos \| Pacific/Gambier \| Pacific/Guadalcanal \| Pacific/Guam \| Pacific/Honolulu \| Pacific/Johnston \| Pacific/Kanton \| Pacific/Kiritimati \| Pacific/Kosrae \| Pacific/Kwajalein \| Pacific/Majuro \| Pacific/Marquesas \| Pacific/Midway \| Pacific/Nauru \| Pacific/Niue \| Pacific/Norfolk \| Pacific/Noumea \| Pacific/Pago_Pago \| Pacific/Palau \| Pacific/Pitcairn \| Pacific/Pohnpei \| Pacific/Ponape \| Pacific/Port_Moresby \| Pacific/Rarotonga \| Pacific/Saipan \| Pacific/Samoa \| Pacific/Tahiti \| Pacific/Tarawa \| Pacific/Tongatapu \| Pacific/Truk \| Pacific/Wake \| Pacific/Wallis \| Pacific/Yap \| Poland \| Portugal \| ROC \| ROK \| Singapore \| Turkey \| UCT \| US/Alaska \| US/Aleutian \| US/Arizona \| US/Central \| US/East-Indiana \| US/Eastern \| US/Hawaii \| US/Indiana-Starke \| US/Michigan \| US/Mountain \| US/Pacific \| US/Samoa \| UTC \| Universal \| W-SU \| WET \| Zulu \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `external_data` | `Record<string, JsonValue>` | No | — |
| `ecommerce_data` | `Record<string, JsonValue>` | No | — |

> [accordion] channels full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   type?: string | null,
>   address?: string | null,
>   preferred?: boolean | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   deleted_datetime?: string | null,
>   user?: {
>     id?: number | null,
>     name?: string | null
>   } | null,
>   customer?: {
>     id?: number | null,
>     name?: string | null
>   } | null
> }[] | null
> ```

***

### listCustomerCustomFieldsValues

`customers.listCustomerCustomFieldsValues`

Gorgias REST: List customer field values.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.customers.listCustomerCustomFieldsValues({"path":{"customer_id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   customer_id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   field?: {
>     id?: number | null,
>     external_id?: string | null,
>     object_type?: Ticket | Customer | string | null,
>     label?: string | null,
>     description?: string | null,
>     priority?: number | null,
>     required?: boolean | null,
>     managed_type?: customer_type | null,
>     definition?: {
>       data_type: text,
>       input_settings?: {
>         input_type: input,
>         placeholder?: string | null
>       } | {
>         input_type: dropdown,
>         choices?: string[] | null,
>         default?: string | null
>       } | null
>     } | {
>       data_type: number,
>       input_settings?: {
>         input_type: input_number,
>         placeholder?: string | null,
>         min?: number | string | null,
>         max?: number | string | null
>       } | null
>     } | {
>       data_type: boolean,
>       input_settings?: {
>         input_type: dropdown,
>         choices?: boolean[] | null,
>         default?: boolean | null
>       } | null
>     } | {
>       data_type?: string | null,
>       input_settings?: Record<string, JsonValue> | null
>     } | null,
>     created_datetime?: string | null,
>     updated_datetime?: string | null,
>     deactivated_datetime?: string | null
>   } | null,
>   value?: JsonValue | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### listCustomers

`customers.listCustomers`

Gorgias REST: List customers.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.customers.listCustomers({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   email?: string | null,
>   external_id?: string | null,
>   language?: aa | ab | af | ak | sq | am | ar | an | hy | as | av | ae | ay | az | ba | bm | eu | be | bn | bh | bi | bs | br | bg | my | ca | ch | ce | zh | cu | cv | kw | co | cr | cs | da | dv | nl | dz | en | eo | et | ee | fo | fj | fi | fr | fy | ff | ka | de | gd | ga | gl | gv | el | gn | gu | ht | ha | he | hz | hi | ho | hr | hu | ig | is | io | ii | iu | ie | ia | id | ik | it | jv | ja | kl | kn | ks | kr | kk | km | ki | rw | ky | kv | kg | ko | kj | ku | lo | la | lv | li | ln | lt | lb | lu | lg | mk | mh | ml | mi | mr | ms | mg | mt | mn | na | nv | nr | nd | ng | ne | nn | nb | no | ny | oc | oj | or | om | os | pa | fa | pi | pl | pt | ps | qu | rc | rm | ro | rn | ru | sg | sa | si | sk | sl | se | sm | sn | sd | so | st | es | sc | sr | ss | su | sw | sv | ty | ta | tt | te | tg | tl | th | bo | ti | to | tn | ts | tk | tr | tw | ug | uk | ur | uz | ve | vi | vo | cy | wa | wo | xh | yi | yo | za | zu,
>   limit?: number,
>   name?: string | null,
>   order_by?: created_datetime:asc | created_datetime:desc | updated_datetime:asc | updated_datetime:desc,
>   timezone?: Africa/Abidjan | Africa/Accra | Africa/Addis_Ababa | Africa/Algiers | Africa/Asmara | Africa/Asmera | Africa/Bamako | Africa/Bangui | Africa/Banjul | Africa/Bissau | Africa/Blantyre | Africa/Brazzaville | Africa/Bujumbura | Africa/Cairo | Africa/Casablanca | Africa/Ceuta | Africa/Conakry | Africa/Dakar | Africa/Dar_es_Salaam | Africa/Djibouti | Africa/Douala | Africa/El_Aaiun | Africa/Freetown | Africa/Gaborone | Africa/Harare | Africa/Johannesburg | Africa/Juba | Africa/Kampala | Africa/Khartoum | Africa/Kigali | Africa/Kinshasa | Africa/Lagos | Africa/Libreville | Africa/Lome | Africa/Luanda | Africa/Lubumbashi | Africa/Lusaka | Africa/Malabo | Africa/Maputo | Africa/Maseru | Africa/Mbabane | Africa/Mogadishu | Africa/Monrovia | Africa/Nairobi | Africa/Ndjamena | Africa/Niamey | Africa/Nouakchott | Africa/Ouagadougou | Africa/Porto-Novo | Africa/Sao_Tome | Africa/Timbuktu | Africa/Tripoli | Africa/Tunis | Africa/Windhoek | America/Adak | America/Anchorage | America/Anguilla | America/Antigua | America/Araguaina | America/Argentina/Buenos_Aires | America/Argentina/Catamarca | America/Argentina/ComodRivadavia | America/Argentina/Cordoba | America/Argentina/Jujuy | America/Argentina/La_Rioja | America/Argentina/Mendoza | America/Argentina/Rio_Gallegos | America/Argentina/Salta | America/Argentina/San_Juan | America/Argentina/San_Luis | America/Argentina/Tucuman | America/Argentina/Ushuaia | America/Aruba | America/Asuncion | America/Atikokan | America/Atka | America/Bahia | America/Bahia_Banderas | America/Barbados | America/Belem | America/Belize | America/Blanc-Sablon | America/Boa_Vista | America/Bogota | America/Boise | America/Buenos_Aires | America/Cambridge_Bay | America/Campo_Grande | America/Cancun | America/Caracas | America/Catamarca | America/Cayenne | America/Cayman | America/Chicago | America/Chihuahua | America/Ciudad_Juarez | America/Coral_Harbour | America/Cordoba | America/Costa_Rica | America/Coyhaique | America/Creston | America/Cuiaba | America/Curacao | America/Danmarkshavn | America/Dawson | America/Dawson_Creek | America/Denver | America/Detroit | America/Dominica | America/Edmonton | America/Eirunepe | America/El_Salvador | America/Ensenada | America/Fort_Nelson | America/Fort_Wayne | America/Fortaleza | America/Glace_Bay | America/Godthab | America/Goose_Bay | America/Grand_Turk | America/Grenada | America/Guadeloupe | America/Guatemala | America/Guayaquil | America/Guyana | America/Halifax | America/Havana | America/Hermosillo | America/Indiana/Indianapolis | America/Indiana/Knox | America/Indiana/Marengo | America/Indiana/Petersburg | America/Indiana/Tell_City | America/Indiana/Vevay | America/Indiana/Vincennes | America/Indiana/Winamac | America/Indianapolis | America/Inuvik | America/Iqaluit | America/Jamaica | America/Jujuy | America/Juneau | America/Kentucky/Louisville | America/Kentucky/Monticello | America/Knox_IN | America/Kralendijk | America/La_Paz | America/Lima | America/Los_Angeles | America/Louisville | America/Lower_Princes | America/Maceio | America/Managua | America/Manaus | America/Marigot | America/Martinique | America/Matamoros | America/Mazatlan | America/Mendoza | America/Menominee | America/Merida | America/Metlakatla | America/Mexico_City | America/Miquelon | America/Moncton | America/Monterrey | America/Montevideo | America/Montreal | America/Montserrat | America/Nassau | America/New_York | America/Nipigon | America/Nome | America/Noronha | America/North_Dakota/Beulah | America/North_Dakota/Center | America/North_Dakota/New_Salem | America/Nuuk | America/Ojinaga | America/Panama | America/Pangnirtung | America/Paramaribo | America/Phoenix | America/Port-au-Prince | America/Port_of_Spain | America/Porto_Acre | America/Porto_Velho | America/Puerto_Rico | America/Punta_Arenas | America/Rainy_River | America/Rankin_Inlet | America/Recife | America/Regina | America/Resolute | America/Rio_Branco | America/Rosario | America/Santa_Isabel | America/Santarem | America/Santiago | America/Santo_Domingo | America/Sao_Paulo | America/Scoresbysund | America/Shiprock | America/Sitka | America/St_Barthelemy | America/St_Johns | America/St_Kitts | America/St_Lucia | America/St_Thomas | America/St_Vincent | America/Swift_Current | America/Tegucigalpa | America/Thule | America/Thunder_Bay | America/Tijuana | America/Toronto | America/Tortola | America/Vancouver | America/Virgin | America/Whitehorse | America/Winnipeg | America/Yakutat | America/Yellowknife | Antarctica/Casey | Antarctica/Davis | Antarctica/DumontDUrville | Antarctica/Macquarie | Antarctica/Mawson | Antarctica/McMurdo | Antarctica/Palmer | Antarctica/Rothera | Antarctica/South_Pole | Antarctica/Syowa | Antarctica/Troll | Antarctica/Vostok | Arctic/Longyearbyen | Asia/Aden | Asia/Almaty | Asia/Amman | Asia/Anadyr | Asia/Aqtau | Asia/Aqtobe | Asia/Ashgabat | Asia/Ashkhabad | Asia/Atyrau | Asia/Baghdad | Asia/Bahrain | Asia/Baku | Asia/Bangkok | Asia/Barnaul | Asia/Beirut | Asia/Bishkek | Asia/Brunei | Asia/Calcutta | Asia/Chita | Asia/Choibalsan | Asia/Chongqing | Asia/Chungking | Asia/Colombo | Asia/Dacca | Asia/Damascus | Asia/Dhaka | Asia/Dili | Asia/Dubai | Asia/Dushanbe | Asia/Famagusta | Asia/Gaza | Asia/Harbin | Asia/Hebron | Asia/Ho_Chi_Minh | Asia/Hong_Kong | Asia/Hovd | Asia/Irkutsk | Asia/Istanbul | Asia/Jakarta | Asia/Jayapura | Asia/Jerusalem | Asia/Kabul | Asia/Kamchatka | Asia/Karachi | Asia/Kashgar | Asia/Kathmandu | Asia/Katmandu | Asia/Khandyga | Asia/Kolkata | Asia/Krasnoyarsk | Asia/Kuala_Lumpur | Asia/Kuching | Asia/Kuwait | Asia/Macao | Asia/Macau | Asia/Magadan | Asia/Makassar | Asia/Manila | Asia/Muscat | Asia/Nicosia | Asia/Novokuznetsk | Asia/Novosibirsk | Asia/Omsk | Asia/Oral | Asia/Phnom_Penh | Asia/Pontianak | Asia/Pyongyang | Asia/Qatar | Asia/Qostanay | Asia/Qyzylorda | Asia/Rangoon | Asia/Riyadh | Asia/Saigon | Asia/Sakhalin | Asia/Samarkand | Asia/Seoul | Asia/Shanghai | Asia/Singapore | Asia/Srednekolymsk | Asia/Taipei | Asia/Tashkent | Asia/Tbilisi | Asia/Tehran | Asia/Tel_Aviv | Asia/Thimbu | Asia/Thimphu | Asia/Tokyo | Asia/Tomsk | Asia/Ujung_Pandang | Asia/Ulaanbaatar | Asia/Ulan_Bator | Asia/Urumqi | Asia/Ust-Nera | Asia/Vientiane | Asia/Vladivostok | Asia/Yakutsk | Asia/Yangon | Asia/Yekaterinburg | Asia/Yerevan | Atlantic/Azores | Atlantic/Bermuda | Atlantic/Canary | Atlantic/Cape_Verde | Atlantic/Faeroe | Atlantic/Faroe | Atlantic/Jan_Mayen | Atlantic/Madeira | Atlantic/Reykjavik | Atlantic/South_Georgia | Atlantic/St_Helena | Atlantic/Stanley | Australia/ACT | Australia/Adelaide | Australia/Brisbane | Australia/Broken_Hill | Australia/Canberra | Australia/Currie | Australia/Darwin | Australia/Eucla | Australia/Hobart | Australia/LHI | Australia/Lindeman | Australia/Lord_Howe | Australia/Melbourne | Australia/NSW | Australia/North | Australia/Perth | Australia/Queensland | Australia/South | Australia/Sydney | Australia/Tasmania | Australia/Victoria | Australia/West | Australia/Yancowinna | Brazil/Acre | Brazil/DeNoronha | Brazil/East | Brazil/West | CET | CST6CDT | Canada/Atlantic | Canada/Central | Canada/Eastern | Canada/Mountain | Canada/Newfoundland | Canada/Pacific | Canada/Saskatchewan | Canada/Yukon | Chile/Continental | Chile/EasterIsland | Cuba | EET | EST | EST5EDT | Egypt | Eire | Etc/GMT | Etc/GMT+0 | Etc/GMT+1 | Etc/GMT+10 | Etc/GMT+11 | Etc/GMT+12 | Etc/GMT+2 | Etc/GMT+3 | Etc/GMT+4 | Etc/GMT+5 | Etc/GMT+6 | Etc/GMT+7 | Etc/GMT+8 | Etc/GMT+9 | Etc/GMT-0 | Etc/GMT-1 | Etc/GMT-10 | Etc/GMT-11 | Etc/GMT-12 | Etc/GMT-13 | Etc/GMT-14 | Etc/GMT-2 | Etc/GMT-3 | Etc/GMT-4 | Etc/GMT-5 | Etc/GMT-6 | Etc/GMT-7 | Etc/GMT-8 | Etc/GMT-9 | Etc/GMT0 | Etc/Greenwich | Etc/UCT | Etc/UTC | Etc/Universal | Etc/Zulu | Europe/Amsterdam | Europe/Andorra | Europe/Astrakhan | Europe/Athens | Europe/Belfast | Europe/Belgrade | Europe/Berlin | Europe/Bratislava | Europe/Brussels | Europe/Bucharest | Europe/Budapest | Europe/Busingen | Europe/Chisinau | Europe/Copenhagen | Europe/Dublin | Europe/Gibraltar | Europe/Guernsey | Europe/Helsinki | Europe/Isle_of_Man | Europe/Istanbul | Europe/Jersey | Europe/Kaliningrad | Europe/Kiev | Europe/Kirov | Europe/Kyiv | Europe/Lisbon | Europe/Ljubljana | Europe/London | Europe/Luxembourg | Europe/Madrid | Europe/Malta | Europe/Mariehamn | Europe/Minsk | Europe/Monaco | Europe/Moscow | Europe/Nicosia | Europe/Oslo | Europe/Paris | Europe/Podgorica | Europe/Prague | Europe/Riga | Europe/Rome | Europe/Samara | Europe/San_Marino | Europe/Sarajevo | Europe/Saratov | Europe/Simferopol | Europe/Skopje | Europe/Sofia | Europe/Stockholm | Europe/Tallinn | Europe/Tirane | Europe/Tiraspol | Europe/Ulyanovsk | Europe/Uzhgorod | Europe/Vaduz | Europe/Vatican | Europe/Vienna | Europe/Vilnius | Europe/Volgograd | Europe/Warsaw | Europe/Zagreb | Europe/Zaporozhye | Europe/Zurich | GB | GB-Eire | GMT | GMT+0 | GMT-0 | GMT0 | Greenwich | HST | Hongkong | Iceland | Indian/Antananarivo | Indian/Chagos | Indian/Christmas | Indian/Cocos | Indian/Comoro | Indian/Kerguelen | Indian/Mahe | Indian/Maldives | Indian/Mauritius | Indian/Mayotte | Indian/Reunion | Iran | Israel | Jamaica | Japan | Kwajalein | Libya | MET | MST | MST7MDT | Mexico/BajaNorte | Mexico/BajaSur | Mexico/General | NZ | NZ-CHAT | Navajo | PRC | PST8PDT | Pacific/Apia | Pacific/Auckland | Pacific/Bougainville | Pacific/Chatham | Pacific/Chuuk | Pacific/Easter | Pacific/Efate | Pacific/Enderbury | Pacific/Fakaofo | Pacific/Fiji | Pacific/Funafuti | Pacific/Galapagos | Pacific/Gambier | Pacific/Guadalcanal | Pacific/Guam | Pacific/Honolulu | Pacific/Johnston | Pacific/Kanton | Pacific/Kiritimati | Pacific/Kosrae | Pacific/Kwajalein | Pacific/Majuro | Pacific/Marquesas | Pacific/Midway | Pacific/Nauru | Pacific/Niue | Pacific/Norfolk | Pacific/Noumea | Pacific/Pago_Pago | Pacific/Palau | Pacific/Pitcairn | Pacific/Pohnpei | Pacific/Ponape | Pacific/Port_Moresby | Pacific/Rarotonga | Pacific/Saipan | Pacific/Samoa | Pacific/Tahiti | Pacific/Tarawa | Pacific/Tongatapu | Pacific/Truk | Pacific/Wake | Pacific/Wallis | Pacific/Yap | Poland | Portugal | ROC | ROK | Singapore | Turkey | UCT | US/Alaska | US/Aleutian | US/Arizona | US/Central | US/East-Indiana | US/Eastern | US/Hawaii | US/Indiana-Starke | US/Michigan | US/Mountain | US/Pacific | US/Samoa | UTC | Universal | W-SU | WET | Zulu,
>   view_id?: number,
>   channel_type?: string,
>   channel_address?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   created_datetime?: string | null,
>   email?: string | null,
>   external_id?: string | null,
>   firstname?: string | null,
>   language?: aa | ab | af | ak | sq | am | ar | an | hy | as | av | ae | ay | az | ba | bm | eu | be | bn | bh | bi | bs | br | bg | my | ca | ch | ce | zh | cu | cv | kw | co | cr | cs | da | dv | nl | dz | en | eo | et | ee | fo | fj | fi | fr | fy | ff | ka | de | gd | ga | gl | gv | el | gn | gu | ht | ha | he | hz | hi | ho | hr | hu | ig | is | io | ii | iu | ie | ia | id | ik | it | jv | ja | kl | kn | ks | kr | kk | km | ki | rw | ky | kv | kg | ko | kj | ku | lo | la | lv | li | ln | lt | lb | lu | lg | mk | mh | ml | mi | mr | ms | mg | mt | mn | na | nv | nr | nd | ng | ne | nn | nb | no | ny | oc | oj | or | om | os | pa | fa | pi | pl | pt | ps | qu | rc | rm | ro | rn | ru | sg | sa | si | sk | sl | se | sm | sn | sd | so | st | es | sc | sr | ss | su | sw | sv | ty | ta | tt | te | tg | tl | th | bo | ti | to | tn | ts | tk | tr | tw | ug | uk | ur | uz | ve | vi | vo | cy | wa | wo | xh | yi | yo | za | zu | string | null,
>   lastname?: string | null,
>   name?: string | null,
>   timezone?: Africa/Abidjan | Africa/Accra | Africa/Addis_Ababa | Africa/Algiers | Africa/Asmara | Africa/Asmera | Africa/Bamako | Africa/Bangui | Africa/Banjul | Africa/Bissau | Africa/Blantyre | Africa/Brazzaville | Africa/Bujumbura | Africa/Cairo | Africa/Casablanca | Africa/Ceuta | Africa/Conakry | Africa/Dakar | Africa/Dar_es_Salaam | Africa/Djibouti | Africa/Douala | Africa/El_Aaiun | Africa/Freetown | Africa/Gaborone | Africa/Harare | Africa/Johannesburg | Africa/Juba | Africa/Kampala | Africa/Khartoum | Africa/Kigali | Africa/Kinshasa | Africa/Lagos | Africa/Libreville | Africa/Lome | Africa/Luanda | Africa/Lubumbashi | Africa/Lusaka | Africa/Malabo | Africa/Maputo | Africa/Maseru | Africa/Mbabane | Africa/Mogadishu | Africa/Monrovia | Africa/Nairobi | Africa/Ndjamena | Africa/Niamey | Africa/Nouakchott | Africa/Ouagadougou | Africa/Porto-Novo | Africa/Sao_Tome | Africa/Timbuktu | Africa/Tripoli | Africa/Tunis | Africa/Windhoek | America/Adak | America/Anchorage | America/Anguilla | America/Antigua | America/Araguaina | America/Argentina/Buenos_Aires | America/Argentina/Catamarca | America/Argentina/ComodRivadavia | America/Argentina/Cordoba | America/Argentina/Jujuy | America/Argentina/La_Rioja | America/Argentina/Mendoza | America/Argentina/Rio_Gallegos | America/Argentina/Salta | America/Argentina/San_Juan | America/Argentina/San_Luis | America/Argentina/Tucuman | America/Argentina/Ushuaia | America/Aruba | America/Asuncion | America/Atikokan | America/Atka | America/Bahia | America/Bahia_Banderas | America/Barbados | America/Belem | America/Belize | America/Blanc-Sablon | America/Boa_Vista | America/Bogota | America/Boise | America/Buenos_Aires | America/Cambridge_Bay | America/Campo_Grande | America/Cancun | America/Caracas | America/Catamarca | America/Cayenne | America/Cayman | America/Chicago | America/Chihuahua | America/Ciudad_Juarez | America/Coral_Harbour | America/Cordoba | America/Costa_Rica | America/Coyhaique | America/Creston | America/Cuiaba | America/Curacao | America/Danmarkshavn | America/Dawson | America/Dawson_Creek | America/Denver | America/Detroit | America/Dominica | America/Edmonton | America/Eirunepe | America/El_Salvador | America/Ensenada | America/Fort_Nelson | America/Fort_Wayne | America/Fortaleza | America/Glace_Bay | America/Godthab | America/Goose_Bay | America/Grand_Turk | America/Grenada | America/Guadeloupe | America/Guatemala | America/Guayaquil | America/Guyana | America/Halifax | America/Havana | America/Hermosillo | America/Indiana/Indianapolis | America/Indiana/Knox | America/Indiana/Marengo | America/Indiana/Petersburg | America/Indiana/Tell_City | America/Indiana/Vevay | America/Indiana/Vincennes | America/Indiana/Winamac | America/Indianapolis | America/Inuvik | America/Iqaluit | America/Jamaica | America/Jujuy | America/Juneau | America/Kentucky/Louisville | America/Kentucky/Monticello | America/Knox_IN | America/Kralendijk | America/La_Paz | America/Lima | America/Los_Angeles | America/Louisville | America/Lower_Princes | America/Maceio | America/Managua | America/Manaus | America/Marigot | America/Martinique | America/Matamoros | America/Mazatlan | America/Mendoza | America/Menominee | America/Merida | America/Metlakatla | America/Mexico_City | America/Miquelon | America/Moncton | America/Monterrey | America/Montevideo | America/Montreal | America/Montserrat | America/Nassau | America/New_York | America/Nipigon | America/Nome | America/Noronha | America/North_Dakota/Beulah | America/North_Dakota/Center | America/North_Dakota/New_Salem | America/Nuuk | America/Ojinaga | America/Panama | America/Pangnirtung | America/Paramaribo | America/Phoenix | America/Port-au-Prince | America/Port_of_Spain | America/Porto_Acre | America/Porto_Velho | America/Puerto_Rico | America/Punta_Arenas | America/Rainy_River | America/Rankin_Inlet | America/Recife | America/Regina | America/Resolute | America/Rio_Branco | America/Rosario | America/Santa_Isabel | America/Santarem | America/Santiago | America/Santo_Domingo | America/Sao_Paulo | America/Scoresbysund | America/Shiprock | America/Sitka | America/St_Barthelemy | America/St_Johns | America/St_Kitts | America/St_Lucia | America/St_Thomas | America/St_Vincent | America/Swift_Current | America/Tegucigalpa | America/Thule | America/Thunder_Bay | America/Tijuana | America/Toronto | America/Tortola | America/Vancouver | America/Virgin | America/Whitehorse | America/Winnipeg | America/Yakutat | America/Yellowknife | Antarctica/Casey | Antarctica/Davis | Antarctica/DumontDUrville | Antarctica/Macquarie | Antarctica/Mawson | Antarctica/McMurdo | Antarctica/Palmer | Antarctica/Rothera | Antarctica/South_Pole | Antarctica/Syowa | Antarctica/Troll | Antarctica/Vostok | Arctic/Longyearbyen | Asia/Aden | Asia/Almaty | Asia/Amman | Asia/Anadyr | Asia/Aqtau | Asia/Aqtobe | Asia/Ashgabat | Asia/Ashkhabad | Asia/Atyrau | Asia/Baghdad | Asia/Bahrain | Asia/Baku | Asia/Bangkok | Asia/Barnaul | Asia/Beirut | Asia/Bishkek | Asia/Brunei | Asia/Calcutta | Asia/Chita | Asia/Choibalsan | Asia/Chongqing | Asia/Chungking | Asia/Colombo | Asia/Dacca | Asia/Damascus | Asia/Dhaka | Asia/Dili | Asia/Dubai | Asia/Dushanbe | Asia/Famagusta | Asia/Gaza | Asia/Harbin | Asia/Hebron | Asia/Ho_Chi_Minh | Asia/Hong_Kong | Asia/Hovd | Asia/Irkutsk | Asia/Istanbul | Asia/Jakarta | Asia/Jayapura | Asia/Jerusalem | Asia/Kabul | Asia/Kamchatka | Asia/Karachi | Asia/Kashgar | Asia/Kathmandu | Asia/Katmandu | Asia/Khandyga | Asia/Kolkata | Asia/Krasnoyarsk | Asia/Kuala_Lumpur | Asia/Kuching | Asia/Kuwait | Asia/Macao | Asia/Macau | Asia/Magadan | Asia/Makassar | Asia/Manila | Asia/Muscat | Asia/Nicosia | Asia/Novokuznetsk | Asia/Novosibirsk | Asia/Omsk | Asia/Oral | Asia/Phnom_Penh | Asia/Pontianak | Asia/Pyongyang | Asia/Qatar | Asia/Qostanay | Asia/Qyzylorda | Asia/Rangoon | Asia/Riyadh | Asia/Saigon | Asia/Sakhalin | Asia/Samarkand | Asia/Seoul | Asia/Shanghai | Asia/Singapore | Asia/Srednekolymsk | Asia/Taipei | Asia/Tashkent | Asia/Tbilisi | Asia/Tehran | Asia/Tel_Aviv | Asia/Thimbu | Asia/Thimphu | Asia/Tokyo | Asia/Tomsk | Asia/Ujung_Pandang | Asia/Ulaanbaatar | Asia/Ulan_Bator | Asia/Urumqi | Asia/Ust-Nera | Asia/Vientiane | Asia/Vladivostok | Asia/Yakutsk | Asia/Yangon | Asia/Yekaterinburg | Asia/Yerevan | Atlantic/Azores | Atlantic/Bermuda | Atlantic/Canary | Atlantic/Cape_Verde | Atlantic/Faeroe | Atlantic/Faroe | Atlantic/Jan_Mayen | Atlantic/Madeira | Atlantic/Reykjavik | Atlantic/South_Georgia | Atlantic/St_Helena | Atlantic/Stanley | Australia/ACT | Australia/Adelaide | Australia/Brisbane | Australia/Broken_Hill | Australia/Canberra | Australia/Currie | Australia/Darwin | Australia/Eucla | Australia/Hobart | Australia/LHI | Australia/Lindeman | Australia/Lord_Howe | Australia/Melbourne | Australia/NSW | Australia/North | Australia/Perth | Australia/Queensland | Australia/South | Australia/Sydney | Australia/Tasmania | Australia/Victoria | Australia/West | Australia/Yancowinna | Brazil/Acre | Brazil/DeNoronha | Brazil/East | Brazil/West | CET | CST6CDT | Canada/Atlantic | Canada/Central | Canada/Eastern | Canada/Mountain | Canada/Newfoundland | Canada/Pacific | Canada/Saskatchewan | Canada/Yukon | Chile/Continental | Chile/EasterIsland | Cuba | EET | EST | EST5EDT | Egypt | Eire | Etc/GMT | Etc/GMT+0 | Etc/GMT+1 | Etc/GMT+10 | Etc/GMT+11 | Etc/GMT+12 | Etc/GMT+2 | Etc/GMT+3 | Etc/GMT+4 | Etc/GMT+5 | Etc/GMT+6 | Etc/GMT+7 | Etc/GMT+8 | Etc/GMT+9 | Etc/GMT-0 | Etc/GMT-1 | Etc/GMT-10 | Etc/GMT-11 | Etc/GMT-12 | Etc/GMT-13 | Etc/GMT-14 | Etc/GMT-2 | Etc/GMT-3 | Etc/GMT-4 | Etc/GMT-5 | Etc/GMT-6 | Etc/GMT-7 | Etc/GMT-8 | Etc/GMT-9 | Etc/GMT0 | Etc/Greenwich | Etc/UCT | Etc/UTC | Etc/Universal | Etc/Zulu | Europe/Amsterdam | Europe/Andorra | Europe/Astrakhan | Europe/Athens | Europe/Belfast | Europe/Belgrade | Europe/Berlin | Europe/Bratislava | Europe/Brussels | Europe/Bucharest | Europe/Budapest | Europe/Busingen | Europe/Chisinau | Europe/Copenhagen | Europe/Dublin | Europe/Gibraltar | Europe/Guernsey | Europe/Helsinki | Europe/Isle_of_Man | Europe/Istanbul | Europe/Jersey | Europe/Kaliningrad | Europe/Kiev | Europe/Kirov | Europe/Kyiv | Europe/Lisbon | Europe/Ljubljana | Europe/London | Europe/Luxembourg | Europe/Madrid | Europe/Malta | Europe/Mariehamn | Europe/Minsk | Europe/Monaco | Europe/Moscow | Europe/Nicosia | Europe/Oslo | Europe/Paris | Europe/Podgorica | Europe/Prague | Europe/Riga | Europe/Rome | Europe/Samara | Europe/San_Marino | Europe/Sarajevo | Europe/Saratov | Europe/Simferopol | Europe/Skopje | Europe/Sofia | Europe/Stockholm | Europe/Tallinn | Europe/Tirane | Europe/Tiraspol | Europe/Ulyanovsk | Europe/Uzhgorod | Europe/Vaduz | Europe/Vatican | Europe/Vienna | Europe/Vilnius | Europe/Volgograd | Europe/Warsaw | Europe/Zagreb | Europe/Zaporozhye | Europe/Zurich | GB | GB-Eire | GMT | GMT+0 | GMT-0 | GMT0 | Greenwich | HST | Hongkong | Iceland | Indian/Antananarivo | Indian/Chagos | Indian/Christmas | Indian/Cocos | Indian/Comoro | Indian/Kerguelen | Indian/Mahe | Indian/Maldives | Indian/Mauritius | Indian/Mayotte | Indian/Reunion | Iran | Israel | Jamaica | Japan | Kwajalein | Libya | MET | MST | MST7MDT | Mexico/BajaNorte | Mexico/BajaSur | Mexico/General | NZ | NZ-CHAT | Navajo | PRC | PST8PDT | Pacific/Apia | Pacific/Auckland | Pacific/Bougainville | Pacific/Chatham | Pacific/Chuuk | Pacific/Easter | Pacific/Efate | Pacific/Enderbury | Pacific/Fakaofo | Pacific/Fiji | Pacific/Funafuti | Pacific/Galapagos | Pacific/Gambier | Pacific/Guadalcanal | Pacific/Guam | Pacific/Honolulu | Pacific/Johnston | Pacific/Kanton | Pacific/Kiritimati | Pacific/Kosrae | Pacific/Kwajalein | Pacific/Majuro | Pacific/Marquesas | Pacific/Midway | Pacific/Nauru | Pacific/Niue | Pacific/Norfolk | Pacific/Noumea | Pacific/Pago_Pago | Pacific/Palau | Pacific/Pitcairn | Pacific/Pohnpei | Pacific/Ponape | Pacific/Port_Moresby | Pacific/Rarotonga | Pacific/Saipan | Pacific/Samoa | Pacific/Tahiti | Pacific/Tarawa | Pacific/Tongatapu | Pacific/Truk | Pacific/Wake | Pacific/Wallis | Pacific/Yap | Poland | Portugal | ROC | ROK | Singapore | Turkey | UCT | US/Alaska | US/Aleutian | US/Arizona | US/Central | US/East-Indiana | US/Eastern | US/Hawaii | US/Indiana-Starke | US/Michigan | US/Mountain | US/Pacific | US/Samoa | UTC | Universal | W-SU | WET | Zulu | string | null,
>   updated_datetime?: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### mergeCustomers

`customers.mergeCustomers`

Gorgias REST: Merge two customers.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.customers.mergeCustomers({"query":{"source_id":1,"target_id":1},"body":{"channels":[],"email":"agent@acme.test","external_id":"x","language":"aa","name":"x","timezone":"Africa/Abidjan"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |
| `body` | `object` | Yes | — |

Merges and deletes the source customer; this action cannot be undone.

> [accordion] query full type
>
> ```ts theme={null}
> {
>   source_id: number,
>   target_id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   channels?: {
>     type: string,
>     address: string,
>     preferred: boolean
>   }[],
>   email?: string | null,
>   external_id?: string | null,
>   language?: aa | ab | af | ak | sq | am | ar | an | hy | as | av | ae | ay | az | ba | bm | eu | be | bn | bh | bi | bs | br | bg | my | ca | ch | ce | zh | cu | cv | kw | co | cr | cs | da | dv | nl | dz | en | eo | et | ee | fo | fj | fi | fr | fy | ff | ka | de | gd | ga | gl | gv | el | gn | gu | ht | ha | he | hz | hi | ho | hr | hu | ig | is | io | ii | iu | ie | ia | id | ik | it | jv | ja | kl | kn | ks | kr | kk | km | ki | rw | ky | kv | kg | ko | kj | ku | lo | la | lv | li | ln | lt | lb | lu | lg | mk | mh | ml | mi | mr | ms | mg | mt | mn | na | nv | nr | nd | ng | ne | nn | nb | no | ny | oc | oj | or | om | os | pa | fa | pi | pl | pt | ps | qu | rc | rm | ro | rn | ru | sg | sa | si | sk | sl | se | sm | sn | sd | so | st | es | sc | sr | ss | su | sw | sv | ty | ta | tt | te | tg | tl | th | bo | ti | to | tn | ts | tk | tr | tw | ug | uk | ur | uz | ve | vi | vo | cy | wa | wo | xh | yi | yo | za | zu,
>   name?: string | null,
>   timezone?: Africa/Abidjan | Africa/Accra | Africa/Addis_Ababa | Africa/Algiers | Africa/Asmara | Africa/Asmera | Africa/Bamako | Africa/Bangui | Africa/Banjul | Africa/Bissau | Africa/Blantyre | Africa/Brazzaville | Africa/Bujumbura | Africa/Cairo | Africa/Casablanca | Africa/Ceuta | Africa/Conakry | Africa/Dakar | Africa/Dar_es_Salaam | Africa/Djibouti | Africa/Douala | Africa/El_Aaiun | Africa/Freetown | Africa/Gaborone | Africa/Harare | Africa/Johannesburg | Africa/Juba | Africa/Kampala | Africa/Khartoum | Africa/Kigali | Africa/Kinshasa | Africa/Lagos | Africa/Libreville | Africa/Lome | Africa/Luanda | Africa/Lubumbashi | Africa/Lusaka | Africa/Malabo | Africa/Maputo | Africa/Maseru | Africa/Mbabane | Africa/Mogadishu | Africa/Monrovia | Africa/Nairobi | Africa/Ndjamena | Africa/Niamey | Africa/Nouakchott | Africa/Ouagadougou | Africa/Porto-Novo | Africa/Sao_Tome | Africa/Timbuktu | Africa/Tripoli | Africa/Tunis | Africa/Windhoek | America/Adak | America/Anchorage | America/Anguilla | America/Antigua | America/Araguaina | America/Argentina/Buenos_Aires | America/Argentina/Catamarca | America/Argentina/ComodRivadavia | America/Argentina/Cordoba | America/Argentina/Jujuy | America/Argentina/La_Rioja | America/Argentina/Mendoza | America/Argentina/Rio_Gallegos | America/Argentina/Salta | America/Argentina/San_Juan | America/Argentina/San_Luis | America/Argentina/Tucuman | America/Argentina/Ushuaia | America/Aruba | America/Asuncion | America/Atikokan | America/Atka | America/Bahia | America/Bahia_Banderas | America/Barbados | America/Belem | America/Belize | America/Blanc-Sablon | America/Boa_Vista | America/Bogota | America/Boise | America/Buenos_Aires | America/Cambridge_Bay | America/Campo_Grande | America/Cancun | America/Caracas | America/Catamarca | America/Cayenne | America/Cayman | America/Chicago | America/Chihuahua | America/Ciudad_Juarez | America/Coral_Harbour | America/Cordoba | America/Costa_Rica | America/Coyhaique | America/Creston | America/Cuiaba | America/Curacao | America/Danmarkshavn | America/Dawson | America/Dawson_Creek | America/Denver | America/Detroit | America/Dominica | America/Edmonton | America/Eirunepe | America/El_Salvador | America/Ensenada | America/Fort_Nelson | America/Fort_Wayne | America/Fortaleza | America/Glace_Bay | America/Godthab | America/Goose_Bay | America/Grand_Turk | America/Grenada | America/Guadeloupe | America/Guatemala | America/Guayaquil | America/Guyana | America/Halifax | America/Havana | America/Hermosillo | America/Indiana/Indianapolis | America/Indiana/Knox | America/Indiana/Marengo | America/Indiana/Petersburg | America/Indiana/Tell_City | America/Indiana/Vevay | America/Indiana/Vincennes | America/Indiana/Winamac | America/Indianapolis | America/Inuvik | America/Iqaluit | America/Jamaica | America/Jujuy | America/Juneau | America/Kentucky/Louisville | America/Kentucky/Monticello | America/Knox_IN | America/Kralendijk | America/La_Paz | America/Lima | America/Los_Angeles | America/Louisville | America/Lower_Princes | America/Maceio | America/Managua | America/Manaus | America/Marigot | America/Martinique | America/Matamoros | America/Mazatlan | America/Mendoza | America/Menominee | America/Merida | America/Metlakatla | America/Mexico_City | America/Miquelon | America/Moncton | America/Monterrey | America/Montevideo | America/Montreal | America/Montserrat | America/Nassau | America/New_York | America/Nipigon | America/Nome | America/Noronha | America/North_Dakota/Beulah | America/North_Dakota/Center | America/North_Dakota/New_Salem | America/Nuuk | America/Ojinaga | America/Panama | America/Pangnirtung | America/Paramaribo | America/Phoenix | America/Port-au-Prince | America/Port_of_Spain | America/Porto_Acre | America/Porto_Velho | America/Puerto_Rico | America/Punta_Arenas | America/Rainy_River | America/Rankin_Inlet | America/Recife | America/Regina | America/Resolute | America/Rio_Branco | America/Rosario | America/Santa_Isabel | America/Santarem | America/Santiago | America/Santo_Domingo | America/Sao_Paulo | America/Scoresbysund | America/Shiprock | America/Sitka | America/St_Barthelemy | America/St_Johns | America/St_Kitts | America/St_Lucia | America/St_Thomas | America/St_Vincent | America/Swift_Current | America/Tegucigalpa | America/Thule | America/Thunder_Bay | America/Tijuana | America/Toronto | America/Tortola | America/Vancouver | America/Virgin | America/Whitehorse | America/Winnipeg | America/Yakutat | America/Yellowknife | Antarctica/Casey | Antarctica/Davis | Antarctica/DumontDUrville | Antarctica/Macquarie | Antarctica/Mawson | Antarctica/McMurdo | Antarctica/Palmer | Antarctica/Rothera | Antarctica/South_Pole | Antarctica/Syowa | Antarctica/Troll | Antarctica/Vostok | Arctic/Longyearbyen | Asia/Aden | Asia/Almaty | Asia/Amman | Asia/Anadyr | Asia/Aqtau | Asia/Aqtobe | Asia/Ashgabat | Asia/Ashkhabad | Asia/Atyrau | Asia/Baghdad | Asia/Bahrain | Asia/Baku | Asia/Bangkok | Asia/Barnaul | Asia/Beirut | Asia/Bishkek | Asia/Brunei | Asia/Calcutta | Asia/Chita | Asia/Choibalsan | Asia/Chongqing | Asia/Chungking | Asia/Colombo | Asia/Dacca | Asia/Damascus | Asia/Dhaka | Asia/Dili | Asia/Dubai | Asia/Dushanbe | Asia/Famagusta | Asia/Gaza | Asia/Harbin | Asia/Hebron | Asia/Ho_Chi_Minh | Asia/Hong_Kong | Asia/Hovd | Asia/Irkutsk | Asia/Istanbul | Asia/Jakarta | Asia/Jayapura | Asia/Jerusalem | Asia/Kabul | Asia/Kamchatka | Asia/Karachi | Asia/Kashgar | Asia/Kathmandu | Asia/Katmandu | Asia/Khandyga | Asia/Kolkata | Asia/Krasnoyarsk | Asia/Kuala_Lumpur | Asia/Kuching | Asia/Kuwait | Asia/Macao | Asia/Macau | Asia/Magadan | Asia/Makassar | Asia/Manila | Asia/Muscat | Asia/Nicosia | Asia/Novokuznetsk | Asia/Novosibirsk | Asia/Omsk | Asia/Oral | Asia/Phnom_Penh | Asia/Pontianak | Asia/Pyongyang | Asia/Qatar | Asia/Qostanay | Asia/Qyzylorda | Asia/Rangoon | Asia/Riyadh | Asia/Saigon | Asia/Sakhalin | Asia/Samarkand | Asia/Seoul | Asia/Shanghai | Asia/Singapore | Asia/Srednekolymsk | Asia/Taipei | Asia/Tashkent | Asia/Tbilisi | Asia/Tehran | Asia/Tel_Aviv | Asia/Thimbu | Asia/Thimphu | Asia/Tokyo | Asia/Tomsk | Asia/Ujung_Pandang | Asia/Ulaanbaatar | Asia/Ulan_Bator | Asia/Urumqi | Asia/Ust-Nera | Asia/Vientiane | Asia/Vladivostok | Asia/Yakutsk | Asia/Yangon | Asia/Yekaterinburg | Asia/Yerevan | Atlantic/Azores | Atlantic/Bermuda | Atlantic/Canary | Atlantic/Cape_Verde | Atlantic/Faeroe | Atlantic/Faroe | Atlantic/Jan_Mayen | Atlantic/Madeira | Atlantic/Reykjavik | Atlantic/South_Georgia | Atlantic/St_Helena | Atlantic/Stanley | Australia/ACT | Australia/Adelaide | Australia/Brisbane | Australia/Broken_Hill | Australia/Canberra | Australia/Currie | Australia/Darwin | Australia/Eucla | Australia/Hobart | Australia/LHI | Australia/Lindeman | Australia/Lord_Howe | Australia/Melbourne | Australia/NSW | Australia/North | Australia/Perth | Australia/Queensland | Australia/South | Australia/Sydney | Australia/Tasmania | Australia/Victoria | Australia/West | Australia/Yancowinna | Brazil/Acre | Brazil/DeNoronha | Brazil/East | Brazil/West | CET | CST6CDT | Canada/Atlantic | Canada/Central | Canada/Eastern | Canada/Mountain | Canada/Newfoundland | Canada/Pacific | Canada/Saskatchewan | Canada/Yukon | Chile/Continental | Chile/EasterIsland | Cuba | EET | EST | EST5EDT | Egypt | Eire | Etc/GMT | Etc/GMT+0 | Etc/GMT+1 | Etc/GMT+10 | Etc/GMT+11 | Etc/GMT+12 | Etc/GMT+2 | Etc/GMT+3 | Etc/GMT+4 | Etc/GMT+5 | Etc/GMT+6 | Etc/GMT+7 | Etc/GMT+8 | Etc/GMT+9 | Etc/GMT-0 | Etc/GMT-1 | Etc/GMT-10 | Etc/GMT-11 | Etc/GMT-12 | Etc/GMT-13 | Etc/GMT-14 | Etc/GMT-2 | Etc/GMT-3 | Etc/GMT-4 | Etc/GMT-5 | Etc/GMT-6 | Etc/GMT-7 | Etc/GMT-8 | Etc/GMT-9 | Etc/GMT0 | Etc/Greenwich | Etc/UCT | Etc/UTC | Etc/Universal | Etc/Zulu | Europe/Amsterdam | Europe/Andorra | Europe/Astrakhan | Europe/Athens | Europe/Belfast | Europe/Belgrade | Europe/Berlin | Europe/Bratislava | Europe/Brussels | Europe/Bucharest | Europe/Budapest | Europe/Busingen | Europe/Chisinau | Europe/Copenhagen | Europe/Dublin | Europe/Gibraltar | Europe/Guernsey | Europe/Helsinki | Europe/Isle_of_Man | Europe/Istanbul | Europe/Jersey | Europe/Kaliningrad | Europe/Kiev | Europe/Kirov | Europe/Kyiv | Europe/Lisbon | Europe/Ljubljana | Europe/London | Europe/Luxembourg | Europe/Madrid | Europe/Malta | Europe/Mariehamn | Europe/Minsk | Europe/Monaco | Europe/Moscow | Europe/Nicosia | Europe/Oslo | Europe/Paris | Europe/Podgorica | Europe/Prague | Europe/Riga | Europe/Rome | Europe/Samara | Europe/San_Marino | Europe/Sarajevo | Europe/Saratov | Europe/Simferopol | Europe/Skopje | Europe/Sofia | Europe/Stockholm | Europe/Tallinn | Europe/Tirane | Europe/Tiraspol | Europe/Ulyanovsk | Europe/Uzhgorod | Europe/Vaduz | Europe/Vatican | Europe/Vienna | Europe/Vilnius | Europe/Volgograd | Europe/Warsaw | Europe/Zagreb | Europe/Zaporozhye | Europe/Zurich | GB | GB-Eire | GMT | GMT+0 | GMT-0 | GMT0 | Greenwich | HST | Hongkong | Iceland | Indian/Antananarivo | Indian/Chagos | Indian/Christmas | Indian/Cocos | Indian/Comoro | Indian/Kerguelen | Indian/Mahe | Indian/Maldives | Indian/Mauritius | Indian/Mayotte | Indian/Reunion | Iran | Israel | Jamaica | Japan | Kwajalein | Libya | MET | MST | MST7MDT | Mexico/BajaNorte | Mexico/BajaSur | Mexico/General | NZ | NZ-CHAT | Navajo | PRC | PST8PDT | Pacific/Apia | Pacific/Auckland | Pacific/Bougainville | Pacific/Chatham | Pacific/Chuuk | Pacific/Easter | Pacific/Efate | Pacific/Enderbury | Pacific/Fakaofo | Pacific/Fiji | Pacific/Funafuti | Pacific/Galapagos | Pacific/Gambier | Pacific/Guadalcanal | Pacific/Guam | Pacific/Honolulu | Pacific/Johnston | Pacific/Kanton | Pacific/Kiritimati | Pacific/Kosrae | Pacific/Kwajalein | Pacific/Majuro | Pacific/Marquesas | Pacific/Midway | Pacific/Nauru | Pacific/Niue | Pacific/Norfolk | Pacific/Noumea | Pacific/Pago_Pago | Pacific/Palau | Pacific/Pitcairn | Pacific/Pohnpei | Pacific/Ponape | Pacific/Port_Moresby | Pacific/Rarotonga | Pacific/Saipan | Pacific/Samoa | Pacific/Tahiti | Pacific/Tarawa | Pacific/Tongatapu | Pacific/Truk | Pacific/Wake | Pacific/Wallis | Pacific/Yap | Poland | Portugal | ROC | ROK | Singapore | Turkey | UCT | US/Alaska | US/Aleutian | US/Arizona | US/Central | US/East-Indiana | US/Eastern | US/Hawaii | US/Indiana-Starke | US/Michigan | US/Mountain | US/Pacific | US/Samoa | UTC | Universal | W-SU | WET | Zulu
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `channels` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `firstname` | `string \| null` | No | — |
| `integrations` | `Record<string, JsonValue> \| null` | No | — |
| `language` | `aa \| ab \| af \| ak \| sq \| am \| ar \| an \| hy \| as \| av \| ae \| ay \| az \| ba \| bm \| eu \| be \| bn \| bh \| bi \| bs \| br \| bg \| my \| ca \| ch \| ce \| zh \| cu \| cv \| kw \| co \| cr \| cs \| da \| dv \| nl \| dz \| en \| eo \| et \| ee \| fo \| fj \| fi \| fr \| fy \| ff \| ka \| de \| gd \| ga \| gl \| gv \| el \| gn \| gu \| ht \| ha \| he \| hz \| hi \| ho \| hr \| hu \| ig \| is \| io \| ii \| iu \| ie \| ia \| id \| ik \| it \| jv \| ja \| kl \| kn \| ks \| kr \| kk \| km \| ki \| rw \| ky \| kv \| kg \| ko \| kj \| ku \| lo \| la \| lv \| li \| ln \| lt \| lb \| lu \| lg \| mk \| mh \| ml \| mi \| mr \| ms \| mg \| mt \| mn \| na \| nv \| nr \| nd \| ng \| ne \| nn \| nb \| no \| ny \| oc \| oj \| or \| om \| os \| pa \| fa \| pi \| pl \| pt \| ps \| qu \| rc \| rm \| ro \| rn \| ru \| sg \| sa \| si \| sk \| sl \| se \| sm \| sn \| sd \| so \| st \| es \| sc \| sr \| ss \| su \| sw \| sv \| ty \| ta \| tt \| te \| tg \| tl \| th \| bo \| ti \| to \| tn \| ts \| tk \| tr \| tw \| ug \| uk \| ur \| uz \| ve \| vi \| vo \| cy \| wa \| wo \| xh \| yi \| yo \| za \| zu \| string \| null` | No | — |
| `lastname` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `note` | `string \| null` | No | — |
| `timezone` | `Africa/Abidjan \| Africa/Accra \| Africa/Addis_Ababa \| Africa/Algiers \| Africa/Asmara \| Africa/Asmera \| Africa/Bamako \| Africa/Bangui \| Africa/Banjul \| Africa/Bissau \| Africa/Blantyre \| Africa/Brazzaville \| Africa/Bujumbura \| Africa/Cairo \| Africa/Casablanca \| Africa/Ceuta \| Africa/Conakry \| Africa/Dakar \| Africa/Dar_es_Salaam \| Africa/Djibouti \| Africa/Douala \| Africa/El_Aaiun \| Africa/Freetown \| Africa/Gaborone \| Africa/Harare \| Africa/Johannesburg \| Africa/Juba \| Africa/Kampala \| Africa/Khartoum \| Africa/Kigali \| Africa/Kinshasa \| Africa/Lagos \| Africa/Libreville \| Africa/Lome \| Africa/Luanda \| Africa/Lubumbashi \| Africa/Lusaka \| Africa/Malabo \| Africa/Maputo \| Africa/Maseru \| Africa/Mbabane \| Africa/Mogadishu \| Africa/Monrovia \| Africa/Nairobi \| Africa/Ndjamena \| Africa/Niamey \| Africa/Nouakchott \| Africa/Ouagadougou \| Africa/Porto-Novo \| Africa/Sao_Tome \| Africa/Timbuktu \| Africa/Tripoli \| Africa/Tunis \| Africa/Windhoek \| America/Adak \| America/Anchorage \| America/Anguilla \| America/Antigua \| America/Araguaina \| America/Argentina/Buenos_Aires \| America/Argentina/Catamarca \| America/Argentina/ComodRivadavia \| America/Argentina/Cordoba \| America/Argentina/Jujuy \| America/Argentina/La_Rioja \| America/Argentina/Mendoza \| America/Argentina/Rio_Gallegos \| America/Argentina/Salta \| America/Argentina/San_Juan \| America/Argentina/San_Luis \| America/Argentina/Tucuman \| America/Argentina/Ushuaia \| America/Aruba \| America/Asuncion \| America/Atikokan \| America/Atka \| America/Bahia \| America/Bahia_Banderas \| America/Barbados \| America/Belem \| America/Belize \| America/Blanc-Sablon \| America/Boa_Vista \| America/Bogota \| America/Boise \| America/Buenos_Aires \| America/Cambridge_Bay \| America/Campo_Grande \| America/Cancun \| America/Caracas \| America/Catamarca \| America/Cayenne \| America/Cayman \| America/Chicago \| America/Chihuahua \| America/Ciudad_Juarez \| America/Coral_Harbour \| America/Cordoba \| America/Costa_Rica \| America/Coyhaique \| America/Creston \| America/Cuiaba \| America/Curacao \| America/Danmarkshavn \| America/Dawson \| America/Dawson_Creek \| America/Denver \| America/Detroit \| America/Dominica \| America/Edmonton \| America/Eirunepe \| America/El_Salvador \| America/Ensenada \| America/Fort_Nelson \| America/Fort_Wayne \| America/Fortaleza \| America/Glace_Bay \| America/Godthab \| America/Goose_Bay \| America/Grand_Turk \| America/Grenada \| America/Guadeloupe \| America/Guatemala \| America/Guayaquil \| America/Guyana \| America/Halifax \| America/Havana \| America/Hermosillo \| America/Indiana/Indianapolis \| America/Indiana/Knox \| America/Indiana/Marengo \| America/Indiana/Petersburg \| America/Indiana/Tell_City \| America/Indiana/Vevay \| America/Indiana/Vincennes \| America/Indiana/Winamac \| America/Indianapolis \| America/Inuvik \| America/Iqaluit \| America/Jamaica \| America/Jujuy \| America/Juneau \| America/Kentucky/Louisville \| America/Kentucky/Monticello \| America/Knox_IN \| America/Kralendijk \| America/La_Paz \| America/Lima \| America/Los_Angeles \| America/Louisville \| America/Lower_Princes \| America/Maceio \| America/Managua \| America/Manaus \| America/Marigot \| America/Martinique \| America/Matamoros \| America/Mazatlan \| America/Mendoza \| America/Menominee \| America/Merida \| America/Metlakatla \| America/Mexico_City \| America/Miquelon \| America/Moncton \| America/Monterrey \| America/Montevideo \| America/Montreal \| America/Montserrat \| America/Nassau \| America/New_York \| America/Nipigon \| America/Nome \| America/Noronha \| America/North_Dakota/Beulah \| America/North_Dakota/Center \| America/North_Dakota/New_Salem \| America/Nuuk \| America/Ojinaga \| America/Panama \| America/Pangnirtung \| America/Paramaribo \| America/Phoenix \| America/Port-au-Prince \| America/Port_of_Spain \| America/Porto_Acre \| America/Porto_Velho \| America/Puerto_Rico \| America/Punta_Arenas \| America/Rainy_River \| America/Rankin_Inlet \| America/Recife \| America/Regina \| America/Resolute \| America/Rio_Branco \| America/Rosario \| America/Santa_Isabel \| America/Santarem \| America/Santiago \| America/Santo_Domingo \| America/Sao_Paulo \| America/Scoresbysund \| America/Shiprock \| America/Sitka \| America/St_Barthelemy \| America/St_Johns \| America/St_Kitts \| America/St_Lucia \| America/St_Thomas \| America/St_Vincent \| America/Swift_Current \| America/Tegucigalpa \| America/Thule \| America/Thunder_Bay \| America/Tijuana \| America/Toronto \| America/Tortola \| America/Vancouver \| America/Virgin \| America/Whitehorse \| America/Winnipeg \| America/Yakutat \| America/Yellowknife \| Antarctica/Casey \| Antarctica/Davis \| Antarctica/DumontDUrville \| Antarctica/Macquarie \| Antarctica/Mawson \| Antarctica/McMurdo \| Antarctica/Palmer \| Antarctica/Rothera \| Antarctica/South_Pole \| Antarctica/Syowa \| Antarctica/Troll \| Antarctica/Vostok \| Arctic/Longyearbyen \| Asia/Aden \| Asia/Almaty \| Asia/Amman \| Asia/Anadyr \| Asia/Aqtau \| Asia/Aqtobe \| Asia/Ashgabat \| Asia/Ashkhabad \| Asia/Atyrau \| Asia/Baghdad \| Asia/Bahrain \| Asia/Baku \| Asia/Bangkok \| Asia/Barnaul \| Asia/Beirut \| Asia/Bishkek \| Asia/Brunei \| Asia/Calcutta \| Asia/Chita \| Asia/Choibalsan \| Asia/Chongqing \| Asia/Chungking \| Asia/Colombo \| Asia/Dacca \| Asia/Damascus \| Asia/Dhaka \| Asia/Dili \| Asia/Dubai \| Asia/Dushanbe \| Asia/Famagusta \| Asia/Gaza \| Asia/Harbin \| Asia/Hebron \| Asia/Ho_Chi_Minh \| Asia/Hong_Kong \| Asia/Hovd \| Asia/Irkutsk \| Asia/Istanbul \| Asia/Jakarta \| Asia/Jayapura \| Asia/Jerusalem \| Asia/Kabul \| Asia/Kamchatka \| Asia/Karachi \| Asia/Kashgar \| Asia/Kathmandu \| Asia/Katmandu \| Asia/Khandyga \| Asia/Kolkata \| Asia/Krasnoyarsk \| Asia/Kuala_Lumpur \| Asia/Kuching \| Asia/Kuwait \| Asia/Macao \| Asia/Macau \| Asia/Magadan \| Asia/Makassar \| Asia/Manila \| Asia/Muscat \| Asia/Nicosia \| Asia/Novokuznetsk \| Asia/Novosibirsk \| Asia/Omsk \| Asia/Oral \| Asia/Phnom_Penh \| Asia/Pontianak \| Asia/Pyongyang \| Asia/Qatar \| Asia/Qostanay \| Asia/Qyzylorda \| Asia/Rangoon \| Asia/Riyadh \| Asia/Saigon \| Asia/Sakhalin \| Asia/Samarkand \| Asia/Seoul \| Asia/Shanghai \| Asia/Singapore \| Asia/Srednekolymsk \| Asia/Taipei \| Asia/Tashkent \| Asia/Tbilisi \| Asia/Tehran \| Asia/Tel_Aviv \| Asia/Thimbu \| Asia/Thimphu \| Asia/Tokyo \| Asia/Tomsk \| Asia/Ujung_Pandang \| Asia/Ulaanbaatar \| Asia/Ulan_Bator \| Asia/Urumqi \| Asia/Ust-Nera \| Asia/Vientiane \| Asia/Vladivostok \| Asia/Yakutsk \| Asia/Yangon \| Asia/Yekaterinburg \| Asia/Yerevan \| Atlantic/Azores \| Atlantic/Bermuda \| Atlantic/Canary \| Atlantic/Cape_Verde \| Atlantic/Faeroe \| Atlantic/Faroe \| Atlantic/Jan_Mayen \| Atlantic/Madeira \| Atlantic/Reykjavik \| Atlantic/South_Georgia \| Atlantic/St_Helena \| Atlantic/Stanley \| Australia/ACT \| Australia/Adelaide \| Australia/Brisbane \| Australia/Broken_Hill \| Australia/Canberra \| Australia/Currie \| Australia/Darwin \| Australia/Eucla \| Australia/Hobart \| Australia/LHI \| Australia/Lindeman \| Australia/Lord_Howe \| Australia/Melbourne \| Australia/NSW \| Australia/North \| Australia/Perth \| Australia/Queensland \| Australia/South \| Australia/Sydney \| Australia/Tasmania \| Australia/Victoria \| Australia/West \| Australia/Yancowinna \| Brazil/Acre \| Brazil/DeNoronha \| Brazil/East \| Brazil/West \| CET \| CST6CDT \| Canada/Atlantic \| Canada/Central \| Canada/Eastern \| Canada/Mountain \| Canada/Newfoundland \| Canada/Pacific \| Canada/Saskatchewan \| Canada/Yukon \| Chile/Continental \| Chile/EasterIsland \| Cuba \| EET \| EST \| EST5EDT \| Egypt \| Eire \| Etc/GMT \| Etc/GMT+0 \| Etc/GMT+1 \| Etc/GMT+10 \| Etc/GMT+11 \| Etc/GMT+12 \| Etc/GMT+2 \| Etc/GMT+3 \| Etc/GMT+4 \| Etc/GMT+5 \| Etc/GMT+6 \| Etc/GMT+7 \| Etc/GMT+8 \| Etc/GMT+9 \| Etc/GMT-0 \| Etc/GMT-1 \| Etc/GMT-10 \| Etc/GMT-11 \| Etc/GMT-12 \| Etc/GMT-13 \| Etc/GMT-14 \| Etc/GMT-2 \| Etc/GMT-3 \| Etc/GMT-4 \| Etc/GMT-5 \| Etc/GMT-6 \| Etc/GMT-7 \| Etc/GMT-8 \| Etc/GMT-9 \| Etc/GMT0 \| Etc/Greenwich \| Etc/UCT \| Etc/UTC \| Etc/Universal \| Etc/Zulu \| Europe/Amsterdam \| Europe/Andorra \| Europe/Astrakhan \| Europe/Athens \| Europe/Belfast \| Europe/Belgrade \| Europe/Berlin \| Europe/Bratislava \| Europe/Brussels \| Europe/Bucharest \| Europe/Budapest \| Europe/Busingen \| Europe/Chisinau \| Europe/Copenhagen \| Europe/Dublin \| Europe/Gibraltar \| Europe/Guernsey \| Europe/Helsinki \| Europe/Isle_of_Man \| Europe/Istanbul \| Europe/Jersey \| Europe/Kaliningrad \| Europe/Kiev \| Europe/Kirov \| Europe/Kyiv \| Europe/Lisbon \| Europe/Ljubljana \| Europe/London \| Europe/Luxembourg \| Europe/Madrid \| Europe/Malta \| Europe/Mariehamn \| Europe/Minsk \| Europe/Monaco \| Europe/Moscow \| Europe/Nicosia \| Europe/Oslo \| Europe/Paris \| Europe/Podgorica \| Europe/Prague \| Europe/Riga \| Europe/Rome \| Europe/Samara \| Europe/San_Marino \| Europe/Sarajevo \| Europe/Saratov \| Europe/Simferopol \| Europe/Skopje \| Europe/Sofia \| Europe/Stockholm \| Europe/Tallinn \| Europe/Tirane \| Europe/Tiraspol \| Europe/Ulyanovsk \| Europe/Uzhgorod \| Europe/Vaduz \| Europe/Vatican \| Europe/Vienna \| Europe/Vilnius \| Europe/Volgograd \| Europe/Warsaw \| Europe/Zagreb \| Europe/Zaporozhye \| Europe/Zurich \| GB \| GB-Eire \| GMT \| GMT+0 \| GMT-0 \| GMT0 \| Greenwich \| HST \| Hongkong \| Iceland \| Indian/Antananarivo \| Indian/Chagos \| Indian/Christmas \| Indian/Cocos \| Indian/Comoro \| Indian/Kerguelen \| Indian/Mahe \| Indian/Maldives \| Indian/Mauritius \| Indian/Mayotte \| Indian/Reunion \| Iran \| Israel \| Jamaica \| Japan \| Kwajalein \| Libya \| MET \| MST \| MST7MDT \| Mexico/BajaNorte \| Mexico/BajaSur \| Mexico/General \| NZ \| NZ-CHAT \| Navajo \| PRC \| PST8PDT \| Pacific/Apia \| Pacific/Auckland \| Pacific/Bougainville \| Pacific/Chatham \| Pacific/Chuuk \| Pacific/Easter \| Pacific/Efate \| Pacific/Enderbury \| Pacific/Fakaofo \| Pacific/Fiji \| Pacific/Funafuti \| Pacific/Galapagos \| Pacific/Gambier \| Pacific/Guadalcanal \| Pacific/Guam \| Pacific/Honolulu \| Pacific/Johnston \| Pacific/Kanton \| Pacific/Kiritimati \| Pacific/Kosrae \| Pacific/Kwajalein \| Pacific/Majuro \| Pacific/Marquesas \| Pacific/Midway \| Pacific/Nauru \| Pacific/Niue \| Pacific/Norfolk \| Pacific/Noumea \| Pacific/Pago_Pago \| Pacific/Palau \| Pacific/Pitcairn \| Pacific/Pohnpei \| Pacific/Ponape \| Pacific/Port_Moresby \| Pacific/Rarotonga \| Pacific/Saipan \| Pacific/Samoa \| Pacific/Tahiti \| Pacific/Tarawa \| Pacific/Tongatapu \| Pacific/Truk \| Pacific/Wake \| Pacific/Wallis \| Pacific/Yap \| Poland \| Portugal \| ROC \| ROK \| Singapore \| Turkey \| UCT \| US/Alaska \| US/Aleutian \| US/Arizona \| US/Central \| US/East-Indiana \| US/Eastern \| US/Hawaii \| US/Indiana-Starke \| US/Michigan \| US/Mountain \| US/Pacific \| US/Samoa \| UTC \| Universal \| W-SU \| WET \| Zulu \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `external_data` | `Record<string, JsonValue>` | No | — |
| `ecommerce_data` | `Record<string, JsonValue>` | No | — |

> [accordion] channels full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   type?: string | null,
>   address?: string | null,
>   preferred?: boolean | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   deleted_datetime?: string | null,
>   user?: {
>     id?: number | null,
>     name?: string | null
>   } | null,
>   customer?: {
>     id?: number | null,
>     name?: string | null
>   } | null
> }[] | null
> ```

***

### updateCustomer

`customers.updateCustomer`

Gorgias REST: Update a customer.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.customers.updateCustomer({"path":{"id":1},"body":{"channels":[],"email":"agent@acme.test","external_id":"x","language":"aa","name":"x","timezone":"Africa/Abidjan"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   channels?: {
>     type: string,
>     address: string,
>     preferred: boolean
>   }[],
>   email?: string | null,
>   external_id?: string | null,
>   language?: aa | ab | af | ak | sq | am | ar | an | hy | as | av | ae | ay | az | ba | bm | eu | be | bn | bh | bi | bs | br | bg | my | ca | ch | ce | zh | cu | cv | kw | co | cr | cs | da | dv | nl | dz | en | eo | et | ee | fo | fj | fi | fr | fy | ff | ka | de | gd | ga | gl | gv | el | gn | gu | ht | ha | he | hz | hi | ho | hr | hu | ig | is | io | ii | iu | ie | ia | id | ik | it | jv | ja | kl | kn | ks | kr | kk | km | ki | rw | ky | kv | kg | ko | kj | ku | lo | la | lv | li | ln | lt | lb | lu | lg | mk | mh | ml | mi | mr | ms | mg | mt | mn | na | nv | nr | nd | ng | ne | nn | nb | no | ny | oc | oj | or | om | os | pa | fa | pi | pl | pt | ps | qu | rc | rm | ro | rn | ru | sg | sa | si | sk | sl | se | sm | sn | sd | so | st | es | sc | sr | ss | su | sw | sv | ty | ta | tt | te | tg | tl | th | bo | ti | to | tn | ts | tk | tr | tw | ug | uk | ur | uz | ve | vi | vo | cy | wa | wo | xh | yi | yo | za | zu,
>   name?: string | null,
>   timezone?: Africa/Abidjan | Africa/Accra | Africa/Addis_Ababa | Africa/Algiers | Africa/Asmara | Africa/Asmera | Africa/Bamako | Africa/Bangui | Africa/Banjul | Africa/Bissau | Africa/Blantyre | Africa/Brazzaville | Africa/Bujumbura | Africa/Cairo | Africa/Casablanca | Africa/Ceuta | Africa/Conakry | Africa/Dakar | Africa/Dar_es_Salaam | Africa/Djibouti | Africa/Douala | Africa/El_Aaiun | Africa/Freetown | Africa/Gaborone | Africa/Harare | Africa/Johannesburg | Africa/Juba | Africa/Kampala | Africa/Khartoum | Africa/Kigali | Africa/Kinshasa | Africa/Lagos | Africa/Libreville | Africa/Lome | Africa/Luanda | Africa/Lubumbashi | Africa/Lusaka | Africa/Malabo | Africa/Maputo | Africa/Maseru | Africa/Mbabane | Africa/Mogadishu | Africa/Monrovia | Africa/Nairobi | Africa/Ndjamena | Africa/Niamey | Africa/Nouakchott | Africa/Ouagadougou | Africa/Porto-Novo | Africa/Sao_Tome | Africa/Timbuktu | Africa/Tripoli | Africa/Tunis | Africa/Windhoek | America/Adak | America/Anchorage | America/Anguilla | America/Antigua | America/Araguaina | America/Argentina/Buenos_Aires | America/Argentina/Catamarca | America/Argentina/ComodRivadavia | America/Argentina/Cordoba | America/Argentina/Jujuy | America/Argentina/La_Rioja | America/Argentina/Mendoza | America/Argentina/Rio_Gallegos | America/Argentina/Salta | America/Argentina/San_Juan | America/Argentina/San_Luis | America/Argentina/Tucuman | America/Argentina/Ushuaia | America/Aruba | America/Asuncion | America/Atikokan | America/Atka | America/Bahia | America/Bahia_Banderas | America/Barbados | America/Belem | America/Belize | America/Blanc-Sablon | America/Boa_Vista | America/Bogota | America/Boise | America/Buenos_Aires | America/Cambridge_Bay | America/Campo_Grande | America/Cancun | America/Caracas | America/Catamarca | America/Cayenne | America/Cayman | America/Chicago | America/Chihuahua | America/Ciudad_Juarez | America/Coral_Harbour | America/Cordoba | America/Costa_Rica | America/Coyhaique | America/Creston | America/Cuiaba | America/Curacao | America/Danmarkshavn | America/Dawson | America/Dawson_Creek | America/Denver | America/Detroit | America/Dominica | America/Edmonton | America/Eirunepe | America/El_Salvador | America/Ensenada | America/Fort_Nelson | America/Fort_Wayne | America/Fortaleza | America/Glace_Bay | America/Godthab | America/Goose_Bay | America/Grand_Turk | America/Grenada | America/Guadeloupe | America/Guatemala | America/Guayaquil | America/Guyana | America/Halifax | America/Havana | America/Hermosillo | America/Indiana/Indianapolis | America/Indiana/Knox | America/Indiana/Marengo | America/Indiana/Petersburg | America/Indiana/Tell_City | America/Indiana/Vevay | America/Indiana/Vincennes | America/Indiana/Winamac | America/Indianapolis | America/Inuvik | America/Iqaluit | America/Jamaica | America/Jujuy | America/Juneau | America/Kentucky/Louisville | America/Kentucky/Monticello | America/Knox_IN | America/Kralendijk | America/La_Paz | America/Lima | America/Los_Angeles | America/Louisville | America/Lower_Princes | America/Maceio | America/Managua | America/Manaus | America/Marigot | America/Martinique | America/Matamoros | America/Mazatlan | America/Mendoza | America/Menominee | America/Merida | America/Metlakatla | America/Mexico_City | America/Miquelon | America/Moncton | America/Monterrey | America/Montevideo | America/Montreal | America/Montserrat | America/Nassau | America/New_York | America/Nipigon | America/Nome | America/Noronha | America/North_Dakota/Beulah | America/North_Dakota/Center | America/North_Dakota/New_Salem | America/Nuuk | America/Ojinaga | America/Panama | America/Pangnirtung | America/Paramaribo | America/Phoenix | America/Port-au-Prince | America/Port_of_Spain | America/Porto_Acre | America/Porto_Velho | America/Puerto_Rico | America/Punta_Arenas | America/Rainy_River | America/Rankin_Inlet | America/Recife | America/Regina | America/Resolute | America/Rio_Branco | America/Rosario | America/Santa_Isabel | America/Santarem | America/Santiago | America/Santo_Domingo | America/Sao_Paulo | America/Scoresbysund | America/Shiprock | America/Sitka | America/St_Barthelemy | America/St_Johns | America/St_Kitts | America/St_Lucia | America/St_Thomas | America/St_Vincent | America/Swift_Current | America/Tegucigalpa | America/Thule | America/Thunder_Bay | America/Tijuana | America/Toronto | America/Tortola | America/Vancouver | America/Virgin | America/Whitehorse | America/Winnipeg | America/Yakutat | America/Yellowknife | Antarctica/Casey | Antarctica/Davis | Antarctica/DumontDUrville | Antarctica/Macquarie | Antarctica/Mawson | Antarctica/McMurdo | Antarctica/Palmer | Antarctica/Rothera | Antarctica/South_Pole | Antarctica/Syowa | Antarctica/Troll | Antarctica/Vostok | Arctic/Longyearbyen | Asia/Aden | Asia/Almaty | Asia/Amman | Asia/Anadyr | Asia/Aqtau | Asia/Aqtobe | Asia/Ashgabat | Asia/Ashkhabad | Asia/Atyrau | Asia/Baghdad | Asia/Bahrain | Asia/Baku | Asia/Bangkok | Asia/Barnaul | Asia/Beirut | Asia/Bishkek | Asia/Brunei | Asia/Calcutta | Asia/Chita | Asia/Choibalsan | Asia/Chongqing | Asia/Chungking | Asia/Colombo | Asia/Dacca | Asia/Damascus | Asia/Dhaka | Asia/Dili | Asia/Dubai | Asia/Dushanbe | Asia/Famagusta | Asia/Gaza | Asia/Harbin | Asia/Hebron | Asia/Ho_Chi_Minh | Asia/Hong_Kong | Asia/Hovd | Asia/Irkutsk | Asia/Istanbul | Asia/Jakarta | Asia/Jayapura | Asia/Jerusalem | Asia/Kabul | Asia/Kamchatka | Asia/Karachi | Asia/Kashgar | Asia/Kathmandu | Asia/Katmandu | Asia/Khandyga | Asia/Kolkata | Asia/Krasnoyarsk | Asia/Kuala_Lumpur | Asia/Kuching | Asia/Kuwait | Asia/Macao | Asia/Macau | Asia/Magadan | Asia/Makassar | Asia/Manila | Asia/Muscat | Asia/Nicosia | Asia/Novokuznetsk | Asia/Novosibirsk | Asia/Omsk | Asia/Oral | Asia/Phnom_Penh | Asia/Pontianak | Asia/Pyongyang | Asia/Qatar | Asia/Qostanay | Asia/Qyzylorda | Asia/Rangoon | Asia/Riyadh | Asia/Saigon | Asia/Sakhalin | Asia/Samarkand | Asia/Seoul | Asia/Shanghai | Asia/Singapore | Asia/Srednekolymsk | Asia/Taipei | Asia/Tashkent | Asia/Tbilisi | Asia/Tehran | Asia/Tel_Aviv | Asia/Thimbu | Asia/Thimphu | Asia/Tokyo | Asia/Tomsk | Asia/Ujung_Pandang | Asia/Ulaanbaatar | Asia/Ulan_Bator | Asia/Urumqi | Asia/Ust-Nera | Asia/Vientiane | Asia/Vladivostok | Asia/Yakutsk | Asia/Yangon | Asia/Yekaterinburg | Asia/Yerevan | Atlantic/Azores | Atlantic/Bermuda | Atlantic/Canary | Atlantic/Cape_Verde | Atlantic/Faeroe | Atlantic/Faroe | Atlantic/Jan_Mayen | Atlantic/Madeira | Atlantic/Reykjavik | Atlantic/South_Georgia | Atlantic/St_Helena | Atlantic/Stanley | Australia/ACT | Australia/Adelaide | Australia/Brisbane | Australia/Broken_Hill | Australia/Canberra | Australia/Currie | Australia/Darwin | Australia/Eucla | Australia/Hobart | Australia/LHI | Australia/Lindeman | Australia/Lord_Howe | Australia/Melbourne | Australia/NSW | Australia/North | Australia/Perth | Australia/Queensland | Australia/South | Australia/Sydney | Australia/Tasmania | Australia/Victoria | Australia/West | Australia/Yancowinna | Brazil/Acre | Brazil/DeNoronha | Brazil/East | Brazil/West | CET | CST6CDT | Canada/Atlantic | Canada/Central | Canada/Eastern | Canada/Mountain | Canada/Newfoundland | Canada/Pacific | Canada/Saskatchewan | Canada/Yukon | Chile/Continental | Chile/EasterIsland | Cuba | EET | EST | EST5EDT | Egypt | Eire | Etc/GMT | Etc/GMT+0 | Etc/GMT+1 | Etc/GMT+10 | Etc/GMT+11 | Etc/GMT+12 | Etc/GMT+2 | Etc/GMT+3 | Etc/GMT+4 | Etc/GMT+5 | Etc/GMT+6 | Etc/GMT+7 | Etc/GMT+8 | Etc/GMT+9 | Etc/GMT-0 | Etc/GMT-1 | Etc/GMT-10 | Etc/GMT-11 | Etc/GMT-12 | Etc/GMT-13 | Etc/GMT-14 | Etc/GMT-2 | Etc/GMT-3 | Etc/GMT-4 | Etc/GMT-5 | Etc/GMT-6 | Etc/GMT-7 | Etc/GMT-8 | Etc/GMT-9 | Etc/GMT0 | Etc/Greenwich | Etc/UCT | Etc/UTC | Etc/Universal | Etc/Zulu | Europe/Amsterdam | Europe/Andorra | Europe/Astrakhan | Europe/Athens | Europe/Belfast | Europe/Belgrade | Europe/Berlin | Europe/Bratislava | Europe/Brussels | Europe/Bucharest | Europe/Budapest | Europe/Busingen | Europe/Chisinau | Europe/Copenhagen | Europe/Dublin | Europe/Gibraltar | Europe/Guernsey | Europe/Helsinki | Europe/Isle_of_Man | Europe/Istanbul | Europe/Jersey | Europe/Kaliningrad | Europe/Kiev | Europe/Kirov | Europe/Kyiv | Europe/Lisbon | Europe/Ljubljana | Europe/London | Europe/Luxembourg | Europe/Madrid | Europe/Malta | Europe/Mariehamn | Europe/Minsk | Europe/Monaco | Europe/Moscow | Europe/Nicosia | Europe/Oslo | Europe/Paris | Europe/Podgorica | Europe/Prague | Europe/Riga | Europe/Rome | Europe/Samara | Europe/San_Marino | Europe/Sarajevo | Europe/Saratov | Europe/Simferopol | Europe/Skopje | Europe/Sofia | Europe/Stockholm | Europe/Tallinn | Europe/Tirane | Europe/Tiraspol | Europe/Ulyanovsk | Europe/Uzhgorod | Europe/Vaduz | Europe/Vatican | Europe/Vienna | Europe/Vilnius | Europe/Volgograd | Europe/Warsaw | Europe/Zagreb | Europe/Zaporozhye | Europe/Zurich | GB | GB-Eire | GMT | GMT+0 | GMT-0 | GMT0 | Greenwich | HST | Hongkong | Iceland | Indian/Antananarivo | Indian/Chagos | Indian/Christmas | Indian/Cocos | Indian/Comoro | Indian/Kerguelen | Indian/Mahe | Indian/Maldives | Indian/Mauritius | Indian/Mayotte | Indian/Reunion | Iran | Israel | Jamaica | Japan | Kwajalein | Libya | MET | MST | MST7MDT | Mexico/BajaNorte | Mexico/BajaSur | Mexico/General | NZ | NZ-CHAT | Navajo | PRC | PST8PDT | Pacific/Apia | Pacific/Auckland | Pacific/Bougainville | Pacific/Chatham | Pacific/Chuuk | Pacific/Easter | Pacific/Efate | Pacific/Enderbury | Pacific/Fakaofo | Pacific/Fiji | Pacific/Funafuti | Pacific/Galapagos | Pacific/Gambier | Pacific/Guadalcanal | Pacific/Guam | Pacific/Honolulu | Pacific/Johnston | Pacific/Kanton | Pacific/Kiritimati | Pacific/Kosrae | Pacific/Kwajalein | Pacific/Majuro | Pacific/Marquesas | Pacific/Midway | Pacific/Nauru | Pacific/Niue | Pacific/Norfolk | Pacific/Noumea | Pacific/Pago_Pago | Pacific/Palau | Pacific/Pitcairn | Pacific/Pohnpei | Pacific/Ponape | Pacific/Port_Moresby | Pacific/Rarotonga | Pacific/Saipan | Pacific/Samoa | Pacific/Tahiti | Pacific/Tarawa | Pacific/Tongatapu | Pacific/Truk | Pacific/Wake | Pacific/Wallis | Pacific/Yap | Poland | Portugal | ROC | ROK | Singapore | Turkey | UCT | US/Alaska | US/Aleutian | US/Arizona | US/Central | US/East-Indiana | US/Eastern | US/Hawaii | US/Indiana-Starke | US/Michigan | US/Mountain | US/Pacific | US/Samoa | UTC | Universal | W-SU | WET | Zulu
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `channels` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `firstname` | `string \| null` | No | — |
| `integrations` | `Record<string, JsonValue> \| null` | No | — |
| `language` | `aa \| ab \| af \| ak \| sq \| am \| ar \| an \| hy \| as \| av \| ae \| ay \| az \| ba \| bm \| eu \| be \| bn \| bh \| bi \| bs \| br \| bg \| my \| ca \| ch \| ce \| zh \| cu \| cv \| kw \| co \| cr \| cs \| da \| dv \| nl \| dz \| en \| eo \| et \| ee \| fo \| fj \| fi \| fr \| fy \| ff \| ka \| de \| gd \| ga \| gl \| gv \| el \| gn \| gu \| ht \| ha \| he \| hz \| hi \| ho \| hr \| hu \| ig \| is \| io \| ii \| iu \| ie \| ia \| id \| ik \| it \| jv \| ja \| kl \| kn \| ks \| kr \| kk \| km \| ki \| rw \| ky \| kv \| kg \| ko \| kj \| ku \| lo \| la \| lv \| li \| ln \| lt \| lb \| lu \| lg \| mk \| mh \| ml \| mi \| mr \| ms \| mg \| mt \| mn \| na \| nv \| nr \| nd \| ng \| ne \| nn \| nb \| no \| ny \| oc \| oj \| or \| om \| os \| pa \| fa \| pi \| pl \| pt \| ps \| qu \| rc \| rm \| ro \| rn \| ru \| sg \| sa \| si \| sk \| sl \| se \| sm \| sn \| sd \| so \| st \| es \| sc \| sr \| ss \| su \| sw \| sv \| ty \| ta \| tt \| te \| tg \| tl \| th \| bo \| ti \| to \| tn \| ts \| tk \| tr \| tw \| ug \| uk \| ur \| uz \| ve \| vi \| vo \| cy \| wa \| wo \| xh \| yi \| yo \| za \| zu \| string \| null` | No | — |
| `lastname` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `note` | `string \| null` | No | — |
| `timezone` | `Africa/Abidjan \| Africa/Accra \| Africa/Addis_Ababa \| Africa/Algiers \| Africa/Asmara \| Africa/Asmera \| Africa/Bamako \| Africa/Bangui \| Africa/Banjul \| Africa/Bissau \| Africa/Blantyre \| Africa/Brazzaville \| Africa/Bujumbura \| Africa/Cairo \| Africa/Casablanca \| Africa/Ceuta \| Africa/Conakry \| Africa/Dakar \| Africa/Dar_es_Salaam \| Africa/Djibouti \| Africa/Douala \| Africa/El_Aaiun \| Africa/Freetown \| Africa/Gaborone \| Africa/Harare \| Africa/Johannesburg \| Africa/Juba \| Africa/Kampala \| Africa/Khartoum \| Africa/Kigali \| Africa/Kinshasa \| Africa/Lagos \| Africa/Libreville \| Africa/Lome \| Africa/Luanda \| Africa/Lubumbashi \| Africa/Lusaka \| Africa/Malabo \| Africa/Maputo \| Africa/Maseru \| Africa/Mbabane \| Africa/Mogadishu \| Africa/Monrovia \| Africa/Nairobi \| Africa/Ndjamena \| Africa/Niamey \| Africa/Nouakchott \| Africa/Ouagadougou \| Africa/Porto-Novo \| Africa/Sao_Tome \| Africa/Timbuktu \| Africa/Tripoli \| Africa/Tunis \| Africa/Windhoek \| America/Adak \| America/Anchorage \| America/Anguilla \| America/Antigua \| America/Araguaina \| America/Argentina/Buenos_Aires \| America/Argentina/Catamarca \| America/Argentina/ComodRivadavia \| America/Argentina/Cordoba \| America/Argentina/Jujuy \| America/Argentina/La_Rioja \| America/Argentina/Mendoza \| America/Argentina/Rio_Gallegos \| America/Argentina/Salta \| America/Argentina/San_Juan \| America/Argentina/San_Luis \| America/Argentina/Tucuman \| America/Argentina/Ushuaia \| America/Aruba \| America/Asuncion \| America/Atikokan \| America/Atka \| America/Bahia \| America/Bahia_Banderas \| America/Barbados \| America/Belem \| America/Belize \| America/Blanc-Sablon \| America/Boa_Vista \| America/Bogota \| America/Boise \| America/Buenos_Aires \| America/Cambridge_Bay \| America/Campo_Grande \| America/Cancun \| America/Caracas \| America/Catamarca \| America/Cayenne \| America/Cayman \| America/Chicago \| America/Chihuahua \| America/Ciudad_Juarez \| America/Coral_Harbour \| America/Cordoba \| America/Costa_Rica \| America/Coyhaique \| America/Creston \| America/Cuiaba \| America/Curacao \| America/Danmarkshavn \| America/Dawson \| America/Dawson_Creek \| America/Denver \| America/Detroit \| America/Dominica \| America/Edmonton \| America/Eirunepe \| America/El_Salvador \| America/Ensenada \| America/Fort_Nelson \| America/Fort_Wayne \| America/Fortaleza \| America/Glace_Bay \| America/Godthab \| America/Goose_Bay \| America/Grand_Turk \| America/Grenada \| America/Guadeloupe \| America/Guatemala \| America/Guayaquil \| America/Guyana \| America/Halifax \| America/Havana \| America/Hermosillo \| America/Indiana/Indianapolis \| America/Indiana/Knox \| America/Indiana/Marengo \| America/Indiana/Petersburg \| America/Indiana/Tell_City \| America/Indiana/Vevay \| America/Indiana/Vincennes \| America/Indiana/Winamac \| America/Indianapolis \| America/Inuvik \| America/Iqaluit \| America/Jamaica \| America/Jujuy \| America/Juneau \| America/Kentucky/Louisville \| America/Kentucky/Monticello \| America/Knox_IN \| America/Kralendijk \| America/La_Paz \| America/Lima \| America/Los_Angeles \| America/Louisville \| America/Lower_Princes \| America/Maceio \| America/Managua \| America/Manaus \| America/Marigot \| America/Martinique \| America/Matamoros \| America/Mazatlan \| America/Mendoza \| America/Menominee \| America/Merida \| America/Metlakatla \| America/Mexico_City \| America/Miquelon \| America/Moncton \| America/Monterrey \| America/Montevideo \| America/Montreal \| America/Montserrat \| America/Nassau \| America/New_York \| America/Nipigon \| America/Nome \| America/Noronha \| America/North_Dakota/Beulah \| America/North_Dakota/Center \| America/North_Dakota/New_Salem \| America/Nuuk \| America/Ojinaga \| America/Panama \| America/Pangnirtung \| America/Paramaribo \| America/Phoenix \| America/Port-au-Prince \| America/Port_of_Spain \| America/Porto_Acre \| America/Porto_Velho \| America/Puerto_Rico \| America/Punta_Arenas \| America/Rainy_River \| America/Rankin_Inlet \| America/Recife \| America/Regina \| America/Resolute \| America/Rio_Branco \| America/Rosario \| America/Santa_Isabel \| America/Santarem \| America/Santiago \| America/Santo_Domingo \| America/Sao_Paulo \| America/Scoresbysund \| America/Shiprock \| America/Sitka \| America/St_Barthelemy \| America/St_Johns \| America/St_Kitts \| America/St_Lucia \| America/St_Thomas \| America/St_Vincent \| America/Swift_Current \| America/Tegucigalpa \| America/Thule \| America/Thunder_Bay \| America/Tijuana \| America/Toronto \| America/Tortola \| America/Vancouver \| America/Virgin \| America/Whitehorse \| America/Winnipeg \| America/Yakutat \| America/Yellowknife \| Antarctica/Casey \| Antarctica/Davis \| Antarctica/DumontDUrville \| Antarctica/Macquarie \| Antarctica/Mawson \| Antarctica/McMurdo \| Antarctica/Palmer \| Antarctica/Rothera \| Antarctica/South_Pole \| Antarctica/Syowa \| Antarctica/Troll \| Antarctica/Vostok \| Arctic/Longyearbyen \| Asia/Aden \| Asia/Almaty \| Asia/Amman \| Asia/Anadyr \| Asia/Aqtau \| Asia/Aqtobe \| Asia/Ashgabat \| Asia/Ashkhabad \| Asia/Atyrau \| Asia/Baghdad \| Asia/Bahrain \| Asia/Baku \| Asia/Bangkok \| Asia/Barnaul \| Asia/Beirut \| Asia/Bishkek \| Asia/Brunei \| Asia/Calcutta \| Asia/Chita \| Asia/Choibalsan \| Asia/Chongqing \| Asia/Chungking \| Asia/Colombo \| Asia/Dacca \| Asia/Damascus \| Asia/Dhaka \| Asia/Dili \| Asia/Dubai \| Asia/Dushanbe \| Asia/Famagusta \| Asia/Gaza \| Asia/Harbin \| Asia/Hebron \| Asia/Ho_Chi_Minh \| Asia/Hong_Kong \| Asia/Hovd \| Asia/Irkutsk \| Asia/Istanbul \| Asia/Jakarta \| Asia/Jayapura \| Asia/Jerusalem \| Asia/Kabul \| Asia/Kamchatka \| Asia/Karachi \| Asia/Kashgar \| Asia/Kathmandu \| Asia/Katmandu \| Asia/Khandyga \| Asia/Kolkata \| Asia/Krasnoyarsk \| Asia/Kuala_Lumpur \| Asia/Kuching \| Asia/Kuwait \| Asia/Macao \| Asia/Macau \| Asia/Magadan \| Asia/Makassar \| Asia/Manila \| Asia/Muscat \| Asia/Nicosia \| Asia/Novokuznetsk \| Asia/Novosibirsk \| Asia/Omsk \| Asia/Oral \| Asia/Phnom_Penh \| Asia/Pontianak \| Asia/Pyongyang \| Asia/Qatar \| Asia/Qostanay \| Asia/Qyzylorda \| Asia/Rangoon \| Asia/Riyadh \| Asia/Saigon \| Asia/Sakhalin \| Asia/Samarkand \| Asia/Seoul \| Asia/Shanghai \| Asia/Singapore \| Asia/Srednekolymsk \| Asia/Taipei \| Asia/Tashkent \| Asia/Tbilisi \| Asia/Tehran \| Asia/Tel_Aviv \| Asia/Thimbu \| Asia/Thimphu \| Asia/Tokyo \| Asia/Tomsk \| Asia/Ujung_Pandang \| Asia/Ulaanbaatar \| Asia/Ulan_Bator \| Asia/Urumqi \| Asia/Ust-Nera \| Asia/Vientiane \| Asia/Vladivostok \| Asia/Yakutsk \| Asia/Yangon \| Asia/Yekaterinburg \| Asia/Yerevan \| Atlantic/Azores \| Atlantic/Bermuda \| Atlantic/Canary \| Atlantic/Cape_Verde \| Atlantic/Faeroe \| Atlantic/Faroe \| Atlantic/Jan_Mayen \| Atlantic/Madeira \| Atlantic/Reykjavik \| Atlantic/South_Georgia \| Atlantic/St_Helena \| Atlantic/Stanley \| Australia/ACT \| Australia/Adelaide \| Australia/Brisbane \| Australia/Broken_Hill \| Australia/Canberra \| Australia/Currie \| Australia/Darwin \| Australia/Eucla \| Australia/Hobart \| Australia/LHI \| Australia/Lindeman \| Australia/Lord_Howe \| Australia/Melbourne \| Australia/NSW \| Australia/North \| Australia/Perth \| Australia/Queensland \| Australia/South \| Australia/Sydney \| Australia/Tasmania \| Australia/Victoria \| Australia/West \| Australia/Yancowinna \| Brazil/Acre \| Brazil/DeNoronha \| Brazil/East \| Brazil/West \| CET \| CST6CDT \| Canada/Atlantic \| Canada/Central \| Canada/Eastern \| Canada/Mountain \| Canada/Newfoundland \| Canada/Pacific \| Canada/Saskatchewan \| Canada/Yukon \| Chile/Continental \| Chile/EasterIsland \| Cuba \| EET \| EST \| EST5EDT \| Egypt \| Eire \| Etc/GMT \| Etc/GMT+0 \| Etc/GMT+1 \| Etc/GMT+10 \| Etc/GMT+11 \| Etc/GMT+12 \| Etc/GMT+2 \| Etc/GMT+3 \| Etc/GMT+4 \| Etc/GMT+5 \| Etc/GMT+6 \| Etc/GMT+7 \| Etc/GMT+8 \| Etc/GMT+9 \| Etc/GMT-0 \| Etc/GMT-1 \| Etc/GMT-10 \| Etc/GMT-11 \| Etc/GMT-12 \| Etc/GMT-13 \| Etc/GMT-14 \| Etc/GMT-2 \| Etc/GMT-3 \| Etc/GMT-4 \| Etc/GMT-5 \| Etc/GMT-6 \| Etc/GMT-7 \| Etc/GMT-8 \| Etc/GMT-9 \| Etc/GMT0 \| Etc/Greenwich \| Etc/UCT \| Etc/UTC \| Etc/Universal \| Etc/Zulu \| Europe/Amsterdam \| Europe/Andorra \| Europe/Astrakhan \| Europe/Athens \| Europe/Belfast \| Europe/Belgrade \| Europe/Berlin \| Europe/Bratislava \| Europe/Brussels \| Europe/Bucharest \| Europe/Budapest \| Europe/Busingen \| Europe/Chisinau \| Europe/Copenhagen \| Europe/Dublin \| Europe/Gibraltar \| Europe/Guernsey \| Europe/Helsinki \| Europe/Isle_of_Man \| Europe/Istanbul \| Europe/Jersey \| Europe/Kaliningrad \| Europe/Kiev \| Europe/Kirov \| Europe/Kyiv \| Europe/Lisbon \| Europe/Ljubljana \| Europe/London \| Europe/Luxembourg \| Europe/Madrid \| Europe/Malta \| Europe/Mariehamn \| Europe/Minsk \| Europe/Monaco \| Europe/Moscow \| Europe/Nicosia \| Europe/Oslo \| Europe/Paris \| Europe/Podgorica \| Europe/Prague \| Europe/Riga \| Europe/Rome \| Europe/Samara \| Europe/San_Marino \| Europe/Sarajevo \| Europe/Saratov \| Europe/Simferopol \| Europe/Skopje \| Europe/Sofia \| Europe/Stockholm \| Europe/Tallinn \| Europe/Tirane \| Europe/Tiraspol \| Europe/Ulyanovsk \| Europe/Uzhgorod \| Europe/Vaduz \| Europe/Vatican \| Europe/Vienna \| Europe/Vilnius \| Europe/Volgograd \| Europe/Warsaw \| Europe/Zagreb \| Europe/Zaporozhye \| Europe/Zurich \| GB \| GB-Eire \| GMT \| GMT+0 \| GMT-0 \| GMT0 \| Greenwich \| HST \| Hongkong \| Iceland \| Indian/Antananarivo \| Indian/Chagos \| Indian/Christmas \| Indian/Cocos \| Indian/Comoro \| Indian/Kerguelen \| Indian/Mahe \| Indian/Maldives \| Indian/Mauritius \| Indian/Mayotte \| Indian/Reunion \| Iran \| Israel \| Jamaica \| Japan \| Kwajalein \| Libya \| MET \| MST \| MST7MDT \| Mexico/BajaNorte \| Mexico/BajaSur \| Mexico/General \| NZ \| NZ-CHAT \| Navajo \| PRC \| PST8PDT \| Pacific/Apia \| Pacific/Auckland \| Pacific/Bougainville \| Pacific/Chatham \| Pacific/Chuuk \| Pacific/Easter \| Pacific/Efate \| Pacific/Enderbury \| Pacific/Fakaofo \| Pacific/Fiji \| Pacific/Funafuti \| Pacific/Galapagos \| Pacific/Gambier \| Pacific/Guadalcanal \| Pacific/Guam \| Pacific/Honolulu \| Pacific/Johnston \| Pacific/Kanton \| Pacific/Kiritimati \| Pacific/Kosrae \| Pacific/Kwajalein \| Pacific/Majuro \| Pacific/Marquesas \| Pacific/Midway \| Pacific/Nauru \| Pacific/Niue \| Pacific/Norfolk \| Pacific/Noumea \| Pacific/Pago_Pago \| Pacific/Palau \| Pacific/Pitcairn \| Pacific/Pohnpei \| Pacific/Ponape \| Pacific/Port_Moresby \| Pacific/Rarotonga \| Pacific/Saipan \| Pacific/Samoa \| Pacific/Tahiti \| Pacific/Tarawa \| Pacific/Tongatapu \| Pacific/Truk \| Pacific/Wake \| Pacific/Wallis \| Pacific/Yap \| Poland \| Portugal \| ROC \| ROK \| Singapore \| Turkey \| UCT \| US/Alaska \| US/Aleutian \| US/Arizona \| US/Central \| US/East-Indiana \| US/Eastern \| US/Hawaii \| US/Indiana-Starke \| US/Michigan \| US/Mountain \| US/Pacific \| US/Samoa \| UTC \| Universal \| W-SU \| WET \| Zulu \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |

> [accordion] channels full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   type?: string | null,
>   address?: string | null,
>   preferred?: boolean | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   deleted_datetime?: string | null,
>   user?: {
>     id?: number | null,
>     name?: string | null
>   } | null,
>   customer?: {
>     id?: number | null,
>     name?: string | null
>   } | null
> }[] | null
> ```

***

### updateCustomerCustomFieldValue

`customers.updateCustomerCustomFieldValue`

Gorgias REST: Update customer field value.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.customers.updateCustomerCustomFieldValue({"path":{"customer_id":1,"id":1},"body":"x"});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `string \| number \| boolean` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   customer_id: number,
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `field` | `object \| null` | No | — |
| `value` | `JsonValue \| null` | No | — |

> [accordion] field full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   external_id?: string | null,
>   object_type?: Ticket | Customer | string | null,
>   label?: string | null,
>   description?: string | null,
>   priority?: number | null,
>   required?: boolean | null,
>   managed_type?: customer_type | null,
>   definition?: {
>     data_type: text,
>     input_settings?: {
>       input_type: input,
>       placeholder?: string | null
>     } | {
>       input_type: dropdown,
>       choices?: string[] | null,
>       default?: string | null
>     } | null
>   } | {
>     data_type: number,
>     input_settings?: {
>       input_type: input_number,
>       placeholder?: string | null,
>       min?: number | string | null,
>       max?: number | string | null
>     } | null
>   } | {
>     data_type: boolean,
>     input_settings?: {
>       input_type: dropdown,
>       choices?: boolean[] | null,
>       default?: boolean | null
>     } | null
>   } | {
>     data_type?: string | null,
>     input_settings?: Record<string, JsonValue> | null
>   } | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   deactivated_datetime?: string | null
> } | null
> ```

***

### updateCustomerCustomFieldValues

`customers.updateCustomerCustomFieldValues`

Gorgias REST: Update customer fields values.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.customers.updateCustomerCustomFieldValues({"path":{"customer_id":1},"body":[]});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object[]` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   customer_id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   id: number,
>   value: string | boolean | number
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   field?: {
>     id?: number | null,
>     external_id?: string | null,
>     object_type?: Ticket | Customer | string | null,
>     label?: string | null,
>     description?: string | null,
>     priority?: number | null,
>     required?: boolean | null,
>     managed_type?: customer_type | null,
>     definition?: {
>       data_type: text,
>       input_settings?: {
>         input_type: input,
>         placeholder?: string | null
>       } | {
>         input_type: dropdown,
>         choices?: string[] | null,
>         default?: string | null
>       } | null
>     } | {
>       data_type: number,
>       input_settings?: {
>         input_type: input_number,
>         placeholder?: string | null,
>         min?: number | string | null,
>         max?: number | string | null
>       } | null
>     } | {
>       data_type: boolean,
>       input_settings?: {
>         input_type: dropdown,
>         choices?: boolean[] | null,
>         default?: boolean | null
>       } | null
>     } | {
>       data_type?: string | null,
>       input_settings?: Record<string, JsonValue> | null
>     } | null,
>     created_datetime?: string | null,
>     updated_datetime?: string | null,
>     deactivated_datetime?: string | null
>   } | null,
>   value?: JsonValue | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateCustomerData

`customers.updateCustomerData`

Gorgias REST: Replace a customer's data object.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.customers.updateCustomerData({"path":{"customer_id":1},"body":{"data":{}}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   customer_id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   version?: string | null,
>   data: Record<string, JsonValue>
> }
> ```

**Output:** `void`

***

## Custom Fields

### createCustomField

`customFields.createCustomField`

Gorgias REST: Create a custom field.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.customFields.createCustomField({"body":{"object_type":"Ticket","label":"x","definition":{"data_type":"text","input_settings":{"input_type":"input"}}}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   external_id?: string,
>   object_type: Ticket | Customer,
>   label: string,
>   description?: string,
>   priority?: number,
>   required?: boolean,
>   requirement_type?: visible | required | conditional,
>   managed_type?: contact_reason | product | resolution | ai_intent | ai_outcome | ai_sales | ai_discount | ai_journey | managed_sentiment | call_status | customer_type,
>   definition: {
>     data_type: text,
>     input_settings: {
>       input_type: input,
>       placeholder?: string
>     } | {
>       input_type: dropdown,
>       choices: string[],
>       default?: string
>     }
>   } | {
>     data_type: number,
>     input_settings: {
>       input_type: input_number,
>       placeholder?: string,
>       min?: number | string,
>       max?: number | string
>     }
>   } | {
>     data_type: boolean,
>     input_settings: {
>       input_type: dropdown,
>       choices?: boolean[],
>       default?: boolean
>     }
>   },
>   deactivated_datetime?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `object_type` | `Ticket \| Customer \| string \| null` | No | — |
| `label` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `priority` | `number \| null` | No | — |
| `required` | `boolean \| null` | No | — |
| `requirement_type` | `visible \| required \| conditional \| string \| null` | No | — |
| `managed_type` | `contact_reason \| product \| resolution \| ai_intent \| ai_outcome \| ai_sales \| ai_discount \| ai_journey \| managed_sentiment \| call_status \| string \| customer_type \| null` | No | — |
| `definition` | `object \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |

> [accordion] definition full type
>
> ```ts theme={null}
> {
>   data_type: text,
>   input_settings?: {
>     input_type: input,
>     placeholder?: string | null
>   } | {
>     input_type: dropdown,
>     choices?: string[] | null,
>     default?: string | null
>   } | null
> } | {
>   data_type: number,
>   input_settings?: {
>     input_type: input_number,
>     placeholder?: string | null,
>     min?: number | string | null,
>     max?: number | string | null
>   } | null
> } | {
>   data_type: boolean,
>   input_settings?: {
>     input_type: dropdown,
>     choices?: boolean[] | null,
>     default?: boolean | null
>   } | null
> } | {
>   data_type?: string | null,
>   input_settings?: Record<string, JsonValue> | null
> } | null
> ```

***

### getCustomField

`customFields.getCustomField`

Gorgias REST: Retrieve a custom field.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.customFields.getCustomField({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `object_type` | `Ticket \| Customer \| string \| null` | No | — |
| `label` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `priority` | `number \| null` | No | — |
| `required` | `boolean \| null` | No | — |
| `requirement_type` | `visible \| required \| conditional \| string \| null` | No | — |
| `managed_type` | `contact_reason \| product \| resolution \| ai_intent \| ai_outcome \| ai_sales \| ai_discount \| ai_journey \| managed_sentiment \| call_status \| string \| customer_type \| null` | No | — |
| `definition` | `object \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |

> [accordion] definition full type
>
> ```ts theme={null}
> {
>   data_type: text,
>   input_settings?: {
>     input_type: input,
>     placeholder?: string | null
>   } | {
>     input_type: dropdown,
>     choices?: string[] | null,
>     default?: string | null
>   } | null
> } | {
>   data_type: number,
>   input_settings?: {
>     input_type: input_number,
>     placeholder?: string | null,
>     min?: number | string | null,
>     max?: number | string | null
>   } | null
> } | {
>   data_type: boolean,
>   input_settings?: {
>     input_type: dropdown,
>     choices?: boolean[] | null,
>     default?: boolean | null
>   } | null
> } | {
>   data_type?: string | null,
>   input_settings?: Record<string, JsonValue> | null
> } | null
> ```

***

### listCustomFields

`customFields.listCustomFields`

Gorgias REST: List custom fields.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.customFields.listCustomFields({"query":{"object_type":"Ticket"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   object_type: Ticket | Customer,
>   search?: string,
>   archived?: boolean,
>   order_by?: priority:asc | priority:desc,
>   cursor?: string,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   external_id?: string | null,
>   object_type?: Ticket | Customer | string | null,
>   label?: string | null,
>   description?: string | null,
>   priority?: number | null,
>   required?: boolean | null,
>   requirement_type?: visible | required | conditional | string | null,
>   managed_type?: contact_reason | product | resolution | ai_intent | ai_outcome | ai_sales | ai_discount | ai_journey | managed_sentiment | call_status | string | customer_type | null,
>   definition?: {
>     data_type: text,
>     input_settings?: {
>       input_type: input,
>       placeholder?: string | null
>     } | {
>       input_type: dropdown,
>       choices?: string[] | null,
>       default?: string | null
>     } | null
>   } | {
>     data_type: number,
>     input_settings?: {
>       input_type: input_number,
>       placeholder?: string | null,
>       min?: number | string | null,
>       max?: number | string | null
>     } | null
>   } | {
>     data_type: boolean,
>     input_settings?: {
>       input_type: dropdown,
>       choices?: boolean[] | null,
>       default?: boolean | null
>     } | null
>   } | {
>     data_type?: string | null,
>     input_settings?: Record<string, JsonValue> | null
>   } | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   deactivated_datetime?: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateCustomField

`customFields.updateCustomField`

Gorgias REST: Update a custom field.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.customFields.updateCustomField({"path":{"id":1},"body":{"external_id":"x","object_type":"Ticket","label":"x","description":"x","priority":1,"required":true,"requirement_type":"visible","managed_type":"contact_reason","definition":{"data_type":"text","input_settings":{"input_type":"input"}},"deactivated_datetime":"2025-01-01T00:00:00Z"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   external_id?: string,
>   object_type?: Ticket | Customer,
>   label?: string,
>   description?: string,
>   priority?: number,
>   required?: boolean,
>   requirement_type?: visible | required | conditional,
>   managed_type?: contact_reason | product | resolution | ai_intent | ai_outcome | ai_sales | ai_discount | ai_journey | managed_sentiment | call_status | customer_type,
>   definition?: {
>     data_type: text,
>     input_settings: {
>       input_type: input,
>       placeholder?: string
>     } | {
>       input_type: dropdown,
>       choices: string[],
>       default?: string
>     }
>   } | {
>     data_type: number,
>     input_settings: {
>       input_type: input_number,
>       placeholder?: string,
>       min?: number | string,
>       max?: number | string
>     }
>   } | {
>     data_type: boolean,
>     input_settings: {
>       input_type: dropdown,
>       choices?: boolean[],
>       default?: boolean
>     }
>   },
>   deactivated_datetime?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `object_type` | `Ticket \| Customer \| string \| null` | No | — |
| `label` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `priority` | `number \| null` | No | — |
| `required` | `boolean \| null` | No | — |
| `requirement_type` | `visible \| required \| conditional \| string \| null` | No | — |
| `managed_type` | `contact_reason \| product \| resolution \| ai_intent \| ai_outcome \| ai_sales \| ai_discount \| ai_journey \| managed_sentiment \| call_status \| string \| customer_type \| null` | No | — |
| `definition` | `object \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |

> [accordion] definition full type
>
> ```ts theme={null}
> {
>   data_type: text,
>   input_settings?: {
>     input_type: input,
>     placeholder?: string | null
>   } | {
>     input_type: dropdown,
>     choices?: string[] | null,
>     default?: string | null
>   } | null
> } | {
>   data_type: number,
>   input_settings?: {
>     input_type: input_number,
>     placeholder?: string | null,
>     min?: number | string | null,
>     max?: number | string | null
>   } | null
> } | {
>   data_type: boolean,
>   input_settings?: {
>     input_type: dropdown,
>     choices?: boolean[] | null,
>     default?: boolean | null
>   } | null
> } | {
>   data_type?: string | null,
>   input_settings?: Record<string, JsonValue> | null
> } | null
> ```

***

### updateCustomFields

`customFields.updateCustomFields`

Gorgias REST: Bulk update a list of custom fields.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.customFields.updateCustomFields({"body":[]});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object[]` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   external_id?: string,
>   object_type?: Ticket | Customer,
>   label?: string,
>   description?: string,
>   priority?: number,
>   required?: boolean,
>   requirement_type?: visible | required | conditional,
>   managed_type?: contact_reason | product | resolution | ai_intent | ai_outcome | ai_sales | ai_discount | ai_journey | managed_sentiment | call_status | customer_type,
>   definition?: {
>     data_type: text,
>     input_settings: {
>       input_type: input,
>       placeholder?: string
>     } | {
>       input_type: dropdown,
>       choices: string[],
>       default?: string
>     }
>   } | {
>     data_type: number,
>     input_settings: {
>       input_type: input_number,
>       placeholder?: string,
>       min?: number | string,
>       max?: number | string
>     }
>   } | {
>     data_type: boolean,
>     input_settings: {
>       input_type: dropdown,
>       choices?: boolean[],
>       default?: boolean
>     }
>   },
>   deactivated_datetime?: string | null,
>   id: number
> }[]
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   external_id?: string | null,
>   object_type?: Ticket | Customer | string | null,
>   label?: string | null,
>   description?: string | null,
>   priority?: number | null,
>   required?: boolean | null,
>   requirement_type?: visible | required | conditional | string | null,
>   managed_type?: contact_reason | product | resolution | ai_intent | ai_outcome | ai_sales | ai_discount | ai_journey | managed_sentiment | call_status | string | customer_type | null,
>   definition?: {
>     data_type: text,
>     input_settings?: {
>       input_type: input,
>       placeholder?: string | null
>     } | {
>       input_type: dropdown,
>       choices?: string[] | null,
>       default?: string | null
>     } | null
>   } | {
>     data_type: number,
>     input_settings?: {
>       input_type: input_number,
>       placeholder?: string | null,
>       min?: number | string | null,
>       max?: number | string | null
>     } | null
>   } | {
>     data_type: boolean,
>     input_settings?: {
>       input_type: dropdown,
>       choices?: boolean[] | null,
>       default?: boolean | null
>     } | null
>   } | {
>     data_type?: string | null,
>     input_settings?: Record<string, JsonValue> | null
>   } | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   deactivated_datetime?: string | null
> }[]
> ```

***

## Events

### getEvent

`events.getEvent`

Gorgias REST: Retrieve an event.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.events.getEvent({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `context` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `data` | `Record<string, JsonValue> \| null` | No | — |
| `object_id` | `number \| null` | No | — |
| `object_type` | `Account \| AccountSetting \| Customer \| CustomField \| CustomFieldCondition \| CustomUserAvailabilityStatus \| CustomerExternalData \| Integration \| Macro \| Order \| Role \| Rule \| SatisfactionSurvey \| Shopper \| ShopperAddress \| Subscription \| Tag \| Team \| TicketMessage \| Ticket \| User \| UserSetting \| View \| Widget \| string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `user_id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |

***

### listEvents

`events.listEvents`

Gorgias REST: List events.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.events.listEvents({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   created_datetime?: {
>     lt?: string,
>     lte?: string,
>     gt?: string,
>     gte?: string
>   },
>   cursor?: string,
>   limit?: number,
>   object_id?: number,
>   object_type?: Account | AccountSetting | Macro | Tag | Customer | Team | View | Widget | CustomField | CustomFieldCondition | User | TicketMessage | Ticket | Rule | Integration | SatisfactionSurvey,
>   order_by?: created_datetime | created_datetime:asc | created_datetime:desc,
>   types?: (account-created | account-deactivated | account-setting-updated | account-updated | action-executed | custom-field-condition-created | custom-field-condition-deleted | custom-field-condition-disabled | custom-field-condition-enabled | custom-field-condition-updated | custom-field-created | custom-field-updated | customer-created | customer-deleted | customer-merged | customer-updated | integration-created | integration-deactivated | integration-deleted | integration-reactivated | integration-updated | macro-created | macro-deleted | macro-updated | rule-created | rule-deleted | rule-executed | rule-priority-updated | rule-updated | satisfaction-survey-responded | satisfaction-survey-sent | tag-created | tag-deleted | tag-merged | tag-renamed | tag-updated | team-created | team-deleted | team-updated | ticket-assigned | ticket-closed | ticket-created | ticket-customer-updated | ticket-deleted | ticket-excluded-from-auto-merge | ticket-excluded-from-csat | ticket-marked-spam | ticket-merged | ticket-message-created | ticket-message-deleted | ticket-message-failed | ticket-message-summary-created | ticket-message-updated | ticket-reopened | ticket-satisfaction-survey-skipped | ticket-self-unsnoozed | ticket-sla-policy-assigned | ticket-snoozed | ticket-split | ticket-subject-updated | ticket-tags-added | ticket-tags-removed | ticket-team-assigned | ticket-team-unassigned | ticket-trashed | ticket-unassigned | ticket-unmarked-spam | ticket-untrashed | ticket-updated | user-2fa-changed | user-availability-updated | user-created | user-deleted | user-impersonated | user-invited | user-logged-in | user-logged-out | user-password-changed | user-password-reset | user-updated | view-created | view-deactivated | view-deleted | view-updated | widget-created | widget-deleted | widget-updated)[],
>   user_ids?: number[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   context?: string | null,
>   created_datetime?: string | null,
>   data?: Record<string, JsonValue> | null,
>   object_id?: number | null,
>   object_type?: Account | AccountSetting | Customer | CustomField | CustomFieldCondition | CustomUserAvailabilityStatus | CustomerExternalData | Integration | Macro | Order | Role | Rule | SatisfactionSurvey | Shopper | ShopperAddress | Subscription | Tag | Team | TicketMessage | Ticket | User | UserSetting | View | Widget | string | null,
>   type?: string | null,
>   user_id?: number | null,
>   uri?: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

## Files

### downloadFile

`files.downloadFile`

Gorgias REST: Download a file.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.files.downloadFile({"path":{"file_type":"attachment","domain_hash":"Hna8kldnmlal","resource_name":"file-resource.png"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

Returns `{ kind: "binary", contentType, base64, sizeBytes }`. The signed redirect URL is followed internally and is never returned or logged. Downloads above the client safety limit of 20 MiB are rejected.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   file_type: string,
>   domain_hash: string,
>   resource_name: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `string \| null` | No | — |
| `base64` | `string \| null` | No | — |
| `sizeBytes` | `number \| null` | No | — |

***

### uploadFiles

`files.uploadFiles`

Gorgias REST: Upload files.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.files.uploadFiles({"body":{"files":[{"filename":"file.txt","contentType":"text/plain","contentBase64":"SGVsbG8="}]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |
| `body` | `object` | Yes | — |

Provide one to ten files in body.files using filename, contentType, and base64-encoded contentBase64. The client caps combined upload data at 20 MiB.

> [accordion] query full type
>
> ```ts theme={null}
> {
>   type?: public_attachment | attachment | profile_picture | widget_picture
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   files: {
>     filename: string,
>     contentType: string,
>     contentBase64: string
>   }[]
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   content_type?: string | null,
>   name?: string | null,
>   size?: number | string | null,
>   url?: string | null
> }[]
> ```

***

## Integrations

### createIntegration

`integrations.createIntegration`

Gorgias REST: Create an integration.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.integrations.createIntegration({"body":{"name":"x","type":"http"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   deactivated_datetime?: string | null,
>   description?: string | null | null,
>   http?: {
>     form?: Record<string, JsonValue> | null,
>     headers?: Record<string, string> | null,
>     hmac_secret?: string,
>     method: GET | POST | PUT | DELETE | HEAD | PATCH,
>     request_content_type: application/json | application/x-www-form-urlencoded,
>     response_content_type: application/json,
>     triggers?: {
>       ticket-created?: boolean,
>       ticket-updated?: boolean,
>       ticket-message-created?: boolean,
>       ticket-self-unsnoozed?: boolean,
>       ticket-message-failed?: boolean,
>       ticket-assignment-updated?: boolean,
>       ticket-status-updated?: boolean,
>       ticket-handed-over?: boolean
>     },
>     url: string
>   },
>   name: string,
>   type: http,
>   managed?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `http` | `object \| null` | No | — |
| `name` | `string \| null` | No | — |
| `type` | `http \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `user` | `object \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `application_id` | `string \| null` | No | — |
| `managed` | `boolean \| null` | No | — |
| `business_hours_id` | `number \| null` | No | — |

> [accordion] http full type
>
> ```ts theme={null}
> {
>   form?: JsonValue | null,
>   method?: GET | POST | PUT | DELETE | HEAD | PATCH | string | null,
>   request_content_type?: application/json | application/x-www-form-urlencoded | string | null,
>   response_content_type?: application/json | string | null,
>   triggers?: {
>     ticket-created?: boolean | null,
>     ticket-updated?: boolean | null,
>     ticket-message-created?: boolean | null,
>     ticket-self-unsnoozed?: boolean | null,
>     ticket-message-failed?: boolean | null,
>     ticket-assignment-updated?: boolean | null,
>     ticket-status-updated?: boolean | null,
>     ticket-handed-over?: boolean | null
>   } | null,
>   url?: string | null,
>   oauth2?: JsonValue | null
> } | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: number | null
> } | null
> ```

***

### deleteIntegration

`integrations.deleteIntegration`

Gorgias REST: Delete an integration.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.integrations.deleteIntegration({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `void`

***

### getIntegration

`integrations.getIntegration`

Gorgias REST: Retrieve an integration.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.integrations.getIntegration({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   include_review_providers?: boolean,
>   include_shopify_integration?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `http` | `object \| null` | No | — |
| `name` | `string \| null` | No | — |
| `type` | `http \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `user` | `object \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `application_id` | `string \| null` | No | — |
| `managed` | `boolean \| null` | No | — |
| `business_hours_id` | `number \| null` | No | — |
| `product_review_provider_integrations` | `object[] \| null` | No | — |
| `shopify_integration` | `object \| null` | No | — |

> [accordion] http full type
>
> ```ts theme={null}
> {
>   form?: JsonValue | null,
>   method?: GET | POST | PUT | DELETE | HEAD | PATCH | string | null,
>   request_content_type?: application/json | application/x-www-form-urlencoded | string | null,
>   response_content_type?: application/json | string | null,
>   triggers?: {
>     ticket-created?: boolean | null,
>     ticket-updated?: boolean | null,
>     ticket-message-created?: boolean | null,
>     ticket-self-unsnoozed?: boolean | null,
>     ticket-message-failed?: boolean | null,
>     ticket-assignment-updated?: boolean | null,
>     ticket-status-updated?: boolean | null,
>     ticket-handed-over?: boolean | null
>   } | null,
>   url?: string | null,
>   oauth2?: JsonValue | null
> } | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: number | null
> } | null
> ```

> [accordion] product\_review\_provider\_integrations full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   created_datetime?: string | null,
>   deactivated_datetime?: string | null,
>   description?: string | null,
>   http?: {
>     form?: JsonValue | null,
>     method?: GET | POST | PUT | DELETE | HEAD | PATCH | string | null,
>     request_content_type?: application/json | application/x-www-form-urlencoded | string | null,
>     response_content_type?: application/json | string | null,
>     triggers?: {
>       ticket-created?: boolean | null,
>       ticket-updated?: boolean | null,
>       ticket-message-created?: boolean | null,
>       ticket-self-unsnoozed?: boolean | null,
>       ticket-message-failed?: boolean | null,
>       ticket-assignment-updated?: boolean | null,
>       ticket-status-updated?: boolean | null,
>       ticket-handed-over?: boolean | null
>     } | null,
>     url?: string | null,
>     oauth2?: JsonValue | null
>   } | null,
>   name?: string | null,
>   type?: http | string | null,
>   updated_datetime?: string | null,
>   user?: {
>     id?: number | null
>   } | null,
>   uri?: string | null,
>   application_id?: string | null,
>   managed?: boolean | null,
>   business_hours_id?: number | null
> }[] | null
> ```

> [accordion] shopify\_integration full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   created_datetime?: string | null,
>   deactivated_datetime?: string | null,
>   description?: string | null,
>   http?: {
>     form?: JsonValue | null,
>     method?: GET | POST | PUT | DELETE | HEAD | PATCH | string | null,
>     request_content_type?: application/json | application/x-www-form-urlencoded | string | null,
>     response_content_type?: application/json | string | null,
>     triggers?: {
>       ticket-created?: boolean | null,
>       ticket-updated?: boolean | null,
>       ticket-message-created?: boolean | null,
>       ticket-self-unsnoozed?: boolean | null,
>       ticket-message-failed?: boolean | null,
>       ticket-assignment-updated?: boolean | null,
>       ticket-status-updated?: boolean | null,
>       ticket-handed-over?: boolean | null
>     } | null,
>     url?: string | null,
>     oauth2?: JsonValue | null
>   } | null,
>   name?: string | null,
>   type?: http | string | null,
>   updated_datetime?: string | null,
>   user?: {
>     id?: number | null
>   } | null,
>   uri?: string | null,
>   application_id?: string | null,
>   managed?: boolean | null,
>   business_hours_id?: number | null
> } | null
> ```

***

### listIntegrations

`integrations.listIntegrations`

Gorgias REST: List integrations.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.integrations.listIntegrations({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   limit?: number,
>   order_by?: created_datetime:asc | created_datetime:desc,
>   type?: email | gmail | outlook | app | aircall | facebook | gorgias_chat | phone | sms | twitter | yotpo | whatsapp | http | shopify | recharge | smile | smooch_inside | smooch | magento2 | zendesk | klaviyo | bigcommerce | alloy | ecom,
>   purpose?: support | marketing
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   created_datetime?: string | null,
>   deactivated_datetime?: string | null,
>   description?: string | null,
>   http?: {
>     form?: JsonValue | null,
>     method?: GET | POST | PUT | DELETE | HEAD | PATCH | string | null,
>     request_content_type?: application/json | application/x-www-form-urlencoded | string | null,
>     response_content_type?: application/json | string | null,
>     triggers?: {
>       ticket-created?: boolean | null,
>       ticket-updated?: boolean | null,
>       ticket-message-created?: boolean | null,
>       ticket-self-unsnoozed?: boolean | null,
>       ticket-message-failed?: boolean | null,
>       ticket-assignment-updated?: boolean | null,
>       ticket-status-updated?: boolean | null,
>       ticket-handed-over?: boolean | null
>     } | null,
>     url?: string | null,
>     oauth2?: JsonValue | null
>   } | null,
>   name?: string | null,
>   type?: http | string | null,
>   updated_datetime?: string | null,
>   user?: {
>     id?: number | null
>   } | null,
>   uri?: string | null,
>   application_id?: string | null,
>   managed?: boolean | null,
>   business_hours_id?: number | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateIntegration

`integrations.updateIntegration`

Gorgias REST: Update an integration.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.integrations.updateIntegration({"path":{"id":1},"body":{"name":"x"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   deactivated_datetime?: string | null,
>   description?: string | null | null,
>   http?: {
>     form?: Record<string, JsonValue> | null,
>     headers?: Record<string, string> | null,
>     hmac_secret?: string,
>     method?: GET | POST | PUT | DELETE | HEAD | PATCH,
>     request_content_type?: application/json | application/x-www-form-urlencoded,
>     response_content_type?: application/json,
>     triggers?: {
>       ticket-created?: boolean,
>       ticket-updated?: boolean,
>       ticket-message-created?: boolean,
>       ticket-self-unsnoozed?: boolean,
>       ticket-message-failed?: boolean,
>       ticket-assignment-updated?: boolean,
>       ticket-status-updated?: boolean,
>       ticket-handed-over?: boolean
>     },
>     url: string
>   },
>   name: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `http` | `object \| null` | No | — |
| `name` | `string \| null` | No | — |
| `type` | `http \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `user` | `object \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `application_id` | `string \| null` | No | — |
| `managed` | `boolean \| null` | No | — |
| `business_hours_id` | `number \| null` | No | — |

> [accordion] http full type
>
> ```ts theme={null}
> {
>   form?: JsonValue | null,
>   method?: GET | POST | PUT | DELETE | HEAD | PATCH | string | null,
>   request_content_type?: application/json | application/x-www-form-urlencoded | string | null,
>   response_content_type?: application/json | string | null,
>   triggers?: {
>     ticket-created?: boolean | null,
>     ticket-updated?: boolean | null,
>     ticket-message-created?: boolean | null,
>     ticket-self-unsnoozed?: boolean | null,
>     ticket-message-failed?: boolean | null,
>     ticket-assignment-updated?: boolean | null,
>     ticket-status-updated?: boolean | null,
>     ticket-handed-over?: boolean | null
>   } | null,
>   url?: string | null,
>   oauth2?: JsonValue | null
> } | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: number | null
> } | null
> ```

***

## Jobs

### cancelJob

`jobs.cancelJob`

Gorgias REST: Cancel a job.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.jobs.cancelJob({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `void`

***

### createJob

`jobs.createJob`

Gorgias REST: Create a background job (apply a macro, delete or update tickets, export).

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.jobs.createJob({"body":{"params":{"apply_and_close":true,"end_datetime":"x","macro_id":1,"start_datetime":"x","ticket_ids":[],"url":"x","updates":{},"view":{},"view_id":1,"context":{}},"type":"applyMacro"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   meta?: Record<string, JsonValue> | null,
>   params: {
>     apply_and_close?: boolean,
>     end_datetime?: string | null,
>     macro_id?: number,
>     start_datetime?: string | null,
>     ticket_ids?: number[],
>     url?: string,
>     updates?: Record<string, JsonValue>,
>     view?: Record<string, JsonValue>,
>     view_id?: number,
>     context?: Record<string, JsonValue>
>   },
>   scheduled_datetime?: string | null,
>   type: applyMacro | deleteTicket | exportTicket | importMacro | exportMacro | updateTicket | exportTicketDrilldown | exportConvertCampaignSalesDrilldown
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `cancel_requested_datetime` | `string \| null` | No | — |
| `cancelled_datetime` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `ended_datetime` | `string \| null` | No | — |
| `failed_datetime` | `string \| null` | No | — |
| `info` | `Record<string, JsonValue> \| null` | No | — |
| `locked_datetime` | `string \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| null` | No | — |
| `params` | `object \| null` | No | — |
| `scheduled_datetime` | `string \| null` | No | — |
| `started_datetime` | `string \| null` | No | — |
| `status` | `cancel_requested \| canceled \| done \| errored \| fatal_errored \| pending \| running \| scheduled \| string \| null` | No | — |
| `type` | `applyMacro \| deleteTicket \| exportTicket \| importMacro \| exportMacro \| updateTicket \| exportTicketDrilldown \| exportConvertCampaignSalesDrilldown \| string \| null` | No | — |
| `user_id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |

> [accordion] params full type
>
> ```ts theme={null}
> {
>   apply_and_close?: boolean | null,
>   end_datetime?: string | null,
>   macro_id?: number | null,
>   start_datetime?: string | null,
>   ticket_ids?: number[] | null,
>   url?: string | null,
>   updates?: Record<string, JsonValue> | null,
>   view?: Record<string, JsonValue> | null,
>   view_id?: number | null,
>   context?: Record<string, JsonValue> | null
> } | null
> ```

***

### getJob

`jobs.getJob`

Gorgias REST: Retrieve a job.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.jobs.getJob({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `cancel_requested_datetime` | `string \| null` | No | — |
| `cancelled_datetime` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `ended_datetime` | `string \| null` | No | — |
| `failed_datetime` | `string \| null` | No | — |
| `info` | `Record<string, JsonValue> \| null` | No | — |
| `locked_datetime` | `string \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| null` | No | — |
| `params` | `object \| null` | No | — |
| `scheduled_datetime` | `string \| null` | No | — |
| `started_datetime` | `string \| null` | No | — |
| `status` | `cancel_requested \| canceled \| done \| errored \| fatal_errored \| pending \| running \| scheduled \| string \| null` | No | — |
| `type` | `applyMacro \| deleteTicket \| exportTicket \| importMacro \| exportMacro \| updateTicket \| exportTicketDrilldown \| exportConvertCampaignSalesDrilldown \| string \| null` | No | — |
| `user_id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |

> [accordion] params full type
>
> ```ts theme={null}
> {
>   apply_and_close?: boolean | null,
>   end_datetime?: string | null,
>   macro_id?: number | null,
>   start_datetime?: string | null,
>   ticket_ids?: number[] | null,
>   url?: string | null,
>   updates?: Record<string, JsonValue> | null,
>   view?: Record<string, JsonValue> | null,
>   view_id?: number | null,
>   context?: Record<string, JsonValue> | null
> } | null
> ```

***

### listJobs

`jobs.listJobs`

Gorgias REST: List jobs.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.jobs.listJobs({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   limit?: number,
>   order_by?: created_datetime:asc | created_datetime:desc,
>   status?: cancel_requested | canceled | done | errored | fatal_errored | pending | running | scheduled,
>   type?: applyMacro | deleteTicket | exportTicket | importMacro | exportMacro | updateTicket | exportTicketDrilldown | exportConvertCampaignSalesDrilldown
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   cancel_requested_datetime?: string | null,
>   cancelled_datetime?: string | null,
>   created_datetime?: string | null,
>   ended_datetime?: string | null,
>   failed_datetime?: string | null,
>   info?: Record<string, JsonValue> | null,
>   locked_datetime?: string | null,
>   meta?: Record<string, JsonValue> | null,
>   params?: {
>     apply_and_close?: boolean | null,
>     end_datetime?: string | null,
>     macro_id?: number | null,
>     start_datetime?: string | null,
>     ticket_ids?: number[] | null,
>     url?: string | null,
>     updates?: Record<string, JsonValue> | null,
>     view?: Record<string, JsonValue> | null,
>     view_id?: number | null,
>     context?: Record<string, JsonValue> | null
>   } | null,
>   scheduled_datetime?: string | null,
>   started_datetime?: string | null,
>   status?: cancel_requested | canceled | done | errored | fatal_errored | pending | running | scheduled | string | null,
>   type?: applyMacro | deleteTicket | exportTicket | importMacro | exportMacro | updateTicket | exportTicketDrilldown | exportConvertCampaignSalesDrilldown | string | null,
>   user_id?: number | null,
>   uri?: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateJob

`jobs.updateJob`

Gorgias REST: Update a job.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.jobs.updateJob({"path":{"id":1},"body":{"meta":{},"params":{"apply_and_close":true,"end_datetime":"x","macro_id":1,"start_datetime":"x","ticket_ids":[],"url":"x","updates":{},"view":{},"view_id":1,"context":{}},"scheduled_datetime":"2025-01-01T00:00:00Z","status":"cancel_requested"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   meta?: Record<string, JsonValue> | null,
>   params?: {
>     apply_and_close?: boolean,
>     end_datetime?: string | null,
>     macro_id?: number,
>     start_datetime?: string | null,
>     ticket_ids?: number[],
>     url?: string,
>     updates?: Record<string, JsonValue>,
>     view?: Record<string, JsonValue>,
>     view_id?: number,
>     context?: Record<string, JsonValue>
>   },
>   scheduled_datetime?: string | null,
>   status?: cancel_requested | canceled | done | errored | fatal_errored | pending | running | scheduled
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `cancel_requested_datetime` | `string \| null` | No | — |
| `cancelled_datetime` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `ended_datetime` | `string \| null` | No | — |
| `failed_datetime` | `string \| null` | No | — |
| `info` | `Record<string, JsonValue> \| null` | No | — |
| `locked_datetime` | `string \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| null` | No | — |
| `params` | `object \| null` | No | — |
| `scheduled_datetime` | `string \| null` | No | — |
| `started_datetime` | `string \| null` | No | — |
| `status` | `cancel_requested \| canceled \| done \| errored \| fatal_errored \| pending \| running \| scheduled \| string \| null` | No | — |
| `type` | `applyMacro \| deleteTicket \| exportTicket \| importMacro \| exportMacro \| updateTicket \| exportTicketDrilldown \| exportConvertCampaignSalesDrilldown \| string \| null` | No | — |
| `user_id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |

> [accordion] params full type
>
> ```ts theme={null}
> {
>   apply_and_close?: boolean | null,
>   end_datetime?: string | null,
>   macro_id?: number | null,
>   start_datetime?: string | null,
>   ticket_ids?: number[] | null,
>   url?: string | null,
>   updates?: Record<string, JsonValue> | null,
>   view?: Record<string, JsonValue> | null,
>   view_id?: number | null,
>   context?: Record<string, JsonValue> | null
> } | null
> ```

***

## Macros

### bulkArchiveMacros

`macros.bulkArchiveMacros`

Gorgias REST: Archive macros.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.macros.bulkArchiveMacros({"body":{"ids":[1]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   ids: number[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   status?: archived | not_found | already_archived | macro_used | string | null,
>   error?: {
>     data?: {
>       rules?: string[] | null
>     } | null,
>     msg?: string | null
>   } | null
> }[] | null
> ```

***

### bulkUnarchiveMacros

`macros.bulkUnarchiveMacros`

Gorgias REST: Unarchive macros.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.macros.bulkUnarchiveMacros({"body":{"ids":[1]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   ids: number[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   status?: unarchived | not_found | already_not_archived | string | null
> }[] | null
> ```

***

### createMacro

`macros.createMacro`

Gorgias REST: Create a macro.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.macros.createMacro({"body":{"name":"x"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   external_id?: string | null,
>   name: string,
>   intent?: discount/request | exchange/request | exchange/status | feedback | order/damaged | order/cancel | order/change | order/wrong | other/no_reply | other/question | other/thanks | product/recommendation | product/question | refund/request | refund/status | return/request | return/status | shipping/change | shipping/delivery-issue | shipping/policy | shipping/status | stock/request | subscription/cancel | subscription/change,
>   language?: string | null,
>   actions?: {
>     arguments: Record<string, JsonValue>,
>     description?: string | null | null,
>     name: string,
>     title: string,
>     type?: system | user
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `intent` | `discount/request \| exchange/request \| exchange/status \| feedback \| order/damaged \| order/cancel \| order/change \| order/wrong \| other/no_reply \| other/question \| other/thanks \| product/recommendation \| product/question \| refund/request \| refund/status \| return/request \| return/status \| shipping/change \| shipping/delivery-issue \| shipping/policy \| shipping/status \| stock/request \| subscription/cancel \| subscription/change \| string \| null` | No | — |
| `language` | `string \| null` | No | — |
| `usage` | `number \| null` | No | — |
| `actions` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `archived_datetime` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |

> [accordion] actions full type
>
> ```ts theme={null}
> {
>   arguments?: Record<string, JsonValue> | null,
>   description?: string | null,
>   name?: string | null,
>   title?: string | null,
>   type?: system | user | string | null
> }[] | null
> ```

***

### deleteMacro

`macros.deleteMacro`

Gorgias REST: Delete a macro.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.macros.deleteMacro({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `void`

***

### getMacro

`macros.getMacro`

Gorgias REST: Retrieve a macro.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.macros.getMacro({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `intent` | `discount/request \| exchange/request \| exchange/status \| feedback \| order/damaged \| order/cancel \| order/change \| order/wrong \| other/no_reply \| other/question \| other/thanks \| product/recommendation \| product/question \| refund/request \| refund/status \| return/request \| return/status \| shipping/change \| shipping/delivery-issue \| shipping/policy \| shipping/status \| stock/request \| subscription/cancel \| subscription/change \| string \| null` | No | — |
| `language` | `string \| null` | No | — |
| `usage` | `number \| null` | No | — |
| `actions` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `archived_datetime` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |

> [accordion] actions full type
>
> ```ts theme={null}
> {
>   arguments?: Record<string, JsonValue> | null,
>   description?: string | null,
>   name?: string | null,
>   title?: string | null,
>   type?: system | user | string | null
> }[] | null
> ```

***

### listMacros

`macros.listMacros`

Gorgias REST: List macros.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.macros.listMacros({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   tags?: (string | null)[],
>   languages?: (string | null)[],
>   cursor?: string,
>   limit?: number,
>   message_id?: number | null,
>   order_by?: name | created_datetime | updated_datetime | usage | relevance | language | name:asc | name:desc | created_datetime:asc | created_datetime:desc | updated_datetime:asc | updated_datetime:desc | usage:asc | usage:desc | relevance:asc | relevance:desc | language:asc | language:desc,
>   search?: string | null,
>   ticket_id?: number | null,
>   number_predictions?: number,
>   archived?: boolean | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   external_id?: string | null,
>   name?: string | null,
>   intent?: discount/request | exchange/request | exchange/status | feedback | order/damaged | order/cancel | order/change | order/wrong | other/no_reply | other/question | other/thanks | product/recommendation | product/question | refund/request | refund/status | return/request | return/status | shipping/change | shipping/delivery-issue | shipping/policy | shipping/status | stock/request | subscription/cancel | subscription/change | string | null,
>   language?: string | null,
>   usage?: number | null,
>   actions?: {
>     arguments?: Record<string, JsonValue> | null,
>     description?: string | null,
>     name?: string | null,
>     title?: string | null,
>     type?: system | user | string | null
>   }[] | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   archived_datetime?: string | null,
>   uri?: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateMacro

`macros.updateMacro`

Gorgias REST: Update a macro.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.macros.updateMacro({"path":{"id":1},"body":{"external_id":"x","name":"x","intent":"discount/request","language":"x","actions":[]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   external_id?: string | null,
>   name?: string,
>   intent?: discount/request | exchange/request | exchange/status | feedback | order/damaged | order/cancel | order/change | order/wrong | other/no_reply | other/question | other/thanks | product/recommendation | product/question | refund/request | refund/status | return/request | return/status | shipping/change | shipping/delivery-issue | shipping/policy | shipping/status | stock/request | subscription/cancel | subscription/change,
>   language?: string | null,
>   actions?: {
>     arguments: Record<string, JsonValue>,
>     description?: string | null | null,
>     name: string,
>     title: string,
>     type?: system | user
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `intent` | `discount/request \| exchange/request \| exchange/status \| feedback \| order/damaged \| order/cancel \| order/change \| order/wrong \| other/no_reply \| other/question \| other/thanks \| product/recommendation \| product/question \| refund/request \| refund/status \| return/request \| return/status \| shipping/change \| shipping/delivery-issue \| shipping/policy \| shipping/status \| stock/request \| subscription/cancel \| subscription/change \| string \| null` | No | — |
| `language` | `string \| null` | No | — |
| `usage` | `number \| null` | No | — |
| `actions` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `archived_datetime` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |

> [accordion] actions full type
>
> ```ts theme={null}
> {
>   arguments?: Record<string, JsonValue> | null,
>   description?: string | null,
>   name?: string | null,
>   title?: string | null,
>   type?: system | user | string | null
> }[] | null
> ```

***

## Metric Cards

### createMetricCardFeedback

`metricCards.createMetricCardFeedback`

Gorgias REST: Submit feedback on a metric card definition.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.metricCards.createMetricCardFeedback({"path":{"slug":"x"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   slug: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   disagreement_type: definition_unclear | formula_seems_wrong | edge_case_missing | other,
>   metric_category: string,
>   comment?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |

***

### getMetricCard

`metricCards.getMetricCard`

Gorgias REST: Retrieve a metric card by slug.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.metricCards.getMetricCard({"path":{"slug":"x"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   slug: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `abandoned-calls \| accuracy \| achievement-rate \| agents-offline \| agents-online \| ai-agent-automation-rate \| ai-agent-average-csat \| ai-agent-closed-tickets \| all-used-tags-all \| all-used-tags-all-created \| all-used-values \| all-used-values-created \| article-views \| assigned-open-tickets \| automated-interactions \| available-time \| average-csat \| average-discount-amount \| average-first-response-time \| average-human-response-time-after-ai-handoff \| average-order-value \| average-resolution-time \| average-survey-score \| average-talk-time \| average-ticket-handle-time \| average-wait-time \| brand-voice \| buy-through-rate \| call-wrap-up-time \| callback-requests \| calls-in-queue \| calls-with-achieved-slas \| calls-with-breached-slas \| cancelled-calls \| click-through-rate \| closed-tickets \| closed-tickets-per-hour \| comment-highlights \| communication-skills \| contribution-to-total-sales \| conversion-rate \| cost-saved \| coverage-rate \| created-tickets \| decrease-in-frt \| decrease-in-resolution-time \| discount-codes-applied \| discount-usage \| discounts-offered \| efficiency \| first-response-time \| handover-interactions \| human-response-time-after-ai-handoff \| inbound-answered \| inbound-answered-per-agent \| inbound-calls \| inbound-declined \| inbound-transferred \| internal-compliance \| language-proficiency \| live-messages-sent \| live-online-status \| live-open-tickets \| live-tickets-closed \| live-tickets-created \| live-tickets-replied \| macro-share-of-total \| macro-total-tickets \| macro-trend \| median-purchase-time \| median-response-time \| messages-per-ticket \| messages-received \| messages-sent \| messages-sent-per-hour \| messages-sent-per-macro \| missed-calls \| no-result-searches \| no-search-results-search-count \| on-a-call-time \| one-touch-tickets \| online-time \| open-tickets \| orders-influenced \| outbound-calls \| overall-automation-rate \| percent-abandoned-calls \| percent-callback-requests \| percent-cancelled-calls \| percent-missed-calls \| percent-one-touch-tickets \| percent-sla-achievement-rate \| percent-zero-touch-tickets \| percentage-of-closed-tickets \| percentage-of-created-tickets \| performance-per-article-views \| product-recommendations \| resolution-completeness \| resolution-time \| response-rate \| revenue-influenced \| revenue-per-interaction \| reviewed-tickets \| satisfaction-score \| search-results \| search-terms-with-results-articles-clicked \| search-terms-with-results-click-through-rate \| search-terms-with-results-search-count \| searches \| success-rate \| surveys-answered \| surveys-sent \| ticket-attribute-intents \| ticket-attribute-share-of-total \| ticket-attribute-tickets \| ticket-attribute-trend \| ticket-handle-time-per-agent \| tickets-replied \| tickets-replied-per-hour \| tickets-with-achieved-slas \| tickets-with-breached-slas \| time-saved-by-agent \| top-performer-frt \| top-performers-closed-tickets \| top-performers-csat \| top-performers-resolution-time \| top-used-tags-all \| top-used-tags-all-created \| top-used-tags-all-created-trend \| top-used-tags-all-trend \| top-used-values \| top-used-values-created \| top-used-values-created-trend \| top-used-values-trend \| total-calls \| total-sales \| total-time \| unanswered-calls \| unassigned-open-tickets \| unavailable-time \| wait-time-per-call \| zero-touch-tickets \| string \| null` | No | — |
| `category` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `status` | `published \| deprecated \| string \| null` | No | — |
| `definition_revised_at` | `string \| null` | No | — |
| `public` | `object \| null` | No | — |
| `api` | `object \| null` | No | — |
| `aliases` | `string[] \| null` | No | — |
| `related` | `object[] \| null` | No | — |
| `replaces` | `object[] \| null` | No | — |
| `used_in_reports` | `string[] \| null` | No | — |
| `used_in_reports_links` | `string[] \| null` | No | — |

> [accordion] public full type
>
> ```ts theme={null}
> {
>   definition?: string | null,
>   formula?: string | null,
>   computation_logic?: string[] | null
> } | null
> ```

> [accordion] api full type
>
> ```ts theme={null}
> {
>   scope?: string | null,
>   measures?: string[] | null,
>   dimensions?: string[] | null,
>   filters?: {
>     member?: string | null,
>     values?: string[] | null
>   }[] | null
> } | null
> ```

> [accordion] related full type
>
> ```ts theme={null}
> {
>   slug?: string | null,
>   url?: string | null
> }[] | null
> ```

> [accordion] replaces full type
>
> ```ts theme={null}
> {
>   slug?: string | null,
>   url?: string | null
> }[] | null
> ```

***

### searchMetricCards

`metricCards.searchMetricCards`

Gorgias REST: Search metric cards.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.metricCards.searchMetricCards({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   category?: string,
>   status?: published | deprecated,
>   q?: string,
>   include?: deprecated
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   slug?: abandoned-calls | accuracy | achievement-rate | agents-offline | agents-online | ai-agent-automation-rate | ai-agent-average-csat | ai-agent-closed-tickets | all-used-tags-all | all-used-tags-all-created | all-used-values | all-used-values-created | article-views | assigned-open-tickets | automated-interactions | available-time | average-csat | average-discount-amount | average-first-response-time | average-human-response-time-after-ai-handoff | average-order-value | average-resolution-time | average-survey-score | average-talk-time | average-ticket-handle-time | average-wait-time | brand-voice | buy-through-rate | call-wrap-up-time | callback-requests | calls-in-queue | calls-with-achieved-slas | calls-with-breached-slas | cancelled-calls | click-through-rate | closed-tickets | closed-tickets-per-hour | comment-highlights | communication-skills | contribution-to-total-sales | conversion-rate | cost-saved | coverage-rate | created-tickets | decrease-in-frt | decrease-in-resolution-time | discount-codes-applied | discount-usage | discounts-offered | efficiency | first-response-time | handover-interactions | human-response-time-after-ai-handoff | inbound-answered | inbound-answered-per-agent | inbound-calls | inbound-declined | inbound-transferred | internal-compliance | language-proficiency | live-messages-sent | live-online-status | live-open-tickets | live-tickets-closed | live-tickets-created | live-tickets-replied | macro-share-of-total | macro-total-tickets | macro-trend | median-purchase-time | median-response-time | messages-per-ticket | messages-received | messages-sent | messages-sent-per-hour | messages-sent-per-macro | missed-calls | no-result-searches | no-search-results-search-count | on-a-call-time | one-touch-tickets | online-time | open-tickets | orders-influenced | outbound-calls | overall-automation-rate | percent-abandoned-calls | percent-callback-requests | percent-cancelled-calls | percent-missed-calls | percent-one-touch-tickets | percent-sla-achievement-rate | percent-zero-touch-tickets | percentage-of-closed-tickets | percentage-of-created-tickets | performance-per-article-views | product-recommendations | resolution-completeness | resolution-time | response-rate | revenue-influenced | revenue-per-interaction | reviewed-tickets | satisfaction-score | search-results | search-terms-with-results-articles-clicked | search-terms-with-results-click-through-rate | search-terms-with-results-search-count | searches | success-rate | surveys-answered | surveys-sent | ticket-attribute-intents | ticket-attribute-share-of-total | ticket-attribute-tickets | ticket-attribute-trend | ticket-handle-time-per-agent | tickets-replied | tickets-replied-per-hour | tickets-with-achieved-slas | tickets-with-breached-slas | time-saved-by-agent | top-performer-frt | top-performers-closed-tickets | top-performers-csat | top-performers-resolution-time | top-used-tags-all | top-used-tags-all-created | top-used-tags-all-created-trend | top-used-tags-all-trend | top-used-values | top-used-values-created | top-used-values-created-trend | top-used-values-trend | total-calls | total-sales | total-time | unanswered-calls | unassigned-open-tickets | unavailable-time | wait-time-per-call | zero-touch-tickets | string | null,
>   category?: string | null,
>   title?: string | null,
>   status?: published | deprecated | string | null,
>   definition_revised_at?: string | null,
>   public?: {
>     definition?: string | null,
>     formula?: string | null,
>     computation_logic?: string[] | null
>   } | null,
>   api?: {
>     scope?: string | null,
>     measures?: string[] | null,
>     dimensions?: string[] | null,
>     filters?: {
>       member?: string | null,
>       values?: string[] | null
>     }[] | null
>   } | null,
>   aliases?: string[] | null,
>   related?: {
>     slug?: string | null,
>     url?: string | null
>   }[] | null,
>   replaces?: {
>     slug?: string | null,
>     url?: string | null
>   }[] | null,
>   used_in_reports?: string[] | null,
>   used_in_reports_links?: string[] | null
> }[] | null
> ```

***

## Reporting Statistics

### getStatistic

`reportingStatistics.getStatistic`

Gorgias REST: Retrieve a statistic.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.reportingStatistics.getStatistic({"body":{"query":{"scope":"tickets-closed","filters":[],"timezone":"x"}}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |
| `body` | `object` | Yes | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   limit?: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   query: {
>     scope: tickets-closed,
>     measures?: ticketCount[],
>     dimensions?: (ticketId | agentId | channel | integrationId | storeId | storeIntegrationId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: closedDatetime | createdDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: tickets-created,
>     measures?: ticketCount[],
>     dimensions?: (ticketId | agentId | channel | integrationId | storeId | storeIntegrationId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3 | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: tickets-open,
>     measures?: ticketCount[],
>     dimensions?: (ticketId | agentId | channel | integrationId | storeId | storeIntegrationId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: tickets-replied,
>     measures?: ticketCount[],
>     dimensions?: (ticketId | agentId | channel | integrationId | storeId | storeIntegrationId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | sentDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: one-touch-tickets,
>     measures?: ticketCount[],
>     dimensions?: (ticketId | agentId | channel | integrationId | storeId | storeIntegrationId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | closedDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: zero-touch-tickets,
>     measures?: ticketCount[],
>     dimensions?: (ticketId | agentId | channel | integrationId | storeId | storeIntegrationId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | closedDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: satisfaction-surveys,
>     measures?: (scoredSurveysCount | averageSurveyScore | satisfactionScore | responseRate | sentSurveysCount)[],
>     dimensions?: (ticketId | agentId | channel | integrationId | surveyScore | storeId | storeIntegrationId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | sentDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: resolution-time,
>     measures?: (medianResolutionTime | averageResolutionTime)[],
>     dimensions?: (ticketId | agentId | channel | integrationId | resolutionTime | storeId | storeIntegrationId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | periodStart | closedDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: messages-sent,
>     measures?: messagesCount[],
>     dimensions?: (ticketId | agentId | channel | integrationId | storeId | storeIntegrationId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: sentDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ticket-macro-usage,
>     measures?: (ticketCount | ticketShare)[],
>     dimensions?: (macroId | macroName | ticketId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | channel | agentId | teamId | integrationId | storeId | storeIntegrationId | score | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | macroId | agentIdFromTeamId,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: closedDatetime | createdDatetime | sentDatetime | updatedDatetime | firstAgentMessageDatetime | timestamp | anchorDatetime | queuedDate | periodStart | scoredDatetime | eventDatetime | billingTimestamp,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: first-response-time,
>     measures?: (medianFirstResponseTime | averageFirstResponseTime)[],
>     dimensions?: (ticketId | agentId | channel | integrationId | firstResponseTime | storeId | storeIntegrationId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | firstAgentMessageDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: human-first-response-time,
>     measures?: (medianFirstResponseTime | averageFirstResponseTime)[],
>     dimensions?: (ticketId | agentId | channel | integrationId | firstResponseTime | storeId | storeIntegrationId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | firstAgentMessageDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: response-time,
>     measures?: medianResponseTime[],
>     dimensions?: (ticketId | agentId | channel | integrationId | storeId | storeIntegrationId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: messages-per-ticket,
>     measures?: averageMessagesCount[],
>     dimensions?: (ticketId | agentId | channel | integrationId | messagesCount | storeId | storeIntegrationId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | closedDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ticket-handle-time,
>     measures?: (averageHandleTime | handleTime)[],
>     dimensions?: (ticketId | agentId | channel | integrationId | handleTime | storeId | storeIntegrationId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | closedDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: online-time,
>     measures?: onlineTime[],
>     dimensions?: agentId[],
>     filters: {
>       member: agentId | periodStart | periodEnd | agentIdFromTeamId,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: tags,
>     measures?: ticketCount[],
>     dimensions?: (ticketId | agentId | channel | integrationId | storeId | tagId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | tagId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | createdDatetime | agentIdFromTeamId,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: timestamp,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ticket-fields,
>     measures?: ticketCount[],
>     dimensions?: (ticketId | customFieldValue)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | integrationId | storeId | customFieldId | productId | createdDatetime | customFieldValue | customFieldValueString | integrationChannelPair | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | score | agentIdFromTeamId,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: updatedDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: auto-qa,
>     measures?: (averageResolutionCompletenessScore | averageCommunicationSkillsScore | averageLanguageProficiencyScore | averageAccuracyScore | averageEfficiencyScore | averageInternalComplianceScore | averageBrandVoiceScore | ticketCount)[],
>     dimensions?: (ticketId | agentId | channel | integrationId | storeId | storeIntegrationId | ticketQAScorerUserId | ticketFields | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | status | ticketQAScorerUserId | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3 | hasScore | agentIdFromTeamId,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: messages-received,
>     measures?: messagesCount[],
>     dimensions?: (ticketId | agentId | channel | integrationId | storeId | storeIntegrationId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | storeIntegrationId | agentIdFromTeamId | aiAgentFilter,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: sentDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: workload-tickets,
>     measures?: ticketCount[],
>     dimensions?: (ticketId | channel)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | score | integrationId | communicationSkills | languageProficiency | resolutionCompleteness | accuracy | efficiency | internalCompliance | brandVoice | storeId | agentIdFromTeamId,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: voice-calls,
>     measures?: (voiceCallsCount | averageTalkTimeInSeconds | averageWaitTimeInSeconds | inboundCallsCount | outboundCallsCount | inboundAnsweredCallsCount | inboundUnansweredCallsCount | inboundMissedCallsCount | inboundAbandonedCallsCount | inboundCancelledCallsCount | inboundCallbackRequestedCallsCount | abandonedRate | callbackRequestedRate | cancelledRate | missedRate | slaAchievementRate | breachedExposures | achievedExposures)[],
>     dimensions?: (agentId | filteringAgentId | integrationId | queueId | customerId | createdDatetime | status | duration | source | destination | callDirection | talkTime | waitTime | voicemailAvailable | voicemailUrl | callRecordingAvailable | callRecordingUrl | displayStatus | queueName | ticketId | isPossibleSpam | callSlaStatus | callSlaStatusLabel | storeIntegrationId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | integrationId | agentId | queueId | isDuringBusinessHours | callTerminationStatus | callDirection | storeId | displayStatus | callSlaStatus | talkTime | waitTime | storeIntegrationId | isAnsweredByAgent | agentIdFromTeamId,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: voice-agent-events,
>     measures?: voiceCallsCount[],
>     dimensions?: (agentId | integrationId | createdDatetime | ticketId | status | transferType | transferTargetAgentId | transferTargetExternalNumber | transferTargetQueueId | assignedAgentId | customerId | duration | source | destination | callDirection | voicemailAvailable | voicemailUrl | callRecordingAvailable | callRecordingUrl | displayStatus | storeIntegrationId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | integrationId | agentId | transferredCalls | declinedCalls | storeId | storeIntegrationId | queueId | isDuringBusinessHours | agentIdFromTeamId,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ticket-sla,
>     measures?: (ticketCount | slaAchievementRate)[],
>     dimensions?: (status | channel | storeId | storeIntegrationId | slaPolicyUuid | slaDelta | slaPolicyMetricName | slaPolicyMetricStatus | ticketId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | integrationId | storeId | storeIntegrationId | status | slaPolicyUuid | score | resolutionCompleteness | communicationSkills | languageProficiency | accuracy | efficiency | internalCompliance | brandVoice | agentIdFromTeamId,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: anchorDatetime | periodStart | createdDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: knowledge-insights,
>     measures?: (averageSurveyScore | ticketCount | interactionsCount)[],
>     dimensions?: (ticketId | resourceType | resourceSourceId | resourceSourceSetId | resourceVersion | customFieldTop2LevelsValue | createdDatetime)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | storeId | resourceSourceId | resourceSourceSetId | resourceVersion | customFieldId | customFieldValueString,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: voice-calls-summary,
>     measures?: (inboundVoiceCallsCount | outboundVoiceCallsCount | answeredVoiceCallsCount | cancelledVoiceCallsCount | abandonedVoiceCallsCount | missedVoiceCallsCount | unansweredVoiceCallsCount | callbackRequestedVoiceCallsCount | averageTalkTimeInSeconds | averageWaitTimeInSeconds | slaAchievementRate)[],
>     filters: {
>       member: periodStart | periodEnd | integrationId | agentId | queueId | isDuringBusinessHours | agentIdFromTeamId,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     timezone: string
>   } | {
>     scope: voice-queue-exposure,
>     measures?: (slaAchievementRate | breachedExposures | achievedExposures | totalExposures)[],
>     dimensions?: (agentId | integrationId | queueId | queueName | callSlaStatusLabel)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | integrationId | queueId | callSlaStatus | storeId | agentIdFromTeamId,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: queuedDate,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: user-availability-tracking,
>     measures?: (totalDurationSeconds | onlineDurationSeconds | offlineDurationSeconds | intervalCount)[],
>     dimensions?: (agentId | statusName)[],
>     filters: {
>       member: agentId | periodStart | periodEnd | agentIdFromTeamId,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: help-center,
>     measures?: (articleViewCount | searchRequestedCount | articleCount | searchRequestedQueryCount | searchArticlesClickedCount | uniqueSearchArticlesClickedCount | uniqueSearchQueryCount | clickThroughRate)[],
>     dimensions?: (helpCenterId | helpCenterEventType | localeCodes | articleId | articleTitle | articleSlug | searchQuery | searchResultRange)[],
>     filters: {
>       member: periodStart | periodEnd | helpCenterId | helpCenterEventType | localeCodes | searchQuery | isSearchRequestWithClick | searchResultCount | articleId,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: timestamp,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-sales-agent-orders-performance,
>     measures?: (ordersInfluencedCount | totalSalesAmount | totalSalesAmountUsd | averageOrderValue | averageOrderValueUsd | medianOrderValue | medianOrderValueUsd | averagePurchaseTime | medianPurchaseTime)[],
>     dimensions?: (channel | currency | storeIntegrationId | engagementType | ticketId | orderId | totalAmount | purchaseTime | productId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | engagementType | currency | orderId | attributionWindowDays,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-sales-agent-discounts,
>     measures?: (offeredDiscountCodesCount | appliedDiscountCodesCount | averageDiscountAmount | averageDiscountUsd | medianDiscountAmount | discountUsage)[],
>     dimensions?: (channel | currency | storeIntegrationId | engagementType | ticketId | discountAmount | discountCodeOffered | discountCodeUsed | productId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | engagementType | currency | attributionWindowDays,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-sales-agent-activity,
>     measures?: (revenuePerInteraction | recommendedProductCount | timesRecommended)[],
>     dimensions?: (channel | storeIntegrationId | ticketId | engagementType | attributedRevenue | productRecommended | productId | productVariantIds | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | engagementType | productId | attributionWindowDays,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: overall-automation-rate,
>     measures?: automationRate[],
>     dimensions?: (automationFeatureType | channel | storeIntegrationId | aiAgentRole | orderManagementType | flowId)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | automationFeatureType | aiAgentRole,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-agent-automated-interactions,
>     measures?: automatedInteractionsCount[],
>     dimensions?: (aiAgentRole | engagementType | channel | storeIntegrationId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3 | ticketId)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | aiAgentRole | engagementType,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: overall-automated-interactions,
>     measures?: automatedInteractionsCount[],
>     dimensions?: (automationFeatureType | orderManagementType | flowId | channel | storeIntegrationId)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | automationFeatureType,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: handover-interactions,
>     measures?: handoverInteractionsCount[],
>     dimensions?: (automationFeatureType | aiAgentRole | engagementType | channel | storeIntegrationId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3 | ticketId | orderManagementType | resourceSourceId | resourceSourceSetId)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | automationFeatureType | aiAgentRole | engagementType | resourceSourceId | resourceSourceSetId,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-sales-agent-buy-through-rate,
>     measures?: (buyThroughRate | productBuyThroughRate)[],
>     dimensions?: (channel | storeIntegrationId | engagementType | ticketId | productRecommended | boughtProducts | productId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | engagementType | attributionWindowDays,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-sales-agent-conversion-rate,
>     measures?: conversionRate[],
>     dimensions?: (channel | storeIntegrationId | engagementType | ticketId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | engagementType | attributionWindowDays,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-sales-agent-contribution-to-total-sales,
>     measures?: contributionToTotalSales[],
>     dimensions?: (storeIntegrationId | orderId | currency)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | engagementType | attributionWindowDays,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-agent-coverage-rate,
>     measures?: coverageRate[],
>     dimensions?: (channel | ticketId | aiAgentRole | storeIntegrationId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: {
>       member: periodStart | periodEnd | channel | aiAgentRole | storeIntegrationId | engagementType | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-agent-handover-rate,
>     measures?: (handoverRate | coveredTicketsCount | handoverTicketsCount)[],
>     dimensions?: (channel | ticketId | aiAgentRole | storeIntegrationId | engagementType | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: {
>       member: periodStart | periodEnd | channel | aiAgentRole | storeIntegrationId | engagementType | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-agent-success-rate,
>     measures?: (successRate | aiAgentTicketVolume)[],
>     dimensions?: (channel | ticketId | aiAgentRole | storeIntegrationId | engagementType | productId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3 | resourceSourceId | resourceSourceSetId)[],
>     filters: {
>       member: periodStart | periodEnd | channel | aiAgentRole | storeIntegrationId | engagementType | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3 | resourceSourceId | resourceSourceSetId,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: overall-time-saved-by-agent,
>     measures?: (averageTimeSavedByAgent | medianTimeSavedByAgent)[],
>     dimensions?: (channel | automationFeatureType | orderManagementType | flowId | storeIntegrationId | ticketId)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | automationFeatureType,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-agent-time-saved,
>     measures?: (averageTimeSavedByAgent | medianTimeSavedByAgent)[],
>     dimensions?: (channel | aiAgentRole | storeIntegrationId | ticketId | engagementType | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | aiAgentRole | engagementType,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-agent-ticket-fields,
>     measures?: ticketCount[],
>     dimensions?: (aiAgentRole | aiOutcomeCustomField | channel | storeIntegrationId | ticketId)[],
>     filters: {
>       member: periodStart | periodEnd | aiAgentRole | channel | storeIntegrationId,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: overall-decrease-in-resolution-time,
>     measures?: (averageDecreaseInResolutionTime | medianDecreaseInResolutionTime)[],
>     dimensions?: (channel | automationFeatureType | orderManagementType | flowId | storeIntegrationId | ticketId | resolutionTime)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | automationFeatureType,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-agent-decrease-in-resolution-time,
>     measures?: (averageDecreaseInResolutionTime | medianDecreaseInResolutionTime)[],
>     dimensions?: (channel | aiAgentRole | storeIntegrationId | ticketId | resolutionTime | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | aiAgentRole,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: flow-dataset,
>     measures?: (dropOffCount | handoverInteractionsCount)[],
>     dimensions?: (channel | flowId | storeIntegrationId)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-agent-csat,
>     measures?: (averageCSAT | medianCSAT)[],
>     dimensions?: (channel | ticketId | aiAgentRole | storeIntegrationId | engagementType | surveyScore | resourceSourceId | resourceSourceSetId | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: {
>       member: periodStart | periodEnd | channel | aiAgentRole | storeIntegrationId | engagementType | resourceSourceId | resourceSourceSetId,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: overall-decrease-in-first-response-time,
>     measures?: (averageDecreaseInFirstResponseTime | medianDecreaseInFirstResponseTime)[],
>     dimensions?: (channel | automationFeatureType | orderManagementType | flowId | storeIntegrationId | ticketId | firstResponseTime)[],
>     filters: {
>       member: periodStart | periodEnd | channel | storeIntegrationId | automationFeatureType,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ai-agent-decrease-in-first-response-time,
>     measures?: (averageDecreaseInFirstResponseTime | medianDecreaseInFirstResponseTime)[],
>     dimensions?: (channel | aiAgentRole | engagementType | storeIntegrationId | ticketId | firstResponseTime | aiIntentCustomField | aiIntentCustomFieldL1 | aiIntentCustomFieldL2 | aiIntentCustomFieldL3)[],
>     filters: {
>       member: periodStart | periodEnd | channel | aiAgentRole | engagementType | storeIntegrationId,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: eventDatetime,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: ticket-status-breakdown,
>     measures?: (total | inbound | outbound | spam | inboundDeleted | inboundTrashed | inboundReopened | inboundClosed | inboundOpen | outboundDeleted | outboundTrashed | outboundReopened | outboundClosed | outboundOpen)[],
>     dimensions?: (ticketId | agentId | channel | integrationId | storeId)[],
>     filters: (
>       {
>         member: periodStart | periodEnd | agentId | teamId | channel | integrationId | storeId | agentIdFromTeamId,
>         operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>         values: string[] | number[]
>       } | {
>         member: customFields,
>         values: {
>           custom_field_id: number,
>           operator: one-of | not-one-of,
>           values: string[] | number[]
>         }[]
>       } | {
>         member: tags,
>         values: {
>           operator: one-of | not-one-of | all-of,
>           values: string[] | number[]
>         }[]
>       }
>     )[],
>     time_dimensions?: {
>       dimension: createdDatetime | periodStart,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   } | {
>     scope: billing-usage,
>     measures?: (smsUsageCount | voiceUsageCount | convertUsageCount | helpdeskUsageCount | aiAgentUsageCount | gaiaUsageCount)[],
>     dimensions?: (billingId | billingProduct)[],
>     filters: {
>       member: periodStart | periodEnd | billingProduct | billingId,
>       operator: one-of | not-one-of | all-of | afterDate | beforeDate | set | inDateRange | contains,
>       values: string[] | number[]
>     }[],
>     time_dimensions?: {
>       dimension: billingTimestamp,
>       granularity: day | week | month | hour
>     }[],
>     timezone: string,
>     order?: Record<string, JsonValue>[][]
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `object` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `data` | `Record<string, boolean \| string \| number \| Record<string, JsonValue>[] \| Record<string, JsonValue>>[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   scope?: tickets-closed | tickets-created | tickets-open | tickets-replied | one-touch-tickets | zero-touch-tickets | satisfaction-surveys | satisfaction-surveys-v2 | resolution-time | messages-sent | first-response-time | human-first-response-time | response-time | messages-per-ticket | ticket-handle-time | online-time | tags | auto-qa | messages-received | messages-sent-per-macro | ticket-macro-usage | automation-rate | workload-tickets | automated-interactions | ticket-fields | voice-calls | voice-agent-events | ticket-sla | knowledge-insights | voice-calls-summary | voice-queue-exposure | user-availability-tracking | convert-campaign-events | convert-order-conversion | convert-campaign-order-events | help-center | ai-sales-agent-orders | ai-sales-agent-conversations | overall-automation-rate | ai-agent-automated-interactions | overall-automated-interactions | handover-interactions | ai-sales-agent-orders-performance | ai-sales-agent-discounts | ai-sales-agent-activity | ai-sales-agent-buy-through-rate | ai-sales-agent-conversion-rate | ai-sales-agent-contribution-to-total-sales | ai-agent-coverage-rate | ai-agent-success-rate | ai-agent-handover-rate | ai-agent-funnel | overall-time-saved-by-agent | ai-agent-time-saved | ai-agent-tickets-closed | ai-agent-ticket-fields | overall-decrease-in-resolution-time | ai-agent-decrease-in-resolution-time | flow-dataset | ai-agent-csat | overall-decrease-in-first-response-time | ai-agent-decrease-in-first-response-time | revenue | ai-influenced-orders-lookup | ticket-status-breakdown | gaia-current-billing-usage | billing-usage | live-chat-summary | live-ticket-summary | string | null,
>   prev_cursor?: string | null,
>   next_cursor?: string | null,
>   total?: number | null,
>   offset?: number | null,
>   limit?: number | null
> } | null
> ```

***

## Rules

### createRule

`rules.createRule`

Gorgias REST: Create a rule.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.rules.createRule({"body":{"code":"x","name":"x"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   code: string,
>   code_ast?: Record<string, JsonValue>,
>   deactivated_datetime?: string | null,
>   description?: string | null,
>   event_types?: string,
>   name: string,
>   priority?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `code` | `string \| null` | No | — |
| `code_ast` | `Record<string, JsonValue> \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `event_types` | `ticket-created \| ticket-updated \| ticket-message-created \| ticket-assigned \| ticket-self-unsnoozed \| satisfaction-survey-responded \| string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `priority` | `number \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |

***

### deleteRule

`rules.deleteRule`

Gorgias REST: Delete a rule.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.rules.deleteRule({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `void`

***

### getRule

`rules.getRule`

Gorgias REST: Retrieve a rule.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.rules.getRule({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `code` | `string \| null` | No | — |
| `code_ast` | `Record<string, JsonValue> \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `event_types` | `ticket-created \| ticket-updated \| ticket-message-created \| ticket-assigned \| ticket-self-unsnoozed \| satisfaction-survey-responded \| string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `priority` | `number \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |

***

### listRules

`rules.listRules`

Gorgias REST: List rules.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.rules.listRules({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   limit?: number,
>   order_by?: created_datetime:asc | created_datetime:desc,
>   search?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   code?: string | null,
>   code_ast?: Record<string, JsonValue> | null,
>   created_datetime?: string | null,
>   deactivated_datetime?: string | null,
>   description?: string | null,
>   event_types?: ticket-created | ticket-updated | ticket-message-created | ticket-assigned | ticket-self-unsnoozed | satisfaction-survey-responded | string | null,
>   name?: string | null,
>   priority?: number | string | null,
>   updated_datetime?: string | null,
>   uri?: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateRule

`rules.updateRule`

Gorgias REST: Update a rule.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.rules.updateRule({"path":{"id":1},"body":{"code":"x","code_ast":{},"deactivated_datetime":"2025-01-01T00:00:00Z","description":"x","event_types":"ticket-created","name":"x","priority":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   code?: string,
>   code_ast?: Record<string, JsonValue>,
>   deactivated_datetime?: string | null,
>   description?: string | null,
>   event_types?: string,
>   name?: string,
>   priority?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `code` | `string \| null` | No | — |
| `code_ast` | `Record<string, JsonValue> \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `event_types` | `ticket-created \| ticket-updated \| ticket-message-created \| ticket-assigned \| ticket-self-unsnoozed \| satisfaction-survey-responded \| string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `priority` | `number \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |

***

### updateRulesPriorities

`rules.updateRulesPriorities`

Gorgias REST: Update rules' priorities.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.rules.updateRulesPriorities({"body":{"priorities":[]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   priorities: {
>     id: number,
>     priority: number
>   }[]
> }
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   code?: string | null,
>   code_ast?: Record<string, JsonValue> | null,
>   created_datetime?: string | null,
>   deactivated_datetime?: string | null,
>   description?: string | null,
>   event_types?: ticket-created | ticket-updated | ticket-message-created | ticket-assigned | ticket-self-unsnoozed | satisfaction-survey-responded | string | null,
>   name?: string | null,
>   priority?: number | string | null,
>   updated_datetime?: string | null,
>   uri?: string | null
> }[]
> ```

***

## Satisfaction Surveys

### createSatisfactionSurvey

`satisfactionSurveys.createSatisfactionSurvey`

Gorgias REST: Create a survey.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.satisfactionSurveys.createSatisfactionSurvey({"body":{"customer_id":1,"ticket_id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   body_text?: string | null,
>   created_datetime?: string | null,
>   customer_id: number,
>   meta?: Record<string, JsonValue> | null,
>   score?: number | null,
>   scored_datetime?: string | null,
>   sent_datetime?: string | null,
>   should_send_datetime?: string | null,
>   ticket_id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `body_text` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `customer_id` | `number \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| null` | No | — |
| `score` | `number \| null` | No | — |
| `scored_datetime` | `string \| null` | No | — |
| `sent_datetime` | `string \| null` | No | — |
| `should_send_datetime` | `string \| null` | No | — |
| `ticket_id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |

***

### getSatisfactionSurvey

`satisfactionSurveys.getSatisfactionSurvey`

Gorgias REST: Retrieve a survey.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.satisfactionSurveys.getSatisfactionSurvey({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `body_text` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `customer_id` | `number \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| null` | No | — |
| `score` | `number \| null` | No | — |
| `scored_datetime` | `string \| null` | No | — |
| `sent_datetime` | `string \| null` | No | — |
| `should_send_datetime` | `string \| null` | No | — |
| `ticket_id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |

***

### listSatisfactionSurveys

`satisfactionSurveys.listSatisfactionSurveys`

Gorgias REST: List surveys.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.satisfactionSurveys.listSatisfactionSurveys({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   limit?: number,
>   order_by?: created_datetime:asc | created_datetime:desc,
>   ticket_id?: number | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   body_text?: string | null,
>   created_datetime?: string | null,
>   customer_id?: number | null,
>   meta?: Record<string, JsonValue> | null,
>   score?: number | null,
>   scored_datetime?: string | null,
>   sent_datetime?: string | null,
>   should_send_datetime?: string | null,
>   ticket_id?: number | null,
>   uri?: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateSatisfactionSurvey

`satisfactionSurveys.updateSatisfactionSurvey`

Gorgias REST: Update a survey.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.satisfactionSurveys.updateSatisfactionSurvey({"path":{"id":1},"body":{"body_text":"x","created_datetime":"2025-01-01T00:00:00Z","customer_id":1,"meta":{},"score":1,"scored_datetime":"2025-01-01T00:00:00Z","sent_datetime":"2025-01-01T00:00:00Z","should_send_datetime":"2025-01-01T00:00:00Z","ticket_id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   body_text?: string | null,
>   created_datetime?: string | null,
>   customer_id?: number,
>   meta?: Record<string, JsonValue> | null,
>   score?: number | null,
>   scored_datetime?: string | null,
>   sent_datetime?: string | null,
>   should_send_datetime?: string | null,
>   ticket_id?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `body_text` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `customer_id` | `number \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| null` | No | — |
| `score` | `number \| null` | No | — |
| `scored_datetime` | `string \| null` | No | — |
| `sent_datetime` | `string \| null` | No | — |
| `should_send_datetime` | `string \| null` | No | — |
| `ticket_id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |

***

## Search

### search

`search.search`

Gorgias REST: Search for resources.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.search.search({"body":{"type":"agent"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   type: agent | customer | customer_profile | customer_channel | customer_channel_email | customer_channel_phone | customers_by_phone | integration | team | tag,
>   query?: string,
>   size?: number
> }
> ```

**Output:** `Record<string, JsonValue>`

***

## Statistics

### downloadLegacyStatistic

`statistics.downloadLegacyStatistic`

Gorgias REST: Download a statistic.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.statistics.downloadLegacyStatistic({"path":{"name":"overview"},"body":{"filters":{"period":{"end_datetime":"2025-01-01T00:00:00Z","start_datetime":"2025-01-01T00:00:00Z"},"agents":[],"channels":[],"campaigns":[],"tags":[],"integrations":[],"score":[]}}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

Returns a `{ kind: "binary", contentType, base64, sizeBytes }` object for the provider CSV response.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   name: overview | total-tickets-created | total-tickets-replied | total-tickets-closed | total-messages-sent | total-messages-received | median-first-response-time | median-resolution-time | total-one-touch-tickets | support-volume | resolution-time | first-response-time | tickets-created-per-hour-per-weekday | tickets-per-tag | tickets-created-per-channel | tickets-created-per-channel-per-day | tickets-closed-per-agent | tickets-closed-per-agent-per-day | messages-sent-per-macro | satisfaction-surveys | latest-satisfaction-surveys | intents-occurrence | intents-overview | intents-breakdown-per-day | revenue-overview | revenue-per-agent | revenue-per-day | revenue-per-ticket | self-service-volume-per-flow | self-service-article-recommendation-performance | self-service-top-reported-issues | self-service-products-with-most-issues-and-return-requests | self-service-workflows-performance
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   filters: {
>     period?: {
>       start_datetime: string,
>       end_datetime: string
>     },
>     agents?: number[],
>     channels?: string[],
>     campaigns?: string[],
>     tags?: number[],
>     integrations?: number[],
>     score?: number[]
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kind` | `binary` | Yes | — |
| `contentType` | `string \| null` | No | — |
| `base64` | `string \| null` | No | — |
| `sizeBytes` | `number \| null` | No | — |

***

### getLegacyStatistic

`statistics.getLegacyStatistic`

Gorgias REST: Retrieve a statistic.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.statistics.getLegacyStatistic({"path":{"name":"overview"},"body":{"filters":{"period":{"end_datetime":"2025-01-01T00:00:00Z","start_datetime":"2025-01-01T00:00:00Z"},"agents":[],"channels":[],"campaigns":[],"tags":[],"integrations":[],"score":[]}}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   name: overview | total-tickets-created | total-tickets-replied | total-tickets-closed | total-messages-sent | total-messages-received | median-first-response-time | median-resolution-time | total-one-touch-tickets | support-volume | resolution-time | first-response-time | tickets-created-per-hour-per-weekday | tickets-per-tag | tickets-created-per-channel | tickets-created-per-channel-per-day | tickets-closed-per-agent | tickets-closed-per-agent-per-day | messages-sent-per-macro | satisfaction-surveys | latest-satisfaction-surveys | intents-occurrence | intents-overview | intents-breakdown-per-day | revenue-overview | revenue-per-agent | revenue-per-day | revenue-per-ticket | self-service-volume-per-flow | self-service-article-recommendation-performance | self-service-top-reported-issues | self-service-products-with-most-issues-and-return-requests | self-service-workflows-performance
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   filters: {
>     period?: {
>       start_datetime: string,
>       end_datetime: string
>     },
>     agents?: number[],
>     channels?: string[],
>     campaigns?: string[],
>     tags?: number[],
>     integrations?: number[],
>     score?: number[]
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `Record<string, JsonValue> \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   end_datetime?: string | null,
>   previous_end_datetime?: string | null,
>   previous_start_datetime?: string | null,
>   start_datetime?: string | null
> } | null
> ```

***

## Tags

### createTag

`tags.createTag`

Gorgias REST: Create a tag.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.tags.createTag({"body":{"name":"x"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   decoration?: {
>     color: string
>   },
>   description?: string,
>   name: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `decoration` | `object \| null` | No | — |
| `description` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `usage` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deleted_datetime` | `string \| null` | No | — |

> [accordion] decoration full type
>
> ```ts theme={null}
> {
>   color?: string | null
> } | null
> ```

***

### deleteTag

`tags.deleteTag`

Gorgias REST: Delete a tag.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.tags.deleteTag({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `void`

***

### deleteTags

`tags.deleteTags`

Gorgias REST: Delete tags.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.tags.deleteTags({"body":{"ids":[1]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   ids: number[]
> }
> ```

**Output:** `void`

***

### getTag

`tags.getTag`

Gorgias REST: Retrieve a tag.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.tags.getTag({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `decoration` | `object \| null` | No | — |
| `description` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `usage` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deleted_datetime` | `string \| null` | No | — |

> [accordion] decoration full type
>
> ```ts theme={null}
> {
>   color?: string | null
> } | null
> ```

***

### listTags

`tags.listTags`

Gorgias REST: List tags.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.tags.listTags({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   order_by?: created_datetime | name | usage | created_datetime:asc | created_datetime:desc | name:asc | name:desc | usage:asc,
>   name:asc | usage:desc,
>   name:desc,
>   search?: string,
>   cursor?: string,
>   limit?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   decoration?: {
>     color?: string | null
>   } | null,
>   description?: string | null,
>   name?: string | null,
>   usage?: number | null,
>   uri?: string | null,
>   created_datetime?: string | null,
>   deleted_datetime?: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### mergeTags

`tags.mergeTags`

Gorgias REST: Merge tags.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.tags.mergeTags({"path":{"destination_tag_id":1},"body":{"source_tags_ids":[]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

Merges source tags into the destination tag and deletes the source tags.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   destination_tag_id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   source_tags_ids: number[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `decoration` | `object \| null` | No | — |
| `description` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `usage` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deleted_datetime` | `string \| null` | No | — |

> [accordion] decoration full type
>
> ```ts theme={null}
> {
>   color?: string | null
> } | null
> ```

***

### updateTag

`tags.updateTag`

Gorgias REST: Update a tag.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.tags.updateTag({"path":{"id":1},"body":{"name":"x","description":"x","decoration":{"color":"x"}}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name?: string,
>   description?: string,
>   decoration?: {
>     color: string
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `decoration` | `object \| null` | No | — |
| `description` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `usage` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deleted_datetime` | `string \| null` | No | — |

> [accordion] decoration full type
>
> ```ts theme={null}
> {
>   color?: string | null
> } | null
> ```

***

## Teams

### createTeam

`teams.createTeam`

Gorgias REST: Create a team.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.teams.createTeam({"body":{"name":"x"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name: string,
>   description?: string | null,
>   default_email_integration_id?: number | null,
>   decoration?: Record<string, JsonValue> | null,
>   members?: {
>     id?: number,
>     name?: string | null,
>     email?: string | null,
>     meta?: null
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `default_email_integration_id` | `number \| null` | No | — |
| `decoration` | `Record<string, JsonValue> \| null` | No | — |
| `members` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |

> [accordion] members full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   email?: string | null,
>   meta?: JsonValue | null
> }[] | null
> ```

***

### deleteTeam

`teams.deleteTeam`

Gorgias REST: Delete a team.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.teams.deleteTeam({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `void`

***

### getTeam

`teams.getTeam`

Gorgias REST: Retrieve a team.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.teams.getTeam({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `default_email_integration_id` | `number \| null` | No | — |
| `decoration` | `Record<string, JsonValue> \| null` | No | — |
| `members` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |

> [accordion] members full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   email?: string | null,
>   meta?: JsonValue | null
> }[] | null
> ```

***

### listTeams

`teams.listTeams`

Gorgias REST: List teams.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.teams.listTeams({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   limit?: number,
>   order_by?: created_datetime:asc | created_datetime:desc | name:asc | name:desc
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   uri?: string | null,
>   name?: string | null,
>   description?: string | null,
>   default_email_integration_id?: number | null,
>   decoration?: Record<string, JsonValue> | null,
>   members?: {
>     id?: number | null,
>     name?: string | null,
>     email?: string | null,
>     meta?: JsonValue | null
>   }[] | null,
>   created_datetime?: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateTeam

`teams.updateTeam`

Gorgias REST: Update a team.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.teams.updateTeam({"path":{"id":1},"body":{"name":"x","description":"x","default_email_integration_id":1,"decoration":{},"members":[]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name?: string,
>   description?: string | null,
>   default_email_integration_id?: number | null,
>   decoration?: Record<string, JsonValue> | null,
>   members?: {
>     id?: number,
>     name?: string | null,
>     email?: string | null,
>     meta?: null
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `default_email_integration_id` | `number \| null` | No | — |
| `decoration` | `Record<string, JsonValue> \| null` | No | — |
| `members` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |

> [accordion] members full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   email?: string | null,
>   meta?: JsonValue | null
> }[] | null
> ```

***

## Ticket Messages

### createTicketMessage

`ticketMessages.createTicketMessage`

Gorgias REST: Create a message.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.ticketMessages.createTicketMessage({"path":{"ticket_id":1},"body":{"channel":"aircall","from_agent":true}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |
| `headers` | `object` | No | — |
| `body` | `object` | Yes | — |

This operation can send a customer-visible message and is marked destructive. Set query.action and the documented If-Unmodified-Since header when using concurrency control.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   action?: force | retry | cancel
> }
> ```

> [accordion] headers full type
>
> ```ts theme={null}
> {
>   If-Unmodified-Since?: string
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   actions?: (string | number | number | boolean | Record<string, JsonValue> | Record<string, JsonValue>[])[],
>   attachments?: {
>     url: string,
>     name: string,
>     size?: number,
>     content_type: string,
>     public?: boolean,
>     extra?: string | number | number | boolean | Record<string, JsonValue> | Record<string, JsonValue>[]
>   }[],
>   body_html?: string,
>   body_text?: string,
>   channel: 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 | string,
>   created_datetime?: string,
>   deleted_datetime?: string,
>   external_id?: string,
>   failed_datetime?: string,
>   from_agent: boolean,
>   headers?: Record<string, string | number | number | boolean | Record<string, JsonValue> | Record<string, JsonValue>[]>,
>   integration_id?: number,
>   last_sending_error?: {
>     error: string
>   },
>   macros?: {
>     id: number
>   }[],
>   message_id?: string,
>   meta?: {
>     relevant_content_indexes?: number[]
>   },
>   opened_datetime?: string,
>   public?: boolean,
>   sent_datetime?: string,
>   source?: {
>     type?: 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,
>     from?: {
>       name?: string,
>       address?: string
>     },
>     to?: {
>       name?: string,
>       address?: string
>     }[],
>     cc?: {
>       name?: string,
>       address?: string
>     }[],
>     bcc?: {
>       name?: string,
>       address?: string
>     }[],
>     extra?: string | number | number | boolean | Record<string, JsonValue> | Record<string, JsonValue>[]
>   },
>   stripped_html?: string,
>   stripped_signature?: string,
>   stripped_text?: string,
>   subject?: string,
>   via?: aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | form | helpdesk | help-center | instagram | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | phone | rule | shopify | sms | twilio | twitter | twitter-direct-message | whatsapp | yotpo | yotpo-review | zendesk,
>   imported?: boolean,
>   mention_ids?: number[],
>   receiver?: {
>     id?: number,
>     email?: string,
>     name?: string,
>     external_id?: string,
>     note?: string,
>     timezone?: string,
>     language?: string,
>     meta?: Record<string, JsonValue>,
>     channels?: {
>       type: string,
>       address: string
>     }[]
>   },
>   sender?: {
>     id?: number,
>     email?: string,
>     name?: string,
>     external_id?: string,
>     note?: string,
>     timezone?: string,
>     language?: string,
>     meta?: Record<string, JsonValue>,
>     channels?: {
>       type: string,
>       address: string
>     }[]
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `message_id` | `string \| null` | No | — |
| `ticket_id` | `number \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `public` | `boolean \| null` | No | — |
| `channel` | `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 \| string \| string \| null` | No | — |
| `via` | `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 \| string \| null` | No | — |
| `source` | `object \| null` | No | — |
| `sender` | `object \| null` | No | — |
| `auth_customer_identity` | `object \| null` | No | — |
| `integration_id` | `number \| null` | No | — |
| `intents` | `object[] \| null` | No | — |
| `rule_id` | `number \| null` | No | — |
| `from_agent` | `boolean \| null` | No | — |
| `receiver` | `object \| null` | No | — |
| `subject` | `string \| null` | No | — |
| `body_text` | `string \| null` | No | — |
| `body_html` | `string \| null` | No | — |
| `body_url` | `string \| null` | No | — |
| `stripped_text` | `string \| null` | No | — |
| `stripped_html` | `string \| null` | No | — |
| `stripped_signature` | `string \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `macros` | `object[] \| null` | No | — |
| `actions` | `Record<string, JsonValue>[] \| null` | No | — |
| `headers` | `Record<string, JsonValue> \| null` | No | — |
| `imported` | `boolean \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `processed_datetime` | `string \| null` | No | — |
| `deleted_datetime` | `string \| null` | No | — |
| `sent_datetime` | `string \| null` | No | — |
| `failed_datetime` | `string \| null` | No | — |
| `opened_datetime` | `string \| null` | No | — |
| `last_sending_error` | `object \| null` | No | — |
| `is_retriable` | `boolean \| null` | No | — |
| `replied_by` | `object \| null` | No | — |
| `replied_to` | `object \| null` | No | — |

> [accordion] source full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   to?: {
>     name?: string | null,
>     address?: string | null
>   }[] | null,
>   cc?: {
>     name?: string | null,
>     address?: string | null
>   }[] | null,
>   bcc?: {
>     name?: string | null,
>     address?: string | null
>   }[] | null,
>   from?: {
>     name?: string | null,
>     address?: string | null
>   } | null,
>   extra?: Record<string, JsonValue> | null
> } | null
> ```

> [accordion] sender full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   email?: string | null,
>   name?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   meta?: Record<string, JsonValue> | null
> } | null
> ```

> [accordion] auth\_customer\_identity full type
>
> ```ts theme={null}
> {
>   service?: {
>     id?: string | null,
>     name?: string | null
>   } | null,
>   identifier?: string | null
> } | null
> ```

> [accordion] intents full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   rejected?: boolean | null,
>   is_user_feedback?: boolean | null
> }[] | null
> ```

> [accordion] receiver full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   email?: string | null,
>   name?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   meta?: Record<string, JsonValue> | null
> } | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   url?: string | null,
>   name?: string | null,
>   size?: number | null,
>   content_type?: string | null,
>   public?: boolean | null,
>   extra?: Record<string, JsonValue> | null
> }[] | null
> ```

> [accordion] macros full type
>
> ```ts theme={null}
> {
>   id?: number | null
> }[] | null
> ```

> [accordion] last\_sending\_error full type
>
> ```ts theme={null}
> {
>   error?: string | null
> } | null
> ```

> [accordion] replied\_by full type
>
> ```ts theme={null}
> {
>   integration_id?: number | null,
>   message_id?: string | null,
>   created_datetime?: string | null,
>   body_text?: string | null,
>   source?: {
>     type?: string | null,
>     to?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     cc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     bcc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     from?: {
>       name?: string | null,
>       address?: string | null
>     } | null,
>     extra?: Record<string, JsonValue> | null
>   } | null,
>   customer?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   user?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null
> } | null
> ```

> [accordion] replied\_to full type
>
> ```ts theme={null}
> {
>   integration_id?: number | null,
>   message_id?: string | null,
>   created_datetime?: string | null,
>   body_text?: string | null,
>   source?: {
>     type?: string | null,
>     to?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     cc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     bcc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     from?: {
>       name?: string | null,
>       address?: string | null
>     } | null,
>     extra?: Record<string, JsonValue> | null
>   } | null,
>   customer?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   user?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null
> } | null
> ```

***

### deleteTicketMessage

`ticketMessages.deleteTicketMessage`

Gorgias REST: Delete a message.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.ticketMessages.deleteTicketMessage({"path":{"ticket_id":1,"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number,
>   id: number
> }
> ```

**Output:** `void`

***

### getTicketMessage

`ticketMessages.getTicketMessage`

Gorgias REST: Retrieve a message.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.ticketMessages.getTicketMessage({"path":{"ticket_id":1,"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number,
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `message_id` | `string \| null` | No | — |
| `ticket_id` | `number \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `public` | `boolean \| null` | No | — |
| `channel` | `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 \| string \| string \| null` | No | — |
| `via` | `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 \| string \| null` | No | — |
| `source` | `object \| null` | No | — |
| `sender` | `object \| null` | No | — |
| `auth_customer_identity` | `object \| null` | No | — |
| `integration_id` | `number \| null` | No | — |
| `intents` | `object[] \| null` | No | — |
| `rule_id` | `number \| null` | No | — |
| `from_agent` | `boolean \| null` | No | — |
| `receiver` | `object \| null` | No | — |
| `subject` | `string \| null` | No | — |
| `body_text` | `string \| null` | No | — |
| `body_html` | `string \| null` | No | — |
| `body_url` | `string \| null` | No | — |
| `stripped_text` | `string \| null` | No | — |
| `stripped_html` | `string \| null` | No | — |
| `stripped_signature` | `string \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `macros` | `object[] \| null` | No | — |
| `actions` | `Record<string, JsonValue>[] \| null` | No | — |
| `headers` | `Record<string, JsonValue> \| null` | No | — |
| `imported` | `boolean \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `processed_datetime` | `string \| null` | No | — |
| `deleted_datetime` | `string \| null` | No | — |
| `sent_datetime` | `string \| null` | No | — |
| `failed_datetime` | `string \| null` | No | — |
| `opened_datetime` | `string \| null` | No | — |
| `last_sending_error` | `object \| null` | No | — |
| `is_retriable` | `boolean \| null` | No | — |
| `replied_by` | `object \| null` | No | — |
| `replied_to` | `object \| null` | No | — |

> [accordion] source full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   to?: {
>     name?: string | null,
>     address?: string | null
>   }[] | null,
>   cc?: {
>     name?: string | null,
>     address?: string | null
>   }[] | null,
>   bcc?: {
>     name?: string | null,
>     address?: string | null
>   }[] | null,
>   from?: {
>     name?: string | null,
>     address?: string | null
>   } | null,
>   extra?: Record<string, JsonValue> | null
> } | null
> ```

> [accordion] sender full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   email?: string | null,
>   name?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   meta?: Record<string, JsonValue> | null
> } | null
> ```

> [accordion] auth\_customer\_identity full type
>
> ```ts theme={null}
> {
>   service?: {
>     id?: string | null,
>     name?: string | null
>   } | null,
>   identifier?: string | null
> } | null
> ```

> [accordion] intents full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   rejected?: boolean | null,
>   is_user_feedback?: boolean | null
> }[] | null
> ```

> [accordion] receiver full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   email?: string | null,
>   name?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   meta?: Record<string, JsonValue> | null
> } | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   url?: string | null,
>   name?: string | null,
>   size?: number | null,
>   content_type?: string | null,
>   public?: boolean | null,
>   extra?: Record<string, JsonValue> | null
> }[] | null
> ```

> [accordion] macros full type
>
> ```ts theme={null}
> {
>   id?: number | null
> }[] | null
> ```

> [accordion] last\_sending\_error full type
>
> ```ts theme={null}
> {
>   error?: string | null
> } | null
> ```

> [accordion] replied\_by full type
>
> ```ts theme={null}
> {
>   integration_id?: number | null,
>   message_id?: string | null,
>   created_datetime?: string | null,
>   body_text?: string | null,
>   source?: {
>     type?: string | null,
>     to?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     cc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     bcc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     from?: {
>       name?: string | null,
>       address?: string | null
>     } | null,
>     extra?: Record<string, JsonValue> | null
>   } | null,
>   customer?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   user?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null
> } | null
> ```

> [accordion] replied\_to full type
>
> ```ts theme={null}
> {
>   integration_id?: number | null,
>   message_id?: string | null,
>   created_datetime?: string | null,
>   body_text?: string | null,
>   source?: {
>     type?: string | null,
>     to?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     cc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     bcc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     from?: {
>       name?: string | null,
>       address?: string | null
>     } | null,
>     extra?: Record<string, JsonValue> | null
>   } | null,
>   customer?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   user?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null
> } | null
> ```

***

### listMessages

`ticketMessages.listMessages`

Gorgias REST: List messages.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.ticketMessages.listMessages({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string | null,
>   limit?: number,
>   order_by?: created_datetime:asc | created_datetime:desc,
>   ticket_id?: number | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   uri?: string | null,
>   message_id?: string | null,
>   ticket_id?: number | null,
>   external_id?: string | null,
>   public?: boolean | null,
>   channel?: 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 | string | string | null,
>   via?: 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 | string | null,
>   source?: {
>     type?: string | null,
>     to?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     cc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     bcc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     from?: {
>       name?: string | null,
>       address?: string | null
>     } | null,
>     extra?: Record<string, JsonValue> | null
>   } | null,
>   sender?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   auth_customer_identity?: {
>     service?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     identifier?: string | null
>   } | null,
>   integration_id?: number | null,
>   intents?: {
>     name?: string | null,
>     rejected?: boolean | null,
>     is_user_feedback?: boolean | null
>   }[] | null,
>   rule_id?: number | null,
>   from_agent?: boolean | null,
>   receiver?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   subject?: string | null,
>   body_text?: string | null,
>   body_html?: string | null,
>   body_url?: string | null,
>   stripped_text?: string | null,
>   stripped_html?: string | null,
>   stripped_signature?: string | null,
>   attachments?: {
>     url?: string | null,
>     name?: string | null,
>     size?: number | null,
>     content_type?: string | null,
>     public?: boolean | null,
>     extra?: Record<string, JsonValue> | null
>   }[] | null,
>   macros?: {
>     id?: number | null
>   }[] | null,
>   actions?: Record<string, JsonValue>[] | null,
>   headers?: Record<string, JsonValue> | null,
>   imported?: boolean | null,
>   meta?: Record<string, JsonValue> | null,
>   created_datetime?: string | null,
>   processed_datetime?: string | null,
>   deleted_datetime?: string | null,
>   sent_datetime?: string | null,
>   failed_datetime?: string | null,
>   opened_datetime?: string | null,
>   last_sending_error?: {
>     error?: string | null
>   } | null,
>   is_retriable?: boolean | null,
>   replied_by?: {
>     integration_id?: number | null,
>     message_id?: string | null,
>     created_datetime?: string | null,
>     body_text?: string | null,
>     source?: {
>       type?: string | null,
>       to?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       cc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       bcc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       from?: {
>         name?: string | null,
>         address?: string | null
>       } | null,
>       extra?: Record<string, JsonValue> | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null,
>     user?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null
>   } | null,
>   replied_to?: {
>     integration_id?: number | null,
>     message_id?: string | null,
>     created_datetime?: string | null,
>     body_text?: string | null,
>     source?: {
>       type?: string | null,
>       to?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       cc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       bcc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       from?: {
>         name?: string | null,
>         address?: string | null
>       } | null,
>       extra?: Record<string, JsonValue> | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null,
>     user?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null
>   } | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### listTicketMessages

`ticketMessages.listTicketMessages`

Gorgias REST: List messages of a ticket.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.ticketMessages.listTicketMessages({"path":{"ticket_id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

Gorgias marks this route deprecated; use ticketMessages.listMessages with query.ticket\_id for new integrations.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   uri?: string | null,
>   message_id?: string | null,
>   ticket_id?: number | null,
>   external_id?: string | null,
>   public?: boolean | null,
>   channel?: 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 | string | string | null,
>   via?: 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 | string | null,
>   source?: {
>     type?: string | null,
>     to?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     cc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     bcc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     from?: {
>       name?: string | null,
>       address?: string | null
>     } | null,
>     extra?: Record<string, JsonValue> | null
>   } | null,
>   sender?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   auth_customer_identity?: {
>     service?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     identifier?: string | null
>   } | null,
>   integration_id?: number | null,
>   intents?: {
>     name?: string | null,
>     rejected?: boolean | null,
>     is_user_feedback?: boolean | null
>   }[] | null,
>   rule_id?: number | null,
>   from_agent?: boolean | null,
>   receiver?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   subject?: string | null,
>   body_text?: string | null,
>   body_html?: string | null,
>   body_url?: string | null,
>   stripped_text?: string | null,
>   stripped_html?: string | null,
>   stripped_signature?: string | null,
>   attachments?: {
>     url?: string | null,
>     name?: string | null,
>     size?: number | null,
>     content_type?: string | null,
>     public?: boolean | null,
>     extra?: Record<string, JsonValue> | null
>   }[] | null,
>   macros?: {
>     id?: number | null
>   }[] | null,
>   actions?: Record<string, JsonValue>[] | null,
>   headers?: Record<string, JsonValue> | null,
>   imported?: boolean | null,
>   meta?: Record<string, JsonValue> | null,
>   created_datetime?: string | null,
>   processed_datetime?: string | null,
>   deleted_datetime?: string | null,
>   sent_datetime?: string | null,
>   failed_datetime?: string | null,
>   opened_datetime?: string | null,
>   last_sending_error?: {
>     error?: string | null
>   } | null,
>   is_retriable?: boolean | null,
>   replied_by?: {
>     integration_id?: number | null,
>     message_id?: string | null,
>     created_datetime?: string | null,
>     body_text?: string | null,
>     source?: {
>       type?: string | null,
>       to?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       cc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       bcc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       from?: {
>         name?: string | null,
>         address?: string | null
>       } | null,
>       extra?: Record<string, JsonValue> | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null,
>     user?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null
>   } | null,
>   replied_to?: {
>     integration_id?: number | null,
>     message_id?: string | null,
>     created_datetime?: string | null,
>     body_text?: string | null,
>     source?: {
>       type?: string | null,
>       to?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       cc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       bcc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       from?: {
>         name?: string | null,
>         address?: string | null
>       } | null,
>       extra?: Record<string, JsonValue> | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null,
>     user?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null
>   } | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateTicketMessage

`ticketMessages.updateTicketMessage`

Gorgias REST: Update a message.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.ticketMessages.updateTicketMessage({"path":{"ticket_id":1,"id":1},"body":{"channel":"aircall","from_agent":true}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number,
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   action?: force | retry | cancel
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   attachments?: {
>     url: string,
>     name: string,
>     size: number | null,
>     content_type: string,
>     public?: boolean,
>     extra?: Record<string, JsonValue>
>   }[],
>   body_html?: string | null,
>   body_text?: string | null,
>   channel: 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?: string | null,
>   failed_datetime?: string | null,
>   from_agent: boolean,
>   message_id?: string | null,
>   receiver?: {
>     id?: number,
>     email?: string
>   },
>   sender?: {
>     id?: number,
>     email?: string
>   },
>   sent_datetime?: string | null,
>   source?: {
>     type?: string,
>     to?: {
>       name?: string | null,
>       address?: string
>     }[],
>     cc?: {
>       name?: string | null,
>       address?: string
>     }[],
>     bcc?: {
>       name?: string | null,
>       address?: string
>     }[],
>     from?: {
>       name?: string | null,
>       address?: string
>     }
>   },
>   subject?: string | null,
>   via?: aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | form | help-center | helpdesk | instagram | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | phone | rule | shopify | sms | twilio | twitter | twitter-direct-message | whatsapp | yotpo | yotpo-review | zendesk
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `message_id` | `string \| null` | No | — |
| `ticket_id` | `number \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `public` | `boolean \| null` | No | — |
| `channel` | `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 \| string \| string \| null` | No | — |
| `via` | `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 \| string \| null` | No | — |
| `source` | `object \| null` | No | — |
| `sender` | `object \| null` | No | — |
| `auth_customer_identity` | `object \| null` | No | — |
| `integration_id` | `number \| null` | No | — |
| `intents` | `object[] \| null` | No | — |
| `rule_id` | `number \| null` | No | — |
| `from_agent` | `boolean \| null` | No | — |
| `receiver` | `object \| null` | No | — |
| `subject` | `string \| null` | No | — |
| `body_text` | `string \| null` | No | — |
| `body_html` | `string \| null` | No | — |
| `body_url` | `string \| null` | No | — |
| `stripped_text` | `string \| null` | No | — |
| `stripped_html` | `string \| null` | No | — |
| `stripped_signature` | `string \| null` | No | — |
| `attachments` | `object[] \| null` | No | — |
| `macros` | `object[] \| null` | No | — |
| `actions` | `Record<string, JsonValue>[] \| null` | No | — |
| `headers` | `Record<string, JsonValue> \| null` | No | — |
| `imported` | `boolean \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `processed_datetime` | `string \| null` | No | — |
| `deleted_datetime` | `string \| null` | No | — |
| `sent_datetime` | `string \| null` | No | — |
| `failed_datetime` | `string \| null` | No | — |
| `opened_datetime` | `string \| null` | No | — |
| `last_sending_error` | `object \| null` | No | — |
| `is_retriable` | `boolean \| null` | No | — |
| `replied_by` | `object \| null` | No | — |
| `replied_to` | `object \| null` | No | — |

> [accordion] source full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   to?: {
>     name?: string | null,
>     address?: string | null
>   }[] | null,
>   cc?: {
>     name?: string | null,
>     address?: string | null
>   }[] | null,
>   bcc?: {
>     name?: string | null,
>     address?: string | null
>   }[] | null,
>   from?: {
>     name?: string | null,
>     address?: string | null
>   } | null,
>   extra?: Record<string, JsonValue> | null
> } | null
> ```

> [accordion] sender full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   email?: string | null,
>   name?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   meta?: Record<string, JsonValue> | null
> } | null
> ```

> [accordion] auth\_customer\_identity full type
>
> ```ts theme={null}
> {
>   service?: {
>     id?: string | null,
>     name?: string | null
>   } | null,
>   identifier?: string | null
> } | null
> ```

> [accordion] intents full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   rejected?: boolean | null,
>   is_user_feedback?: boolean | null
> }[] | null
> ```

> [accordion] receiver full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   email?: string | null,
>   name?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   meta?: Record<string, JsonValue> | null
> } | null
> ```

> [accordion] attachments full type
>
> ```ts theme={null}
> {
>   url?: string | null,
>   name?: string | null,
>   size?: number | null,
>   content_type?: string | null,
>   public?: boolean | null,
>   extra?: Record<string, JsonValue> | null
> }[] | null
> ```

> [accordion] macros full type
>
> ```ts theme={null}
> {
>   id?: number | null
> }[] | null
> ```

> [accordion] last\_sending\_error full type
>
> ```ts theme={null}
> {
>   error?: string | null
> } | null
> ```

> [accordion] replied\_by full type
>
> ```ts theme={null}
> {
>   integration_id?: number | null,
>   message_id?: string | null,
>   created_datetime?: string | null,
>   body_text?: string | null,
>   source?: {
>     type?: string | null,
>     to?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     cc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     bcc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     from?: {
>       name?: string | null,
>       address?: string | null
>     } | null,
>     extra?: Record<string, JsonValue> | null
>   } | null,
>   customer?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   user?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null
> } | null
> ```

> [accordion] replied\_to full type
>
> ```ts theme={null}
> {
>   integration_id?: number | null,
>   message_id?: string | null,
>   created_datetime?: string | null,
>   body_text?: string | null,
>   source?: {
>     type?: string | null,
>     to?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     cc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     bcc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     from?: {
>       name?: string | null,
>       address?: string | null
>     } | null,
>     extra?: Record<string, JsonValue> | null
>   } | null,
>   customer?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   user?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null
> } | null
> ```

***

## Tickets

### createTicket

`tickets.createTicket`

Gorgias REST: Create a ticket. Messages without sent\_datetime are sent to the customer by Gorgias.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.tickets.createTicket({"body":{"messages":[{"channel":"aircall","from_agent":true}]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   assignee_team?: {
>     id?: number
>   },
>   assignee_user?: {
>     id?: number
>   },
>   channel?: 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 | string,
>   closed_datetime?: string,
>   created_datetime?: string,
>   custom_fields?: {
>     id: number,
>     value: string | number | boolean
>   }[],
>   customer?: {
>     id?: number,
>     email?: string,
>     name?: string
>   },
>   external_id?: string,
>   from_agent?: boolean,
>   language?: string,
>   last_message_datetime?: string,
>   last_received_message_datetime?: string,
>   messages: {
>     actions?: (string | number | number | boolean | Record<string, JsonValue> | Record<string, JsonValue>[])[],
>     attachments?: {
>       url: string,
>       name: string,
>       size?: number,
>       content_type: string,
>       public?: boolean,
>       extra?: string | number | number | boolean | Record<string, JsonValue> | Record<string, JsonValue>[]
>     }[],
>     body_html?: string,
>     body_text?: string,
>     channel: 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 | string,
>     created_datetime?: string,
>     deleted_datetime?: string,
>     external_id?: string,
>     failed_datetime?: string,
>     from_agent: boolean,
>     headers?: Record<string, string | number | number | boolean | Record<string, JsonValue> | Record<string, JsonValue>[]>,
>     integration_id?: number,
>     last_sending_error?: {
>       error: string
>     },
>     macros?: {
>       id: number
>     }[],
>     message_id?: string,
>     meta?: {
>       relevant_content_indexes?: number[]
>     },
>     opened_datetime?: string,
>     public?: boolean,
>     sent_datetime?: string,
>     source?: {
>       type?: 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,
>       from?: {
>         name?: string,
>         address?: string
>       },
>       to?: {
>         name?: string,
>         address?: string
>       }[],
>       cc?: {
>         name?: string,
>         address?: string
>       }[],
>       bcc?: {
>         name?: string,
>         address?: string
>       }[],
>       extra?: string | number | number | boolean | Record<string, JsonValue> | Record<string, JsonValue>[]
>     },
>     stripped_html?: string,
>     stripped_signature?: string,
>     stripped_text?: string,
>     subject?: string,
>     via?: aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | form | helpdesk | help-center | instagram | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | phone | rule | shopify | sms | twilio | twitter | twitter-direct-message | whatsapp | yotpo | yotpo-review | zendesk,
>     mention_ids?: number[],
>     receiver?: {
>       id?: number,
>       email?: string,
>       name?: string,
>       external_id?: string,
>       note?: string,
>       timezone?: string,
>       language?: string,
>       meta?: Record<string, JsonValue>,
>       channels?: {
>         type: string,
>         address: string
>       }[]
>     },
>     sender?: {
>       id?: number,
>       email?: string,
>       name?: string,
>       external_id?: string,
>       note?: string,
>       timezone?: string,
>       language?: string,
>       meta?: Record<string, JsonValue>,
>       channels?: {
>         type: string,
>         address: string
>       }[]
>     }
>   }[],
>   meta?: Record<string, string | number | number | boolean | Record<string, JsonValue> | Record<string, JsonValue>[]>,
>   opened_datetime?: string,
>   priority?: critical | high | normal | low,
>   snooze_datetime?: string,
>   spam?: boolean,
>   split_from?: number,
>   status?: open | closed,
>   subject?: string,
>   tags?: {
>     name: string,
>     decoration?: {
>       color?: string
>     }
>   }[],
>   trashed_datetime?: string,
>   updated_datetime?: string,
>   via?: aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | form | helpdesk | help-center | instagram | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | phone | rule | shopify | sms | twilio | twitter | twitter-direct-message | whatsapp | yotpo | yotpo-review | zendesk,
>   imported?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `events` | `object[] \| null` | No | — |
| `status` | `open \| closed \| string \| null` | No | — |
| `channel` | `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 \| string \| string \| null` | No | — |
| `via` | `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 \| string \| null` | No | — |
| `from_agent` | `boolean \| null` | No | — |
| `spam` | `boolean \| null` | No | — |
| `imported` | `boolean \| null` | No | — |
| `customer` | `object \| null` | No | — |
| `assignee_user` | `object \| null` | No | — |
| `language` | `string \| null` | No | — |
| `subject` | `string \| null` | No | — |
| `summary` | `object \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| null` | No | — |
| `tags` | `object[] \| null` | No | — |
| `custom_fields` | `object \| null` | No | — |
| `messages` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `processed_datetime` | `string \| null` | No | — |
| `opened_datetime` | `string \| null` | No | — |
| `last_received_message_datetime` | `string \| null` | No | — |
| `last_message_datetime` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `closed_datetime` | `string \| null` | No | — |
| `trashed_datetime` | `string \| null` | No | — |
| `snooze_datetime` | `string \| null` | No | — |
| `satisfaction_survey` | `object \| null` | No | — |
| `reply_options` | `object \| null` | No | — |
| `is_unread` | `boolean \| null` | No | — |

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   type?: string | null,
>   user?: {
>     id?: number | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     name?: string | null,
>     email?: string | null
>   } | null,
>   data?: Record<string, JsonValue> | null,
>   created_datetime?: string | null
> }[] | null
> ```

> [accordion] customer full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   email?: string | null,
>   name?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   meta?: Record<string, JsonValue> | null,
>   channels?: {
>     id?: number | null,
>     type?: string | null,
>     address?: string | null,
>     preferred?: boolean | null,
>     created_datetime?: string | null,
>     updated_datetime?: string | null,
>     deleted_datetime?: string | null,
>     user?: {
>       id?: number | null,
>       name?: string | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       name?: string | null
>     } | null
>   }[] | null,
>   data?: Record<string, JsonValue> | null,
>   customer?: Record<string, JsonValue> | null,
>   integrations?: Record<string, JsonValue> | null,
>   external_id?: string | null,
>   note?: string | null,
>   external_data?: Record<string, Record<string, JsonValue>> | null,
>   ecommerce_data?: Record<string, {
>     store?: {
>       id?: number | null,
>       currencies?: (AFN | EUR | ALL | DZD | USD | AOA | XCD | ARS | AMD | AWG | AUD | AZN | BSD | BHD | BDT | BBD | BYN | BZD | XOF | BMD | INR | BTN | BOB | BOV | BAM | BWP | NOK | BRL | BND | BGN | BIF | CVE | KHR | XAF | CAD | KYD | CLP | CLF | CNY | COP | COU | KMF | CDF | NZD | CRC | HRK | CUP | CUC | ANG | CZK | DKK | DJF | DOP | EGP | SVC | ERN | SZL | ETB | FKP | FJD | XPF | GMD | GEL | GHS | GIP | GTQ | GBP | GNF | GYD | HTG | HNL | HKD | HUF | ISK | IDR | XDR | IRR | IQD | ILS | JMD | JPY | JOD | KZT | KES | KPW | KRW | KWD | KGS | LAK | LBP | LSL | ZAR | LRD | LYD | CHF | MOP | MKD | MGA | MWK | MYR | MVR | MRU | MUR | XUA | MXN | MXV | MDL | MNT | MAD | MZN | MMK | NAD | NPR | NIO | NGN | OMR | PKR | PAB | PGK | PYG | PEN | PHP | PLN | QAR | RON | RUB | RWF | SHP | WST | STN | SAR | RSD | SCR | SLL | SLE | SGD | XSU | SBD | SOS | SSP | LKR | SDG | SRD | SEK | CHE | CHW | SYP | TWD | TJS | TZS | THB | TOP | TTD | TND | TRY | TMT | UGX | UAH | AED | USN | UYU | UYI | UYW | UZS | VUV | VES | VED | VND | YER | ZMW | ZWL | XBA | XBB | XBC | XBD | XTS | XXX | XAU | XPD | XPT | XAG | string)[] | null,
>       default_currency?: AFN | EUR | ALL | DZD | USD | AOA | XCD | ARS | AMD | AWG | AUD | AZN | BSD | BHD | BDT | BBD | BYN | BZD | XOF | BMD | INR | BTN | BOB | BOV | BAM | BWP | NOK | BRL | BND | BGN | BIF | CVE | KHR | XAF | CAD | KYD | CLP | CLF | CNY | COP | COU | KMF | CDF | NZD | CRC | HRK | CUP | CUC | ANG | CZK | DKK | DJF | DOP | EGP | SVC | ERN | SZL | ETB | FKP | FJD | XPF | GMD | GEL | GHS | GIP | GTQ | GBP | GNF | GYD | HTG | HNL | HKD | HUF | ISK | IDR | XDR | IRR | IQD | ILS | JMD | JPY | JOD | KZT | KES | KPW | KRW | KWD | KGS | LAK | LBP | LSL | ZAR | LRD | LYD | CHF | MOP | MKD | MGA | MWK | MYR | MVR | MRU | MUR | XUA | MXN | MXV | MDL | MNT | MAD | MZN | MMK | NAD | NPR | NIO | NGN | OMR | PKR | PAB | PGK | PYG | PEN | PHP | PLN | QAR | RON | RUB | RWF | SHP | WST | STN | SAR | RSD | SCR | SLL | SLE | SGD | XSU | SBD | SOS | SSP | LKR | SDG | SRD | SEK | CHE | CHW | SYP | TWD | TJS | TZS | THB | TOP | TTD | TND | TRY | TMT | UGX | UAH | AED | USN | UYU | UYI | UYW | UZS | VUV | VES | VED | VND | YER | ZMW | ZWL | XBA | XBB | XBC | XBD | XTS | XXX | XAU | XPD | XPT | XAG | string | null,
>       display_name?: string | null,
>       name?: string | null,
>       type?: bigcommerce | magento | shopify | woocommerce | string | null,
>       url?: string | null,
>       helpdesk_integration_id?: number | null,
>       uuid?: string | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deleted_datetime?: string | null
>     } | null,
>     shopper?: {
>       id?: number | null,
>       external_id?: string | null,
>       helpdesk_customer_id?: number | null,
>       email_address?: string | null,
>       phone_number?: string | null,
>       first_name?: string | null,
>       middle_name?: string | null,
>       last_name?: string | null,
>       birthdate?: string | null,
>       status?: tax_exempt | veteran | string | null,
>       accepts_marketing_email?: boolean | null,
>       accepts_marketing_sms?: boolean | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deleted_datetime?: string | null
>     } | null,
>     orders?: {
>       id?: number | null,
>       external_id?: string | null,
>       shopper_external_id?: string | null,
>       number?: number | null,
>       name?: string | null,
>       currency?: AFN | EUR | ALL | DZD | USD | AOA | XCD | ARS | AMD | AWG | AUD | AZN | BSD | BHD | BDT | BBD | BYN | BZD | XOF | BMD | INR | BTN | BOB | BOV | BAM | BWP | NOK | BRL | BND | BGN | BIF | CVE | KHR | XAF | CAD | KYD | CLP | CLF | CNY | COP | COU | KMF | CDF | NZD | CRC | HRK | CUP | CUC | ANG | CZK | DKK | DJF | DOP | EGP | SVC | ERN | SZL | ETB | FKP | FJD | XPF | GMD | GEL | GHS | GIP | GTQ | GBP | GNF | GYD | HTG | HNL | HKD | HUF | ISK | IDR | XDR | IRR | IQD | ILS | JMD | JPY | JOD | KZT | KES | KPW | KRW | KWD | KGS | LAK | LBP | LSL | ZAR | LRD | LYD | CHF | MOP | MKD | MGA | MWK | MYR | MVR | MRU | MUR | XUA | MXN | MXV | MDL | MNT | MAD | MZN | MMK | NAD | NPR | NIO | NGN | OMR | PKR | PAB | PGK | PYG | PEN | PHP | PLN | QAR | RON | RUB | RWF | SHP | WST | STN | SAR | RSD | SCR | SLL | SLE | SGD | XSU | SBD | SOS | SSP | LKR | SDG | SRD | SEK | CHE | CHW | SYP | TWD | TJS | TZS | THB | TOP | TTD | TND | TRY | TMT | UGX | UAH | AED | USN | UYU | UYI | UYW | UZS | VUV | VES | VED | VND | YER | ZMW | ZWL | XBA | XBB | XBC | XBD | XTS | XXX | XAU | XPD | XPT | XAG | string | null,
>       discount_codes?: string[] | null,
>       discount_amount?: number | string | null,
>       subtotal_amount?: number | string | null,
>       shipping_amount?: number | string | null,
>       tax_amount?: number | string | null,
>       total_amount?: number | string | null,
>       external_status?: string | null,
>       external_fulfillment_status?: string | null,
>       external_payment_status?: string | null,
>       status?: partially_fulfilled | completed | canceled | on_hold | awaiting_fulfillment | awaiting_payment | scheduled | order_pending | string | null,
>       payment_status?: refunded | partially_refunded | unpaid | voided | failed | manual_verification_required | customer_authentication_required | paid | declined | authorized | string | null,
>       billing_address?: {
>         id?: number | null,
>         external_id?: string | null,
>         shopper_external_id?: string | null,
>         preferred?: boolean | null,
>         line_1?: string | null,
>         line_2?: string | null,
>         city?: string | null,
>         state?: string | null,
>         country?: string | null,
>         zip_code?: string | null,
>         first_name?: string | null,
>         last_name?: string | null,
>         phone_number?: string | null,
>         created_datetime?: string | null,
>         updated_datetime?: string | null,
>         deleted_datetime?: string | null
>       } | null,
>       shipping_address?: {
>         id?: number | null,
>         external_id?: string | null,
>         shopper_external_id?: string | null,
>         preferred?: boolean | null,
>         line_1?: string | null,
>         line_2?: string | null,
>         city?: string | null,
>         state?: string | null,
>         country?: string | null,
>         zip_code?: string | null,
>         first_name?: string | null,
>         last_name?: string | null,
>         phone_number?: string | null,
>         created_datetime?: string | null,
>         updated_datetime?: string | null,
>         deleted_datetime?: string | null
>       } | null,
>       line_items?: {
>         id?: number | null,
>         title?: string | null,
>         taxable?: boolean | null,
>         requires_shipping?: boolean | null,
>         unit_price?: number | string | null,
>         discount_amount?: number | string | null,
>         discount_type?: percentage | fixed_amount | string | null,
>         discount_reason?: string | null,
>         quantity?: number | null,
>         total_amount?: number | string | null,
>         product_options?: Record<string, JsonValue> | null,
>         fulfilled_quantity?: number | null,
>         created_datetime?: string | null,
>         updated_datetime?: string | null,
>         deleted_datetime?: string | null
>       }[] | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deleted_datetime?: string | null
>     }[] | null,
>     addresses?: {
>       id?: number | null,
>       external_id?: string | null,
>       shopper_external_id?: string | null,
>       preferred?: boolean | null,
>       line_1?: string | null,
>       line_2?: string | null,
>       city?: string | null,
>       state?: string | null,
>       country?: string | null,
>       zip_code?: string | null,
>       first_name?: string | null,
>       last_name?: string | null,
>       phone_number?: string | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deleted_datetime?: string | null
>     }[] | null
>   }> | null
> } | null
> ```

> [accordion] assignee\_user full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   email?: string | null,
>   name?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   meta?: Record<string, JsonValue> | null,
>   bio?: string | null
> } | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   content?: string | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   triggered_by?: number | null
> } | null
> ```

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   decoration?: {
>     color?: string | null
>   } | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> Record<string, {
>   field?: {
>     id?: number | null,
>     external_id?: string | null,
>     object_type?: Account | AccountSetting | Customer | CustomField | CustomFieldCondition | CustomUserAvailabilityStatus | CustomerExternalData | Integration | Macro | Order | Role | Rule | SatisfactionSurvey | Shopper | ShopperAddress | Subscription | Tag | Team | TicketMessage | Ticket | User | UserSetting | View | Widget | string | null,
>     label?: string | null,
>     description?: string | null,
>     priority?: number | null,
>     required?: boolean | null,
>     requirement_type?: visible | required | conditional | string | null,
>     managed_type?: contact_reason | product | resolution | ai_intent | ai_outcome | ai_sales | ai_discount | ai_journey | managed_sentiment | call_status | string | null,
>     definition?: {
>       data_type: number,
>       input_settings?: {
>         input_type: input_number,
>         placeholder?: string | null,
>         min?: number | string | null,
>         max?: number | string | null
>       } | null
>     } | {
>       data_type: text,
>       input_settings?: {
>         input_type: input,
>         placeholder?: string | null
>       } | {
>         input_type: dropdown,
>         choices?: string[] | null,
>         default?: string | null
>       } | null
>     } | {
>       data_type: boolean,
>       input_settings?: {
>         input_type: dropdown,
>         choices?: boolean[] | null,
>         default?: boolean | null
>       } | null
>     } | null,
>     created_datetime?: string | null,
>     updated_datetime?: string | null,
>     deactivated_datetime?: string | null
>   } | null,
>   id?: number | null,
>   prediction?: Record<string, JsonValue> | null,
>   value?: JsonValue | null
> }> | null
> ```

> [accordion] messages full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   uri?: string | null,
>   message_id?: string | null,
>   ticket_id?: number | null,
>   external_id?: string | null,
>   public?: boolean | null,
>   channel?: 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 | string | string | null,
>   via?: 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 | string | null,
>   source?: {
>     type?: string | null,
>     to?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     cc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     bcc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     from?: {
>       name?: string | null,
>       address?: string | null
>     } | null,
>     extra?: Record<string, JsonValue> | null
>   } | null,
>   sender?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   auth_customer_identity?: {
>     service?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     identifier?: string | null
>   } | null,
>   integration_id?: number | null,
>   intents?: {
>     name?: string | null,
>     rejected?: boolean | null,
>     is_user_feedback?: boolean | null
>   }[] | null,
>   rule_id?: number | null,
>   from_agent?: boolean | null,
>   receiver?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   subject?: string | null,
>   body_text?: string | null,
>   body_html?: string | null,
>   body_url?: string | null,
>   stripped_text?: string | null,
>   stripped_html?: string | null,
>   stripped_signature?: string | null,
>   attachments?: {
>     url?: string | null,
>     name?: string | null,
>     size?: number | null,
>     content_type?: string | null,
>     public?: boolean | null,
>     extra?: Record<string, JsonValue> | null
>   }[] | null,
>   macros?: {
>     id?: number | null
>   }[] | null,
>   actions?: Record<string, JsonValue>[] | null,
>   headers?: Record<string, JsonValue> | null,
>   imported?: boolean | null,
>   meta?: Record<string, JsonValue> | null,
>   created_datetime?: string | null,
>   processed_datetime?: string | null,
>   deleted_datetime?: string | null,
>   sent_datetime?: string | null,
>   failed_datetime?: string | null,
>   opened_datetime?: string | null,
>   last_sending_error?: {
>     error?: string | null
>   } | null,
>   is_retriable?: boolean | null,
>   replied_by?: {
>     integration_id?: number | null,
>     message_id?: string | null,
>     created_datetime?: string | null,
>     body_text?: string | null,
>     source?: {
>       type?: string | null,
>       to?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       cc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       bcc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       from?: {
>         name?: string | null,
>         address?: string | null
>       } | null,
>       extra?: Record<string, JsonValue> | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null,
>     user?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null
>   } | null,
>   replied_to?: {
>     integration_id?: number | null,
>     message_id?: string | null,
>     created_datetime?: string | null,
>     body_text?: string | null,
>     source?: {
>       type?: string | null,
>       to?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       cc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       bcc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       from?: {
>         name?: string | null,
>         address?: string | null
>       } | null,
>       extra?: Record<string, JsonValue> | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null,
>     user?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null
>   } | null
> }[] | null
> ```

> [accordion] satisfaction\_survey full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   customer_id?: number | null,
>   ticket_id?: number | null,
>   sent_datetime?: string | null,
>   scored_datetime?: string | null,
>   should_send_datetime?: string | null,
>   created_datetime?: string | null,
>   score?: number | null,
>   body_text?: string | null,
>   meta?: Record<string, JsonValue> | null
> } | null
> ```

> [accordion] reply\_options full type
>
> ```ts theme={null}
> Record<string, {
>   answerable?: boolean | null,
>   reason?: string | null,
>   integrations?: {
>     id?: number | null,
>     name?: string | null,
>     address?: string | null
>   }[] | null
> }> | null
> ```

***

### createTicketTags

`tickets.createTicketTags`

Gorgias REST: Add ticket tags.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.tickets.createTicketTags({"path":{"ticket_id":1},"body":{"names":[],"ids":[]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   names?: string[],
>   ids?: number[]
> }
> ```

**Output:** `void`

***

### deleteTicket

`tickets.deleteTicket`

Gorgias REST: Delete a ticket.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.tickets.deleteTicket({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `void`

***

### deleteTicketCustomField

`tickets.deleteTicketCustomField`

Gorgias REST: Delete ticket field value.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.tickets.deleteTicketCustomField({"path":{"ticket_id":1,"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number,
>   id: number
> }
> ```

**Output:** `void`

***

### deleteTicketTags

`tickets.deleteTicketTags`

Gorgias REST: Remove ticket tags.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.tickets.deleteTicketTags({"path":{"ticket_id":1},"body":{"names":[],"ids":[]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   names?: string[],
>   ids?: number[]
> }
> ```

**Output:** `void`

***

### getTicket

`tickets.getTicket`

Gorgias REST: Retrieve a ticket.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.tickets.getTicket({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   relationships?: custom_fields[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `events` | `object[] \| null` | No | — |
| `status` | `open \| closed \| string \| null` | No | — |
| `channel` | `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 \| string \| string \| null` | No | — |
| `via` | `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 \| string \| null` | No | — |
| `from_agent` | `boolean \| null` | No | — |
| `spam` | `boolean \| null` | No | — |
| `imported` | `boolean \| null` | No | — |
| `customer` | `object \| null` | No | — |
| `assignee_user` | `object \| null` | No | — |
| `language` | `string \| null` | No | — |
| `subject` | `string \| null` | No | — |
| `summary` | `object \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| null` | No | — |
| `tags` | `object[] \| null` | No | — |
| `custom_fields` | `object \| null` | No | — |
| `messages` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `processed_datetime` | `string \| null` | No | — |
| `opened_datetime` | `string \| null` | No | — |
| `last_received_message_datetime` | `string \| null` | No | — |
| `last_message_datetime` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `closed_datetime` | `string \| null` | No | — |
| `trashed_datetime` | `string \| null` | No | — |
| `snooze_datetime` | `string \| null` | No | — |
| `satisfaction_survey` | `object \| null` | No | — |
| `reply_options` | `object \| null` | No | — |
| `is_unread` | `boolean \| null` | No | — |

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   type?: string | null,
>   user?: {
>     id?: number | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     name?: string | null,
>     email?: string | null
>   } | null,
>   data?: Record<string, JsonValue> | null,
>   created_datetime?: string | null
> }[] | null
> ```

> [accordion] customer full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   email?: string | null,
>   name?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   meta?: Record<string, JsonValue> | null,
>   channels?: {
>     id?: number | null,
>     type?: string | null,
>     address?: string | null,
>     preferred?: boolean | null,
>     created_datetime?: string | null,
>     updated_datetime?: string | null,
>     deleted_datetime?: string | null,
>     user?: {
>       id?: number | null,
>       name?: string | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       name?: string | null
>     } | null
>   }[] | null,
>   data?: Record<string, JsonValue> | null,
>   customer?: Record<string, JsonValue> | null,
>   integrations?: Record<string, JsonValue> | null,
>   external_id?: string | null,
>   note?: string | null,
>   external_data?: Record<string, Record<string, JsonValue>> | null,
>   ecommerce_data?: Record<string, {
>     store?: {
>       id?: number | null,
>       currencies?: (AFN | EUR | ALL | DZD | USD | AOA | XCD | ARS | AMD | AWG | AUD | AZN | BSD | BHD | BDT | BBD | BYN | BZD | XOF | BMD | INR | BTN | BOB | BOV | BAM | BWP | NOK | BRL | BND | BGN | BIF | CVE | KHR | XAF | CAD | KYD | CLP | CLF | CNY | COP | COU | KMF | CDF | NZD | CRC | HRK | CUP | CUC | ANG | CZK | DKK | DJF | DOP | EGP | SVC | ERN | SZL | ETB | FKP | FJD | XPF | GMD | GEL | GHS | GIP | GTQ | GBP | GNF | GYD | HTG | HNL | HKD | HUF | ISK | IDR | XDR | IRR | IQD | ILS | JMD | JPY | JOD | KZT | KES | KPW | KRW | KWD | KGS | LAK | LBP | LSL | ZAR | LRD | LYD | CHF | MOP | MKD | MGA | MWK | MYR | MVR | MRU | MUR | XUA | MXN | MXV | MDL | MNT | MAD | MZN | MMK | NAD | NPR | NIO | NGN | OMR | PKR | PAB | PGK | PYG | PEN | PHP | PLN | QAR | RON | RUB | RWF | SHP | WST | STN | SAR | RSD | SCR | SLL | SLE | SGD | XSU | SBD | SOS | SSP | LKR | SDG | SRD | SEK | CHE | CHW | SYP | TWD | TJS | TZS | THB | TOP | TTD | TND | TRY | TMT | UGX | UAH | AED | USN | UYU | UYI | UYW | UZS | VUV | VES | VED | VND | YER | ZMW | ZWL | XBA | XBB | XBC | XBD | XTS | XXX | XAU | XPD | XPT | XAG | string)[] | null,
>       default_currency?: AFN | EUR | ALL | DZD | USD | AOA | XCD | ARS | AMD | AWG | AUD | AZN | BSD | BHD | BDT | BBD | BYN | BZD | XOF | BMD | INR | BTN | BOB | BOV | BAM | BWP | NOK | BRL | BND | BGN | BIF | CVE | KHR | XAF | CAD | KYD | CLP | CLF | CNY | COP | COU | KMF | CDF | NZD | CRC | HRK | CUP | CUC | ANG | CZK | DKK | DJF | DOP | EGP | SVC | ERN | SZL | ETB | FKP | FJD | XPF | GMD | GEL | GHS | GIP | GTQ | GBP | GNF | GYD | HTG | HNL | HKD | HUF | ISK | IDR | XDR | IRR | IQD | ILS | JMD | JPY | JOD | KZT | KES | KPW | KRW | KWD | KGS | LAK | LBP | LSL | ZAR | LRD | LYD | CHF | MOP | MKD | MGA | MWK | MYR | MVR | MRU | MUR | XUA | MXN | MXV | MDL | MNT | MAD | MZN | MMK | NAD | NPR | NIO | NGN | OMR | PKR | PAB | PGK | PYG | PEN | PHP | PLN | QAR | RON | RUB | RWF | SHP | WST | STN | SAR | RSD | SCR | SLL | SLE | SGD | XSU | SBD | SOS | SSP | LKR | SDG | SRD | SEK | CHE | CHW | SYP | TWD | TJS | TZS | THB | TOP | TTD | TND | TRY | TMT | UGX | UAH | AED | USN | UYU | UYI | UYW | UZS | VUV | VES | VED | VND | YER | ZMW | ZWL | XBA | XBB | XBC | XBD | XTS | XXX | XAU | XPD | XPT | XAG | string | null,
>       display_name?: string | null,
>       name?: string | null,
>       type?: bigcommerce | magento | shopify | woocommerce | string | null,
>       url?: string | null,
>       helpdesk_integration_id?: number | null,
>       uuid?: string | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deleted_datetime?: string | null
>     } | null,
>     shopper?: {
>       id?: number | null,
>       external_id?: string | null,
>       helpdesk_customer_id?: number | null,
>       email_address?: string | null,
>       phone_number?: string | null,
>       first_name?: string | null,
>       middle_name?: string | null,
>       last_name?: string | null,
>       birthdate?: string | null,
>       status?: tax_exempt | veteran | string | null,
>       accepts_marketing_email?: boolean | null,
>       accepts_marketing_sms?: boolean | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deleted_datetime?: string | null
>     } | null,
>     orders?: {
>       id?: number | null,
>       external_id?: string | null,
>       shopper_external_id?: string | null,
>       number?: number | null,
>       name?: string | null,
>       currency?: AFN | EUR | ALL | DZD | USD | AOA | XCD | ARS | AMD | AWG | AUD | AZN | BSD | BHD | BDT | BBD | BYN | BZD | XOF | BMD | INR | BTN | BOB | BOV | BAM | BWP | NOK | BRL | BND | BGN | BIF | CVE | KHR | XAF | CAD | KYD | CLP | CLF | CNY | COP | COU | KMF | CDF | NZD | CRC | HRK | CUP | CUC | ANG | CZK | DKK | DJF | DOP | EGP | SVC | ERN | SZL | ETB | FKP | FJD | XPF | GMD | GEL | GHS | GIP | GTQ | GBP | GNF | GYD | HTG | HNL | HKD | HUF | ISK | IDR | XDR | IRR | IQD | ILS | JMD | JPY | JOD | KZT | KES | KPW | KRW | KWD | KGS | LAK | LBP | LSL | ZAR | LRD | LYD | CHF | MOP | MKD | MGA | MWK | MYR | MVR | MRU | MUR | XUA | MXN | MXV | MDL | MNT | MAD | MZN | MMK | NAD | NPR | NIO | NGN | OMR | PKR | PAB | PGK | PYG | PEN | PHP | PLN | QAR | RON | RUB | RWF | SHP | WST | STN | SAR | RSD | SCR | SLL | SLE | SGD | XSU | SBD | SOS | SSP | LKR | SDG | SRD | SEK | CHE | CHW | SYP | TWD | TJS | TZS | THB | TOP | TTD | TND | TRY | TMT | UGX | UAH | AED | USN | UYU | UYI | UYW | UZS | VUV | VES | VED | VND | YER | ZMW | ZWL | XBA | XBB | XBC | XBD | XTS | XXX | XAU | XPD | XPT | XAG | string | null,
>       discount_codes?: string[] | null,
>       discount_amount?: number | string | null,
>       subtotal_amount?: number | string | null,
>       shipping_amount?: number | string | null,
>       tax_amount?: number | string | null,
>       total_amount?: number | string | null,
>       external_status?: string | null,
>       external_fulfillment_status?: string | null,
>       external_payment_status?: string | null,
>       status?: partially_fulfilled | completed | canceled | on_hold | awaiting_fulfillment | awaiting_payment | scheduled | order_pending | string | null,
>       payment_status?: refunded | partially_refunded | unpaid | voided | failed | manual_verification_required | customer_authentication_required | paid | declined | authorized | string | null,
>       billing_address?: {
>         id?: number | null,
>         external_id?: string | null,
>         shopper_external_id?: string | null,
>         preferred?: boolean | null,
>         line_1?: string | null,
>         line_2?: string | null,
>         city?: string | null,
>         state?: string | null,
>         country?: string | null,
>         zip_code?: string | null,
>         first_name?: string | null,
>         last_name?: string | null,
>         phone_number?: string | null,
>         created_datetime?: string | null,
>         updated_datetime?: string | null,
>         deleted_datetime?: string | null
>       } | null,
>       shipping_address?: {
>         id?: number | null,
>         external_id?: string | null,
>         shopper_external_id?: string | null,
>         preferred?: boolean | null,
>         line_1?: string | null,
>         line_2?: string | null,
>         city?: string | null,
>         state?: string | null,
>         country?: string | null,
>         zip_code?: string | null,
>         first_name?: string | null,
>         last_name?: string | null,
>         phone_number?: string | null,
>         created_datetime?: string | null,
>         updated_datetime?: string | null,
>         deleted_datetime?: string | null
>       } | null,
>       line_items?: {
>         id?: number | null,
>         title?: string | null,
>         taxable?: boolean | null,
>         requires_shipping?: boolean | null,
>         unit_price?: number | string | null,
>         discount_amount?: number | string | null,
>         discount_type?: percentage | fixed_amount | string | null,
>         discount_reason?: string | null,
>         quantity?: number | null,
>         total_amount?: number | string | null,
>         product_options?: Record<string, JsonValue> | null,
>         fulfilled_quantity?: number | null,
>         created_datetime?: string | null,
>         updated_datetime?: string | null,
>         deleted_datetime?: string | null
>       }[] | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deleted_datetime?: string | null
>     }[] | null,
>     addresses?: {
>       id?: number | null,
>       external_id?: string | null,
>       shopper_external_id?: string | null,
>       preferred?: boolean | null,
>       line_1?: string | null,
>       line_2?: string | null,
>       city?: string | null,
>       state?: string | null,
>       country?: string | null,
>       zip_code?: string | null,
>       first_name?: string | null,
>       last_name?: string | null,
>       phone_number?: string | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deleted_datetime?: string | null
>     }[] | null
>   }> | null
> } | null
> ```

> [accordion] assignee\_user full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   email?: string | null,
>   name?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   meta?: Record<string, JsonValue> | null,
>   bio?: string | null
> } | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   content?: string | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   triggered_by?: number | null
> } | null
> ```

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   decoration?: {
>     color?: string | null
>   } | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> Record<string, {
>   field?: {
>     id?: number | null,
>     external_id?: string | null,
>     object_type?: Account | AccountSetting | Customer | CustomField | CustomFieldCondition | CustomUserAvailabilityStatus | CustomerExternalData | Integration | Macro | Order | Role | Rule | SatisfactionSurvey | Shopper | ShopperAddress | Subscription | Tag | Team | TicketMessage | Ticket | User | UserSetting | View | Widget | string | null,
>     label?: string | null,
>     description?: string | null,
>     priority?: number | null,
>     required?: boolean | null,
>     requirement_type?: visible | required | conditional | string | null,
>     managed_type?: contact_reason | product | resolution | ai_intent | ai_outcome | ai_sales | ai_discount | ai_journey | managed_sentiment | call_status | string | null,
>     definition?: {
>       data_type: number,
>       input_settings?: {
>         input_type: input_number,
>         placeholder?: string | null,
>         min?: number | string | null,
>         max?: number | string | null
>       } | null
>     } | {
>       data_type: text,
>       input_settings?: {
>         input_type: input,
>         placeholder?: string | null
>       } | {
>         input_type: dropdown,
>         choices?: string[] | null,
>         default?: string | null
>       } | null
>     } | {
>       data_type: boolean,
>       input_settings?: {
>         input_type: dropdown,
>         choices?: boolean[] | null,
>         default?: boolean | null
>       } | null
>     } | null,
>     created_datetime?: string | null,
>     updated_datetime?: string | null,
>     deactivated_datetime?: string | null
>   } | null,
>   id?: number | null,
>   prediction?: Record<string, JsonValue> | null,
>   value?: JsonValue | null
> }> | null
> ```

> [accordion] messages full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   uri?: string | null,
>   message_id?: string | null,
>   ticket_id?: number | null,
>   external_id?: string | null,
>   public?: boolean | null,
>   channel?: 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 | string | string | null,
>   via?: 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 | string | null,
>   source?: {
>     type?: string | null,
>     to?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     cc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     bcc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     from?: {
>       name?: string | null,
>       address?: string | null
>     } | null,
>     extra?: Record<string, JsonValue> | null
>   } | null,
>   sender?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   auth_customer_identity?: {
>     service?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     identifier?: string | null
>   } | null,
>   integration_id?: number | null,
>   intents?: {
>     name?: string | null,
>     rejected?: boolean | null,
>     is_user_feedback?: boolean | null
>   }[] | null,
>   rule_id?: number | null,
>   from_agent?: boolean | null,
>   receiver?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   subject?: string | null,
>   body_text?: string | null,
>   body_html?: string | null,
>   body_url?: string | null,
>   stripped_text?: string | null,
>   stripped_html?: string | null,
>   stripped_signature?: string | null,
>   attachments?: {
>     url?: string | null,
>     name?: string | null,
>     size?: number | null,
>     content_type?: string | null,
>     public?: boolean | null,
>     extra?: Record<string, JsonValue> | null
>   }[] | null,
>   macros?: {
>     id?: number | null
>   }[] | null,
>   actions?: Record<string, JsonValue>[] | null,
>   headers?: Record<string, JsonValue> | null,
>   imported?: boolean | null,
>   meta?: Record<string, JsonValue> | null,
>   created_datetime?: string | null,
>   processed_datetime?: string | null,
>   deleted_datetime?: string | null,
>   sent_datetime?: string | null,
>   failed_datetime?: string | null,
>   opened_datetime?: string | null,
>   last_sending_error?: {
>     error?: string | null
>   } | null,
>   is_retriable?: boolean | null,
>   replied_by?: {
>     integration_id?: number | null,
>     message_id?: string | null,
>     created_datetime?: string | null,
>     body_text?: string | null,
>     source?: {
>       type?: string | null,
>       to?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       cc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       bcc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       from?: {
>         name?: string | null,
>         address?: string | null
>       } | null,
>       extra?: Record<string, JsonValue> | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null,
>     user?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null
>   } | null,
>   replied_to?: {
>     integration_id?: number | null,
>     message_id?: string | null,
>     created_datetime?: string | null,
>     body_text?: string | null,
>     source?: {
>       type?: string | null,
>       to?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       cc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       bcc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       from?: {
>         name?: string | null,
>         address?: string | null
>       } | null,
>       extra?: Record<string, JsonValue> | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null,
>     user?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null
>   } | null
> }[] | null
> ```

> [accordion] satisfaction\_survey full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   customer_id?: number | null,
>   ticket_id?: number | null,
>   sent_datetime?: string | null,
>   scored_datetime?: string | null,
>   should_send_datetime?: string | null,
>   created_datetime?: string | null,
>   score?: number | null,
>   body_text?: string | null,
>   meta?: Record<string, JsonValue> | null
> } | null
> ```

> [accordion] reply\_options full type
>
> ```ts theme={null}
> Record<string, {
>   answerable?: boolean | null,
>   reason?: string | null,
>   integrations?: {
>     id?: number | null,
>     name?: string | null,
>     address?: string | null
>   }[] | null
> }> | null
> ```

***

### listTicketCustomFields

`tickets.listTicketCustomFields`

Gorgias REST: List ticket field values.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.tickets.listTicketCustomFields({"path":{"ticket_id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   field?: {
>     id?: number | null,
>     external_id?: string | null,
>     object_type?: Account | AccountSetting | Customer | CustomField | CustomFieldCondition | CustomUserAvailabilityStatus | CustomerExternalData | Integration | Macro | Order | Role | Rule | SatisfactionSurvey | Shopper | ShopperAddress | Subscription | Tag | Team | TicketMessage | Ticket | User | UserSetting | View | Widget | string | null,
>     label?: string | null,
>     description?: string | null,
>     priority?: number | null,
>     required?: boolean | null,
>     requirement_type?: visible | required | conditional | string | null,
>     managed_type?: contact_reason | product | resolution | ai_intent | ai_outcome | ai_sales | ai_discount | ai_journey | managed_sentiment | call_status | string | null,
>     definition?: {
>       data_type: number,
>       input_settings?: {
>         input_type: input_number,
>         placeholder?: string | null,
>         min?: number | string | null,
>         max?: number | string | null
>       } | null
>     } | {
>       data_type: text,
>       input_settings?: {
>         input_type: input,
>         placeholder?: string | null
>       } | {
>         input_type: dropdown,
>         choices?: string[] | null,
>         default?: string | null
>       } | null
>     } | {
>       data_type: boolean,
>       input_settings?: {
>         input_type: dropdown,
>         choices?: boolean[] | null,
>         default?: boolean | null
>       } | null
>     } | null,
>     created_datetime?: string | null,
>     updated_datetime?: string | null,
>     deactivated_datetime?: string | null
>   } | null,
>   id?: number | null,
>   prediction?: Record<string, JsonValue> | null,
>   value?: JsonValue | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### listTickets

`tickets.listTickets`

Gorgias REST: List tickets.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.tickets.listTickets({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   order_by?: created_datetime:asc | created_datetime:desc | updated_datetime:asc | updated_datetime:desc,
>   cursor?: string,
>   customer_id?: number,
>   trashed?: boolean,
>   external_id?: string,
>   limit?: number,
>   view_id?: number,
>   rule_id?: number,
>   ticket_ids?: number[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   uri?: string | null,
>   external_id?: string | null,
>   language?: string | null,
>   status?: open | closed | string | null,
>   priority?: critical | high | normal | low | string | null,
>   channel?: 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 | string | string | null,
>   via?: 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 | string | null,
>   from_agent?: boolean | null,
>   customer?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   assignee_user?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null,
>     bio?: string | null
>   } | null,
>   assignee_team?: {
>     id?: number | null,
>     name?: string | null,
>     decoration?: Record<string, JsonValue> | null
>   } | null,
>   subject?: string | null,
>   summary?: {
>     content?: string | null,
>     created_datetime?: string | null,
>     updated_datetime?: string | null,
>     triggered_by?: number | null
>   } | null,
>   excerpt?: string | null,
>   integrations?: {
>     name?: string | null,
>     address?: string | null,
>     type?: aircall | alloy | app | bigcommerce | ecom | email | facebook | gmail | gorgias_chat | http | klaviyo | magento2 | outlook | phone | recharge | self_service | shopify | smile | smooch | smooch_inside | sms | twitter | whatsapp | yotpo | zendesk | string | null
>   }[] | null,
>   meta?: Record<string, JsonValue> | null,
>   tags?: {
>     id?: number | null,
>     name?: string | null,
>     decoration?: {
>       color?: string | null
>     } | null
>   }[] | null,
>   messages_count?: number | null,
>   is_unread?: boolean | null,
>   spam?: boolean | null,
>   created_datetime?: string | null,
>   opened_datetime?: string | null,
>   last_received_message_datetime?: string | null,
>   last_message_datetime?: string | null,
>   last_sent_message_not_delivered?: boolean | null,
>   updated_datetime?: string | null,
>   closed_datetime?: string | null,
>   snooze_datetime?: string | null,
>   trashed_datetime?: string | null,
>   custom_fields?: Record<string, {
>     field?: {
>       id?: number | null,
>       external_id?: string | null,
>       object_type?: Account | AccountSetting | Customer | CustomField | CustomFieldCondition | CustomUserAvailabilityStatus | CustomerExternalData | Integration | Macro | Order | Role | Rule | SatisfactionSurvey | Shopper | ShopperAddress | Subscription | Tag | Team | TicketMessage | Ticket | User | UserSetting | View | Widget | string | null,
>       label?: string | null,
>       description?: string | null,
>       priority?: number | null,
>       required?: boolean | null,
>       requirement_type?: visible | required | conditional | string | null,
>       managed_type?: contact_reason | product | resolution | ai_intent | ai_outcome | ai_sales | ai_discount | ai_journey | managed_sentiment | call_status | string | null,
>       definition?: {
>         data_type: number,
>         input_settings?: {
>           input_type: input_number,
>           placeholder?: string | null,
>           min?: number | string | null,
>           max?: number | string | null
>         } | null
>       } | {
>         data_type: text,
>         input_settings?: {
>           input_type: input,
>           placeholder?: string | null
>         } | {
>           input_type: dropdown,
>           choices?: string[] | null,
>           default?: string | null
>         } | null
>       } | {
>         data_type: boolean,
>         input_settings?: {
>           input_type: dropdown,
>           choices?: boolean[] | null,
>           default?: boolean | null
>         } | null
>       } | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deactivated_datetime?: string | null
>     } | null,
>     id?: number | null,
>     prediction?: Record<string, JsonValue> | null,
>     value?: JsonValue | null
>   }> | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### listTicketTags

`tickets.listTicketTags`

Gorgias REST: List ticket tags.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.tickets.listTicketTags({"path":{"ticket_id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   created_datetime?: string | null,
>   decoration?: {
>     color?: string | null
>   } | null,
>   deleted_datetime?: string | null,
>   description?: string | null,
>   name?: string | null,
>   usage?: number | null,
>   uri?: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateTicket

`tickets.updateTicket`

Gorgias REST: Update a ticket.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.tickets.updateTicket({"path":{"id":1},"body":{"assignee_team":{"id":1},"assignee_user":{"id":1},"channel":"aircall","closed_datetime":"2025-01-01T00:00:00Z","custom_fields":[],"customer":{"id":1,"email":"x","name":"x"},"external_id":"x","from_agent":true,"is_unread":true,"language":"x","last_message_datetime":"2025-01-01T00:00:00Z","last_received_message_datetime":"2025-01-01T00:00:00Z","meta":{},"opened_datetime":"2025-01-01T00:00:00Z","priority":"critical","snooze_datetime":"2025-01-01T00:00:00Z","spam":true,"status":"open","subject":"x","tags":[],"trashed_datetime":"2025-01-01T00:00:00Z","updated_datetime":"2025-01-01T00:00:00Z","via":"aircall"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   assignee_team?: {
>     id?: number
>   },
>   assignee_user?: {
>     id?: number
>   },
>   channel?: 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 | string,
>   closed_datetime?: string,
>   custom_fields?: {
>     id: number,
>     value: string | number | boolean
>   }[],
>   customer?: {
>     id?: number,
>     email?: string,
>     name?: string
>   },
>   external_id?: string,
>   from_agent?: boolean,
>   is_unread?: boolean,
>   language?: string,
>   last_message_datetime?: string,
>   last_received_message_datetime?: string,
>   meta?: Record<string, string | number | number | boolean | Record<string, JsonValue> | Record<string, JsonValue>[]>,
>   opened_datetime?: string,
>   priority?: critical | high | normal | low,
>   snooze_datetime?: string,
>   spam?: boolean,
>   status?: open | closed,
>   subject?: string,
>   tags?: {
>     name: string,
>     decoration?: {
>       color?: string
>     }
>   }[],
>   trashed_datetime?: string | null,
>   updated_datetime?: string,
>   via?: aircall | api | chat | contact_form | email | facebook | facebook-mention | facebook-messenger | facebook-recommendations | form | helpdesk | help-center | instagram | instagram-ad-comment | instagram-comment | instagram-direct-message | instagram-mention | internal-note | phone | rule | shopify | sms | twilio | twitter | twitter-direct-message | whatsapp | yotpo | yotpo-review | zendesk
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `events` | `object[] \| null` | No | — |
| `status` | `open \| closed \| string \| null` | No | — |
| `channel` | `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 \| string \| string \| null` | No | — |
| `via` | `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 \| string \| null` | No | — |
| `from_agent` | `boolean \| null` | No | — |
| `spam` | `boolean \| null` | No | — |
| `imported` | `boolean \| null` | No | — |
| `customer` | `object \| null` | No | — |
| `assignee_user` | `object \| null` | No | — |
| `language` | `string \| null` | No | — |
| `subject` | `string \| null` | No | — |
| `summary` | `object \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| null` | No | — |
| `tags` | `object[] \| null` | No | — |
| `custom_fields` | `object \| null` | No | — |
| `messages` | `object[] \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `processed_datetime` | `string \| null` | No | — |
| `opened_datetime` | `string \| null` | No | — |
| `last_received_message_datetime` | `string \| null` | No | — |
| `last_message_datetime` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `closed_datetime` | `string \| null` | No | — |
| `trashed_datetime` | `string \| null` | No | — |
| `snooze_datetime` | `string \| null` | No | — |
| `satisfaction_survey` | `object \| null` | No | — |
| `reply_options` | `object \| null` | No | — |
| `is_unread` | `boolean \| null` | No | — |

> [accordion] events full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   type?: string | null,
>   user?: {
>     id?: number | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     name?: string | null,
>     email?: string | null
>   } | null,
>   data?: Record<string, JsonValue> | null,
>   created_datetime?: string | null
> }[] | null
> ```

> [accordion] customer full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   email?: string | null,
>   name?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   meta?: Record<string, JsonValue> | null,
>   channels?: {
>     id?: number | null,
>     type?: string | null,
>     address?: string | null,
>     preferred?: boolean | null,
>     created_datetime?: string | null,
>     updated_datetime?: string | null,
>     deleted_datetime?: string | null,
>     user?: {
>       id?: number | null,
>       name?: string | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       name?: string | null
>     } | null
>   }[] | null,
>   data?: Record<string, JsonValue> | null,
>   customer?: Record<string, JsonValue> | null,
>   integrations?: Record<string, JsonValue> | null,
>   external_id?: string | null,
>   note?: string | null,
>   external_data?: Record<string, Record<string, JsonValue>> | null,
>   ecommerce_data?: Record<string, {
>     store?: {
>       id?: number | null,
>       currencies?: (AFN | EUR | ALL | DZD | USD | AOA | XCD | ARS | AMD | AWG | AUD | AZN | BSD | BHD | BDT | BBD | BYN | BZD | XOF | BMD | INR | BTN | BOB | BOV | BAM | BWP | NOK | BRL | BND | BGN | BIF | CVE | KHR | XAF | CAD | KYD | CLP | CLF | CNY | COP | COU | KMF | CDF | NZD | CRC | HRK | CUP | CUC | ANG | CZK | DKK | DJF | DOP | EGP | SVC | ERN | SZL | ETB | FKP | FJD | XPF | GMD | GEL | GHS | GIP | GTQ | GBP | GNF | GYD | HTG | HNL | HKD | HUF | ISK | IDR | XDR | IRR | IQD | ILS | JMD | JPY | JOD | KZT | KES | KPW | KRW | KWD | KGS | LAK | LBP | LSL | ZAR | LRD | LYD | CHF | MOP | MKD | MGA | MWK | MYR | MVR | MRU | MUR | XUA | MXN | MXV | MDL | MNT | MAD | MZN | MMK | NAD | NPR | NIO | NGN | OMR | PKR | PAB | PGK | PYG | PEN | PHP | PLN | QAR | RON | RUB | RWF | SHP | WST | STN | SAR | RSD | SCR | SLL | SLE | SGD | XSU | SBD | SOS | SSP | LKR | SDG | SRD | SEK | CHE | CHW | SYP | TWD | TJS | TZS | THB | TOP | TTD | TND | TRY | TMT | UGX | UAH | AED | USN | UYU | UYI | UYW | UZS | VUV | VES | VED | VND | YER | ZMW | ZWL | XBA | XBB | XBC | XBD | XTS | XXX | XAU | XPD | XPT | XAG | string)[] | null,
>       default_currency?: AFN | EUR | ALL | DZD | USD | AOA | XCD | ARS | AMD | AWG | AUD | AZN | BSD | BHD | BDT | BBD | BYN | BZD | XOF | BMD | INR | BTN | BOB | BOV | BAM | BWP | NOK | BRL | BND | BGN | BIF | CVE | KHR | XAF | CAD | KYD | CLP | CLF | CNY | COP | COU | KMF | CDF | NZD | CRC | HRK | CUP | CUC | ANG | CZK | DKK | DJF | DOP | EGP | SVC | ERN | SZL | ETB | FKP | FJD | XPF | GMD | GEL | GHS | GIP | GTQ | GBP | GNF | GYD | HTG | HNL | HKD | HUF | ISK | IDR | XDR | IRR | IQD | ILS | JMD | JPY | JOD | KZT | KES | KPW | KRW | KWD | KGS | LAK | LBP | LSL | ZAR | LRD | LYD | CHF | MOP | MKD | MGA | MWK | MYR | MVR | MRU | MUR | XUA | MXN | MXV | MDL | MNT | MAD | MZN | MMK | NAD | NPR | NIO | NGN | OMR | PKR | PAB | PGK | PYG | PEN | PHP | PLN | QAR | RON | RUB | RWF | SHP | WST | STN | SAR | RSD | SCR | SLL | SLE | SGD | XSU | SBD | SOS | SSP | LKR | SDG | SRD | SEK | CHE | CHW | SYP | TWD | TJS | TZS | THB | TOP | TTD | TND | TRY | TMT | UGX | UAH | AED | USN | UYU | UYI | UYW | UZS | VUV | VES | VED | VND | YER | ZMW | ZWL | XBA | XBB | XBC | XBD | XTS | XXX | XAU | XPD | XPT | XAG | string | null,
>       display_name?: string | null,
>       name?: string | null,
>       type?: bigcommerce | magento | shopify | woocommerce | string | null,
>       url?: string | null,
>       helpdesk_integration_id?: number | null,
>       uuid?: string | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deleted_datetime?: string | null
>     } | null,
>     shopper?: {
>       id?: number | null,
>       external_id?: string | null,
>       helpdesk_customer_id?: number | null,
>       email_address?: string | null,
>       phone_number?: string | null,
>       first_name?: string | null,
>       middle_name?: string | null,
>       last_name?: string | null,
>       birthdate?: string | null,
>       status?: tax_exempt | veteran | string | null,
>       accepts_marketing_email?: boolean | null,
>       accepts_marketing_sms?: boolean | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deleted_datetime?: string | null
>     } | null,
>     orders?: {
>       id?: number | null,
>       external_id?: string | null,
>       shopper_external_id?: string | null,
>       number?: number | null,
>       name?: string | null,
>       currency?: AFN | EUR | ALL | DZD | USD | AOA | XCD | ARS | AMD | AWG | AUD | AZN | BSD | BHD | BDT | BBD | BYN | BZD | XOF | BMD | INR | BTN | BOB | BOV | BAM | BWP | NOK | BRL | BND | BGN | BIF | CVE | KHR | XAF | CAD | KYD | CLP | CLF | CNY | COP | COU | KMF | CDF | NZD | CRC | HRK | CUP | CUC | ANG | CZK | DKK | DJF | DOP | EGP | SVC | ERN | SZL | ETB | FKP | FJD | XPF | GMD | GEL | GHS | GIP | GTQ | GBP | GNF | GYD | HTG | HNL | HKD | HUF | ISK | IDR | XDR | IRR | IQD | ILS | JMD | JPY | JOD | KZT | KES | KPW | KRW | KWD | KGS | LAK | LBP | LSL | ZAR | LRD | LYD | CHF | MOP | MKD | MGA | MWK | MYR | MVR | MRU | MUR | XUA | MXN | MXV | MDL | MNT | MAD | MZN | MMK | NAD | NPR | NIO | NGN | OMR | PKR | PAB | PGK | PYG | PEN | PHP | PLN | QAR | RON | RUB | RWF | SHP | WST | STN | SAR | RSD | SCR | SLL | SLE | SGD | XSU | SBD | SOS | SSP | LKR | SDG | SRD | SEK | CHE | CHW | SYP | TWD | TJS | TZS | THB | TOP | TTD | TND | TRY | TMT | UGX | UAH | AED | USN | UYU | UYI | UYW | UZS | VUV | VES | VED | VND | YER | ZMW | ZWL | XBA | XBB | XBC | XBD | XTS | XXX | XAU | XPD | XPT | XAG | string | null,
>       discount_codes?: string[] | null,
>       discount_amount?: number | string | null,
>       subtotal_amount?: number | string | null,
>       shipping_amount?: number | string | null,
>       tax_amount?: number | string | null,
>       total_amount?: number | string | null,
>       external_status?: string | null,
>       external_fulfillment_status?: string | null,
>       external_payment_status?: string | null,
>       status?: partially_fulfilled | completed | canceled | on_hold | awaiting_fulfillment | awaiting_payment | scheduled | order_pending | string | null,
>       payment_status?: refunded | partially_refunded | unpaid | voided | failed | manual_verification_required | customer_authentication_required | paid | declined | authorized | string | null,
>       billing_address?: {
>         id?: number | null,
>         external_id?: string | null,
>         shopper_external_id?: string | null,
>         preferred?: boolean | null,
>         line_1?: string | null,
>         line_2?: string | null,
>         city?: string | null,
>         state?: string | null,
>         country?: string | null,
>         zip_code?: string | null,
>         first_name?: string | null,
>         last_name?: string | null,
>         phone_number?: string | null,
>         created_datetime?: string | null,
>         updated_datetime?: string | null,
>         deleted_datetime?: string | null
>       } | null,
>       shipping_address?: {
>         id?: number | null,
>         external_id?: string | null,
>         shopper_external_id?: string | null,
>         preferred?: boolean | null,
>         line_1?: string | null,
>         line_2?: string | null,
>         city?: string | null,
>         state?: string | null,
>         country?: string | null,
>         zip_code?: string | null,
>         first_name?: string | null,
>         last_name?: string | null,
>         phone_number?: string | null,
>         created_datetime?: string | null,
>         updated_datetime?: string | null,
>         deleted_datetime?: string | null
>       } | null,
>       line_items?: {
>         id?: number | null,
>         title?: string | null,
>         taxable?: boolean | null,
>         requires_shipping?: boolean | null,
>         unit_price?: number | string | null,
>         discount_amount?: number | string | null,
>         discount_type?: percentage | fixed_amount | string | null,
>         discount_reason?: string | null,
>         quantity?: number | null,
>         total_amount?: number | string | null,
>         product_options?: Record<string, JsonValue> | null,
>         fulfilled_quantity?: number | null,
>         created_datetime?: string | null,
>         updated_datetime?: string | null,
>         deleted_datetime?: string | null
>       }[] | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deleted_datetime?: string | null
>     }[] | null,
>     addresses?: {
>       id?: number | null,
>       external_id?: string | null,
>       shopper_external_id?: string | null,
>       preferred?: boolean | null,
>       line_1?: string | null,
>       line_2?: string | null,
>       city?: string | null,
>       state?: string | null,
>       country?: string | null,
>       zip_code?: string | null,
>       first_name?: string | null,
>       last_name?: string | null,
>       phone_number?: string | null,
>       created_datetime?: string | null,
>       updated_datetime?: string | null,
>       deleted_datetime?: string | null
>     }[] | null
>   }> | null
> } | null
> ```

> [accordion] assignee\_user full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   email?: string | null,
>   name?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   meta?: Record<string, JsonValue> | null,
>   bio?: string | null
> } | null
> ```

> [accordion] summary full type
>
> ```ts theme={null}
> {
>   content?: string | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   triggered_by?: number | null
> } | null
> ```

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   decoration?: {
>     color?: string | null
>   } | null
> }[] | null
> ```

> [accordion] custom\_fields full type
>
> ```ts theme={null}
> Record<string, {
>   field?: {
>     id?: number | null,
>     external_id?: string | null,
>     object_type?: Account | AccountSetting | Customer | CustomField | CustomFieldCondition | CustomUserAvailabilityStatus | CustomerExternalData | Integration | Macro | Order | Role | Rule | SatisfactionSurvey | Shopper | ShopperAddress | Subscription | Tag | Team | TicketMessage | Ticket | User | UserSetting | View | Widget | string | null,
>     label?: string | null,
>     description?: string | null,
>     priority?: number | null,
>     required?: boolean | null,
>     requirement_type?: visible | required | conditional | string | null,
>     managed_type?: contact_reason | product | resolution | ai_intent | ai_outcome | ai_sales | ai_discount | ai_journey | managed_sentiment | call_status | string | null,
>     definition?: {
>       data_type: number,
>       input_settings?: {
>         input_type: input_number,
>         placeholder?: string | null,
>         min?: number | string | null,
>         max?: number | string | null
>       } | null
>     } | {
>       data_type: text,
>       input_settings?: {
>         input_type: input,
>         placeholder?: string | null
>       } | {
>         input_type: dropdown,
>         choices?: string[] | null,
>         default?: string | null
>       } | null
>     } | {
>       data_type: boolean,
>       input_settings?: {
>         input_type: dropdown,
>         choices?: boolean[] | null,
>         default?: boolean | null
>       } | null
>     } | null,
>     created_datetime?: string | null,
>     updated_datetime?: string | null,
>     deactivated_datetime?: string | null
>   } | null,
>   id?: number | null,
>   prediction?: Record<string, JsonValue> | null,
>   value?: JsonValue | null
> }> | null
> ```

> [accordion] messages full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   uri?: string | null,
>   message_id?: string | null,
>   ticket_id?: number | null,
>   external_id?: string | null,
>   public?: boolean | null,
>   channel?: 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 | string | string | null,
>   via?: 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 | string | null,
>   source?: {
>     type?: string | null,
>     to?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     cc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     bcc?: {
>       name?: string | null,
>       address?: string | null
>     }[] | null,
>     from?: {
>       name?: string | null,
>       address?: string | null
>     } | null,
>     extra?: Record<string, JsonValue> | null
>   } | null,
>   sender?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   auth_customer_identity?: {
>     service?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     identifier?: string | null
>   } | null,
>   integration_id?: number | null,
>   intents?: {
>     name?: string | null,
>     rejected?: boolean | null,
>     is_user_feedback?: boolean | null
>   }[] | null,
>   rule_id?: number | null,
>   from_agent?: boolean | null,
>   receiver?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: Record<string, JsonValue> | null
>   } | null,
>   subject?: string | null,
>   body_text?: string | null,
>   body_html?: string | null,
>   body_url?: string | null,
>   stripped_text?: string | null,
>   stripped_html?: string | null,
>   stripped_signature?: string | null,
>   attachments?: {
>     url?: string | null,
>     name?: string | null,
>     size?: number | null,
>     content_type?: string | null,
>     public?: boolean | null,
>     extra?: Record<string, JsonValue> | null
>   }[] | null,
>   macros?: {
>     id?: number | null
>   }[] | null,
>   actions?: Record<string, JsonValue>[] | null,
>   headers?: Record<string, JsonValue> | null,
>   imported?: boolean | null,
>   meta?: Record<string, JsonValue> | null,
>   created_datetime?: string | null,
>   processed_datetime?: string | null,
>   deleted_datetime?: string | null,
>   sent_datetime?: string | null,
>   failed_datetime?: string | null,
>   opened_datetime?: string | null,
>   last_sending_error?: {
>     error?: string | null
>   } | null,
>   is_retriable?: boolean | null,
>   replied_by?: {
>     integration_id?: number | null,
>     message_id?: string | null,
>     created_datetime?: string | null,
>     body_text?: string | null,
>     source?: {
>       type?: string | null,
>       to?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       cc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       bcc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       from?: {
>         name?: string | null,
>         address?: string | null
>       } | null,
>       extra?: Record<string, JsonValue> | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null,
>     user?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null
>   } | null,
>   replied_to?: {
>     integration_id?: number | null,
>     message_id?: string | null,
>     created_datetime?: string | null,
>     body_text?: string | null,
>     source?: {
>       type?: string | null,
>       to?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       cc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       bcc?: {
>         name?: string | null,
>         address?: string | null
>       }[] | null,
>       from?: {
>         name?: string | null,
>         address?: string | null
>       } | null,
>       extra?: Record<string, JsonValue> | null
>     } | null,
>     customer?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null,
>     user?: {
>       id?: number | null,
>       email?: string | null,
>       name?: string | null,
>       firstname?: string | null,
>       lastname?: string | null,
>       meta?: Record<string, JsonValue> | null
>     } | null
>   } | null
> }[] | null
> ```

> [accordion] satisfaction\_survey full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   customer_id?: number | null,
>   ticket_id?: number | null,
>   sent_datetime?: string | null,
>   scored_datetime?: string | null,
>   should_send_datetime?: string | null,
>   created_datetime?: string | null,
>   score?: number | null,
>   body_text?: string | null,
>   meta?: Record<string, JsonValue> | null
> } | null
> ```

> [accordion] reply\_options full type
>
> ```ts theme={null}
> Record<string, {
>   answerable?: boolean | null,
>   reason?: string | null,
>   integrations?: {
>     id?: number | null,
>     name?: string | null,
>     address?: string | null
>   }[] | null
> }> | null
> ```

***

### updateTicketCustomField

`tickets.updateTicketCustomField`

Gorgias REST: Update ticket field value.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.tickets.updateTicketCustomField({"path":{"ticket_id":1,"id":1},"body":"x"});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `string \| number \| boolean` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number,
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `field` | `object \| null` | No | — |
| `id` | `number \| null` | No | — |
| `prediction` | `Record<string, JsonValue> \| null` | No | — |
| `value` | `JsonValue \| null` | No | — |

> [accordion] field full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   external_id?: string | null,
>   object_type?: Account | AccountSetting | Customer | CustomField | CustomFieldCondition | CustomUserAvailabilityStatus | CustomerExternalData | Integration | Macro | Order | Role | Rule | SatisfactionSurvey | Shopper | ShopperAddress | Subscription | Tag | Team | TicketMessage | Ticket | User | UserSetting | View | Widget | string | null,
>   label?: string | null,
>   description?: string | null,
>   priority?: number | null,
>   required?: boolean | null,
>   requirement_type?: visible | required | conditional | string | null,
>   managed_type?: contact_reason | product | resolution | ai_intent | ai_outcome | ai_sales | ai_discount | ai_journey | managed_sentiment | call_status | string | null,
>   definition?: {
>     data_type: number,
>     input_settings?: {
>       input_type: input_number,
>       placeholder?: string | null,
>       min?: number | string | null,
>       max?: number | string | null
>     } | null
>   } | {
>     data_type: text,
>     input_settings?: {
>       input_type: input,
>       placeholder?: string | null
>     } | {
>       input_type: dropdown,
>       choices?: string[] | null,
>       default?: string | null
>     } | null
>   } | {
>     data_type: boolean,
>     input_settings?: {
>       input_type: dropdown,
>       choices?: boolean[] | null,
>       default?: boolean | null
>     } | null
>   } | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   deactivated_datetime?: string | null
> } | null
> ```

***

### updateTicketCustomFields

`tickets.updateTicketCustomFields`

Gorgias REST: Replace all custom field values on a ticket. Fields left out of the request are deleted.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.tickets.updateTicketCustomFields({"path":{"ticket_id":1},"body":[]});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object[]` | Yes | — |

This route replaces all custom-field values on the ticket. Include every value you want to retain.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   id: number,
>   value: string | boolean | number | number
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   field?: {
>     id?: number | null,
>     external_id?: string | null,
>     object_type?: Account | AccountSetting | Customer | CustomField | CustomFieldCondition | CustomUserAvailabilityStatus | CustomerExternalData | Integration | Macro | Order | Role | Rule | SatisfactionSurvey | Shopper | ShopperAddress | Subscription | Tag | Team | TicketMessage | Ticket | User | UserSetting | View | Widget | string | null,
>     label?: string | null,
>     description?: string | null,
>     priority?: number | null,
>     required?: boolean | null,
>     requirement_type?: visible | required | conditional | string | null,
>     managed_type?: contact_reason | product | resolution | ai_intent | ai_outcome | ai_sales | ai_discount | ai_journey | managed_sentiment | call_status | string | null,
>     definition?: {
>       data_type: number,
>       input_settings?: {
>         input_type: input_number,
>         placeholder?: string | null,
>         min?: number | string | null,
>         max?: number | string | null
>       } | null
>     } | {
>       data_type: text,
>       input_settings?: {
>         input_type: input,
>         placeholder?: string | null
>       } | {
>         input_type: dropdown,
>         choices?: string[] | null,
>         default?: string | null
>       } | null
>     } | {
>       data_type: boolean,
>       input_settings?: {
>         input_type: dropdown,
>         choices?: boolean[] | null,
>         default?: boolean | null
>       } | null
>     } | null,
>     created_datetime?: string | null,
>     updated_datetime?: string | null,
>     deactivated_datetime?: string | null
>   } | null,
>   id?: number | null,
>   prediction?: Record<string, JsonValue> | null,
>   value?: JsonValue | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateTicketTags

`tickets.updateTicketTags`

Gorgias REST: Replace all tags on a ticket with the given list.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.tickets.updateTicketTags({"path":{"ticket_id":1},"body":{"names":[],"ids":[]}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   ticket_id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   names?: string[],
>   ids?: number[]
> }
> ```

**Output:** `void`

***

## Users

### createUser

`users.createUser`

Gorgias REST: Create a user.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.users.createUser({"body":{"email":"agent@acme.test","name":"x","role":{"name":"admin"}}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   bio?: string | null,
>   country?: string | null,
>   email: string,
>   external_id?: string,
>   g-recaptcha-response?: string,
>   language?: fr | en,
>   meta?: {
>     sso?: google | office365,
>     profile_picture_url?: string | null
>   },
>   name: string,
>   role: {
>     name: admin | agent | basic-agent | lite-agent | observer-agent
>   },
>   timezone?: Africa/Abidjan | Africa/Accra | Africa/Addis_Ababa | Africa/Algiers | Africa/Asmara | Africa/Asmera | Africa/Bamako | Africa/Bangui | Africa/Banjul | Africa/Bissau | Africa/Blantyre | Africa/Brazzaville | Africa/Bujumbura | Africa/Cairo | Africa/Casablanca | Africa/Ceuta | Africa/Conakry | Africa/Dakar | Africa/Dar_es_Salaam | Africa/Djibouti | Africa/Douala | Africa/El_Aaiun | Africa/Freetown | Africa/Gaborone | Africa/Harare | Africa/Johannesburg | Africa/Juba | Africa/Kampala | Africa/Khartoum | Africa/Kigali | Africa/Kinshasa | Africa/Lagos | Africa/Libreville | Africa/Lome | Africa/Luanda | Africa/Lubumbashi | Africa/Lusaka | Africa/Malabo | Africa/Maputo | Africa/Maseru | Africa/Mbabane | Africa/Mogadishu | Africa/Monrovia | Africa/Nairobi | Africa/Ndjamena | Africa/Niamey | Africa/Nouakchott | Africa/Ouagadougou | Africa/Porto-Novo | Africa/Sao_Tome | Africa/Timbuktu | Africa/Tripoli | Africa/Tunis | Africa/Windhoek | America/Adak | America/Anchorage | America/Anguilla | America/Antigua | America/Araguaina | America/Argentina/Buenos_Aires | America/Argentina/Catamarca | America/Argentina/ComodRivadavia | America/Argentina/Cordoba | America/Argentina/Jujuy | America/Argentina/La_Rioja | America/Argentina/Mendoza | America/Argentina/Rio_Gallegos | America/Argentina/Salta | America/Argentina/San_Juan | America/Argentina/San_Luis | America/Argentina/Tucuman | America/Argentina/Ushuaia | America/Aruba | America/Asuncion | America/Atikokan | America/Atka | America/Bahia | America/Bahia_Banderas | America/Barbados | America/Belem | America/Belize | America/Blanc-Sablon | America/Boa_Vista | America/Bogota | America/Boise | America/Buenos_Aires | America/Cambridge_Bay | America/Campo_Grande | America/Cancun | America/Caracas | America/Catamarca | America/Cayenne | America/Cayman | America/Chicago | America/Chihuahua | America/Ciudad_Juarez | America/Coral_Harbour | America/Cordoba | America/Costa_Rica | America/Coyhaique | America/Creston | America/Cuiaba | America/Curacao | America/Danmarkshavn | America/Dawson | America/Dawson_Creek | America/Denver | America/Detroit | America/Dominica | America/Edmonton | America/Eirunepe | America/El_Salvador | America/Ensenada | America/Fort_Nelson | America/Fort_Wayne | America/Fortaleza | America/Glace_Bay | America/Godthab | America/Goose_Bay | America/Grand_Turk | America/Grenada | America/Guadeloupe | America/Guatemala | America/Guayaquil | America/Guyana | America/Halifax | America/Havana | America/Hermosillo | America/Indiana/Indianapolis | America/Indiana/Knox | America/Indiana/Marengo | America/Indiana/Petersburg | America/Indiana/Tell_City | America/Indiana/Vevay | America/Indiana/Vincennes | America/Indiana/Winamac | America/Indianapolis | America/Inuvik | America/Iqaluit | America/Jamaica | America/Jujuy | America/Juneau | America/Kentucky/Louisville | America/Kentucky/Monticello | America/Knox_IN | America/Kralendijk | America/La_Paz | America/Lima | America/Los_Angeles | America/Louisville | America/Lower_Princes | America/Maceio | America/Managua | America/Manaus | America/Marigot | America/Martinique | America/Matamoros | America/Mazatlan | America/Mendoza | America/Menominee | America/Merida | America/Metlakatla | America/Mexico_City | America/Miquelon | America/Moncton | America/Monterrey | America/Montevideo | America/Montreal | America/Montserrat | America/Nassau | America/New_York | America/Nipigon | America/Nome | America/Noronha | America/North_Dakota/Beulah | America/North_Dakota/Center | America/North_Dakota/New_Salem | America/Nuuk | America/Ojinaga | America/Panama | America/Pangnirtung | America/Paramaribo | America/Phoenix | America/Port-au-Prince | America/Port_of_Spain | America/Porto_Acre | America/Porto_Velho | America/Puerto_Rico | America/Punta_Arenas | America/Rainy_River | America/Rankin_Inlet | America/Recife | America/Regina | America/Resolute | America/Rio_Branco | America/Rosario | America/Santa_Isabel | America/Santarem | America/Santiago | America/Santo_Domingo | America/Sao_Paulo | America/Scoresbysund | America/Shiprock | America/Sitka | America/St_Barthelemy | America/St_Johns | America/St_Kitts | America/St_Lucia | America/St_Thomas | America/St_Vincent | America/Swift_Current | America/Tegucigalpa | America/Thule | America/Thunder_Bay | America/Tijuana | America/Toronto | America/Tortola | America/Vancouver | America/Virgin | America/Whitehorse | America/Winnipeg | America/Yakutat | America/Yellowknife | Antarctica/Casey | Antarctica/Davis | Antarctica/DumontDUrville | Antarctica/Macquarie | Antarctica/Mawson | Antarctica/McMurdo | Antarctica/Palmer | Antarctica/Rothera | Antarctica/South_Pole | Antarctica/Syowa | Antarctica/Troll | Antarctica/Vostok | Arctic/Longyearbyen | Asia/Aden | Asia/Almaty | Asia/Amman | Asia/Anadyr | Asia/Aqtau | Asia/Aqtobe | Asia/Ashgabat | Asia/Ashkhabad | Asia/Atyrau | Asia/Baghdad | Asia/Bahrain | Asia/Baku | Asia/Bangkok | Asia/Barnaul | Asia/Beirut | Asia/Bishkek | Asia/Brunei | Asia/Calcutta | Asia/Chita | Asia/Choibalsan | Asia/Chongqing | Asia/Chungking | Asia/Colombo | Asia/Dacca | Asia/Damascus | Asia/Dhaka | Asia/Dili | Asia/Dubai | Asia/Dushanbe | Asia/Famagusta | Asia/Gaza | Asia/Harbin | Asia/Hebron | Asia/Ho_Chi_Minh | Asia/Hong_Kong | Asia/Hovd | Asia/Irkutsk | Asia/Istanbul | Asia/Jakarta | Asia/Jayapura | Asia/Jerusalem | Asia/Kabul | Asia/Kamchatka | Asia/Karachi | Asia/Kashgar | Asia/Kathmandu | Asia/Katmandu | Asia/Khandyga | Asia/Kolkata | Asia/Krasnoyarsk | Asia/Kuala_Lumpur | Asia/Kuching | Asia/Kuwait | Asia/Macao | Asia/Macau | Asia/Magadan | Asia/Makassar | Asia/Manila | Asia/Muscat | Asia/Nicosia | Asia/Novokuznetsk | Asia/Novosibirsk | Asia/Omsk | Asia/Oral | Asia/Phnom_Penh | Asia/Pontianak | Asia/Pyongyang | Asia/Qatar | Asia/Qostanay | Asia/Qyzylorda | Asia/Rangoon | Asia/Riyadh | Asia/Saigon | Asia/Sakhalin | Asia/Samarkand | Asia/Seoul | Asia/Shanghai | Asia/Singapore | Asia/Srednekolymsk | Asia/Taipei | Asia/Tashkent | Asia/Tbilisi | Asia/Tehran | Asia/Tel_Aviv | Asia/Thimbu | Asia/Thimphu | Asia/Tokyo | Asia/Tomsk | Asia/Ujung_Pandang | Asia/Ulaanbaatar | Asia/Ulan_Bator | Asia/Urumqi | Asia/Ust-Nera | Asia/Vientiane | Asia/Vladivostok | Asia/Yakutsk | Asia/Yangon | Asia/Yekaterinburg | Asia/Yerevan | Atlantic/Azores | Atlantic/Bermuda | Atlantic/Canary | Atlantic/Cape_Verde | Atlantic/Faeroe | Atlantic/Faroe | Atlantic/Jan_Mayen | Atlantic/Madeira | Atlantic/Reykjavik | Atlantic/South_Georgia | Atlantic/St_Helena | Atlantic/Stanley | Australia/ACT | Australia/Adelaide | Australia/Brisbane | Australia/Broken_Hill | Australia/Canberra | Australia/Currie | Australia/Darwin | Australia/Eucla | Australia/Hobart | Australia/LHI | Australia/Lindeman | Australia/Lord_Howe | Australia/Melbourne | Australia/NSW | Australia/North | Australia/Perth | Australia/Queensland | Australia/South | Australia/Sydney | Australia/Tasmania | Australia/Victoria | Australia/West | Australia/Yancowinna | Brazil/Acre | Brazil/DeNoronha | Brazil/East | Brazil/West | CET | CST6CDT | Canada/Atlantic | Canada/Central | Canada/Eastern | Canada/Mountain | Canada/Newfoundland | Canada/Pacific | Canada/Saskatchewan | Canada/Yukon | Chile/Continental | Chile/EasterIsland | Cuba | EET | EST | EST5EDT | Egypt | Eire | Etc/GMT | Etc/GMT+0 | Etc/GMT+1 | Etc/GMT+10 | Etc/GMT+11 | Etc/GMT+12 | Etc/GMT+2 | Etc/GMT+3 | Etc/GMT+4 | Etc/GMT+5 | Etc/GMT+6 | Etc/GMT+7 | Etc/GMT+8 | Etc/GMT+9 | Etc/GMT-0 | Etc/GMT-1 | Etc/GMT-10 | Etc/GMT-11 | Etc/GMT-12 | Etc/GMT-13 | Etc/GMT-14 | Etc/GMT-2 | Etc/GMT-3 | Etc/GMT-4 | Etc/GMT-5 | Etc/GMT-6 | Etc/GMT-7 | Etc/GMT-8 | Etc/GMT-9 | Etc/GMT0 | Etc/Greenwich | Etc/UCT | Etc/UTC | Etc/Universal | Etc/Zulu | Europe/Amsterdam | Europe/Andorra | Europe/Astrakhan | Europe/Athens | Europe/Belfast | Europe/Belgrade | Europe/Berlin | Europe/Bratislava | Europe/Brussels | Europe/Bucharest | Europe/Budapest | Europe/Busingen | Europe/Chisinau | Europe/Copenhagen | Europe/Dublin | Europe/Gibraltar | Europe/Guernsey | Europe/Helsinki | Europe/Isle_of_Man | Europe/Istanbul | Europe/Jersey | Europe/Kaliningrad | Europe/Kiev | Europe/Kirov | Europe/Kyiv | Europe/Lisbon | Europe/Ljubljana | Europe/London | Europe/Luxembourg | Europe/Madrid | Europe/Malta | Europe/Mariehamn | Europe/Minsk | Europe/Monaco | Europe/Moscow | Europe/Nicosia | Europe/Oslo | Europe/Paris | Europe/Podgorica | Europe/Prague | Europe/Riga | Europe/Rome | Europe/Samara | Europe/San_Marino | Europe/Sarajevo | Europe/Saratov | Europe/Simferopol | Europe/Skopje | Europe/Sofia | Europe/Stockholm | Europe/Tallinn | Europe/Tirane | Europe/Tiraspol | Europe/Ulyanovsk | Europe/Uzhgorod | Europe/Vaduz | Europe/Vatican | Europe/Vienna | Europe/Vilnius | Europe/Volgograd | Europe/Warsaw | Europe/Zagreb | Europe/Zaporozhye | Europe/Zurich | GB | GB-Eire | GMT | GMT+0 | GMT-0 | GMT0 | Greenwich | HST | Hongkong | Iceland | Indian/Antananarivo | Indian/Chagos | Indian/Christmas | Indian/Cocos | Indian/Comoro | Indian/Kerguelen | Indian/Mahe | Indian/Maldives | Indian/Mauritius | Indian/Mayotte | Indian/Reunion | Iran | Israel | Jamaica | Japan | Kwajalein | Libya | MET | MST | MST7MDT | Mexico/BajaNorte | Mexico/BajaSur | Mexico/General | NZ | NZ-CHAT | Navajo | PRC | PST8PDT | Pacific/Apia | Pacific/Auckland | Pacific/Bougainville | Pacific/Chatham | Pacific/Chuuk | Pacific/Easter | Pacific/Efate | Pacific/Enderbury | Pacific/Fakaofo | Pacific/Fiji | Pacific/Funafuti | Pacific/Galapagos | Pacific/Gambier | Pacific/Guadalcanal | Pacific/Guam | Pacific/Honolulu | Pacific/Johnston | Pacific/Kanton | Pacific/Kiritimati | Pacific/Kosrae | Pacific/Kwajalein | Pacific/Majuro | Pacific/Marquesas | Pacific/Midway | Pacific/Nauru | Pacific/Niue | Pacific/Norfolk | Pacific/Noumea | Pacific/Pago_Pago | Pacific/Palau | Pacific/Pitcairn | Pacific/Pohnpei | Pacific/Ponape | Pacific/Port_Moresby | Pacific/Rarotonga | Pacific/Saipan | Pacific/Samoa | Pacific/Tahiti | Pacific/Tarawa | Pacific/Tongatapu | Pacific/Truk | Pacific/Wake | Pacific/Wallis | Pacific/Yap | Poland | Portugal | ROC | ROK | Singapore | Turkey | UCT | US/Alaska | US/Aleutian | US/Arizona | US/Central | US/East-Indiana | US/Eastern | US/Hawaii | US/Indiana-Starke | US/Michigan | US/Mountain | US/Pacific | US/Samoa | UTC | Universal | W-SU | WET | Zulu
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `active` | `boolean \| null` | No | — |
| `bio` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `country` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `firstname` | `string \| null` | No | — |
| `lastname` | `string \| null` | No | — |
| `language` | `string \| null` | No | — |
| `meta` | `object \| null` | No | — |
| `name` | `string \| null` | No | — |
| `role` | `object \| null` | No | — |
| `timezone` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `client_id` | `string \| null` | No | — |

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   sso?: google | office365 | string | null,
>   profile_picture_url?: string | null
> } | null
> ```

> [accordion] role full type
>
> ```ts theme={null}
> {
>   name?: admin | agent | basic-agent | bot | internal-agent | lite-agent | observer-agent | string | null
> } | null
> ```

***

### deleteUser

`users.deleteUser`

Gorgias REST: Delete a user.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.users.deleteUser({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `void`

***

### getUser

`users.getUser`

Gorgias REST: Retrieve a user.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.users.getUser({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

The route page's 200 response does not name a schema; the output is validated against Gorgias's documented User object.

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `active` | `boolean \| null` | No | — |
| `bio` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `country` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `firstname` | `string \| null` | No | — |
| `lastname` | `string \| null` | No | — |
| `language` | `string \| null` | No | — |
| `meta` | `object \| null` | No | — |
| `name` | `string \| null` | No | — |
| `role` | `object \| null` | No | — |
| `timezone` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `client_id` | `string \| null` | No | — |

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   sso?: google | office365 | string | null,
>   profile_picture_url?: string | null
> } | null
> ```

> [accordion] role full type
>
> ```ts theme={null}
> {
>   name?: admin | agent | basic-agent | bot | internal-agent | lite-agent | observer-agent | string | null
> } | null
> ```

***

### listUsers

`users.listUsers`

Gorgias REST: List users.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.users.listUsers({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   external_id?: string,
>   email?: string,
>   limit?: number,
>   order_by?: created_datetime:asc | created_datetime:desc | name:asc | name:desc | email:asc | email:desc | role.name:asc | role.name:desc,
>   roles?: (admin | agent | basic-agent | bot | internal-agent | lite-agent | observer-agent)[],
>   search?: string,
>   available_first?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   active?: boolean | null,
>   bio?: string | null,
>   created_datetime?: string | null,
>   country?: string | null,
>   deactivated_datetime?: string | null,
>   email?: string | null,
>   external_id?: string | null,
>   firstname?: string | null,
>   lastname?: string | null,
>   language?: string | null,
>   meta?: {
>     sso?: google | office365 | string | null,
>     profile_picture_url?: string | null
>   } | null,
>   name?: string | null,
>   role?: {
>     name?: admin | agent | basic-agent | bot | internal-agent | lite-agent | observer-agent | string | null
>   } | null,
>   timezone?: string | null,
>   updated_datetime?: string | null,
>   client_id?: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateUser

`users.updateUser`

Gorgias REST: Update a user.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.users.updateUser({"path":{"id":1},"body":{"bio":"x","country":"x","email":"agent@acme.test","external_id":"x","language":"fr","meta":{"sso":"google","profile_picture_url":"https://acme.test/resource"},"name":"x","new_password":"x","old_password":"x","password_confirmation":"x","role":{"name":"admin"},"timezone":"Africa/Abidjan","two_fa_code":"x"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   bio?: string | null,
>   country?: string | null,
>   email?: string,
>   external_id?: string,
>   language?: fr | en,
>   meta?: {
>     sso?: google | office365,
>     profile_picture_url?: string | null
>   },
>   name?: string,
>   new_password?: string,
>   old_password?: string,
>   password_confirmation?: string,
>   role?: {
>     name: admin | agent | basic-agent | lite-agent | observer-agent
>   },
>   timezone?: Africa/Abidjan | Africa/Accra | Africa/Addis_Ababa | Africa/Algiers | Africa/Asmara | Africa/Asmera | Africa/Bamako | Africa/Bangui | Africa/Banjul | Africa/Bissau | Africa/Blantyre | Africa/Brazzaville | Africa/Bujumbura | Africa/Cairo | Africa/Casablanca | Africa/Ceuta | Africa/Conakry | Africa/Dakar | Africa/Dar_es_Salaam | Africa/Djibouti | Africa/Douala | Africa/El_Aaiun | Africa/Freetown | Africa/Gaborone | Africa/Harare | Africa/Johannesburg | Africa/Juba | Africa/Kampala | Africa/Khartoum | Africa/Kigali | Africa/Kinshasa | Africa/Lagos | Africa/Libreville | Africa/Lome | Africa/Luanda | Africa/Lubumbashi | Africa/Lusaka | Africa/Malabo | Africa/Maputo | Africa/Maseru | Africa/Mbabane | Africa/Mogadishu | Africa/Monrovia | Africa/Nairobi | Africa/Ndjamena | Africa/Niamey | Africa/Nouakchott | Africa/Ouagadougou | Africa/Porto-Novo | Africa/Sao_Tome | Africa/Timbuktu | Africa/Tripoli | Africa/Tunis | Africa/Windhoek | America/Adak | America/Anchorage | America/Anguilla | America/Antigua | America/Araguaina | America/Argentina/Buenos_Aires | America/Argentina/Catamarca | America/Argentina/ComodRivadavia | America/Argentina/Cordoba | America/Argentina/Jujuy | America/Argentina/La_Rioja | America/Argentina/Mendoza | America/Argentina/Rio_Gallegos | America/Argentina/Salta | America/Argentina/San_Juan | America/Argentina/San_Luis | America/Argentina/Tucuman | America/Argentina/Ushuaia | America/Aruba | America/Asuncion | America/Atikokan | America/Atka | America/Bahia | America/Bahia_Banderas | America/Barbados | America/Belem | America/Belize | America/Blanc-Sablon | America/Boa_Vista | America/Bogota | America/Boise | America/Buenos_Aires | America/Cambridge_Bay | America/Campo_Grande | America/Cancun | America/Caracas | America/Catamarca | America/Cayenne | America/Cayman | America/Chicago | America/Chihuahua | America/Ciudad_Juarez | America/Coral_Harbour | America/Cordoba | America/Costa_Rica | America/Coyhaique | America/Creston | America/Cuiaba | America/Curacao | America/Danmarkshavn | America/Dawson | America/Dawson_Creek | America/Denver | America/Detroit | America/Dominica | America/Edmonton | America/Eirunepe | America/El_Salvador | America/Ensenada | America/Fort_Nelson | America/Fort_Wayne | America/Fortaleza | America/Glace_Bay | America/Godthab | America/Goose_Bay | America/Grand_Turk | America/Grenada | America/Guadeloupe | America/Guatemala | America/Guayaquil | America/Guyana | America/Halifax | America/Havana | America/Hermosillo | America/Indiana/Indianapolis | America/Indiana/Knox | America/Indiana/Marengo | America/Indiana/Petersburg | America/Indiana/Tell_City | America/Indiana/Vevay | America/Indiana/Vincennes | America/Indiana/Winamac | America/Indianapolis | America/Inuvik | America/Iqaluit | America/Jamaica | America/Jujuy | America/Juneau | America/Kentucky/Louisville | America/Kentucky/Monticello | America/Knox_IN | America/Kralendijk | America/La_Paz | America/Lima | America/Los_Angeles | America/Louisville | America/Lower_Princes | America/Maceio | America/Managua | America/Manaus | America/Marigot | America/Martinique | America/Matamoros | America/Mazatlan | America/Mendoza | America/Menominee | America/Merida | America/Metlakatla | America/Mexico_City | America/Miquelon | America/Moncton | America/Monterrey | America/Montevideo | America/Montreal | America/Montserrat | America/Nassau | America/New_York | America/Nipigon | America/Nome | America/Noronha | America/North_Dakota/Beulah | America/North_Dakota/Center | America/North_Dakota/New_Salem | America/Nuuk | America/Ojinaga | America/Panama | America/Pangnirtung | America/Paramaribo | America/Phoenix | America/Port-au-Prince | America/Port_of_Spain | America/Porto_Acre | America/Porto_Velho | America/Puerto_Rico | America/Punta_Arenas | America/Rainy_River | America/Rankin_Inlet | America/Recife | America/Regina | America/Resolute | America/Rio_Branco | America/Rosario | America/Santa_Isabel | America/Santarem | America/Santiago | America/Santo_Domingo | America/Sao_Paulo | America/Scoresbysund | America/Shiprock | America/Sitka | America/St_Barthelemy | America/St_Johns | America/St_Kitts | America/St_Lucia | America/St_Thomas | America/St_Vincent | America/Swift_Current | America/Tegucigalpa | America/Thule | America/Thunder_Bay | America/Tijuana | America/Toronto | America/Tortola | America/Vancouver | America/Virgin | America/Whitehorse | America/Winnipeg | America/Yakutat | America/Yellowknife | Antarctica/Casey | Antarctica/Davis | Antarctica/DumontDUrville | Antarctica/Macquarie | Antarctica/Mawson | Antarctica/McMurdo | Antarctica/Palmer | Antarctica/Rothera | Antarctica/South_Pole | Antarctica/Syowa | Antarctica/Troll | Antarctica/Vostok | Arctic/Longyearbyen | Asia/Aden | Asia/Almaty | Asia/Amman | Asia/Anadyr | Asia/Aqtau | Asia/Aqtobe | Asia/Ashgabat | Asia/Ashkhabad | Asia/Atyrau | Asia/Baghdad | Asia/Bahrain | Asia/Baku | Asia/Bangkok | Asia/Barnaul | Asia/Beirut | Asia/Bishkek | Asia/Brunei | Asia/Calcutta | Asia/Chita | Asia/Choibalsan | Asia/Chongqing | Asia/Chungking | Asia/Colombo | Asia/Dacca | Asia/Damascus | Asia/Dhaka | Asia/Dili | Asia/Dubai | Asia/Dushanbe | Asia/Famagusta | Asia/Gaza | Asia/Harbin | Asia/Hebron | Asia/Ho_Chi_Minh | Asia/Hong_Kong | Asia/Hovd | Asia/Irkutsk | Asia/Istanbul | Asia/Jakarta | Asia/Jayapura | Asia/Jerusalem | Asia/Kabul | Asia/Kamchatka | Asia/Karachi | Asia/Kashgar | Asia/Kathmandu | Asia/Katmandu | Asia/Khandyga | Asia/Kolkata | Asia/Krasnoyarsk | Asia/Kuala_Lumpur | Asia/Kuching | Asia/Kuwait | Asia/Macao | Asia/Macau | Asia/Magadan | Asia/Makassar | Asia/Manila | Asia/Muscat | Asia/Nicosia | Asia/Novokuznetsk | Asia/Novosibirsk | Asia/Omsk | Asia/Oral | Asia/Phnom_Penh | Asia/Pontianak | Asia/Pyongyang | Asia/Qatar | Asia/Qostanay | Asia/Qyzylorda | Asia/Rangoon | Asia/Riyadh | Asia/Saigon | Asia/Sakhalin | Asia/Samarkand | Asia/Seoul | Asia/Shanghai | Asia/Singapore | Asia/Srednekolymsk | Asia/Taipei | Asia/Tashkent | Asia/Tbilisi | Asia/Tehran | Asia/Tel_Aviv | Asia/Thimbu | Asia/Thimphu | Asia/Tokyo | Asia/Tomsk | Asia/Ujung_Pandang | Asia/Ulaanbaatar | Asia/Ulan_Bator | Asia/Urumqi | Asia/Ust-Nera | Asia/Vientiane | Asia/Vladivostok | Asia/Yakutsk | Asia/Yangon | Asia/Yekaterinburg | Asia/Yerevan | Atlantic/Azores | Atlantic/Bermuda | Atlantic/Canary | Atlantic/Cape_Verde | Atlantic/Faeroe | Atlantic/Faroe | Atlantic/Jan_Mayen | Atlantic/Madeira | Atlantic/Reykjavik | Atlantic/South_Georgia | Atlantic/St_Helena | Atlantic/Stanley | Australia/ACT | Australia/Adelaide | Australia/Brisbane | Australia/Broken_Hill | Australia/Canberra | Australia/Currie | Australia/Darwin | Australia/Eucla | Australia/Hobart | Australia/LHI | Australia/Lindeman | Australia/Lord_Howe | Australia/Melbourne | Australia/NSW | Australia/North | Australia/Perth | Australia/Queensland | Australia/South | Australia/Sydney | Australia/Tasmania | Australia/Victoria | Australia/West | Australia/Yancowinna | Brazil/Acre | Brazil/DeNoronha | Brazil/East | Brazil/West | CET | CST6CDT | Canada/Atlantic | Canada/Central | Canada/Eastern | Canada/Mountain | Canada/Newfoundland | Canada/Pacific | Canada/Saskatchewan | Canada/Yukon | Chile/Continental | Chile/EasterIsland | Cuba | EET | EST | EST5EDT | Egypt | Eire | Etc/GMT | Etc/GMT+0 | Etc/GMT+1 | Etc/GMT+10 | Etc/GMT+11 | Etc/GMT+12 | Etc/GMT+2 | Etc/GMT+3 | Etc/GMT+4 | Etc/GMT+5 | Etc/GMT+6 | Etc/GMT+7 | Etc/GMT+8 | Etc/GMT+9 | Etc/GMT-0 | Etc/GMT-1 | Etc/GMT-10 | Etc/GMT-11 | Etc/GMT-12 | Etc/GMT-13 | Etc/GMT-14 | Etc/GMT-2 | Etc/GMT-3 | Etc/GMT-4 | Etc/GMT-5 | Etc/GMT-6 | Etc/GMT-7 | Etc/GMT-8 | Etc/GMT-9 | Etc/GMT0 | Etc/Greenwich | Etc/UCT | Etc/UTC | Etc/Universal | Etc/Zulu | Europe/Amsterdam | Europe/Andorra | Europe/Astrakhan | Europe/Athens | Europe/Belfast | Europe/Belgrade | Europe/Berlin | Europe/Bratislava | Europe/Brussels | Europe/Bucharest | Europe/Budapest | Europe/Busingen | Europe/Chisinau | Europe/Copenhagen | Europe/Dublin | Europe/Gibraltar | Europe/Guernsey | Europe/Helsinki | Europe/Isle_of_Man | Europe/Istanbul | Europe/Jersey | Europe/Kaliningrad | Europe/Kiev | Europe/Kirov | Europe/Kyiv | Europe/Lisbon | Europe/Ljubljana | Europe/London | Europe/Luxembourg | Europe/Madrid | Europe/Malta | Europe/Mariehamn | Europe/Minsk | Europe/Monaco | Europe/Moscow | Europe/Nicosia | Europe/Oslo | Europe/Paris | Europe/Podgorica | Europe/Prague | Europe/Riga | Europe/Rome | Europe/Samara | Europe/San_Marino | Europe/Sarajevo | Europe/Saratov | Europe/Simferopol | Europe/Skopje | Europe/Sofia | Europe/Stockholm | Europe/Tallinn | Europe/Tirane | Europe/Tiraspol | Europe/Ulyanovsk | Europe/Uzhgorod | Europe/Vaduz | Europe/Vatican | Europe/Vienna | Europe/Vilnius | Europe/Volgograd | Europe/Warsaw | Europe/Zagreb | Europe/Zaporozhye | Europe/Zurich | GB | GB-Eire | GMT | GMT+0 | GMT-0 | GMT0 | Greenwich | HST | Hongkong | Iceland | Indian/Antananarivo | Indian/Chagos | Indian/Christmas | Indian/Cocos | Indian/Comoro | Indian/Kerguelen | Indian/Mahe | Indian/Maldives | Indian/Mauritius | Indian/Mayotte | Indian/Reunion | Iran | Israel | Jamaica | Japan | Kwajalein | Libya | MET | MST | MST7MDT | Mexico/BajaNorte | Mexico/BajaSur | Mexico/General | NZ | NZ-CHAT | Navajo | PRC | PST8PDT | Pacific/Apia | Pacific/Auckland | Pacific/Bougainville | Pacific/Chatham | Pacific/Chuuk | Pacific/Easter | Pacific/Efate | Pacific/Enderbury | Pacific/Fakaofo | Pacific/Fiji | Pacific/Funafuti | Pacific/Galapagos | Pacific/Gambier | Pacific/Guadalcanal | Pacific/Guam | Pacific/Honolulu | Pacific/Johnston | Pacific/Kanton | Pacific/Kiritimati | Pacific/Kosrae | Pacific/Kwajalein | Pacific/Majuro | Pacific/Marquesas | Pacific/Midway | Pacific/Nauru | Pacific/Niue | Pacific/Norfolk | Pacific/Noumea | Pacific/Pago_Pago | Pacific/Palau | Pacific/Pitcairn | Pacific/Pohnpei | Pacific/Ponape | Pacific/Port_Moresby | Pacific/Rarotonga | Pacific/Saipan | Pacific/Samoa | Pacific/Tahiti | Pacific/Tarawa | Pacific/Tongatapu | Pacific/Truk | Pacific/Wake | Pacific/Wallis | Pacific/Yap | Poland | Portugal | ROC | ROK | Singapore | Turkey | UCT | US/Alaska | US/Aleutian | US/Arizona | US/Central | US/East-Indiana | US/Eastern | US/Hawaii | US/Indiana-Starke | US/Michigan | US/Mountain | US/Pacific | US/Samoa | UTC | Universal | W-SU | WET | Zulu,
>   two_fa_code?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `active` | `boolean \| null` | No | — |
| `bio` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `country` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `firstname` | `string \| null` | No | — |
| `lastname` | `string \| null` | No | — |
| `language` | `string \| null` | No | — |
| `meta` | `object \| null` | No | — |
| `name` | `string \| null` | No | — |
| `role` | `object \| null` | No | — |
| `timezone` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `client_id` | `string \| null` | No | — |

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   sso?: google | office365 | string | null,
>   profile_picture_url?: string | null
> } | null
> ```

> [accordion] role full type
>
> ```ts theme={null}
> {
>   name?: admin | agent | basic-agent | bot | internal-agent | lite-agent | observer-agent | string | null
> } | null
> ```

***

## Views

### createView

`views.createView`

Gorgias REST: Create a view.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.views.createView({"body":{"slug":"x"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   decoration?: {
>     emoji?: string
>   },
>   fields?: (id | details | tags | customer | last_message | name | email | created | updated | assignee | assignee_team | channel | closed | language | last_received_message | integrations | snooze | status | subject | priority)[],
>   filters?: string,
>   name?: string,
>   order_by?: string,
>   order_dir?: asc | desc,
>   shared_with_teams?: number[],
>   shared_with_users?: number[],
>   slug: string,
>   type?: ticket-list | customer-list,
>   visibility?: public | shared | private
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `category` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `decoration` | `object \| null` | No | — |
| `fields` | `(id \| details \| tags \| customer \| last_message \| name \| email \| created \| updated \| assignee \| assignee_team \| channel \| closed \| language \| last_received_message \| integrations \| snooze \| status \| subject \| priority \| string)[] \| null` | No | — |
| `filters` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `order_by` | `string \| null` | No | — |
| `order_dir` | `asc \| desc \| string \| null` | No | — |
| `search` | `string \| null` | No | — |
| `shared_with_teams` | `object[] \| null` | No | — |
| `shared_with_users` | `object[] \| null` | No | — |
| `slug` | `string \| null` | No | — |
| `type` | `ticket-list \| customer-list \| string \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `visibility` | `public \| shared \| private \| string \| null` | No | — |

> [accordion] decoration full type
>
> ```ts theme={null}
> {
>   emoji?: string | null
> } | null
> ```

> [accordion] shared\_with\_teams full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   decoration?: Record<string, JsonValue> | null
> }[] | null
> ```

> [accordion] shared\_with\_users full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   meta?: Record<string, JsonValue> | null
> }[] | null
> ```

***

### deleteView

`views.deleteView`

Gorgias REST: Delete a view.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.views.deleteView({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `void`

***

### getView

`views.getView`

Gorgias REST: Retrieve a view.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.views.getView({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `category` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `decoration` | `object \| null` | No | — |
| `fields` | `(id \| details \| tags \| customer \| last_message \| name \| email \| created \| updated \| assignee \| assignee_team \| channel \| closed \| language \| last_received_message \| integrations \| snooze \| status \| subject \| priority \| string)[] \| null` | No | — |
| `filters` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `order_by` | `string \| null` | No | — |
| `order_dir` | `asc \| desc \| string \| null` | No | — |
| `search` | `string \| null` | No | — |
| `shared_with_teams` | `object[] \| null` | No | — |
| `shared_with_users` | `object[] \| null` | No | — |
| `slug` | `string \| null` | No | — |
| `type` | `ticket-list \| customer-list \| string \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `visibility` | `public \| shared \| private \| string \| null` | No | — |

> [accordion] decoration full type
>
> ```ts theme={null}
> {
>   emoji?: string | null
> } | null
> ```

> [accordion] shared\_with\_teams full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   decoration?: Record<string, JsonValue> | null
> }[] | null
> ```

> [accordion] shared\_with\_users full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   meta?: Record<string, JsonValue> | null
> }[] | null
> ```

***

### listViewItems

`views.listViewItems`

Gorgias REST: List view's items.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.views.listViewItems({"path":{"view_id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   view_id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   direction?: prev | next,
>   ignored_item?: number,
>   limit?: number,
>   order_by?: created_datetime:asc | created_datetime:desc | updated_datetime:asc | updated_datetime:desc | last_message_datetime:asc | last_message_datetime:desc | last_received_message_datetime:asc | last_received_message_datetime:desc | closed_datetime:asc | closed_datetime:desc | snooze_datetime:asc | snooze_datetime:desc | priority:asc | priority:desc
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   uri?: string | null,
>   external_id?: string | null,
>   language?: string | null,
>   status?: string | null,
>   priority?: string | null,
>   channel?: string | null,
>   via?: string | null,
>   from_agent?: boolean | null,
>   customer?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: JsonValue | null
>   } | null,
>   assignee_user?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: JsonValue | null,
>     bio?: string | null
>   } | null,
>   assignee_team?: {
>     id?: number | null,
>     name?: string | null,
>     decoration?: JsonValue | null
>   } | null,
>   subject?: string | null,
>   excerpt?: string | null,
>   integrations?: Record<string, JsonValue>[] | null,
>   meta?: JsonValue | null,
>   tags?: {
>     id?: number | null,
>     name?: string | null,
>     uri?: string | null,
>     decoration?: JsonValue | null
>   }[] | null,
>   messages_count?: number | null,
>   is_unread?: boolean | null,
>   spam?: boolean | null,
>   created_datetime?: string | null,
>   opened_datetime?: string | null,
>   last_received_message_datetime?: string | null,
>   last_message_datetime?: string | null,
>   updated_datetime?: string | null,
>   closed_datetime?: string | null,
>   snooze_datetime?: string | null,
>   trashed_datetime?: string | null,
>   last_sent_message_not_delivered?: boolean | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   current_cursor?: string | null,
>   next_items?: string | null,
>   prev_items?: string | null
> } | null
> ```

***

### listViews

`views.listViews`

Gorgias REST: List views.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.views.listViews({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   order_by?: created_datetime:asc | created_datetime:desc,
>   cursor?: string,
>   limit?: number,
>   category?: system | user
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   category?: string | null,
>   created_datetime?: string | null,
>   deactivated_datetime?: string | null,
>   decoration?: {
>     emoji?: string | null
>   } | null,
>   fields?: (id | details | tags | customer | last_message | name | email | created | updated | assignee | assignee_team | channel | closed | language | last_received_message | integrations | snooze | status | subject | priority | string)[] | null,
>   filters?: string | null,
>   name?: string | null,
>   order_by?: string | null,
>   order_dir?: asc | desc | string | null,
>   search?: string | null,
>   shared_with_teams?: {
>     id?: number | null,
>     name?: string | null,
>     decoration?: Record<string, JsonValue> | null
>   }[] | null,
>   shared_with_users?: {
>     id?: number | null,
>     name?: string | null,
>     meta?: Record<string, JsonValue> | null
>   }[] | null,
>   slug?: string | null,
>   type?: ticket-list | customer-list | string | null,
>   uri?: string | null,
>   visibility?: public | shared | private | string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateView

`views.updateView`

Gorgias REST: Update a view.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.views.updateView({"path":{"id":1},"body":{"decoration":{"emoji":"x"},"fields":[],"filters":"x","name":"x","order_by":"x","order_dir":"asc","shared_with_teams":[],"shared_with_users":[],"slug":"x","type":"ticket-list","visibility":"public"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   decoration?: {
>     emoji?: string
>   },
>   fields?: (id | details | tags | customer | last_message | name | email | created | updated | assignee | assignee_team | channel | closed | language | last_received_message | integrations | snooze | status | subject | priority)[],
>   filters?: string,
>   name?: string,
>   order_by?: string,
>   order_dir?: asc | desc,
>   shared_with_teams?: number[],
>   shared_with_users?: number[],
>   slug?: string,
>   type?: ticket-list | customer-list,
>   visibility?: public | shared | private
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `category` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `decoration` | `object \| null` | No | — |
| `fields` | `(id \| details \| tags \| customer \| last_message \| name \| email \| created \| updated \| assignee \| assignee_team \| channel \| closed \| language \| last_received_message \| integrations \| snooze \| status \| subject \| priority \| string)[] \| null` | No | — |
| `filters` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `order_by` | `string \| null` | No | — |
| `order_dir` | `asc \| desc \| string \| null` | No | — |
| `search` | `string \| null` | No | — |
| `shared_with_teams` | `object[] \| null` | No | — |
| `shared_with_users` | `object[] \| null` | No | — |
| `slug` | `string \| null` | No | — |
| `type` | `ticket-list \| customer-list \| string \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `visibility` | `public \| shared \| private \| string \| null` | No | — |

> [accordion] decoration full type
>
> ```ts theme={null}
> {
>   emoji?: string | null
> } | null
> ```

> [accordion] shared\_with\_teams full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   decoration?: Record<string, JsonValue> | null
> }[] | null
> ```

> [accordion] shared\_with\_users full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   name?: string | null,
>   meta?: Record<string, JsonValue> | null
> }[] | null
> ```

***

### updateViewItems

`views.updateViewItems`

Gorgias REST: Search for view's items.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.views.updateViewItems({"path":{"view_id":1},"body":{"view":{"category":"x","fields":[],"filters":"x","order_by":"x","order_dir":"asc","search":"x","type":"ticket-list"}}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `query` | `object` | No | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   view_id: number
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   direction?: prev | next,
>   ignored_item?: number,
>   limit?: number,
>   order_by?: created_datetime:asc | created_datetime:desc | updated_datetime:asc | updated_datetime:desc | last_message_datetime:asc | last_message_datetime:desc | last_received_message_datetime:asc | last_received_message_datetime:desc | closed_datetime:asc | closed_datetime:desc | snooze_datetime:asc | snooze_datetime:desc | priority:asc | priority:desc
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   view?: {
>     category?: string | null,
>     fields?: (id | details | tags | customer | last_message | name | email | created | updated | assignee | assignee_team | channel | closed | language | last_received_message | integrations | snooze | status | subject | priority)[],
>     filters?: string,
>     order_by?: string,
>     order_dir?: asc | desc,
>     search?: string | null,
>     type?: ticket-list
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   uri?: string | null,
>   external_id?: string | null,
>   language?: string | null,
>   status?: string | null,
>   priority?: string | null,
>   channel?: string | null,
>   via?: string | null,
>   from_agent?: boolean | null,
>   customer?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: JsonValue | null
>   } | null,
>   assignee_user?: {
>     id?: number | null,
>     email?: string | null,
>     name?: string | null,
>     firstname?: string | null,
>     lastname?: string | null,
>     meta?: JsonValue | null,
>     bio?: string | null
>   } | null,
>   assignee_team?: {
>     id?: number | null,
>     name?: string | null,
>     decoration?: JsonValue | null
>   } | null,
>   subject?: string | null,
>   excerpt?: string | null,
>   integrations?: Record<string, JsonValue>[] | null,
>   meta?: JsonValue | null,
>   tags?: {
>     id?: number | null,
>     name?: string | null,
>     uri?: string | null,
>     decoration?: JsonValue | null
>   }[] | null,
>   messages_count?: number | null,
>   is_unread?: boolean | null,
>   spam?: boolean | null,
>   created_datetime?: string | null,
>   opened_datetime?: string | null,
>   last_received_message_datetime?: string | null,
>   last_message_datetime?: string | null,
>   updated_datetime?: string | null,
>   closed_datetime?: string | null,
>   snooze_datetime?: string | null,
>   trashed_datetime?: string | null,
>   last_sent_message_not_delivered?: boolean | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   current_cursor?: string | null,
>   next_items?: string | null,
>   prev_items?: string | null
> } | null
> ```

***

## Voice Call Events

### getVoiceCallEvent

`voiceCallEvents.getVoiceCallEvent`

Gorgias REST: Retrieve a voice call event.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.voiceCallEvents.getVoiceCallEvent({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `type` | `phone-call-answered \| phone-call-ringing \| phone-call-dial-failed \| phone-call-agent-dialed \| incoming-phone-call \| outgoing-phone-call \| completed-phone-call \| call-recording \| missed-phone-call \| declined-phone-call \| call-ending-triggered \| voicemail-recording \| phone-call-conversation-started \| phone-call-forwarded-to-external-number \| phone-call-forwarded-to-gorgias-number \| phone-call-forwarded \| message-played \| outgoing-phone-call-connected \| child-call-not_answered \| phone-call-transfer-initiated \| phone-call-transfer-failed \| phone-call-enqueued \| phone-call-enqueue-skipped \| phone-call-dequeued \| phone-call-wrap-up-started \| phone-call-wrap-up-ended \| ivr-menu-presented \| ivr-option-selected \| phone-call-deflected-to-sms \| customer-field-conditional-evaluated \| monitoring-started \| monitoring-ended \| monitoring-updated \| string \| null` | No | — |
| `account_id` | `number \| null` | No | — |
| `call_id` | `number \| null` | No | — |
| `user_id` | `number \| null` | No | — |
| `customer_id` | `number \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `meta` | `Record<string, JsonValue> \| string \| null` | No | — |

***

### listVoiceCallEvents

`voiceCallEvents.listVoiceCallEvents`

Gorgias REST: List voice call events.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.voiceCallEvents.listVoiceCallEvents({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   limit?: number,
>   call_id?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   type?: phone-call-answered | phone-call-ringing | phone-call-dial-failed | phone-call-agent-dialed | incoming-phone-call | outgoing-phone-call | completed-phone-call | call-recording | missed-phone-call | declined-phone-call | call-ending-triggered | voicemail-recording | phone-call-conversation-started | phone-call-forwarded-to-external-number | phone-call-forwarded-to-gorgias-number | phone-call-forwarded | message-played | outgoing-phone-call-connected | child-call-not_answered | phone-call-transfer-initiated | phone-call-transfer-failed | phone-call-enqueued | phone-call-enqueue-skipped | phone-call-dequeued | phone-call-wrap-up-started | phone-call-wrap-up-ended | ivr-menu-presented | ivr-option-selected | phone-call-deflected-to-sms | customer-field-conditional-evaluated | monitoring-started | monitoring-ended | monitoring-updated | string | null,
>   account_id?: number | null,
>   call_id?: number | null,
>   user_id?: number | null,
>   customer_id?: number | null,
>   created_datetime?: string | null,
>   meta?: Record<string, JsonValue> | string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

## Voice Call Recordings

### deleteVoiceCallRecording

`voiceCallRecordings.deleteVoiceCallRecording`

Gorgias REST: Delete a voice call recording.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.voiceCallRecordings.deleteVoiceCallRecording({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `void`

***

### getVoiceCallRecording

`voiceCallRecordings.getVoiceCallRecording`

Gorgias REST: Retrieve a voice call recording.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.voiceCallRecordings.getVoiceCallRecording({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `call_id` | `number \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `duration` | `number \| null` | No | — |
| `type` | `call-recording \| voicemail \| string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deleted_datetime` | `string \| null` | No | — |
| `deleted_by_user_id` | `number \| null` | No | — |
| `error_code` | `RECORDING_IS_PRIVATE \| string \| null` | No | — |
| `transcription_status` | `requested \| completed \| failed \| recording_too_short \| recording_too_long \| null \| low_quality_transcription \| null` | No | — |

***

### listVoiceCallRecordings

`voiceCallRecordings.listVoiceCallRecordings`

Gorgias REST: List voice call recordings.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.voiceCallRecordings.listVoiceCallRecordings({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   limit?: number,
>   call_id?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   call_id?: number | null,
>   external_id?: string | null,
>   url?: string | null,
>   duration?: number | null,
>   type?: call-recording | voicemail | string | null,
>   created_datetime?: string | null,
>   deleted_datetime?: string | null,
>   deleted_by_user_id?: number | null,
>   error_code?: RECORDING_IS_PRIVATE | string | null,
>   transcription_status?: requested | completed | failed | recording_too_short | recording_too_long | null | low_quality_transcription | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

## Voice Calls

### getVoiceCall

`voiceCalls.getVoiceCall`

Gorgias REST: Retrieve a voice call.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.voiceCalls.getVoiceCall({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `integration_id` | `number \| null` | No | — |
| `ticket_id` | `number \| null` | No | — |
| `phone_number_id` | `number \| null` | No | — |
| `external_id` | `string \| null` | No | — |
| `provider` | `string \| null` | No | — |
| `status` | `answered \| connected \| in-progress \| initiated \| queued \| ringing \| ending \| busy \| canceled \| completed \| failed \| no-answer \| missed \| string \| null` | No | — |
| `direction` | `inbound \| outbound \| string \| null` | No | — |
| `phone_number_source` | `string \| null` | No | — |
| `country_source` | `string \| null` | No | — |
| `phone_number_destination` | `string \| null` | No | — |
| `country_destination` | `string \| null` | No | — |
| `duration` | `number \| null` | No | — |
| `started_datetime` | `string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `initiated_by_agent_id` | `number \| null` | No | — |
| `last_answered_by_agent_id` | `number \| null` | No | — |
| `customer_id` | `number \| null` | No | — |
| `last_rang_agent_id` | `number \| null` | No | — |
| `has_voicemail` | `boolean \| null` | No | — |
| `has_call_recording` | `boolean \| null` | No | — |
| `summaries` | `object[] \| null` | No | — |
| `termination_status` | `answered \| cancelled \| missed \| abandoned \| callback-requested \| string \| null` | No | — |
| `queue_id` | `number \| null` | No | — |
| `status_in_queue` | `string \| null` | No | — |
| `answered_by_external_number` | `string \| null` | No | — |
| `answered_by_external_customer_id` | `number \| null` | No | — |
| `monitoring_status` | `listening \| whispering \| none \| string \| null` | No | — |
| `last_monitoring_agent_id` | `number \| null` | No | — |

> [accordion] summaries full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   recording_id?: number | null,
>   summary?: string | null,
>   created_datetime?: string | null
> }[] | null
> ```

***

### listVoiceCalls

`voiceCalls.listVoiceCalls`

Gorgias REST: List voice calls.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.voiceCalls.listVoiceCalls({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   limit?: number,
>   ticket_id?: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   integration_id?: number | null,
>   ticket_id?: number | null,
>   phone_number_id?: number | null,
>   external_id?: string | null,
>   provider?: string | null,
>   status?: answered | connected | in-progress | initiated | queued | ringing | ending | busy | canceled | completed | failed | no-answer | missed | string | null,
>   direction?: inbound | outbound | string | null,
>   phone_number_source?: string | null,
>   country_source?: string | null,
>   phone_number_destination?: string | null,
>   country_destination?: string | null,
>   duration?: number | null,
>   started_datetime?: string | null,
>   created_datetime?: string | null,
>   updated_datetime?: string | null,
>   initiated_by_agent_id?: number | null,
>   last_answered_by_agent_id?: number | null,
>   customer_id?: number | null,
>   last_rang_agent_id?: number | null,
>   has_voicemail?: boolean | null,
>   has_call_recording?: boolean | null,
>   summaries?: {
>     id?: number | null,
>     recording_id?: number | null,
>     summary?: string | null,
>     created_datetime?: string | null
>   }[] | null,
>   termination_status?: answered | cancelled | missed | abandoned | callback-requested | string | null,
>   queue_id?: number | null,
>   status_in_queue?: string | null,
>   answered_by_external_number?: string | null,
>   answered_by_external_customer_id?: number | null,
>   monitoring_status?: listening | whispering | none | string | null,
>   last_monitoring_agent_id?: number | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

## Widgets

### createWidget

`widgets.createWidget`

Gorgias REST: Create a widget.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.widgets.createWidget({"body":{"template":{},"type":"bigcommerce"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   context?: ticket | customer | user,
>   deactivated_datetime?: string | null,
>   integration_id?: number | null,
>   app_id?: string | null,
>   order?: number,
>   template: Record<string, JsonValue>,
>   type: bigcommerce | custom | customer_external_data | http | magento2 | recharge | shopify | smile | standalone | yotpo | klaviyo | stripe | woocommerce
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `context` | `ticket \| customer \| user \| string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `integration_id` | `number \| null` | No | — |
| `app_id` | `string \| null` | No | — |
| `order` | `number \| null` | No | — |
| `template` | `Record<string, JsonValue> \| null` | No | — |
| `type` | `bigcommerce \| custom \| customer_external_data \| http \| magento2 \| recharge \| shopify \| smile \| standalone \| yotpo \| klaviyo \| stripe \| woocommerce \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |

***

### deleteWidget

`widgets.deleteWidget`

Gorgias REST: Delete a widget.

**Risk:** `destructive`

```ts theme={null}
await corsair.gorgias.api.widgets.deleteWidget({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output:** `void`

***

### getWidget

`widgets.getWidget`

Gorgias REST: Retrieve a widget.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.widgets.getWidget({"path":{"id":1}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `context` | `ticket \| customer \| user \| string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `integration_id` | `number \| null` | No | — |
| `app_id` | `string \| null` | No | — |
| `order` | `number \| null` | No | — |
| `template` | `Record<string, JsonValue> \| null` | No | — |
| `type` | `bigcommerce \| custom \| customer_external_data \| http \| magento2 \| recharge \| shopify \| smile \| standalone \| yotpo \| klaviyo \| stripe \| woocommerce \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |

***

### listWidgets

`widgets.listWidgets`

Gorgias REST: List widgets.

**Risk:** `read`

```ts theme={null}
await corsair.gorgias.api.widgets.listWidgets({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `query` | `object` | No | — |

> [accordion] query full type
>
> ```ts theme={null}
> {
>   cursor?: string,
>   limit?: number,
>   order_by?: created_datetime:asc | created_datetime:desc | order:asc | order:desc,
>   integration_id?: number | null,
>   app_id?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | — |
| `object` | `string` | No | — |
| `uri` | `string` | No | — |
| `meta` | `object` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   context?: ticket | customer | user | string | null,
>   created_datetime?: string | null,
>   deactivated_datetime?: string | null,
>   integration_id?: number | null,
>   app_id?: string | null,
>   order?: number | null,
>   template?: Record<string, JsonValue> | null,
>   type?: bigcommerce | custom | customer_external_data | http | magento2 | recharge | shopify | smile | standalone | yotpo | klaviyo | stripe | woocommerce | string | null,
>   updated_datetime?: string | null,
>   uri?: string | null
> }[]
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   prev_cursor?: string | null,
>   next_cursor?: string | null
> }
> ```

***

### updateWidget

`widgets.updateWidget`

Gorgias REST: Update a widget.

**Risk:** `write`

```ts theme={null}
await corsair.gorgias.api.widgets.updateWidget({"path":{"id":1},"body":{"context":"ticket","deactivated_datetime":"2025-01-01T00:00:00Z","integration_id":1,"app_id":"x","order":1,"template":{},"type":"bigcommerce"}});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `path` | `object` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] path full type
>
> ```ts theme={null}
> {
>   id: number
> }
> ```

> [accordion] body full type
>
> ```ts theme={null}
> {
>   context?: ticket | customer | user,
>   deactivated_datetime?: string | null,
>   integration_id?: number | null,
>   app_id?: string | null,
>   order?: number,
>   template?: Record<string, JsonValue>,
>   type?: bigcommerce | custom | customer_external_data | http | magento2 | recharge | shopify | smile | standalone | yotpo | klaviyo | stripe | woocommerce
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| null` | No | — |
| `context` | `ticket \| customer \| user \| string \| null` | No | — |
| `created_datetime` | `string \| null` | No | — |
| `deactivated_datetime` | `string \| null` | No | — |
| `integration_id` | `number \| null` | No | — |
| `app_id` | `string \| null` | No | — |
| `order` | `number \| null` | No | — |
| `template` | `Record<string, JsonValue> \| null` | No | — |
| `type` | `bigcommerce \| custom \| customer_external_data \| http \| magento2 \| recharge \| shopify \| smile \| standalone \| yotpo \| klaviyo \| stripe \| woocommerce \| string \| null` | No | — |
| `updated_datetime` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.