Authentication
Every request needs an API key in the Authorization header. Owners create keys in the dashboard under API keys. An owner can have up to 10 active keys.
A key is shown once, when it is created, and cannot be recovered later. If you lose a key, revoke it and create a new one. A revoked key stops working on its next request. The owner gets an email whenever a new key is created.
Each key has an access level, chosen when it is created. A read-only key can use the GET endpoints; any other request with it gets 403 with the code api_key_read_only. A read and write key can use every endpoint on this page.
Each key also has a term of 30, 90, 180 or 365 days, chosen when it is created. An expired key stops working and gets 401 with the code invalid_api_key, so create a new one before the term ends. The term and access level of a key can't be changed later.
Changing or resetting the password does not revoke API keys, so your integration keeps working. If your account was hacked, revoke your keys and create new ones.
A key acts on behalf of the owner and covers all of the owner's projects. Actions made with a key appear in the activity log as the owner's. Employees cannot create keys.
Call the API from your server only. Browsers are blocked from calling it from other sites, and a key placed in browser code would be visible to your visitors.
curl "https://api.hth.chat/api/v1/tickets" \
-H "Authorization: Bearer hth_your_api_key"
Endpoints
Open a ticket
POST /tickets
Opens a ticket on behalf of a customer, for example from a contact form on your site. Unlike the public form, this needs no confirmation: the ticket opens at once, and the customer gets no email about it, then or later. Your site or app checks the address and notifies the customer itself. You and your employees are notified as usual. The message counts as written by the customer. Send the request as multipart/form-data or application/x-www-form-urlencoded, not JSON. The project must be active. The response contains the ticket key, which is what lets the customer open the ticket page at https://hth.chat/{project_id}/{id}?key={key}. Treat it as a secret: anyone with this link can read the ticket and reply as the customer.
| Parameter | In | Type | Required | Description |
|---|
| project_id | form | UUID | Yes | One of your projects. See List projects and employees. |
| subject | form | string | Yes | Plain text, up to 255 characters. |
| body | form | string | Yes | Plain text, up to 10000 characters. |
| email | form | string | Yes | The customer's email address. |
Example request
curl -X POST "https://api.hth.chat/api/v1/tickets" \
-H "Authorization: Bearer $HTH_API_KEY" \
-F "project_id=018f6a2e-7c10-7000-8000-0000000000a1" \
-F "subject=Cannot sign in" \
-F "body=The login page shows an error." \
-F "[email protected]"
Example response
{
"success": true,
"data": {
"ticket": {
"id": "018f6a2f-1b20-7000-8000-0000000000b2",
"project_id": "018f6a2e-7c10-7000-8000-0000000000a1",
"key": "k7Qm2xV9pLr4TzN8sW1cYhB6dF3gJ0aE"
}
}
}
List tickets
GET /tickets
Returns tickets from all your projects, newest first, one status at a time.
| Parameter | In | Type | Required | Description |
|---|
| status | query | string | No | open, closed or archived. Default: open. |
| project_id | query | UUID | No | Only tickets of this project. |
| employee_id | query | UUID | No | Only tickets taken by this person. |
| page | query | integer | No | Page number. Default: 1. |
| per_page | query | integer | No | Tickets per page. Default: 25, maximum: 100. |
Example request
curl "https://api.hth.chat/api/v1/tickets?status=open&per_page=25" \
-H "Authorization: Bearer $HTH_API_KEY"
Example response
{
"success": true,
"data": {
"tickets": [
{
"id": "018f6a2f-1b20-7000-8000-0000000000b2",
"project_id": "018f6a2e-7c10-7000-8000-0000000000a1",
"project_name": "Acme Support",
"project_active": true,
"subject": "Cannot sign in",
"requester_email": "[email protected]",
"status": "open",
"created_at": "2026-11-03T09:15:00.000Z",
"closed_at": null,
"archived_at": null,
"rating": null,
"claimed_by_email": null
}
],
"total": 1,
"page": 1,
"per_page": 25
}
}
List projects and employees
GET /tickets/filters
Returns your projects and the people who work or have worked on their tickets. Use these IDs for project_id and employee_id when listing tickets.
Example request
curl "https://api.hth.chat/api/v1/tickets/filters" \
-H "Authorization: Bearer $HTH_API_KEY"
Example response
{
"success": true,
"data": {
"projects": [
{
"id": "018f6a2e-7c10-7000-8000-0000000000a1",
"label": "Acme Support"
}
],
"employees": [
{
"id": "018f6a2d-0a00-7000-8000-0000000000f7",
"label": "[email protected]"
}
]
}
}
Get a ticket with its conversation
GET /tickets/{id}
Returns the ticket, all its messages from oldest to newest, and internal comments. The messages array is the full conversation history, including every reply. Internal comments are never shown to the customer.
| Parameter | In | Type | Required | Description |
|---|
| id | path | UUID | Yes | Ticket ID. |
Example request
curl "https://api.hth.chat/api/v1/tickets/018f6a2f-1b20-7000-8000-0000000000b2" \
-H "Authorization: Bearer $HTH_API_KEY"
Example response
{
"success": true,
"data": {
"ticket": {
"id": "018f6a2f-1b20-7000-8000-0000000000b2",
"project_id": "018f6a2e-7c10-7000-8000-0000000000a1",
"subject": "Cannot sign in",
"requester_email": "[email protected]",
"status": "open",
"created_at": "2026-11-03T09:15:00.000Z",
"closed_at": null,
"closed_by": "",
"archived_at": null,
"rating": null
},
"project_name": "Acme Support",
"project_active": true,
"claimed_by_email": "[email protected]",
"closed_by_email": null,
"messages": [
{
"id": "018f6a2f-1b21-7000-8000-0000000000c3",
"author": "client",
"type": "initial",
"body": "The login page shows an error.",
"created_at": "2026-11-03T09:15:00.000Z",
"author_type": "client",
"author_email": null
},
{
"id": "018f6a31-4d30-7000-8000-0000000000c4",
"author": "owner",
"type": "reply",
"body": "Please try resetting your password.",
"created_at": "2026-11-03T09:40:00.000Z",
"author_type": "owner",
"author_email": "[email protected]"
}
],
"comments": [],
"can_write": true,
"can_reopen": false,
"can_delete": true
}
}
Send a reply
POST /tickets/{id}/messages
Sends a reply to the customer and returns the updated ticket. The customer gets an email only if the ticket was created on the public page, not through the API. The first person to reply takes the ticket. Send the request as multipart/form-data or application/x-www-form-urlencoded, not JSON. The ticket must be open.
| Parameter | In | Type | Required | Description |
|---|
| id | path | UUID | Yes | Ticket ID. |
| body | form | string | Yes | Plain text, up to 10000 characters. |
Example request
curl -X POST "https://api.hth.chat/api/v1/tickets/018f6a2f-1b20-7000-8000-0000000000b2/messages" \
-H "Authorization: Bearer $HTH_API_KEY" \
-F "body=Please try resetting your password."
Example response
{
"success": true,
"data": {
"ticket": {
"id": "018f6a2f-1b20-7000-8000-0000000000b2",
"project_id": "018f6a2e-7c10-7000-8000-0000000000a1",
"subject": "Cannot sign in",
"requester_email": "[email protected]",
"status": "open",
"created_at": "2026-11-03T09:15:00.000Z",
"closed_at": null,
"closed_by": "",
"archived_at": null,
"rating": null
},
"project_name": "Acme Support",
"project_active": true,
"claimed_by_email": "[email protected]",
"closed_by_email": null,
"messages": [
{
"id": "018f6a2f-1b21-7000-8000-0000000000c3",
"author": "client",
"type": "initial",
"body": "The login page shows an error.",
"created_at": "2026-11-03T09:15:00.000Z",
"author_type": "client",
"author_email": null
},
{
"id": "018f6a31-4d30-7000-8000-0000000000c4",
"author": "owner",
"type": "reply",
"body": "Please try resetting your password.",
"created_at": "2026-11-03T09:40:00.000Z",
"author_type": "owner",
"author_email": "[email protected]"
}
],
"comments": [],
"can_write": true,
"can_reopen": false,
"can_delete": true
}
}
Close a ticket
POST /tickets/{id}/close
Closes an open ticket and returns the updated ticket. The customer gets an email only if the ticket was created on the public page, not through the API. A closed ticket is archived 24 hours later. There is no request body.
| Parameter | In | Type | Required | Description |
|---|
| id | path | UUID | Yes | Ticket ID. |
Example request
curl -X POST "https://api.hth.chat/api/v1/tickets/018f6a2f-1b20-7000-8000-0000000000b2/close" \
-H "Authorization: Bearer $HTH_API_KEY"
Example response
{
"success": true,
"data": {
"ticket": {
"id": "018f6a2f-1b20-7000-8000-0000000000b2",
"project_id": "018f6a2e-7c10-7000-8000-0000000000a1",
"subject": "Cannot sign in",
"requester_email": "[email protected]",
"status": "closed",
"created_at": "2026-11-03T09:15:00.000Z",
"closed_at": "2026-11-03T10:00:00.000Z",
"closed_by": "support",
"archived_at": null,
"rating": null
},
"project_name": "Acme Support",
"project_active": true,
"claimed_by_email": "[email protected]",
"closed_by_email": "[email protected]",
"messages": [
{
"id": "018f6a2f-1b21-7000-8000-0000000000c3",
"author": "client",
"type": "initial",
"body": "The login page shows an error.",
"created_at": "2026-11-03T09:15:00.000Z",
"author_type": "client",
"author_email": null
},
{
"id": "018f6a31-4d30-7000-8000-0000000000c4",
"author": "owner",
"type": "reply",
"body": "Please try resetting your password.",
"created_at": "2026-11-03T09:40:00.000Z",
"author_type": "owner",
"author_email": "[email protected]"
}
],
"comments": [],
"can_write": true,
"can_reopen": true,
"can_delete": true
}
}
Reopen a ticket
POST /tickets/{id}/reopen
Reopens a closed ticket and returns the updated ticket. An archived ticket can't be reopened. There is no request body. Customers of tickets created through the API have no reopen link, so this endpoint is how such a ticket gets reopened.
| Parameter | In | Type | Required | Description |
|---|
| id | path | UUID | Yes | Ticket ID. |
Example request
curl -X POST "https://api.hth.chat/api/v1/tickets/018f6a2f-1b20-7000-8000-0000000000b2/reopen" \
-H "Authorization: Bearer $HTH_API_KEY"
Example response
{
"success": true,
"data": {
"ticket": {
"id": "018f6a2f-1b20-7000-8000-0000000000b2",
"project_id": "018f6a2e-7c10-7000-8000-0000000000a1",
"subject": "Cannot sign in",
"requester_email": "[email protected]",
"status": "open",
"created_at": "2026-11-03T09:15:00.000Z",
"closed_at": null,
"closed_by": "",
"archived_at": null,
"rating": null
},
"project_name": "Acme Support",
"project_active": true,
"claimed_by_email": "[email protected]",
"closed_by_email": null,
"messages": [
{
"id": "018f6a2f-1b21-7000-8000-0000000000c3",
"author": "client",
"type": "initial",
"body": "The login page shows an error.",
"created_at": "2026-11-03T09:15:00.000Z",
"author_type": "client",
"author_email": null
},
{
"id": "018f6a31-4d30-7000-8000-0000000000c4",
"author": "owner",
"type": "reply",
"body": "Please try resetting your password.",
"created_at": "2026-11-03T09:40:00.000Z",
"author_type": "owner",
"author_email": "[email protected]"
}
],
"comments": [],
"can_write": true,
"can_reopen": false,
"can_delete": true
}
}
Frequently asked questions
Does hth.chat have an API?
Yes. hth.chat has a REST API for opening and listing tickets, reading conversations, sending replies and closing tickets. It authenticates with an API key.
Which plans include the API?
All of them, including the Free plan.
Can I create tickets through the API?
Yes. POST /tickets opens a ticket in one of your projects on behalf of a customer. It needs no confirmation of the customer's email address, and hth.chat sends that customer no email: your site or app checks the address and notifies them.
Do customers get emails about tickets opened through the API?
No. Email notifications to customers work only for tickets created by hand on a project's public page. You and your employees still get your notifications.
Can an API key be limited or expire?
Yes. A key has either read-only or read and write access, and a term of 30, 90, 180 or 365 days, both chosen when it is created.
Can I delete tickets?
No. A ticket can't be deleted, through the API or in the dashboard. Deleting a project removes its tickets.
Does changing my password revoke my API keys?
No. Your API keys keep working after a password change or reset. If your account was hacked, revoke them and create new ones.
Can I withdraw money through the API?
No. Withdrawal requests can only be made in the dashboard.
Can I call the API from a browser?
No. Call it from your server, so that your API key stays secret.