THINKHX

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

MethodPathScope
GET/v1/projectproject:read
GET/v1/project/<project_id>project:read
PATCH/v1/projectproject: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

FieldTypeDescription
idstringThe project identifier, prefixed proj_.
objectstringAlways project.
namestringThe project's name.
descriptionstringWhat the project is for.
countrystringThe project's country code.
default_localestringThe default language, as a three-letter ISO 639-3 code.
creator_idstringThe consumer who created the project.
owner_idstringThe consumer who owns it.
is_verifiedbooleanWhether the project has been verified.
cdnobjectThe project's file delivery scope, as public_id and public_key.
companyobjectCompany details. See below.
addressobjectPostal address. See below.
appearanceobjectIcon colours, as icon_bg_color and icon_text_color.
team_totalintegerHow many members the project has.
statusstringThe project's status.
verified_atintegerWhen it was verified, or null.
suspended_atintegerWhen it was suspended, or null.
suspended_reasonstringWhy it was suspended, or an empty string.
deleted_atintegerWhen it was deleted, or null.
created_atintegerCreation time, in Unix seconds.
updated_atintegerLast 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
curl https://api.thinkhx.com/v1/project \
  -H "Authorization: Bearer sk-project-YOUR_KEY"
json
{
  "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.

ParameterTypeDescription
namestringA new name.
descriptionstringA new description.
default_localestringA three-letter ISO 639-3 language code, lowercase.
companyobjectAny of name, number, legal_form, vat_number, country.
addressobjectAny of line_1, line_2, postal_code, city, state, country.
appearanceobjectEither or both of icon_bg_color, icon_text_color.
curl
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.

CodeMessageCause
400No updatable field provided.The body held none of the fields above.
422default_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.

Need help? Contact Support.