v1
latestOpenAPI 3.0.02026-08-04891301.4 MBJoin a team with an invite code
Adds a principal to a team using a 12-character invite code. The invite code can be supplied as either join_code or invite_code; both are accepted for backwards compatibility.
For user-authenticated requests, the currently authenticated user is added to the team. For server-to-server requests, you must supply either agent (to add an agent) or user (to add a specific user by ID). If the user is already a member of the team, the request succeeds without creating a duplicate membership.
This endpoint is rate-limited to 10 requests per minute per IP address to prevent invite-code enumeration.
post/api/v1/teams/join_by_code
Request body
Example request
{
"agent": "string",
"invite_code": "string",
"join_code": "string",
"user": "string"
}Response
Successful response
Example response
{
"acl": {
"add": [
{
"actions": [
"read",
"write"
],
"principal": "string",
"principal_type": "user"
}
],
"grants": [
{
"actions": [
"read",
"write"
],
"principal": "string",
"principal_type": "user"
}
],
"remove": [
{
"principal": "string",
"principal_type": "user"
}
]
},
"app": "dap_0aBcDeFgHiJkLmNoPqRsTu",
"badges": {},
"created_at": "2024-01-01T00:00:00Z",
"description": "An example description.",
"id": "tem_0aBcDeFgHiJkLmNoPqRsTu",
"membership_status": "member",
"metadata": {
"key": "value"
},
"name": "Example Name",
"org": "org_0aBcDeFgHiJkLmNoPqRsTu",
"sandbox": "dsb_0aBcDeFgHiJkLmNoPqRsTu",
"slug": "example-slug",
"updated_at": "2024-01-01T00:00:00Z"
}