Skip to content
Hayonix

API reference · Organizations

Update an organization

PATCH/v1/orgs/{org_id}
Console sessionorg:updateOrganization

Changes the name or slug; fields you omit are left as they are. A slug already used by another organization answers 409.

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

Request

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): UpdateOrganizationRequest.

  • namestring

    Its name

    1–100 characters

  • slugstring

    New slug: lowercase letters, digits and hyphens, globally unique (409 `slug_taken` when another organization has it)

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

Response

200 Organization — The updated organization

  • objectstringrequired

    Always `organization`: the type of this object

    One oforganization

  • idstringrequired

    Unique ID (`org_…`)

    ID with prefix org_

  • namestringrequired

    Its name

  • slugstringrequired

    Short URL-safe name, unique across the platform

  • rolestring | nullrequired

    Your role in this organization; null when the caller is an API key

    One ofowneradmindeveloperbillingviewer

  • created_atstring (date-time)required

    When it was created (ISO 8601, UTC)

Example response
Example response
{
  "object": "organization",
  "id": "org_01jc5zq4m8k3v6x9t2w7r0b1e4",
  "name": "string",
  "slug": "string",
  "role": "owner",
  "created_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.
429rate_limit_error rate_limitedToo many requests; retry after retry-after seconds.