Skip to content

API reference

API: Clients

Markdown version

MethodPathWhat it doesScope
GET/v1/work/clientsYour clientsprojects:read
POST/v1/work/clientsAdd a clientprojects:write
DELETE/v1/work/clients/:idRemove a client added by mistake. One with projects is archived insteadprojects:write
GET/v1/work/clients/:idOne client, with who to write toprojects:read
PATCH/v1/work/clients/:idCorrect a client, archive it or bring it back. Its projects and time stayprojects:write
POST/v1/work/clients/:id/contactsAdd someone to write to at a clientprojects:write
DELETE/v1/work/clients/:id/contacts/:contact_idRemove a client's contactprojects:write
PATCH/v1/work/clients/:id/contacts/:contact_idCorrect a client's contactprojects:write
PUT/v1/work/clients/:id/linkMake a page for a client with their invoices and payments, or turn it off. A new link stops the old oneinvoices:write
PUT/v1/work/clients/:id/ratesSet what an hour costs this client: for everyone, or for a person or a task. A project's own rate comes first. Billed time never changesprojects:write

Examples

GET /v1/work/clients

Your clients

curl -s "https://api.hourfinch.com/v1/work/clients" \
  -H "Authorization: Bearer $TK_API_KEY"
const res = await fetch(`https://api.hourfinch.com/v1/work/clients`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}` },
});
const data = await res.json();

POST /v1/work/clients

Add a client

curl -s -X POST "https://api.hourfinch.com/v1/work/clients" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/clients`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

DELETE /v1/work/clients/$ID

Remove a client added by mistake. One with projects is archived instead

curl -s -X DELETE "https://api.hourfinch.com/v1/work/clients/$ID" \
  -H "Authorization: Bearer $TK_API_KEY"
const res = await fetch(`https://api.hourfinch.com/v1/work/clients/${id}`, {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}` },
});
const data = await res.json();

GET /v1/work/clients/$ID

One client, with who to write to

curl -s "https://api.hourfinch.com/v1/work/clients/$ID" \
  -H "Authorization: Bearer $TK_API_KEY"
const res = await fetch(`https://api.hourfinch.com/v1/work/clients/${id}`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}` },
});
const data = await res.json();

PATCH /v1/work/clients/$ID

Correct a client, archive it or bring it back. Its projects and time stay

curl -s -X PATCH "https://api.hourfinch.com/v1/work/clients/$ID" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/clients/${id}`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/work/clients/$ID/contacts

Add someone to write to at a client

curl -s -X POST "https://api.hourfinch.com/v1/work/clients/$ID/contacts" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/clients/${id}/contacts`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

DELETE /v1/work/clients/$ID/contacts/$CONTACT_ID

Remove a client's contact

curl -s -X DELETE "https://api.hourfinch.com/v1/work/clients/$ID/contacts/$CONTACT_ID" \
  -H "Authorization: Bearer $TK_API_KEY"
const res = await fetch(`https://api.hourfinch.com/v1/work/clients/${id}/contacts/${contact_id}`, {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}` },
});
const data = await res.json();

PATCH /v1/work/clients/$ID/contacts/$CONTACT_ID

Correct a client's contact

curl -s -X PATCH "https://api.hourfinch.com/v1/work/clients/$ID/contacts/$CONTACT_ID" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/clients/${id}/contacts/${contact_id}`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

Make a page for a client with their invoices and payments, or turn it off. A new link stops the old one

curl -s -X PUT "https://api.hourfinch.com/v1/work/clients/$ID/link" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/clients/${id}/link`, {
  method: "PUT",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

PUT /v1/work/clients/$ID/rates

Set what an hour costs this client: for everyone, or for a person or a task. A project's own rate comes first. Billed time never changes

curl -s -X PUT "https://api.hourfinch.com/v1/work/clients/$ID/rates" \
  -H "Authorization: Bearer $TK_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.hourfinch.com/v1/work/clients/${id}/rates`, {
  method: "PUT",
  headers: { authorization: `Bearer ${process.env.TK_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

Request and response schemas: https://www.hourfinch.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.