Skip to content

Move a personal project into a company

POST
/v1/projects/{id}/transfer
curl --request POST \
--url https://beta-api.plune.ai/v1/projects/example/transfer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "companyId": "6f1c2b3a-0000-4000-8000-0000000000a5" }'

The owner of the project moves it into a company they own or run as a manager (ADR 0038). One way: it does not go back to personal projects, only on to another company by POST /v1/projects/{id}/move (ADR 0075), and a project already in a company answers 409 — so does a default project, the place a request with no project lands. Its people stay: the owner who moves it stays its one owner (ADR 0050); a member of the company takes the role their company role maps to, anybody else keeps theirs. The refusals go project first: somebody who is not in the project gets the 404 an invented id gets, whatever company they name. Recorded in the project’s audit feed. Seats (#2012): the people the project brings are counted against the company’s seats, writers and readers apart; a move that leaves a pool over its limit, having made it larger, answers 429 (quota.kind: "writeSeats" or "readerSeats") and the project stays personal. Only once the operator sets TIER_LIMITS_ENFORCE=true; until then counted and logged.

id
required
string

An id from GET /v1/projects

Media type application/json

The body of POST /v1/projects/{id}/transfer — the company the project moves into; it does not go back to personal projects.

object
companyId
required
string
Example
{
"companyId": "6f1c2b3a-0000-4000-8000-0000000000a5"
}

Moved — the project and the company it is in now

Media type application/json
object
id
required
string
name
required
string
company
required
object
id
required
string
name
required
string
Example
{
"id": "9c4e7d10-0000-4000-8000-0000000000a4",
"name": "Mobile app",
"company": {
"id": "6f1c2b3a-0000-4000-8000-0000000000a5",
"name": "Acme"
}
}

Invalid body — a company id

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

No / invalid token or session

Not the owner of the project, or neither the owner nor a manager of the company

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

No such project among yours, or no such company among yours

Media type application/json
object
error
required
string
Example
{
"error": "company '6f1c2b3a-0000-4000-8000-0000000000a5' not found"
}

A default project, or one already in a company

Media type application/json
object
error
required
string
Example
{
"error": "this project is already in a company — a transfer is one-way"
}

Two refusals share this status, and what to do about them is opposite. Rate-limited — the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442, #2092): Retry-After carries the seconds until the window rolls over, and waiting that long is the way out. Quota reached — a ceiling on what the project holds (runs in the last 24 hours, test cases, items waiting in the review queue, rules in force in the project’s memory): { error, quota }. A retry straight away frees nothing, so do not loop on it; the message says what makes room — deleting cases, working the queue down, an operator raising the limit — and the run quota, a rolling 24 hours, frees its oldest runs as they age out. Tell the two apart by the body: a 429 whose body has a quota object is a quota, one without it is a throttle. quota carries kind, limit, used, remaining and resetsAt: the figures behind the sentence, and for the run quota the instant its oldest run ages out (#1258). Retry-After is sent on a quota only where there is such an instant (the run quota: the whole seconds, at least 1, until resetsAt); the case, review-queue and project quotas free only by an action, have resetsAt: null, and send no Retry-After. GET /v1/quotas reads the same figures without a refusal.

Media type application/json
One of:
object
error
required
string
Examples

A throttle: no `quota`; wait `Retry-After`

{
"error": "rate limit exceeded — slow down"
}
Retry-After
integer

Seconds until the window rolls over on a throttle; on a quota, until quota.resetsAt — sent only for the run quota, which has one