Skip to content

Rename a company, or set its automatic deletion

PATCH
/v1/companies/{id}
curl --request PATCH \
--url https://beta-api.plune.ai/v1/companies/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Acme" }'

Its owner renames it, sets or clears its automatic-deletion mark (#3175), or both (ADR 0050 §2). A change of the mark is in the company’s log. A manager, a member and a reader are told it is not theirs to (403). Answers the company as GET /v1/companies lists it.

id
required
string format: uuid
Media type application/json

The body of PATCH /v1/companies/{id}: at least one of the two; what is not named stays as it was.

object
>= 1 properties
name
string
>= 1 characters <= 100 characters
autoDelete

Sets or clears the automatic-deletion mark (#3175), as CompanyDetail says it.

boolean
Example
{
"name": "Acme"
}

The company as it is now

Media type application/json

A company the caller is in, with their role in it and two counts — one row of GET /v1/companies.

object
id
required
string format: uuid
name
required
string
<= 100 characters
role
required

What a member of a company may do (ADR 0038, ADR 0050). owner — exactly one: renames and deletes it and hands its ownership over; never demoted or removed, and does not leave. owner and manager run its people by the project’s rules (a manager gives their own level and below, and demotes and removes only members and readers) and add them to its projects; member and reader join its projects themselves. A company role opens no project: joining one gives the project role it maps to — owner and manager → manager (a project has its own one owner), member → member, reader → reader. The former admin is a manager since release B and is never answered.

string
Allowed values: owner manager member reader
projects
required

Its projects — all of them, joined or not: their names are the company’s.

integer
members
required
integer
>= 1
createdAt
required
string format: date-time
Example
{
"id": "6f1c2b3a-0000-4000-8000-0000000000a5",
"name": "Acme",
"role": "owner",
"projects": 2,
"members": 2,
"createdAt": "2026-09-16T09:12:04.151Z"
}

Invalid body — a name is 1 to 100 characters, autoDelete is true or false, at least one of them

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No / invalid token or session

A manager, a member or a reader asked

Media type application/json
object
error
required
string
Example
{
"error": "company owner only"
}

No such company among yours

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

auto_delete_not_enabled: autoDelete: true where autoDeleteLive is false

Media type application/json
object
error
required
string
Example
{
"error": "automatic deletion is not switched on here (COMPANY_AUTO_DELETE_ENFORCE)",
"code": "auto_delete_not_enabled"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over