Accept an invitation by token — acceptteaminvitation
const url = 'https://example.com/api/team/invitations/accept/example';const options = {method: 'POST', headers: {cookie: 'sb-access-token=<sb-access-token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/team/invitations/accept/example \ --cookie sb-access-token=<sb-access-token>Failures carry a machine code: not_found (404), db_error (500), and the business refusals no_longer_valid, email_required, email_mismatch and expired (400).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”Success
object
Invalid request
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
Not authenticated
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
True if re-linking GitHub may fix the issue
Not found
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)
Server error
object
Human-readable error message
Stable machine-readable error code for client branching
First validation message per field path
object
Structured validation issues (Zod)
object
Seconds until rate limit resets (429 responses)