# Add reply to a ticket

`POST /api/tickets/reply/{id}`



- **Group:** Tickets
- **Since:** v0.0.0
- **Authentication:** `authtoken` header, created under Setup > API > API Management
- **HTML version:** /apiguide/tickets/post-ticket-reply/

## Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authtoken` | String | **required** | Authentication token, generated from admin area |

## Parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | Number | **required** | Ticket unique ID. |
| `message` | String | **required** | Mandatory Reply message. |
| `admin` | Number | optional | Optional Staff ID (if provided, reply is from staff member). |
| `status` | Number | optional | Optional Ticket status after reply (default: 1 for customer, 3 for staff). |
| `cc` | String | optional | Optional CC email addresses. |
| `file` | File | optional | Optional File attachments. |

## Example request

```bash
curl -X POST "https://yoursite.com/api/tickets/reply/123" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "message": "..." }'
```

## Success response

### Success-Response:

```json
HTTP/1.1 200 OK
{
  "status": true,
  "message": "Ticket Reply Added Successful.",
  "reply_id": 123
}
```

## Error responses

### Error-Response:

```json
HTTP/1.1 404 Not Found
{
  "status": false,
  "message": "Ticket Reply Fail."
}
```

---

Perfex CRM REST API by Themesic Interactive. Full reference: /apiguide/
