API reference

Projects

Create and discover active projects in the calling API key's organization.

Project management is organization-scoped. Creating needs projects:write; listing and retrieval need projects:read. A project API key never selects or creates projects across another organization.

Create a project

POST/v1/projects

Request body

FieldTypeNotes
namerequiredstring
len 1..120
slugstring
len 1..80; pattern: ^[a-z0-9-]+$

201 response

FieldTypeNotes
idrequiredstring
objectrequired"project"
namerequiredstring
slugrequiredstring
default_languagerequired"pt_BR" | "en_US" | "es_ES"
profilerequiredobject
archived_atrequiredstring<ISO-8601> | null
created_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
environmentsrequiredobject[]

Creating a project also creates its sandbox and production environments. TheIdempotency-Key header is optional but supported: repeat the same parsed request with the same key to replay its original 201 response; reuse that key with a changed request to receive 409 idempotency_key_conflict instead.

curl https://api.tyxter.com/v1/projects \
  -H "authorization: Bearer $TYXTER_API_KEY" \
  -H "content-type: application/json" \
  -H "idempotency-key: $IDEMPOTENCY_KEY" \
  -d '{"name":"Acme Clinics","slug":"acme-clinics"}'

List active projects

GET/v1/projects

Query params

FieldTypeNotes
limitrequiredinteger
Maximum number of projects to return. Defaults to 20; maximum 50.
range 1..50
starting_afterstring
Opaque cursor from the previous response next_cursor.

Response

FieldTypeNotes
objectrequired"list"
datarequiredobject[]
has_morerequiredboolean
next_cursorrequiredstring | null

Results include only active projects in your organization, ordered by created_at and id descending. Use the opaque next_cursor value as starting_after for the next page. The default page size is 20 and the maximum is 50; archived projects never appear.

Retrieve a project

GET/v1/projects/{project_id}

Response

FieldTypeNotes
idrequiredstring
objectrequired"project"
namerequiredstring
slugrequiredstring
default_languagerequired"pt_BR" | "en_US" | "es_ES"
profilerequiredobject
archived_atrequiredstring<ISO-8601> | null
created_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
environmentsrequiredobject[]

A missing, archived, or foreign project ID produces the same 404 project_not_found response. This privacy behavior does not reveal whether another organization owns the ID.

JavaScript SDK

const project = await client.projects.create(
  { name: 'Acme Clinics', slug: 'acme-clinics' },
  { idempotencyKey: crypto.randomUUID() },
);

const page = await client.projects.list({ limit: 20 });
const sameProject = await client.projects.retrieve(project.id);

Errors