POST
/api/v1/team/invitations/acceptAccept an invitation
The INVITEE joins the org. Interactive session only (API keys are refused); the signed-in account's email must be verified and equal the invited address. Single use and race-safe; the seat is reserved atomically here. Re-clicking an invitation you already accepted is idempotent.
Authentication
Dashboard browser session. Requires the Supabase Auth session cookie the EvalGuard dashboard sets (sb-<project-ref>-auth-token).
This is a browser-only credential you cannot mint or reconstruct from an API client — @supabase/ssr may chunk it across ...auth-token.0 / .1. It is published because the operation accepts NOTHING else: the handler has no bearer branch, so an eg_ API key answers 401 here.
Request body required
Example
{
"token": "string"
}Schema
{
"application/json": {
"schema": {
"type": "object",
"properties": {
"token": {
"type": "string",
"minLength": 1,
"maxLength": 200
}
},
"required": [
"token"
],
"additionalProperties": false
}
}
}Response
All status codes
200Joined (or already joined).
400(no description)
401(no description)
403SESSION_REQUIRED (API key), EMAIL_NOT_VERIFIED, INVITATION_EMAIL_MISMATCH, or QUOTA_EXCEEDED (no seat left).
404INVITATION_INVALID — invalid, expired, revoked or already used.
410INVITATION_ACCESS_WINDOW_ELAPSED — the invitation's access period has already ended.
429(no description)
500Internal Server Error — DB_ERROR.
Code samples
cURL
curl -X POST \
https://evalguard.ai/api/v1/team/invitations/accept \
-H "Authorization: Bearer $EVALGUARD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "token": "string" }'TypeScript
// The TypeScript SDK (@evalguard/sdk) exposes TYPED methods — eval,
// getEvalRun, securityScan, checkFirewall, … — not a generic request().
// For an arbitrary endpoint, call it directly:
const res = await fetch("https://evalguard.ai/api/v1/team/invitations/accept", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.EVALGUARD_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"token": "string"
}),
});
console.log(res.status, await res.json());Python
# The Python SDK (pip install evalguardai) exposes TYPED methods on
# EvalGuardClient — run_eval, get_eval, … — not a generic request().
# For an arbitrary endpoint, call it directly:
import os
import requests
headers = {"Authorization": f"Bearer {os.environ['EVALGUARD_API_KEY']}"}
headers["Content-Type"] = "application/json"
response = requests.request(
"POST",
"https://evalguard.ai/api/v1/team/invitations/accept",
headers=headers,
json={
"token": "string"
},
)
print(response.status_code, response.json())Go
package main
import (
"context"
"fmt"
"net/http"
"os"
"strings"
)
func main() {
body := strings.NewReader(`{"token":"string"}`)
req, _ := http.NewRequestWithContext(context.Background(), "POST", "https://evalguard.ai/api/v1/team/invitations/accept", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("EVALGUARD_API_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil { panic(err) }
defer resp.Body.Close()
fmt.Println(resp.Status)
}Errors
400401403404410429500