Skip to content

Ask an address into a company

POST
/v1/companies/{id}/members
curl --request POST \
--url https://beta-api.plune.ai/v1/companies/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "newcomer@example.com", "role": "member" }'

The owner or a manager, as a manager, a member or a reader — nobody is asked in as the owner (400 use_handover); admin is still read as manager for one release. Two outcomes, told apart by kind: an address that already has a Plune account is a member at once; any other gets an invitation — a mail names the company, the beta door lets the address through, and the sign-in turns the invitation into a membership. Being in the company opens none of its projects. Twice for the same address is 409, and so is the address of an account that waits in the Bin (code: account_in_bin, #2053) until the purge frees it. 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
Media type application/json

The role is an AssignableRole; admin is still read as manager for one release (ADR 0050 §9) and never answered.

object
email
required
string format: email
role
required

A role an invitation or a change of role gives (ADR 0050 §2): anything but owner. owner here is answered 400 with code: use_handover — ownership moves by POST /v1/projects/{id}/handover (or the company’s). Give your own level and below: the owner and a manager may give any of the three.

string
Allowed values: manager member reader
Examples

An address without an account — an invitation

{
"email": "newcomer@example.com",
"role": "member"
}

Asked — kind says which of the two it became

Media type application/json
One of:

What asking an address into a company produced: a member at once when an account holds it (kind: member), else an invitation for the address to sign in with (kind: invitation).

object
kind
required
string
Allowed values: member
userId
required
string
email
required
string format: email
name

The display name (T3) — absent until the person has given one.

string
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
invitedBy

Who brought them in (a userId) — absent for the person who made the company.

string
createdAt
required
string format: date-time
deleted

Present while the person’s account waits in the Bin (#952), as on Member.

boolean
pendingHandover

ADR 0050 §3: on the row of the person the owner asked to take the company over, while the request waits — absent on every other row.

object
id
required
string format: uuid
expiresAt
required
string format: date-time
Example
{
"kind": "invitation",
"id": "6f1c2b3a-0000-4000-8000-0000000000a6",
"email": "newcomer@example.com",
"role": "member",
"createdAt": "2026-09-16T09:12:04.151Z"
}

Invalid body — an email address and one of the three roles; owner is code: use_handover

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

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

Already in, or already invited — or the address is an account’s in the Bin (code: account_in_bin)

Media type application/json
object
error
required
string
Example
{
"error": "newcomer@example.com is already in this company, or already invited"
}

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