> For the complete documentation index, see [llms.txt](https://docs.planetcrust.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.planetcrust.com/human-connections/freshdesk/freshdesk.md).

# Freshdesk

<p align="center"><a class="button primary" data-icon="circle-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>

<figure><img src="/files/CI1Nwnwlw12M3UvZdLTO" alt=""><figcaption></figcaption></figure>

<h3 align="center">Put Freshdesk to Work with @Human Automations and @Human Agents</h3>

<p align="center">The Freshdesk Connection documents all Triggers, Actions and Query Operations available for creating automations via the Freshdesk API.</p>

{% embed url="<https://www.youtube.com/watch?v=CyuUuaBSZzA>" %}

#### What can you do with the Freshdesk Connection?

* Connect to the Freshdesk API in a few clicks
* Use the related Freshdesk Operations (see below) in @Human Automations or @Human Agents

### Related Operations

#### Trigger Operations

**Ticket Created**

Triggers on: tickets/created

Triggered when a ticket is created in Freshdesk.

**Ticket Updated**

Triggers on: tickets/updated

Triggered when an existing ticket is updated in Freshdesk.

**Contact Created**

Triggers on: contacts/created

Triggered when a contact is created in Freshdesk.

**Contact Updated**

Triggers on: contacts/updated

Triggered when an existing contact is updated in Freshdesk.

#### Action Operations

[Action: Create Ticket](/human-connections/freshdesk/freshdesk/action-create-ticket.md)

[Action: Update Ticket](/human-connections/freshdesk/freshdesk/action-update-ticket.md)

#### Query Operations

[Query: View Ticket](/human-connections/freshdesk/freshdesk/query-view-ticket.md)

[Query: List Tickets](/human-connections/freshdesk/freshdesk/query-list-tickets.md)

### Related Automations

Example link

### Obtaining Access Credentials

Here’s the step-by-step guide to generate a **Personal Access Token (PAT)** in **Freshdesk**:

#### **Prerequisites**

* **Admin access** to the Freshdesk account.
* **Freshdesk domain** (e.g., `yourcompany.freshdesk.com`).

#### **Steps to Generate PAT**

1. **Log in** to your Freshdesk account as an **Admin** at: `https://<your_domain>.freshdesk.com/login` *(Replace `<your_domain>` with your actual Freshdesk subdomain.)*
2. **Navigate to Profile Settings**:
   * Click your **profile icon** (top-right) → **"Profile Settings"**.
3. **Generate API Key**:
   * Scroll to the **"API Key"** section.
   * Click **"Generate API Key"**.
   * Enter your **password** for confirmation.
4. **Copy the PAT**:
   * The **API Key (PAT)** will be displayed **once**.
   * **Copy and store it securely** (you won’t see it again).

**Done.** Use this token for system-to-system authentication.

### Configuring Webhooks

1. **Log in** to your Freshdesk account as an **Admin**.
2. **Navigate to Automations**:
   * Click the **Admin** icon in the sidebar.
   * Under **Workflows**, click **Automations**.
3. **Select Rule Type**:
   * Select the appropriate tab for your trigger: **Ticket Creation** (for new tickets) or **Ticket Updates** (for changes to existing tickets).
4. **Create New Rule**:
   * Click **New Rule**.
   * Enter a **Rule Name**.
5. **Set Conditions**:
   * Define the criteria under **On tickets with these properties** to determine when the webhook should fire.
6. **Trigger Webhook Action**:
   * In the **Perform these actions** section, select **Trigger Webhook** from the dropdown menu.
7. **Configure Webhook Details**:
   * **Request Type**: Select the method (e.g., **POST**).
   * **URL**: Enter the destination endpoint.
   * **Encoding**: Select **JSON**.
   * **Content**: Choose **Simple** and select the fields, or **Advanced** for a custom JSON body.
8. **Save Rule**:
   * Click **Preview and Save** to activate the automation.

### Code (Apache v2.0): Service Connectivity and Metadata

```
{
  "handle": "freshdesk-api-v2",
  "status": "active",
  "meta": {
    "short": "Freshdesk",
    "description": "Connect to Freshdesk API for ticket management and customer support operations.",
    "icon": "freshdesk",
    "tags": ["customer-support", "ticketing", "api"]
  },
  "service": {
    "baseURL": {
      "value": "https://{{domain}}.freshdesk.com/api/v2"
    },
    "protocol": "https",
    "contentType": "application/json",
    "headers": {
      "Content-Type": {
        "value": "application/json"
      }
    },
    "auth": {
      "method": "basic",
      "params": {
        "basic": {
          "username": {
            "value": "{{apiKey}}"
          },
          "password": {
            "value": "X"
          }
        }
      }
    }
  }
}

```

### Code (Apache v2.0): List of External Resources and Internal Mapping

```
[
  {
    "handle": "tickets",
    "meta": {
      "short": "Tickets",
      "description": "Manage support tickets in Freshdesk"
    },
    "endpoint": {
      "value": "/api/v2/tickets"
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {
          "description": "Unique identifier for the ticket"
        }
      },
      {
        "name": "subject",
        "type": "String",
        "selector": [
          "subject"
        ],
        "meta": {
          "description": "Subject of the ticket"
        }
      },
      {
        "name": "description",
        "type": "String",
        "selector": [
          "description"
        ],
        "meta": {
          "description": "Detailed description of the ticket"
        }
      },
      {
        "name": "status",
        "type": "Integer",
        "selector": [
          "status"
        ],
        "meta": {
          "description": "Status of the ticket (e.g., 2 for Open, 3 for Pending, 4 for Resolved, 5 for Closed)"
        }
      },
      {
        "name": "priority",
        "type": "Integer",
        "selector": [
          "priority"
        ],
        "meta": {
          "description": "Priority of the ticket (e.g., 1 for Low, 2 for Medium, 3 for High, 4 for Urgent)"
        }
      },
      {
        "name": "requester_id",
        "type": "Integer",
        "selector": [
          "requester_id"
        ],
        "meta": {
          "description": "User ID of the requester"
        }
      },
      {
        "name": "email",
        "type": "String",
        "selector": [
          "email"
        ],
        "meta": {
          "description": "Email address of the requester"
        }
      },
      {
        "name": "created_at",
        "type": "String",
        "selector": [
          "created_at"
        ],
        "meta": {
          "description": "Ticket creation timestamp"
        }
      },
      {
        "name": "updated_at",
        "type": "String",
        "selector": [
          "updated_at"
        ],
        "meta": {
          "description": "Ticket update timestamp"
        }
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": ""
        },
        "headers": {
          "Content-Type": "application/json"
        },
        "queryParams": {
          "per_page": "100"
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}"
        },
        "placeholders": [
          {
            "name": "id",
            "type": "Integer",
            "description": "Ticket ID",
            "required": true
          }
        ]
      },
      "create": {
        "method": "POST",
        "path": {
          "value": ""
        },
        "headers": {
          "Content-Type": "application/json"
        },
        "bodyTemplate": {
          "value": "{\"subject\": \"{{subject}}\", \"description\": \"{{description}}\", \"email\": \"{{email}}\", \"status\": {{status}}, \"priority\": {{priority}}}",
          "placeholders": [
            {
              "name": "subject",
              "type": "String",
              "description": "Subject of the ticket",
              "required": true
            },
            {
              "name": "description",
              "type": "String",
              "description": "Detailed description of the ticket",
              "required": true
            },
            {
              "name": "email",
              "type": "String",
              "description": "Email of the requester",
              "required": true
            },
            {
              "name": "status",
              "type": "Integer",
              "description": "Status of the ticket",
              "required": false,
              "default": "2"
            },
            {
              "name": "priority",
              "type": "Integer",
              "description": "Priority of the ticket",
              "required": false,
              "default": "2"
            }
          ]
        }
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}"
        },
        "headers": {
          "Content-Type": "application/json"
        },
        "bodyTemplate": {
          "value": "{\"subject\": \"{{subject}}\", \"description\": \"{{description}}\", \"status\": {{status}}, \"priority\": {{priority}}}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "Ticket ID",
              "required": true
            },
            {
              "name": "subject",
              "type": "String",
              "description": "Subject of the ticket",
              "required": false
            },
            {
              "name": "description",
              "type": "String",
              "description": "Detailed description of the ticket",
              "required": false
            },
            {
              "name": "status",
              "type": "Integer",
              "description": "Status of the ticket",
              "required": false
            },
            {
              "name": "priority",
              "type": "Integer",
              "description": "Priority of the ticket",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}"
        },
        "placeholders": [
          {
            "name": "id",
            "type": "Integer",
            "description": "Ticket ID",
            "required": true
          }
        ]
      }
    },
    "webhooks": [
      {
        "event": "created",
        "path": "/webhooks/freshdesk/tickets/created",
        "payload": [
          {
            "name": "id",
            "type": "Integer",
            "selector": [
              "ticket",
              "id"
            ],
            "meta": {
              "description": "Unique identifier for the ticket"
            }
          },
          {
            "name": "subject",
            "type": "String",
            "selector": [
              "ticket",
              "subject"
            ],
            "meta": {
              "description": "Subject"
            }
          }
        ]
      },
      {
        "event": "updated",
        "path": "/webhooks/freshdesk/tickets/updated",
        "payload": [
          {
            "name": "id",
            "type": "Integer",
            "selector": [
              "ticket",
              "id"
            ],
            "meta": {
              "description": "Unique identifier for the ticket"
            }
          },
          {
            "name": "subject",
            "type": "String",
            "selector": [
              "ticket",
              "subject"
            ],
            "meta": {
              "description": "Subject"
            }
          }
        ]
      }
    ]
  },
  {
    "handle": "contacts",
    "meta": {
      "short": "Contacts",
      "description": "Manage contacts in Freshdesk"
    },
    "endpoint": {
      "value": "/api/v2/contacts"
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {
          "description": "Unique identifier for the contact"
        }
      },
      {
        "name": "name",
        "type": "String",
        "selector": [
          "name"
        ],
        "meta": {
          "description": "Name of the contact"
        }
      },
      {
        "name": "email",
        "type": "String",
        "selector": [
          "email"
        ],
        "meta": {
          "description": "Email address of the contact"
        }
      },
      {
        "name": "phone",
        "type": "String",
        "selector": [
          "phone"
        ],
        "meta": {
          "description": "Phone number of the contact"
        }
      },
      {
        "name": "company_id",
        "type": "Integer",
        "selector": [
          "company_id"
        ],
        "meta": {
          "description": "Company ID of the contact"
        }
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": ""
        },
        "headers": {
          "Content-Type": "application/json"
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}"
        },
        "placeholders": [
          {
            "name": "id",
            "type": "Integer",
            "description": "Contact ID",
            "required": true
          }
        ]
      },
      "create": {
        "method": "POST",
        "path": {
          "value": ""
        },
        "headers": {
          "Content-Type": "application/json"
        },
        "bodyTemplate": {
          "value": "{\"name\": \"{{name}}\", \"email\": \"{{email}}\", \"phone\": \"{{phone}}\", \"company_id\": {{company_id}}}",
          "placeholders": [
            {
              "name": "name",
              "type": "String",
              "description": "Name of the contact",
              "required": true
            },
            {
              "name": "email",
              "type": "String",
              "description": "Email address of the contact",
              "required": false
            },
            {
              "name": "phone",
              "type": "String",
              "description": "Phone number of the contact",
              "required": false
            },
            {
              "name": "company_id",
              "type": "Integer",
              "description": "Company ID",
              "required": false
            }
          ]
        }
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}"
        },
        "headers": {
          "Content-Type": "application/json"
        },
        "bodyTemplate": {
          "value": "{\"name\": \"{{name}}\", \"email\": \"{{email}}\", \"phone\": \"{{phone}}\", \"company_id\": {{company_id}}}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "Contact ID",
              "required": true
            },
            {
              "name": "name",
              "type": "String",
              "description": "Name of the contact",
              "required": false
            },
            {
              "name": "email",
              "type": "String",
              "description": "Email address of the contact",
              "required": false
            },
            {
              "name": "phone",
              "type": "String",
              "description": "Phone number of the contact",
              "required": false
            },
            {
              "name": "company_id",
              "type": "Integer",
              "description": "Company ID",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}"
        },
        "placeholders": [
          {
            "name": "id",
            "type": "Integer",
            "description": "Contact ID",
            "required": true
          }
        ]
      }
    },
    "webhooks": [
      {
        "event": "created",
        "path": "/webhooks/freshdesk/contacts/created",
        "payload": [
          {
            "name": "id",
            "type": "Integer",
            "selector": [
              "contact",
              "id"
            ],
            "meta": {
              "description": "ID"
            }
          },
          {
            "name": "name",
            "type": "String",
            "selector": [
              "contact",
              "name"
            ],
            "meta": {
              "description": "Name"
            }
          }
        ]
      },
      {
        "event": "updated",
        "path": "/webhooks/freshdesk/contacts/updated",
        "payload": [
          {
            "name": "id",
            "type": "Integer",
            "selector": [
              "contact",
              "id"
            ],
            "meta": {
              "description": "ID"
            }
          },
          {
            "name": "name",
            "type": "String",
            "selector": [
              "contact",
              "name"
            ],
            "meta": {
              "description": "Name"
            }
          }
        ]
      }
    ]
  },
  {
    "handle": "companies",
    "meta": {
      "short": "Companies",
      "description": "Manage companies in Freshdesk"
    },
    "endpoint": {
      "value": "/api/v2/companies"
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {
          "description": "Unique identifier for the company"
        }
      },
      {
        "name": "name",
        "type": "String",
        "selector": [
          "name"
        ],
        "meta": {
          "description": "Name of the company"
        }
      },
      {
        "name": "description",
        "type": "String",
        "selector": [
          "description"
        ],
        "meta": {
          "description": "Description of the company"
        }
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": ""
        },
        "headers": {
          "Content-Type": "application/json"
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}"
        },
        "placeholders": [
          {
            "name": "id",
            "type": "Integer",
            "description": "Company ID",
            "required": true
          }
        ]
      },
      "create": {
        "method": "POST",
        "path": {
          "value": ""
        },
        "headers": {
          "Content-Type": "application/json"
        },
        "bodyTemplate": {
          "value": "{\"name\": \"{{name}}\", \"description\": \"{{description}}\"}",
          "placeholders": [
            {
              "name": "name",
              "type": "String",
              "description": "Name of the company",
              "required": true
            },
            {
              "name": "description",
              "type": "String",
              "description": "Description of the company",
              "required": false
            }
          ]
        }
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}"
        },
        "headers": {
          "Content-Type": "application/json"
        },
        "bodyTemplate": {
          "value": "{\"name\": \"{{name}}\", \"description\": \"{{description}}\"}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "Company ID",
              "required": true
            },
            {
              "name": "name",
              "type": "String",
              "description": "Name of the company",
              "required": false
            },
            {
              "name": "description",
              "type": "String",
              "description": "Description of the company",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}"
        },
        "placeholders": [
          {
            "name": "id",
            "type": "Integer",
            "description": "Company ID",
            "required": true
          }
        ]
      }
    },
    "webhooks": []
  },
  {
    "handle": "agents",
    "meta": {
      "short": "Agents",
      "description": "Manage agents in Freshdesk"
    },
    "endpoint": {
      "value": "/api/v2/agents"
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {
          "description": "Unique identifier for the agent"
        }
      },
      {
        "name": "contact_id",
        "type": "Integer",
        "selector": [
          "contact",
          "id"
        ],
        "meta": {
          "description": "Contact ID of the agent"
        }
      },
      {
        "name": "first_name",
        "type": "String",
        "selector": [
          "contact",
          "name"
        ],
        "meta": {
          "description": "First name of the agent"
        }
      },
      {
        "name": "email",
        "type": "String",
        "selector": [
          "contact",
          "email"
        ],
        "meta": {
          "description": "Email of the agent"
        }
      },
      {
        "name": "available",
        "type": "Boolean",
        "selector": [
          "available"
        ],
        "meta": {
          "description": "Availability status of the agent"
        }
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": ""
        },
        "headers": {
          "Content-Type": "application/json"
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}"
        },
        "placeholders": [
          {
            "name": "id",
            "type": "Integer",
            "description": "Agent ID",
            "required": true
          }
        ]
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}"
        },
        "headers": {
          "Content-Type": "application/json"
        },
        "bodyTemplate": {
          "value": "{\"available\": {{available}}}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "Agent ID",
              "required": true
            },
            {
              "name": "available",
              "type": "Boolean",
              "description": "Availability status",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}"
        },
        "placeholders": [
          {
            "name": "id",
            "type": "Integer",
            "description": "Agent ID",
            "required": true
          }
        ]
      }
    },
    "webhooks": []
  },
  {
    "handle": "groups",
    "meta": {
      "short": "Groups",
      "description": "Manage groups in Freshdesk"
    },
    "endpoint": {
      "value": "/api/v2/groups"
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {
          "description": "Unique identifier for the group"
        }
      },
      {
        "name": "name",
        "type": "String",
        "selector": [
          "name"
        ],
        "meta": {
          "description": "Name of the group"
        }
      },
      {
        "name": "description",
        "type": "String",
        "selector": [
          "description"
        ],
        "meta": {
          "description": "Description of the group"
        }
      }
    ],
    "operations": {
      "list": {
        "method": "GET",
        "path": {
          "value": ""
        },
        "headers": {
          "Content-Type": "application/json"
        }
      },
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}"
        },
        "placeholders": [
          {
            "name": "id",
            "type": "Integer",
            "description": "Group ID",
            "required": true
          }
        ]
      }
    },
    "webhooks": []
  },
  {
    "handle": "articles",
    "meta": {
      "short": "Articles",
      "description": "Manage knowledge base articles in Freshdesk"
    },
    "endpoint": {
      "value": "/api/v2/solutions/articles"
    },
    "fields": [
      {
        "name": "id",
        "type": "Integer",
        "selector": [
          "id"
        ],
        "meta": {
          "description": "Unique identifier for the article"
        }
      },
      {
        "name": "title",
        "type": "String",
        "selector": [
          "title"
        ],
        "meta": {
          "description": "Title of the article"
        }
      },
      {
        "name": "description",
        "type": "String",
        "selector": [
          "description"
        ],
        "meta": {
          "description": "Content of the article"
        }
      },
      {
        "name": "status",
        "type": "Integer",
        "selector": [
          "status"
        ],
        "meta": {
          "description": "Status of the article (1: Draft, 2: Published)"
        }
      },
      {
        "name": "folder_id",
        "type": "Integer",
        "selector": [
          "folder_id"
        ],
        "meta": {
          "description": "Folder ID of the article"
        }
      }
    ],
    "operations": {
      "read": {
        "method": "GET",
        "path": {
          "value": "/{{id}}"
        },
        "placeholders": [
          {
            "name": "id",
            "type": "Integer",
            "description": "Article ID",
            "required": true
          }
        ]
      },
      "update": {
        "method": "PUT",
        "path": {
          "value": "/{{id}}"
        },
        "headers": {
          "Content-Type": "application/json"
        },
        "bodyTemplate": {
          "value": "{\"title\": \"{{title}}\", \"description\": \"{{description}}\", \"status\": {{status}}}",
          "placeholders": [
            {
              "name": "id",
              "type": "Integer",
              "description": "Article ID",
              "required": true
            },
            {
              "name": "title",
              "type": "String",
              "description": "Title",
              "required": false
            },
            {
              "name": "description",
              "type": "String",
              "description": "Content",
              "required": false
            },
            {
              "name": "status",
              "type": "Integer",
              "description": "Status",
              "required": false
            }
          ]
        }
      },
      "delete": {
        "method": "DELETE",
        "path": {
          "value": "/{{id}}"
        },
        "placeholders": [
          {
            "name": "id",
            "type": "Integer",
            "description": "Article ID",
            "required": true
          }
        ]
      }
    },
    "webhooks": []
  }
]

```

<p align="center"><a class="button primary" data-icon="square-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.planetcrust.com/human-connections/freshdesk/freshdesk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
