Skip to main content

Organizations & Users

Manage tenants, team members, invitations, roles, SAML SSO, network proxies, and service account keys.

MethodPathWhat it does
GET/auth/get-user-organizationsList organizations the current user belongs to (includes org_id and service_account_key)
POST/organizationsCreate a new organization
GET/organizations/{org_id}/usersList 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_invitationsList 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}/roleChange 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}/settingsGet organization settings
PUT/customer/settingsCreate or update organization settings (e.g. LambdaTest credentials)
PUT/organization/{org_id}/regenerate-service-account-keyRotate 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}/proxiesList proxy configurations
GET/organizations/{org_id}/proxy/defaultGet the default proxy
POST/organizations/{org_id}/proxy/defaultSet (or clear) the default proxy
GET/organizations/{org_id}/test-suitesList 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

RoleTypical capability
adminManage an organization: members, settings, proxies, SSO
userDay-to-day work: create and run tests, view results
service_accountNon-human automation identity (CI, scripts)