hth.chat API documentation

The hth.chat API lets a project owner work with support tickets from their own site or tools, without the hth.chat dashboard. It is available on every plan, including Free.

With the API you can open tickets for your customers, list tickets, read a ticket with its full conversation, send replies, add internal comments, and close or reopen tickets.

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"

Base URL and response format

The base URL is https://api.hth.chat/api/v1. All requests use HTTPS. Dates are in UTC, in ISO 8601 format. IDs are UUIDs.

Every JSON response has the same envelope: "success" is true with the result in "data", or false with the reason in "error".

{
  "success": true,
  "data": {
    "tickets": [],
    "total": 0,
    "page": 1,
    "per_page": 25
  }
}

Rate limits

When a limit is exceeded, the API responds with HTTP 429 and the code rate_limited. Limits reset within a minute, so wait and retry.

  • 120 requests per minute for each API key.
  • 30 write requests per minute for each API key, included in the 120.
  • 60 replies, closings and reopenings per minute for one account, across all keys and the dashboard.
  • 300 requests per minute from one IP address, across all keys.

Email notifications

A ticket opened through the API sends no email to the customer whose address is on it, and it needs no confirmation of that address. This holds for the ticket's whole life: opening, replies, closing and reopening, including actions taken in the dashboard. Your own site or app checks the customer's email address and tells them about the ticket and its replies.

Email notifications to customers work only for tickets created by hand on a project's public page.

You and your employees are still notified about tickets opened through the API in the usual way: when a ticket opens, and when the customer replies, closes it or reopens it from the ticket page.

What the API can't do

API keys work only with the ticket endpoints on this page. The following are available only in the dashboard:

  • Requesting a withdrawal or viewing a balance.
  • Subscriptions and payments.
  • Managing projects, employees, API keys and account settings.
  • Analytics and the activity log.

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.

ParameterInTypeRequiredDescription
project_idformUUIDYesOne of your projects. See List projects and employees.
subjectformstringYesPlain text, up to 255 characters.
bodyformstringYesPlain text, up to 10000 characters.
emailformstringYesThe 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.

ParameterInTypeRequiredDescription
statusquerystringNoopen, closed or archived. Default: open.
project_idqueryUUIDNoOnly tickets of this project.
employee_idqueryUUIDNoOnly tickets taken by this person.
pagequeryintegerNoPage number. Default: 1.
per_pagequeryintegerNoTickets 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.

ParameterInTypeRequiredDescription
idpathUUIDYesTicket 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.

ParameterInTypeRequiredDescription
idpathUUIDYesTicket ID.
bodyformstringYesPlain 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
  }
}

Add an internal comment

POST /tickets/{id}/comments

Adds a note visible only to you and your employees, and returns the updated ticket. Send JSON.

ParameterInTypeRequiredDescription
idpathUUIDYesTicket ID.
bodyJSONstringYesPlain text, up to 10000 characters.

Example request

curl -X POST "https://api.hth.chat/api/v1/tickets/018f6a2f-1b20-7000-8000-0000000000b2/comments" \
  -H "Authorization: Bearer $HTH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body": "Customer is on the Business plan."}'

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": [
      {
        "id": "018f6a32-0e40-7000-8000-0000000000e6",
        "body": "Customer is on the Business plan.",
        "author_email": "[email protected]",
        "created_at": "2026-11-03T09:45:00.000Z"
      }
    ],
    "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.

ParameterInTypeRequiredDescription
idpathUUIDYesTicket 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.

ParameterInTypeRequiredDescription
idpathUUIDYesTicket 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
  }
}

Errors

A failed request returns an HTTP error status and a stable code you can rely on. The message is meant for people and may change. A ticket that doesn't exist or belongs to another owner returns the same 404.

{
  "success": false,
  "error": {
    "code": "invalid_api_key",
    "message": "The API key is missing, invalid or revoked."
  }
}
HTTP statusCodeMeaning
400invalid_inputThe request could not be read.
400invalid_ticket_subjectThe subject is empty or longer than 255 characters.
400invalid_ticket_emailThe customer's email address is not valid.
400invalid_ticket_messageThe message is empty or longer than 10000 characters.
401invalid_api_keyThe key is malformed, unknown, revoked or expired.
401unauthorizedNo credentials, or this endpoint does not accept API keys.
403api_key_read_onlyThe key has read-only access and this request changes something.
403project_inactiveThe project is deactivated, so its tickets are read-only.
404not_foundThe ticket or project was not found.
409ticket_not_openThe action needs an open ticket.
409ticket_not_closedOnly a closed ticket can be reopened.
409ticket_archivedAn archived ticket can't be reopened.
413request_too_largeThe request is larger than 128 KB.
415attachments_not_supportedThe request contains a file. Tickets hold text only.
429rate_limitedA rate limit was exceeded.
500internal_errorSomething went wrong on our side. Try again later.

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.