Adds a member of the organisation to the team. An address that is not a member yet is invited to the organisation and joins the team once they accept.
HTTP
POST /teams/{teamId}/membersAccess: Session token only. API keys get 403 with insufficient_scope.
Role: Organisation owner or admin, or owner or admin of the team.
Path parameters #
| Parameter | Description |
|---|---|
teamId | The id of the team. |
Request body #
JSON.
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | The address of the person. |
role | string | no | owner, admin, reviewer or translator. Default translator. |
JSON
{ "email": "grace@example.com", "role": "reviewer" }Response 201 #
The team. A person who was invited is not in it yet.
JSON
{
"id": "0197a3c5-3c42-7f33-96ea-8a2d4b9f1c53",
"name": "Core",
"icon": "👥",
"accent": null,
"description": "Product translators",
"allProjects": false,
"languages": ["de-de", "fr-fr"],
"members": [
{ "id": "0197a3c2-5b1e-7c4a-9d2f-3e8b6a1f0c55", "name": "Ada Lovelace", "email": "ada@example.com", "initials": "AL", "gradient": "...", "from": "#06b6d4", "to": "#7c3aed", "role": "owner" }
],
"projects": [
{ "projectId": "0197a3c6-4d53-7a44-87fb-9b3e5c0a2d64", "role": "translator" }
]
}Response fields #
| Field | Type | Description |
|---|---|---|
id | string | The id of the team. |
name | string | The name. |
icon | string | An emoji. The app shows an abbreviation of the name instead. |
accent | string or null | A colour. |
description | string | A description. |
allProjects | boolean | Whether the team has access to every project. |
languages | list of string | Language codes the team works in. |
members | list of object | The members: the fields of a person (id, name, email, initials, gradient, from, to) and their team role. |
projects | list of object | The projects the team has access to: projectId and the role the team has there. |
Errors #
| Status | error | When |
|---|---|---|
| 401 | unauthenticated | The token is missing or not valid. |
| 404 | not_found | The team does not exist in your organisation, or an id is not a UUID. |
| 403 | forbidden | You may not change this team. |
| 402 | plan_limit | An invitation was needed and the plan has no room for another member. |
| 422 | invalid_request | role is not valid, or the invitation failed: email is invalid, already_member or domain_not_allowed. |
| 429 | rate_limited | Too many requests, see Rate limiting. |
See Errors for the error format.
Notes #
Inviting someone needs the organisation owner or admin role.