Skip to content
Hayonix

API reference · Projects

Create a project

POST/v1/orgs/{org_id}/projects
Console sessionproject:createOrganizationIdempotency-Key

Creates a project in the organization. When slug is omitted it is derived from the name; a slug already used in this organization answers 409.

Console session only: no API key can be granted the project:create permission it needs. Requires the project:create permission (a key's scope, or a role that includes it).

Request

Headers
HeaderRequiredDescription
Idempotency-KeynoMakes a retry safe: the same key and request within 24 hours return the original response (see Idempotency). The SDKs send one for you.

Path parameters

  • org_idstring

    Your organization. The SDKs and the CLI fill it in from the API key.

    ID with prefix org_

Body

JSON (application/json): CreateProjectRequest.

  • namestringrequired

    Its name

    1–100 characters

  • slugstring

    Defaults to one derived from the name

    pattern ^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$

  • descriptionstring | null

    Free-text description

    up to 1000 characters

Response

201 Project — The new project

  • objectstringrequired

    Always `project`: the type of this object

    One ofproject

  • idstringrequired

    Unique ID (`prj_…`)

    ID with prefix prj_

  • org_idstringrequired

    Organization it belongs to

    ID with prefix org_

  • namestringrequired

    Its name

  • slugstringrequired

    Short URL-safe name, unique within the organization

  • descriptionstring | nullrequired

    Free-text description

  • archived_atstring (date-time) | nullrequired

    When it was archived (null while it is active) (ISO 8601, UTC)

  • created_atstring (date-time)required

    When it was created (ISO 8601, UTC)

  • updated_atstring (date-time)required

    When it last changed (ISO 8601, UTC)

Example response
Example response
{
  "object": "project",
  "id": "prj_01jc5zq4m8k3v6x9t2w7r0b1e4",
  "org_id": "org_01jc5zq4m8k3v6x9t2w7r0b1e4",
  "name": "string",
  "slug": "string",
  "description": "string",
  "archived_at": "2026-01-01T00:00:00.000Z",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Errors

Errors use the standard envelope. What this operation can answer:

Errors
StatusTypeWhen
400invalid_request_errorA parameter or body field is missing or not allowed; param names it.
401authentication_errorThe key or session is missing, revoked or expired.
403permission_errorThe credential lacks the permission this needs, or the organization is suspended.
409conflict_error idempotency_in_progressA request with the same Idempotency-Key is still running.
422idempotency_error idempotency_key_reusedThe Idempotency-Key was used with a different request.
429rate_limit_error rate_limitedToo many requests; retry after retry-after seconds.