# FreshDesk Integration via LowCodeAPI

## Overview

FreshDesk is a customer support software platform that provides help desk functionality, ticket management, and customer engagement tools. Build customer support automation, ticket management systems, and integrate support workflows into your applications.

## Base Endpoint

```
https://api.lowcodeapi.com/freshdesk/
```

## Authentication

LowCodeAPI handles authentication automatically. You only need to:

1. **Sign up** at [FreshDesk](https://www.freshworks.com/freshdesk)
2. **Get your subdomain and API Key** from account settings
3. **Connect your account** in LowCodeAPI dashboard
4. **Use your `api_token`** in all requests

The `api_token` is your LowCodeAPI authentication token. LowCodeAPI will automatically:
- Fetch your FreshDesk subdomain and API key from the database
- Apply Basic Authentication to each request

**Auth Type**: API Key (Basic Auth)

**Credential Link**: [https://support.freshdesk.com/en/support/solutions/articles/215517-how-to-find-your-api-key](https://support.freshdesk.com/en/support/solutions/articles/215517-how-to-find-your-api-key)

## API Categories

- **Customer Support** - Customer support and ticket management systems

## Common Endpoints

### Category: Account

#### View Account

**Method**: `GET` | **LowCodeAPI Path**: `/api/v2/account`

**Full URL**:
```
https://api.lowcodeapi.com/freshdesk/api/v2/account?api_token={api_token}
```

**Description**: View your FreshDesk account information

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `api_token` | string | Yes | Your LowCodeAPI authentication token |

**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/freshdesk/api/v2/account?api_token=YOUR_API_TOKEN"
```

**Example Response**:
```json
{
  "data": {
    "id": 1,
    "name": "My Company",
    "domain": "mycompany",
    "product_id": 1,
    "time_zone": "Eastern Time (US & Canada)",
    "created_at": "2014-05-22T12:06:27Z"
  }
}
```

**Official Documentation**: [https://developers.freshdesk.com/api/#view_account](https://developers.freshdesk.com/api/#view_account)

---

### Category: Tickets

#### List All Tickets

**Method**: `GET` | **LowCodeAPI Path**: `/api/v2/tickets`

**Full URL**:
```
https://api.lowcodeapi.com/freshdesk/api/v2/tickets?api_token={api_token}
```

**Description**: List all support tickets in your FreshDesk account

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `api_token` | string | Yes | Your LowCodeAPI authentication token |
| `page` | number | No | Page number for pagination |
| `per_page` | number | No | Number of tickets per page (default: 30) |
| `filter` | string | No | Filter tickets (e.g., new_and_my_open, watching, spam) |
| `status` | number | No | Filter by status ID |

**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/freshdesk/api/v2/tickets?per_page=10&api_token=YOUR_API_TOKEN"
```

**Official Documentation**: [https://developers.freshdesk.com/api/#list_all_tickets](https://developers.freshdesk.com/api/#list_all_tickets)

---

### Category: Skill

#### View a Skill

**Method**: `GET` | **LowCodeAPI Path**: `/api/v2/skills/id`

**Full URL**:
```
https://api.lowcodeapi.com/freshdesk/api/v2/skills/id?id={id}&api_token={api_token}
```

**Description**: View a specific skill (agent capability) in FreshDesk

**Query Parameters**:

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The skill ID to retrieve |
| `api_token` | string | Yes | Your LowCodeAPI authentication token |

**Example Request**:
```bash
curl -X GET "https://api.lowcodeapi.com/freshdesk/api/v2/skills/id?id=123&api_token=YOUR_API_TOKEN"
```

**Official Documentation**: [https://developers.freshdesk.com/api/#view_skill](https://developers.freshdesk.com/api/#view_skill)

---

## Usage Examples

### Example 1: Account Setup and Ticket Overview

This example demonstrates getting account information and viewing tickets:

```bash
# Step 1: View your account details
# No ID required - returns your account information
curl -X GET "https://api.lowcodeapi.com/freshdesk/api/v2/account?api_token=YOUR_API_TOKEN"

# Step 2: List all open tickets
# No ID required - returns paginated list of tickets
curl -X GET "https://api.lowcodeapi.com/freshdesk/api/v2/tickets?filter=new_and_my_open&per_page=20&api_token=YOUR_API_TOKEN"
```

### Example 2: Ticket Management Workflow

This example shows how to work with tickets and skills:

```bash
# Step 1: List tickets by status
# No ID required - filters by status
curl -X GET "https://api.lowcodeapi.com/freshdesk/api/v2/tickets?status=2&per_page=50&api_token=YOUR_API_TOKEN"

# Step 2: View specific skill information
# Replace SKILL_ID with the actual skill ID
curl -X GET "https://api.lowcodeapi.com/freshdesk/api/v2/skills/id?id=SKILL_ID&api_token=YOUR_API_TOKEN"
```

## Complete Endpoint Reference

For a complete list of all endpoints and their parameters, refer to:
- **OpenAPI Definition**: `https://backend.lowcodeapi.com/freshdesk/definition`
- **Official Provider Documentation**: [https://developers.freshdesk.com/api](https://developers.freshdesk.com/api)

## Rate Limits & Best Practices

- FreshDesk has **API rate limits** based on your plan
- **Best practice**: Implement pagination for large ticket lists
- **Best practice**: Cache account and skill data that doesn't change frequently
- **Best practice**: Use filters to reduce data transfer

## Error Handling

Standard HTTP status codes apply:
- **200** - Success
- **400** - Bad request
- **401** - Authentication failed
- **403** - Permission denied
- **404** - Resource not found
- **429** - Rate limit exceeded
- **500** - Server error