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

# Zendesk

> Manage Zendesk tickets, users, organizations, and ticket fields from inside an agent workflow.

Zendesk actions let an agent work with your support data directly in a flow. An agent can create and update tickets, manage users and organizations, read ticket fields, and pass the results to later steps.

## Supported actions

| Group            | Actions                                                        |
| ---------------- | -------------------------------------------------------------- |
| **Ticket**       | Create, Update, Get, Get All, Delete, Recover                  |
| **User**         | Create, Update, Get, Get All, Search, Delete, Get Related Data |
| **Organization** | Create, Update, Get, Get All, Delete, Count, Get Related Data  |
| **Ticket field** | Get, Get All                                                   |

## Prerequisites

<AccordionGroup>
  <Accordion title="Create a Zendesk credential" icon="key">
    Generate an API token in your Zendesk admin center, then store it as a **Zendesk** credential in [Credential Management](/admin-hub/account_settings/credential-management). Select that credential on every Zendesk action.
  </Accordion>
</AccordionGroup>

## How to use these actions

* **Every action needs your Subdomain and authentication email.** The **Subdomain** is the `mycompany` part of `mycompany.zendesk.com`, and the authentication email is the email tied to your API token. Both are required on every Zendesk action.
* **Map text inputs from earlier steps.** Inputs such as **Subject**, **Description**, and **Email** accept a value mapped from a previous step.
* **Numeric and toggle inputs take fixed values.** Numeric IDs such as **Assignee ID**, **Group ID**, and **Organization ID**, the **Limit**, and the **Comment Is Public** toggle take fixed values.
* **Comma separated lists.** **Tags** and **Domain Names** are entered as comma separated values.
* **JSON objects for custom data.** **Custom Fields**, **Organization Fields**, and **User Fields** accept a JSON object.
* **List actions cap results with Limit.** The Get All actions return up to **Limit** records.

<Note>
  **Subdomain** and the authentication email tied to your API token are required on every Zendesk action. They are documented here once and are not repeated in each operation's input table below.
</Note>

## Actions

### Ticket

#### Zendesk Ticket Create

Creates a new ticket.

| Input               | Required | Description                                                                |
| ------------------- | -------- | -------------------------------------------------------------------------- |
| **Subject**         | Yes      | The subject line of the ticket.                                            |
| **Description**     | Yes      | The first comment body on the ticket.                                      |
| **Priority**        | No       | The ticket priority. One of `urgent`, `high`, `normal`, or `low`.          |
| **Type**            | No       | The ticket type. One of `problem`, `incident`, `question`, or `task`.      |
| **Requester Email** | No       | The email address of the person requesting support.                        |
| **Requester Name**  | No       | The name of the person requesting support.                                 |
| **Assignee ID**     | No       | The numeric ID of the agent to assign the ticket to. Takes a fixed number. |
| **Group ID**        | No       | The numeric ID of the group to assign the ticket to. Takes a fixed number. |
| **Tags**            | No       | Tags to apply, entered as a comma separated list.                          |
| **Custom Fields**   | No       | Custom field values as a JSON object.                                      |

#### Zendesk Ticket Update

Updates an existing ticket.

| Input                 | Required | Description                                                                     |
| --------------------- | -------- | ------------------------------------------------------------------------------- |
| **Ticket ID**         | Yes      | The unique identifier of the ticket to update.                                  |
| **Subject**           | No       | The new subject line.                                                           |
| **Comment**           | No       | A comment to add to the ticket.                                                 |
| **Comment Is Public** | No       | Whether the added comment is public. Defaults to on.                            |
| **Status**            | No       | The new status. One of `new`, `open`, `pending`, `hold`, `solved`, or `closed`. |
| **Priority**          | No       | The ticket priority. One of `urgent`, `high`, `normal`, or `low`.               |
| **Type**              | No       | The ticket type. One of `problem`, `incident`, `question`, or `task`.           |
| **Assignee ID**       | No       | The numeric ID of the agent to assign the ticket to. Takes a fixed number.      |
| **Group ID**          | No       | The numeric ID of the group to assign the ticket to. Takes a fixed number.      |
| **Tags**              | No       | Tags to apply, entered as a comma separated list.                               |
| **Custom Fields**     | No       | Custom field values as a JSON object.                                           |

#### Zendesk Ticket Get

Retrieves a ticket by ID.

| Input         | Required | Description                                      |
| ------------- | -------- | ------------------------------------------------ |
| **Ticket ID** | Yes      | The unique identifier of the ticket to retrieve. |

#### Zendesk Ticket Get All

Lists tickets.

| Input          | Required | Description                                                                       |
| -------------- | -------- | --------------------------------------------------------------------------------- |
| **Limit**      | No       | Maximum number of tickets to return, from 1 to 1000. Defaults to 100.             |
| **Sort By**    | No       | The field to sort on. One of `created_at`, `updated_at`, `priority`, or `status`. |
| **Sort Order** | No       | The sort direction, either `asc` or `desc`.                                       |
| **Status**     | No       | Filter tickets by status.                                                         |

#### Zendesk Ticket Delete

Deletes a ticket.

| Input         | Required | Description                                    |
| ------------- | -------- | ---------------------------------------------- |
| **Ticket ID** | Yes      | The unique identifier of the ticket to delete. |

#### Zendesk Ticket Recover

Recovers a deleted ticket.

| Input         | Required | Description                                             |
| ------------- | -------- | ------------------------------------------------------- |
| **Ticket ID** | Yes      | The unique identifier of the deleted ticket to recover. |

### User

#### Zendesk User Create

Creates a new user.

| Input               | Required | Description                                                                          |
| ------------------- | -------- | ------------------------------------------------------------------------------------ |
| **Name**            | Yes      | The user's full name.                                                                |
| **Email**           | Yes      | The user's email address.                                                            |
| **Role**            | No       | The user role. One of `end-user`, `agent`, or `admin`.                               |
| **Phone**           | No       | The user's phone number.                                                             |
| **Organization ID** | No       | The numeric ID of the organization to associate the user with. Takes a fixed number. |
| **External ID**     | No       | An identifier for the user in an external system.                                    |
| **User Fields**     | No       | Custom user field values as a JSON object.                                           |

#### Zendesk User Update

Updates an existing user.

| Input               | Required | Description                                                                          |
| ------------------- | -------- | ------------------------------------------------------------------------------------ |
| **User ID**         | Yes      | The unique identifier of the user to update.                                         |
| **Name**            | No       | The user's full name.                                                                |
| **Email**           | No       | The user's email address.                                                            |
| **Role**            | No       | The user role. One of `end-user`, `agent`, or `admin`.                               |
| **Phone**           | No       | The user's phone number.                                                             |
| **Organization ID** | No       | The numeric ID of the organization to associate the user with. Takes a fixed number. |
| **User Fields**     | No       | Custom user field values as a JSON object.                                           |

#### Zendesk User Get

Retrieves a user by ID.

| Input       | Required | Description                                    |
| ----------- | -------- | ---------------------------------------------- |
| **User ID** | Yes      | The unique identifier of the user to retrieve. |

#### Zendesk User Get All

Lists users.

| Input     | Required | Description                                                         |
| --------- | -------- | ------------------------------------------------------------------- |
| **Limit** | No       | Maximum number of users to return, from 1 to 1000. Defaults to 100. |
| **Role**  | No       | Filter users by role, one of `end-user`, `agent`, or `admin`.       |

#### Zendesk User Search

Searches for users.

| Input     | Required | Description                                                         |
| --------- | -------- | ------------------------------------------------------------------- |
| **Query** | Yes      | The search query.                                                   |
| **Limit** | No       | Maximum number of users to return, from 1 to 1000. Defaults to 100. |

#### Zendesk User Delete

Deletes a user.

| Input       | Required | Description                                  |
| ----------- | -------- | -------------------------------------------- |
| **User ID** | Yes      | The unique identifier of the user to delete. |

#### Zendesk User Get Related Data

Retrieves data related to a user, such as their tickets and organizations.

| Input       | Required | Description                                                 |
| ----------- | -------- | ----------------------------------------------------------- |
| **User ID** | Yes      | The unique identifier of the user to read related data for. |

### Organization

#### Zendesk Organization Create

Creates a new organization.

| Input                   | Required | Description                                                            |
| ----------------------- | -------- | ---------------------------------------------------------------------- |
| **Name**                | Yes      | The organization's name.                                               |
| **Domain Names**        | No       | Email domains for the organization, entered as a comma separated list. |
| **Details**             | No       | Additional details about the organization.                             |
| **Notes**               | No       | Notes about the organization.                                          |
| **External ID**         | No       | An identifier for the organization in an external system.              |
| **Tags**                | No       | Tags to apply, entered as a comma separated list.                      |
| **Organization Fields** | No       | Custom organization field values as a JSON object.                     |

#### Zendesk Organization Update

Updates an existing organization.

| Input                   | Required | Description                                                            |
| ----------------------- | -------- | ---------------------------------------------------------------------- |
| **Organization ID**     | Yes      | The unique identifier of the organization to update.                   |
| **Name**                | No       | The organization's name.                                               |
| **Domain Names**        | No       | Email domains for the organization, entered as a comma separated list. |
| **Details**             | No       | Additional details about the organization.                             |
| **Notes**               | No       | Notes about the organization.                                          |
| **Tags**                | No       | Tags to apply, entered as a comma separated list.                      |
| **Organization Fields** | No       | Custom organization field values as a JSON object.                     |

#### Zendesk Organization Get

Retrieves an organization by ID.

| Input               | Required | Description                                            |
| ------------------- | -------- | ------------------------------------------------------ |
| **Organization ID** | Yes      | The unique identifier of the organization to retrieve. |

#### Zendesk Organization Get All

Lists organizations.

| Input     | Required | Description                                                                 |
| --------- | -------- | --------------------------------------------------------------------------- |
| **Limit** | No       | Maximum number of organizations to return, from 1 to 1000. Defaults to 100. |

#### Zendesk Organization Delete

Deletes an organization.

| Input               | Required | Description                                          |
| ------------------- | -------- | ---------------------------------------------------- |
| **Organization ID** | Yes      | The unique identifier of the organization to delete. |

#### Zendesk Organization Count

Returns the total number of organizations.

This action takes no inputs beyond the credential.

#### Zendesk Organization Get Related Data

Retrieves data related to an organization, such as its users and tickets.

| Input               | Required | Description                                                         |
| ------------------- | -------- | ------------------------------------------------------------------- |
| **Organization ID** | Yes      | The unique identifier of the organization to read related data for. |

### Ticket field

#### Zendesk Ticket Field Get

Retrieves a ticket field by ID.

| Input        | Required | Description                                            |
| ------------ | -------- | ------------------------------------------------------ |
| **Field ID** | Yes      | The unique identifier of the ticket field to retrieve. |

#### Zendesk Ticket Field Get All

Lists ticket fields.

This action takes no inputs beyond the credential.

## Example

An agent that opens a ticket for an inbound support request:

<Steps>
  <Step title="Find the requester">
    A **Zendesk User Search** action sets **Query** to the requester's email so a model step can confirm whether the user already exists.
  </Step>

  <Step title="Create the ticket">
    A **Zendesk Ticket Create** action sets **Subject** and **Description** from the request, sets **Priority**, and maps **Requester Email** to the matched user.
  </Step>

  <Step title="Confirm">
    A model step summarizes the ticket result, including the returned ticket ID, for the activity log.
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Authentication failed" icon="lock">
    Confirm the **Subdomain** and the authentication email are correct, and that the stored API token belongs to that account and has not been revoked. The authentication email must match the user who owns the token.
  </Accordion>

  <Accordion title="Record not found" icon="circle-question">
    The **Ticket ID**, **User ID**, or **Organization ID** you passed does not exist in this Zendesk account. Use a **Get All** or **Search** action to confirm the ID before referencing it.
  </Accordion>

  <Accordion title="Invalid field or value" icon="triangle-exclamation">
    **Status**, **Priority**, and **Type** accept only their listed values. **Custom Fields**, **Organization Fields**, and **User Fields** must be a valid JSON object whose keys match fields defined in your account.
  </Accordion>

  <Accordion title="Cannot recover the ticket" icon="trash-can-arrow-up">
    **Zendesk Ticket Recover** only works on a ticket that was soft deleted and not yet permanently removed. A permanently deleted ticket cannot be recovered.
  </Accordion>
</AccordionGroup>

For issues common to every vendor, see the [Actions overview](/building-and-deploying-agents/agent-basics/actions/overview#troubleshooting).
