Reference
View as MarkdownTeams API
Teams, members, invites and instance settings.
19 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes
/instanceInstance settings
Whether team creation is allowed; SMTP details only for the instance admin (the first user).
Response 200 · OK · application/json
- allowTeamCreationbooleanrequiredWhether any user may create a team (the instance admin always may)
- canManagebooleanrequiredThe caller is the instance admin and may change these settings
- smtpConfiguredbooleanrequiredInvites can be emailed through the instance relay
- smtpFromstring
- smtpHoststring
- smtpInsecureSkipVerifyboolean
- smtpPasswordSetboolean
- smtpPortinteger (int64)
- smtpTlsenum: implicit | starttls | none
- smtpUsernamestring
401Unauthorized500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/instanceChange the instance settings
Instance admin only: allow team creation and the SMTP relay used to mail invites when a team has no email channel.
Request body · application/json · required
- allowTeamCreationboolean
- smtpFromstring
- smtpHoststring
- smtpInsecureSkipVerifyboolean
- smtpPasswordstringWrite-only. Empty clears it.
- smtpPortinteger (int64)
- smtpTlsenum: implicit | starttls | none
- smtpUsernamestring
Response 200 · OK · application/json
- allowTeamCreationbooleanrequiredWhether any user may create a team (the instance admin always may)
- canManagebooleanrequiredThe caller is the instance admin and may change these settings
- smtpConfiguredbooleanrequiredInvites can be emailed through the instance relay
- smtpFromstring
- smtpHoststring
- smtpInsecureSkipVerifyboolean
- smtpPasswordSetboolean
- smtpPortinteger (int64)
- smtpTlsenum: implicit | starttls | none
- smtpUsernamestring
401Unauthorized403Forbidden422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/invites/{token}PublicPreview an invite (public)
What the invite link offers: team, role, expiry. 404 invite_invalid, 410 invite_expired or invite_used otherwise. Rate limited per IP.
| Parameter | In | Type | Description |
|---|---|---|---|
tokenrequired | path | string |
Response 200 · OK · application/json
- accountExistsbooleanrequired
- emailstringSet when the invite is bound to one email address
- expiresAtstring (date-time)required
- invitedBystringDisplay name of the person who created the invite
- roleenum: owner | admin | developer | viewerrequired
- teamNamestringrequired
- teamSlugstringrequired
404Not Foundinvite_invalid410Goneinvite_expired422Unprocessable Entity429Too Many Requests500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/invites/{token}/acceptPublicAccept an invite
Signed in: joins the team and makes it the session's current team. Not signed in: send name and password (and email for link invites) to create the account and join in one step; the session is started. 409 account_exists when the email already has an account (sign in instead), 403 invite_email_mismatch for an invite sent to another address.
| Parameter | In | Type | Description |
|---|---|---|---|
tokenrequired | path | string |
Request body · application/json
- emailstringSign-up only
- namestringSign-up only
- passwordstringSign-up only: creates the account
Response 200 · OK · application/json
- createdAccountbooleanrequiredA new account was created through the invite and signed in
- Teamrequired
403Forbiddeninvite_email_mismatch404Not Found409Conflictaccount_exists410Gone422Unprocessable Entity429Too Many Requests500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teamsList the caller's teams
Every team the signed-in user belongs to, with their role in each. current marks the team the request acts in.
Response 200 · OK · application/json
- Team[] | nullrequired
401Unauthorized500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teamsCreate a team
The caller becomes its owner. 403 team_creation_disabled when the instance admin turned team creation off.
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-chosen key (<=255 chars). A retry with the same key replays the original response for 24 hours. |
Request body · application/json · required
- namestringrequired
Response 201 · Created · application/json
- createdAtstring (date-time)required
- currentbooleanrequiredThe team the caller is acting in
- idstringrequired
- memberCountinteger (int64)required
- namestringrequired
- projectIdsstring[] | nullThe caller's project restriction; absent = all projects
- roleenum: owner | admin | developer | viewerrequiredThe caller's role in this team
- slugstringrequired
401Unauthorized403Forbiddenteam_creation_disabled422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}Get a team
| Parameter | In | Type | Description |
|---|---|---|---|
teamIdrequired | path | string |
Response 200 · OK · application/json
- createdAtstring (date-time)required
- currentbooleanrequiredThe team the caller is acting in
- idstringrequired
- memberCountinteger (int64)required
- namestringrequired
- projectIdsstring[] | nullThe caller's project restriction; absent = all projects
- roleenum: owner | admin | developer | viewerrequiredThe caller's role in this team
- slugstringrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}Rename a team
| Parameter | In | Type | Description |
|---|---|---|---|
teamIdrequired | path | string |
Request body · application/json · required
- namestringrequired
Response 200 · OK · application/json
- createdAtstring (date-time)required
- currentbooleanrequiredThe team the caller is acting in
- idstringrequired
- memberCountinteger (int64)required
- namestringrequired
- projectIdsstring[] | nullThe caller's project restriction; absent = all projects
- roleenum: owner | admin | developer | viewerrequiredThe caller's role in this team
- slugstringrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}Delete a team
Owners only. Requires confirm=<slug> and a team without servers (409 team_has_servers). Deletes every project, token and setting of the team.
| Parameter | In | Type | Description |
|---|---|---|---|
teamIdrequired | path | string | |
confirm | query | string | The team's slug |
Response 204 · No Content
No body.
401Unauthorized403Forbidden404Not Found409Conflictteam_has_servers422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}/invitesList a team's pending invites
| Parameter | In | Type | Description |
|---|---|---|---|
teamIdrequired | path | string |
Response 200 · OK · application/json
- TeamInvite[] | nullrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}/invitesInvite someone to a team
With email the link is mailed (team email channel, else the instance SMTP relay) and works once for that address; without it a link invite is created with an expiry and a use limit. delivery tells whether the email went out; the response always carries the link.
| Parameter | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Client-chosen key (<=255 chars). A retry with the same key replays the original response for 24 hours. |
teamIdrequired | path | string |
Request body · application/json · required
- emailstringMail the invite to this address (single use). Omit for a link invite.
- expiresInDaysinteger (int64)Default 7
- maxUsesinteger (int64)Link invites: how many people may use it (default 1)
- projectIdsstring[] | nullRestrict the new member to these projects (developer and viewer only)
- roleenum: owner | admin | developer | viewerrequired
Response 201 · Created · application/json
- deliveryenum: sent | link_only | not_configured | failedrequired
- emailErrorstring
- TeamInviterequired
- linkstringrequiredWhere the invitee accepts: an absolute URL when NEBULACTRL_PUBLIC_URL is set, otherwise a path
- tokenstringrequiredThe raw invite token. Shown once.
401Unauthorized403Forbidden404Not Found409Conflict422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}/invites/{inviteId}Revoke an invite
| Parameter | In | Type | Description |
|---|---|---|---|
teamIdrequired | path | string | |
inviteIdrequired | path | string |
Response 204 · No Content
No body.
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}/membersList a team's members
| Parameter | In | Type | Description |
|---|---|---|---|
teamIdrequired | path | string |
Response 200 · OK · application/json
- TeamMember[] | nullrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}/members/{userId}Change a member's role or project restriction
Owners and admins; only owners manage owners. 409 last_owner when the change would leave the team without an owner.
| Parameter | In | Type | Description |
|---|---|---|---|
teamIdrequired | path | string | |
userIdrequired | path | string |
Request body · application/json · required
- allProjectsbooleantrue lifts the project restriction
- projectIdsstring[]Restrict the member to these projects (developer and viewer only); an empty list sees no project
- roleenum: owner | admin | developer | viewer
Response 200 · OK · application/json
- emailstringrequired
- joinedAtstring (date-time)required
- namestringrequired
- projectIdsstring[] | nullAbsent = every project of the team
- roleenum: owner | admin | developer | viewerrequired
- userIdstringrequired
- youbooleanrequired
401Unauthorized403Forbidden404Not Found409Conflictlast_owner422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}/members/{userId}Remove a member (or leave the team)
Owners and admins remove members; any member may remove themselves. 409 last_owner for the last owner.
| Parameter | In | Type | Description |
|---|---|---|---|
teamIdrequired | path | string | |
userIdrequired | path | string |
Response 204 · No Content
No body.
401Unauthorized403Forbidden404Not Found409Conflictlast_owner422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}/members/{userId}/password-resetGenerate a password reset link for a member
Owners and admins (admins cannot reset an owner); signed-in users only. The link works once for 30 minutes, needs no SMTP setup and is shown once. Using it ends every session of the member. 409 no_password for members who only sign in through an identity provider.
| Parameter | In | Type | Description |
|---|---|---|---|
teamIdrequired | path | string | |
userIdrequired | path | string |
Response 201 · Created · application/json
- expiresAtstring (date-time)required
- linkstringrequiredWhere the member sets a new password: an absolute URL when NEBULACTRL_PUBLIC_URL is set, otherwise a path
- tokenstringrequired
401Unauthorized403Forbidden404Not Found409Conflictno_password422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}/securityA team's two-factor requirement
| Parameter | In | Type | Description |
|---|---|---|---|
teamIdrequired | path | string |
Response 200 · OK · application/json
- enrolledinteger (int64)requiredMembers that have 2FA enabled
- membersinteger (int64)required
- require2fabooleanrequiredMembers must enrol 2FA before acting in this team
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}/securityRequire two-factor authentication of every member of the team
Members without 2FA are blocked from acting in the team until they enrol. The caller must have 2FA themselves (409 enrol_first).
| Parameter | In | Type | Description |
|---|---|---|---|
teamIdrequired | path | string |
Request body · application/json · required
- require2fabooleanrequired
Response 200 · OK · application/json
- enrolledinteger (int64)requiredMembers that have 2FA enabled
- membersinteger (int64)required
- require2fabooleanrequiredMembers must enrol 2FA before acting in this team
401Unauthorized403Forbidden404Not Found409Conflictenrol_first422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.
/teams/{teamId}/switchMake a team the session's current team
Re-checks membership (404 for non-members) and stores the team in the session. Browser sessions only: an API token belongs to one team.
| Parameter | In | Type | Description |
|---|---|---|---|
teamIdrequired | path | string |
Response 200 · OK · application/json
- createdAtstring (date-time)required
- currentbooleanrequiredThe team the caller is acting in
- idstringrequired
- memberCountinteger (int64)required
- namestringrequired
- projectIdsstring[] | nullThe caller's project restriction; absent = all projects
- roleenum: owner | admin | developer | viewerrequiredThe caller's role in this team
- slugstringrequired
401Unauthorized403Forbidden404Not Found422Unprocessable Entity500Internal Server Error
Errors are RFC 9457 application/problem+json with a stable code field.