Project
The project is what your key is scoped to. This resource reads it and edits its settings: its identity, the company and address used on invoices, and the colours its icon is drawn with. There is no endpoint to create or delete a project through the API.
Endpoints
| Method | Path | Scope |
|---|---|---|
| GET | /v1/project | project:read |
| GET | /v1/project/<project_id> | project:read |
| PATCH | /v1/project | project:write |
<project_id> must be your own project, prefixed proj_. Naming any other project gives 403 and The API key doesn't have permissions to perform the request., so the path form is only useful to assert which project you expected.
The project object
| Field | Type | Description |
|---|---|---|
id | string | The project identifier, prefixed proj_. |
object | string | Always project. |
name | string | The project's name. |
description | string | What the project is for. |
country | string | The project's country code. |
default_locale | string | The default language, as a three-letter ISO 639-3 code. |
creator_id | string | The consumer who created the project. |
owner_id | string | The consumer who owns it. |
is_verified | boolean | Whether the project has been verified. |
cdn | object | The project's file delivery scope, as public_id and public_key. |
company | object | Company details. See below. |
address | object | Postal address. See below. |
appearance | object | Icon colours, as icon_bg_color and icon_text_color. |
team_total | integer | How many members the project has. |
status | string | The project's status. |
verified_at | integer | When it was verified, or null. |
suspended_at | integer | When it was suspended, or null. |
suspended_reason | string | Why it was suspended, or an empty string. |
deleted_at | integer | When it was deleted, or null. |
created_at | integer | Creation time, in Unix seconds. |
updated_at | integer | Last change, in Unix seconds. |
company holds name, number, legal_form, vat_number and country. address holds line_1, line_2, postal_code, city, state and country.
Read the project
curl https://api.thinkhx.com/v1/project \
-H "Authorization: Bearer sk-project-YOUR_KEY" {
"code": 200,
"title": "OK",
"response": {
"id": "proj_3f6c1d90ab77e2415c08",
"object": "project",
"name": "Acme",
"description": "Acme's reasoning workspace",
"country": "us",
"default_locale": "eng",
"creator_id": "cons_8e2b45a10c9df7631b4a",
"owner_id": "cons_8e2b45a10c9df7631b4a",
"is_verified": true,
"cdn": {
"public_id": "cdnu_6b2e91f47a05c3d8e142",
"public_key": "cdnk_a37f0b81de692c45f70d"
},
"company": {
"name": "Acme Inc.",
"number": "552100554",
"legal_form": "Inc.",
"vat_number": "US552100554",
"country": "us"
},
"address": {
"line_1": "18 Market Street",
"line_2": "",
"postal_code": "94105",
"city": "San Francisco",
"state": "CA",
"country": "us"
},
"appearance": {
"icon_bg_color": "#4f46e5",
"icon_text_color": "#ffffff"
},
"team_total": 4,
"status": "activated",
"verified_at": 1751414400,
"suspended_at": null,
"suspended_reason": "",
"deleted_at": null,
"created_at": 1751328000,
"updated_at": 1754205600
}
} Update the project
PATCH /v1/project accepts three root fields and three nested objects. Send only what you want to change.
| Parameter | Type | Description |
|---|---|---|
name | string | A new name. |
description | string | A new description. |
default_locale | string | A three-letter ISO 639-3 language code, lowercase. |
company | object | Any of name, number, legal_form, vat_number, country. |
address | object | Any of line_1, line_2, postal_code, city, state, country. |
appearance | object | Either or both of icon_bg_color, icon_text_color. |
curl -X PATCH https://api.thinkhx.com/v1/project \
-H "Authorization: Bearer sk-project-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Acme support automation",
"address": { "line_1": "20 Market Street", "postal_code": "94105" }
}' The response is the complete project object, read back after the change, exactly as the GET returns it. Check the fields you sent rather than assuming.
| Code | Message | Cause |
|---|---|---|
| 400 | No updatable field provided. | The body held none of the fields above. |
| 422 | default_locale must be a three-letter ISO-639-3 code. | The code was not three lowercase letters. |
| 422 | <name> must be an object. | company, address or appearance was sent as something other than an object. |
Important — A nested object sent as a string or an array is rejected rather than ignored, so a malformed payload can never look like a successful update. Send
{"company": {"name": "Acme Inc."}}, never{"company": "Acme Inc."}.
Every update is recorded in the project's event log, naming which sections changed. See Events.