Projects
Create and discover active projects in the calling API key's organization.
projects:write; listing and retrieval need projects:read. A project API key never selects or creates projects across another organization.Create a project
Request body
| Field | Type | Notes |
|---|---|---|
namerequired | string | len 1..120 |
slug | string | len 1..80; pattern: ^[a-z0-9-]+$ |
201 response
| Field | Type | Notes |
|---|---|---|
idrequired | string | |
objectrequired | "project" | |
namerequired | string | |
slugrequired | string | |
default_languagerequired | "pt_BR" | "en_US" | "es_ES" | |
profilerequired | object | |
archived_atrequired | string<ISO-8601> | null | |
created_atrequired | string<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_atrequired | string<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)))$ |
environmentsrequired | object[] |
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
Query params
| Field | Type | Notes |
|---|---|---|
limitrequired | integer | Maximum number of projects to return. Defaults to 20; maximum 50. range 1..50 |
starting_after | string | Opaque cursor from the previous response next_cursor. |
Response
| Field | Type | Notes |
|---|---|---|
objectrequired | "list" | |
datarequired | object[] | |
has_morerequired | boolean | |
next_cursorrequired | string | 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
Response
| Field | Type | Notes |
|---|---|---|
idrequired | string | |
objectrequired | "project" | |
namerequired | string | |
slugrequired | string | |
default_languagerequired | "pt_BR" | "en_US" | "es_ES" | |
profilerequired | object | |
archived_atrequired | string<ISO-8601> | null | |
created_atrequired | string<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_atrequired | string<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)))$ |
environmentsrequired | object[] |
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
invalid_project_bodyfor an invalid strict create body or list query.project_slug_takenwhen the requested slug already belongs to another project in your organization.project_not_foundfor absent, archived, and foreign project IDs.organization_not_foundwhenPOST /v1/projectsfinds that the authenticated caller's organization no longer exists. The request never selects another organization.