Skip to content

Add somebody from the company to one of its projects

POST
/v1/companies/{id}/projects/{projectId}/members
curl --request POST \
--url https://beta-api.plune.ai/v1/companies/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/projects/example/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "userId": "6f1c2b3a-0000-4000-8000-0000000000a2" }'

The owner or a manager adds another member of the company to one of its projects, with the role THEIR company role maps to. Only the company’s people: somebody outside it answers 404, the same as an id nobody has — an address from outside is asked in through POST /v1/companies/{id}/members or POST /v1/members. Seats (#1439): adding a person (or inviting an address) who is not yet counted in the account or company that owns the tier is capped by the tier — write roles Free 1, Personal 1, Team 50, Enterprise none; readers Free 1, Personal 3, Team 5, Enterprise none. 429 with quota.kind: "writeSeats" or "readerSeats" and no Retry-After, only once the operator sets TIER_LIMITS_ENFORCE=true (until then counted and logged). An invitation not yet accepted takes no seat but is checked when created and again when accepted (a refused acceptance leaves it pending).

id
required
string format: uuid
projectId
required
string
Media type application/json
object
userId
required

A member of the company, as GET /v1/companies/{id} lists them

string
Example
{
"userId": "6f1c2b3a-0000-4000-8000-0000000000a2"
}

Added — with this role

Media type application/json
object
projectId
required
string
userId
required
string
role
required

What a member may do (B8-team, ADR 0050). owner — exactly one a project: its secrets (bucket, CI, AI keys), statuses, name, the move into a company, and the handover of ownership; never demoted or removed, and does not leave — ownership moves only by a handover the recipient accepts. manager runs the people of their level and below: invites as manager, member or reader, and changes and removes members and readers (a manager is demoted and removed by the owner alone). member works in the project and manages nobody; reader is refused every write at the boundary, before a handler runs, but a comment, a pending proposal and leaving the project (#1440, #2055).

string
Allowed values: owner manager member reader
Example
{
"projectId": "9c4e7d10-0000-4000-8000-0000000000a4",
"userId": "6f1c2b3a-0000-4000-8000-0000000000a2",
"role": "manager"
}

Invalid body — a user id

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

No / invalid token or session

A member or a reader asked

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

No such company among yours, no such project in it, or nobody of that id in the company

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

Already in it, the project is at its member limit, or that account is in the Bin (code: account_in_bin)

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

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