Organizations & Users
Manage tenants, team members, invitations, roles, SAML SSO, network proxies, and service account keys.
| Method | Path | What it does |
|---|---|---|
| GET | /auth/get-user-organizations | List organizations the current user belongs to (includes org_id and service_account_key) |
| POST | /organizations | Create a new organization |
| GET | /organizations/{org_id}/users | List members of an organization |
| POST | /organizations/{org_id}/invite-user/{user_email} | Invite a user by email (new users receive an email; existing users are added immediately) |
| POST | /organizations/{org_id}/add-user/{user_email} | Directly add an existing user |
| GET | /organizations/{org_id}/user_invitations | List pending invitations |
| POST | /organizations/{org_id}/cancel-invitation/{user_id} | Cancel a pending invitation |
| POST | /accept-invitation/{token} | Accept an invitation from an email link |
| PUT | /organizations/{org_id}/users/{user_id}/role | Change a member's role (new_role query: admin, user, service_account) |
| PUT | /organizations/{org_id}/remove-user/{user_id} | Remove a member |
| GET | /organization/{org_id}/settings | Get organization settings |
| PUT | /customer/settings | Create or update organization settings (e.g. LambdaTest credentials) |
| PUT | /organization/{org_id}/regenerate-service-account-key | Rotate the service account key |
| POST | /organizations/{org_id}/saml-sso/ | Configure SAML SSO (entity_id required) |
| DELETE | /organizations/{org_id}/saml-sso/ | Remove SAML SSO configuration |
| GET | /organizations/{org_id}/proxies | List proxy configurations |
| GET | /organizations/{org_id}/proxy/default | Get the default proxy |
| POST | /organizations/{org_id}/proxy/default | Set (or clear) the default proxy |
| GET | /organizations/{org_id}/test-suites | List test suites in the organization |
Example — list your organizations
curl "https://cj-backend.foreai.co/auth/get-user-organizations" \
-H "Authorization: Bearer <token>"
[
{
"organization": {
"org_id": "a60bca6e-71a0-4a0b-be00-8f9dcc5f8e33",
"name": "Acme Corp",
"created_at": "2025-01-15T09:00:00Z"
},
"service_account_key": "sk-...",
"role": "admin"
}
]
The org_id is required by almost every other endpoint. The service_account_key is used for CI/CD integrations.
Roles
| Role | Typical capability |
|---|---|
admin | Manage an organization: members, settings, proxies, SSO |
user | Day-to-day work: create and run tests, view results |
service_account | Non-human automation identity (CI, scripts) |