Auth
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/auth/apple |
create |
Apple identity approved this login |
POST |
/api/v1/auth/github |
create |
Authenticated user session |
POST |
/api/v1/auth/google |
create |
Authenticated user session |
POST |
/api/v1/auth/login |
create |
Authenticated user session |
POST |
/api/v1/auth/logout |
create |
Success |
POST |
/api/v1/auth/register |
create |
Authenticated user session |
GET |
/api/v1/auth/csrf |
load |
Browser CSRF token |
GET |
/api/v1/auth/impersonation |
load |
Available only to the active superadmin who began this session |
DELETE |
/api/v1/auth/impersonation |
remove |
Success |
Fields
| Field | Type | Required | Description |
|---|
create
POST /api/v1/auth/apple
Operation ID: api_v1_auth_apple.
Authentication: not required.
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
string |
Yes | |
login_id |
string |
Yes | |
polling_token |
string |
Yes |
Responses
200: Apple identity approved this login
application/json
| Property | Type | Required | Description |
|---|---|---|---|
status |
string |
Yes |
401: Invalid, expired or consumed native request or Apple authorization
403: Account not admitted
404: Not found
409: Email already belongs to an account with another sign-in method
422: Unprocessable entity
502: Bad gateway
POST /api/v1/auth/github
Operation ID: api_v1_auth_github.
Authentication: not required.
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
string |
Yes | |
invite_code |
string |
No | Optional signup invitation code. |
redirect_uri |
string (uri) |
Yes | |
state |
string |
Yes |
Responses
200: Authenticated user session
application/json
| Property | Type | Required | Description |
|---|---|---|---|
active_organization |
object or null |
Yes | |
api_base_url |
string (uri) |
No | |
api_token |
string |
No | |
app_promotion |
object |
Yes | |
app_promotion.android_testing_requested |
boolean |
Yes | |
app_promotion.desktop |
boolean |
Yes | Whether to offer the desktop app. |
app_promotion.ios_testing_requested |
boolean |
Yes | |
app_promotion.mobile |
boolean |
Yes | Whether to offer mobile testing. |
email |
string (email) |
Yes | |
github_pr_user_authorization_connected |
boolean |
Yes | |
github_pr_user_authorization_login |
string |
Yes | |
github_prs_authored_by_change_author |
boolean |
Yes | |
id |
string |
Yes | |
name |
string |
Yes | |
onboarding |
object |
Yes | V2 agent onboarding progress. Each finished step pays its reward_cents once; an invited person finishing every step pays the inviter referral.reward_cents. |
onboarding.claimed_count |
integer |
Yes | Steps paid so far. |
onboarding.earned_cents |
integer |
Yes | Credit paid so far |
onboarding.finished |
boolean |
Yes | Every step is paid. |
onboarding.organization |
object,null |
Yes | The workspace where steps count and credit is paid; null when the person belongs to none. |
onboarding.organization.name |
string |
Yes | |
onboarding.organization.slug |
string |
Yes | |
onboarding.referral |
object |
Yes | |
onboarding.referral.open |
boolean |
Yes | Whether more referrals can still pay. |
onboarding.referral.reward_cents |
integer |
Yes | |
onboarding.referral.rewarded_count |
integer |
Yes | |
onboarding.remaining_reward_cents |
integer |
Yes | Credit the unpaid steps still pay. |
onboarding.steps |
array of object |
Yes | |
onboarding.steps[].key |
enum: subscription, integration, github, automation, pull_request, call |
Yes | |
onboarding.steps[].reward_cents |
integer |
Yes | Credit this step pays. |
onboarding.steps[].state |
enum: todo, claimable, claimed |
Yes | |
onboarding.total_reward_cents |
integer |
Yes | Credit for paying every step. |
onboarding.visible |
boolean |
Yes | Whether to show the onboarding card. |
openai_sign_in_connected |
boolean |
No | |
openai_sign_in_enabled |
boolean |
No | |
organizations |
array of object |
Yes | |
organizations[].activated_products |
array of enum: transcripts, vcs |
Yes | Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement. |
organizations[].agents_only |
boolean |
No | Whether this organization uses the agents-only interface; older responses may omit this value. |
organizations[].can_activate_products |
boolean |
Yes | Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces. |
organizations[].created_at |
string (date-time) |
Yes | |
organizations[].created_at_label |
string |
Yes | |
organizations[].github_prs_authored_by_change_author |
boolean |
Yes | |
organizations[].id |
string |
Yes | |
organizations[].logo_url |
string |
Yes | |
organizations[].member_count |
integer |
Yes | |
organizations[].name |
string |
Yes | |
organizations[].pending_invitation_count |
integer |
Yes | |
organizations[].personal |
boolean |
Yes | |
organizations[].repository_count |
integer |
Yes | |
organizations[].role |
string |
Yes | |
organizations[].sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
Yes | |
organizations[].shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. Present only where agent integrations are on. |
organizations[].slug |
string |
Yes | |
organizations[].source_control_providers |
array of enum: github, gitlab |
No | Connected source control providers for this organization. Missing values mean no providers are known. |
organizations[].source_ui_enabled |
boolean |
No | Organization-scoped Source workspace rollout; missing values mean disabled. |
organizations[].timezone |
string |
Yes | Default IANA timezone for organization-local schedules such as nightly dreaming. |
organizations[].updated_at |
string (date-time) |
Yes | |
organizations[].updated_at_label |
string |
Yes | |
organizations[].verify_pr_scenario_writing_enabled |
boolean |
Yes | |
pending_organization_invitation_count |
integer |
Yes | |
pending_organization_invitation_count_label |
string |
Yes | |
picture_url |
string |
Yes | |
superadmin |
boolean |
No | |
time_zone |
string |
No | The IANA zone the person chose for their agents' replies; null follows their app. |
401: Unauthorized
403: Sign-in requires account access, email verification, or a different existing sign-in method
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
enum: account_not_found, beta_access_required, email_verification_required, oauth_account_linking_required, waitlist_required |
Yes | |
error |
string |
Yes | |
waitlist_reference |
integer |
No |
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/auth/google
Operation ID: api_v1_auth_google.
Authentication: not required.
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
string |
Yes | |
invite_code |
string |
No | Optional signup invitation code. |
redirect_uri |
string (uri) |
Yes | |
state |
string |
Yes |
Responses
200: Authenticated user session
application/json
| Property | Type | Required | Description |
|---|---|---|---|
active_organization |
object or null |
Yes | |
api_base_url |
string (uri) |
No | |
api_token |
string |
No | |
app_promotion |
object |
Yes | |
app_promotion.android_testing_requested |
boolean |
Yes | |
app_promotion.desktop |
boolean |
Yes | Whether to offer the desktop app. |
app_promotion.ios_testing_requested |
boolean |
Yes | |
app_promotion.mobile |
boolean |
Yes | Whether to offer mobile testing. |
email |
string (email) |
Yes | |
github_pr_user_authorization_connected |
boolean |
Yes | |
github_pr_user_authorization_login |
string |
Yes | |
github_prs_authored_by_change_author |
boolean |
Yes | |
id |
string |
Yes | |
name |
string |
Yes | |
onboarding |
object |
Yes | V2 agent onboarding progress. Each finished step pays its reward_cents once; an invited person finishing every step pays the inviter referral.reward_cents. |
onboarding.claimed_count |
integer |
Yes | Steps paid so far. |
onboarding.earned_cents |
integer |
Yes | Credit paid so far |
onboarding.finished |
boolean |
Yes | Every step is paid. |
onboarding.organization |
object,null |
Yes | The workspace where steps count and credit is paid; null when the person belongs to none. |
onboarding.organization.name |
string |
Yes | |
onboarding.organization.slug |
string |
Yes | |
onboarding.referral |
object |
Yes | |
onboarding.referral.open |
boolean |
Yes | Whether more referrals can still pay. |
onboarding.referral.reward_cents |
integer |
Yes | |
onboarding.referral.rewarded_count |
integer |
Yes | |
onboarding.remaining_reward_cents |
integer |
Yes | Credit the unpaid steps still pay. |
onboarding.steps |
array of object |
Yes | |
onboarding.steps[].key |
enum: subscription, integration, github, automation, pull_request, call |
Yes | |
onboarding.steps[].reward_cents |
integer |
Yes | Credit this step pays. |
onboarding.steps[].state |
enum: todo, claimable, claimed |
Yes | |
onboarding.total_reward_cents |
integer |
Yes | Credit for paying every step. |
onboarding.visible |
boolean |
Yes | Whether to show the onboarding card. |
openai_sign_in_connected |
boolean |
No | |
openai_sign_in_enabled |
boolean |
No | |
organizations |
array of object |
Yes | |
organizations[].activated_products |
array of enum: transcripts, vcs |
Yes | Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement. |
organizations[].agents_only |
boolean |
No | Whether this organization uses the agents-only interface; older responses may omit this value. |
organizations[].can_activate_products |
boolean |
Yes | Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces. |
organizations[].created_at |
string (date-time) |
Yes | |
organizations[].created_at_label |
string |
Yes | |
organizations[].github_prs_authored_by_change_author |
boolean |
Yes | |
organizations[].id |
string |
Yes | |
organizations[].logo_url |
string |
Yes | |
organizations[].member_count |
integer |
Yes | |
organizations[].name |
string |
Yes | |
organizations[].pending_invitation_count |
integer |
Yes | |
organizations[].personal |
boolean |
Yes | |
organizations[].repository_count |
integer |
Yes | |
organizations[].role |
string |
Yes | |
organizations[].sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
Yes | |
organizations[].shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. Present only where agent integrations are on. |
organizations[].slug |
string |
Yes | |
organizations[].source_control_providers |
array of enum: github, gitlab |
No | Connected source control providers for this organization. Missing values mean no providers are known. |
organizations[].source_ui_enabled |
boolean |
No | Organization-scoped Source workspace rollout; missing values mean disabled. |
organizations[].timezone |
string |
Yes | Default IANA timezone for organization-local schedules such as nightly dreaming. |
organizations[].updated_at |
string (date-time) |
Yes | |
organizations[].updated_at_label |
string |
Yes | |
organizations[].verify_pr_scenario_writing_enabled |
boolean |
Yes | |
pending_organization_invitation_count |
integer |
Yes | |
pending_organization_invitation_count_label |
string |
Yes | |
picture_url |
string |
Yes | |
superadmin |
boolean |
No | |
time_zone |
string |
No | The IANA zone the person chose for their agents' replies; null follows their app. |
401: Unauthorized
403: Sign-in requires account access, email verification, or a different existing sign-in method
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
enum: account_not_found, beta_access_required, email_verification_required, oauth_account_linking_required, waitlist_required |
Yes | |
error |
string |
Yes | |
waitlist_reference |
integer |
No |
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/auth/login
Operation ID: api_v1_auth_login.
Authentication: not required.
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
email |
string (email) |
Yes | |
password |
string (password) |
Yes |
Responses
200: Authenticated user session
application/json
| Property | Type | Required | Description |
|---|---|---|---|
active_organization |
object or null |
Yes | |
api_base_url |
string (uri) |
No | |
api_token |
string |
No | |
app_promotion |
object |
Yes | |
app_promotion.android_testing_requested |
boolean |
Yes | |
app_promotion.desktop |
boolean |
Yes | Whether to offer the desktop app. |
app_promotion.ios_testing_requested |
boolean |
Yes | |
app_promotion.mobile |
boolean |
Yes | Whether to offer mobile testing. |
email |
string (email) |
Yes | |
github_pr_user_authorization_connected |
boolean |
Yes | |
github_pr_user_authorization_login |
string |
Yes | |
github_prs_authored_by_change_author |
boolean |
Yes | |
id |
string |
Yes | |
name |
string |
Yes | |
onboarding |
object |
Yes | V2 agent onboarding progress. Each finished step pays its reward_cents once; an invited person finishing every step pays the inviter referral.reward_cents. |
onboarding.claimed_count |
integer |
Yes | Steps paid so far. |
onboarding.earned_cents |
integer |
Yes | Credit paid so far |
onboarding.finished |
boolean |
Yes | Every step is paid. |
onboarding.organization |
object,null |
Yes | The workspace where steps count and credit is paid; null when the person belongs to none. |
onboarding.organization.name |
string |
Yes | |
onboarding.organization.slug |
string |
Yes | |
onboarding.referral |
object |
Yes | |
onboarding.referral.open |
boolean |
Yes | Whether more referrals can still pay. |
onboarding.referral.reward_cents |
integer |
Yes | |
onboarding.referral.rewarded_count |
integer |
Yes | |
onboarding.remaining_reward_cents |
integer |
Yes | Credit the unpaid steps still pay. |
onboarding.steps |
array of object |
Yes | |
onboarding.steps[].key |
enum: subscription, integration, github, automation, pull_request, call |
Yes | |
onboarding.steps[].reward_cents |
integer |
Yes | Credit this step pays. |
onboarding.steps[].state |
enum: todo, claimable, claimed |
Yes | |
onboarding.total_reward_cents |
integer |
Yes | Credit for paying every step. |
onboarding.visible |
boolean |
Yes | Whether to show the onboarding card. |
openai_sign_in_connected |
boolean |
No | |
openai_sign_in_enabled |
boolean |
No | |
organizations |
array of object |
Yes | |
organizations[].activated_products |
array of enum: transcripts, vcs |
Yes | Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement. |
organizations[].agents_only |
boolean |
No | Whether this organization uses the agents-only interface; older responses may omit this value. |
organizations[].can_activate_products |
boolean |
Yes | Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces. |
organizations[].created_at |
string (date-time) |
Yes | |
organizations[].created_at_label |
string |
Yes | |
organizations[].github_prs_authored_by_change_author |
boolean |
Yes | |
organizations[].id |
string |
Yes | |
organizations[].logo_url |
string |
Yes | |
organizations[].member_count |
integer |
Yes | |
organizations[].name |
string |
Yes | |
organizations[].pending_invitation_count |
integer |
Yes | |
organizations[].personal |
boolean |
Yes | |
organizations[].repository_count |
integer |
Yes | |
organizations[].role |
string |
Yes | |
organizations[].sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
Yes | |
organizations[].shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. Present only where agent integrations are on. |
organizations[].slug |
string |
Yes | |
organizations[].source_control_providers |
array of enum: github, gitlab |
No | Connected source control providers for this organization. Missing values mean no providers are known. |
organizations[].source_ui_enabled |
boolean |
No | Organization-scoped Source workspace rollout; missing values mean disabled. |
organizations[].timezone |
string |
Yes | Default IANA timezone for organization-local schedules such as nightly dreaming. |
organizations[].updated_at |
string (date-time) |
Yes | |
organizations[].updated_at_label |
string |
Yes | |
organizations[].verify_pr_scenario_writing_enabled |
boolean |
Yes | |
pending_organization_invitation_count |
integer |
Yes | |
pending_organization_invitation_count_label |
string |
Yes | |
picture_url |
string |
Yes | |
superadmin |
boolean |
No | |
time_zone |
string |
No | The IANA zone the person chose for their agents' replies; null follows their app. |
401: Invalid email or password
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/auth/logout
Operation ID: api_v1_auth_logout.
Authentication: bearer token (bearerAuth).
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
204: Session cleared
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/auth/register
Operation ID: api_v1_auth_register.
Authentication: not required.
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cli_login_id |
string |
No | Desktop approval request to resume after email verification. |
email |
string (email) |
Yes | |
invite_code |
string |
No | Optional invitation code from an existing invitation. |
name |
string |
No | |
organization_invitation_token |
string |
No | Active organization invitation token proving the invited email during password setup. Accepts the invitation and signs in without another verification email. |
password |
string (password) |
Yes | |
turnstile_token |
string |
No |
Responses
200: Authenticated user session
application/json
| Property | Type | Required | Description |
|---|---|---|---|
active_organization |
object or null |
Yes | |
api_base_url |
string (uri) |
No | |
api_token |
string |
No | |
app_promotion |
object |
Yes | |
app_promotion.android_testing_requested |
boolean |
Yes | |
app_promotion.desktop |
boolean |
Yes | Whether to offer the desktop app. |
app_promotion.ios_testing_requested |
boolean |
Yes | |
app_promotion.mobile |
boolean |
Yes | Whether to offer mobile testing. |
email |
string (email) |
Yes | |
github_pr_user_authorization_connected |
boolean |
Yes | |
github_pr_user_authorization_login |
string |
Yes | |
github_prs_authored_by_change_author |
boolean |
Yes | |
id |
string |
Yes | |
name |
string |
Yes | |
onboarding |
object |
Yes | V2 agent onboarding progress. Each finished step pays its reward_cents once; an invited person finishing every step pays the inviter referral.reward_cents. |
onboarding.claimed_count |
integer |
Yes | Steps paid so far. |
onboarding.earned_cents |
integer |
Yes | Credit paid so far |
onboarding.finished |
boolean |
Yes | Every step is paid. |
onboarding.organization |
object,null |
Yes | The workspace where steps count and credit is paid; null when the person belongs to none. |
onboarding.organization.name |
string |
Yes | |
onboarding.organization.slug |
string |
Yes | |
onboarding.referral |
object |
Yes | |
onboarding.referral.open |
boolean |
Yes | Whether more referrals can still pay. |
onboarding.referral.reward_cents |
integer |
Yes | |
onboarding.referral.rewarded_count |
integer |
Yes | |
onboarding.remaining_reward_cents |
integer |
Yes | Credit the unpaid steps still pay. |
onboarding.steps |
array of object |
Yes | |
onboarding.steps[].key |
enum: subscription, integration, github, automation, pull_request, call |
Yes | |
onboarding.steps[].reward_cents |
integer |
Yes | Credit this step pays. |
onboarding.steps[].state |
enum: todo, claimable, claimed |
Yes | |
onboarding.total_reward_cents |
integer |
Yes | Credit for paying every step. |
onboarding.visible |
boolean |
Yes | Whether to show the onboarding card. |
openai_sign_in_connected |
boolean |
No | |
openai_sign_in_enabled |
boolean |
No | |
organizations |
array of object |
Yes | |
organizations[].activated_products |
array of enum: transcripts, vcs |
Yes | Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement. |
organizations[].agents_only |
boolean |
No | Whether this organization uses the agents-only interface; older responses may omit this value. |
organizations[].can_activate_products |
boolean |
Yes | Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces. |
organizations[].created_at |
string (date-time) |
Yes | |
organizations[].created_at_label |
string |
Yes | |
organizations[].github_prs_authored_by_change_author |
boolean |
Yes | |
organizations[].id |
string |
Yes | |
organizations[].logo_url |
string |
Yes | |
organizations[].member_count |
integer |
Yes | |
organizations[].name |
string |
Yes | |
organizations[].pending_invitation_count |
integer |
Yes | |
organizations[].personal |
boolean |
Yes | |
organizations[].repository_count |
integer |
Yes | |
organizations[].role |
string |
Yes | |
organizations[].sandbox_region |
enum: us-was-1, us-pdx-1, eu-lon-1, eu-fra-1, auto |
Yes | |
organizations[].shared_agent_personal_accounts_enabled |
boolean |
No | Whether a shared agent may use one person's account for everyone who chats with it. Present only where agent integrations are on. |
organizations[].slug |
string |
Yes | |
organizations[].source_control_providers |
array of enum: github, gitlab |
No | Connected source control providers for this organization. Missing values mean no providers are known. |
organizations[].source_ui_enabled |
boolean |
No | Organization-scoped Source workspace rollout; missing values mean disabled. |
organizations[].timezone |
string |
Yes | Default IANA timezone for organization-local schedules such as nightly dreaming. |
organizations[].updated_at |
string (date-time) |
Yes | |
organizations[].updated_at_label |
string |
Yes | |
organizations[].verify_pr_scenario_writing_enabled |
boolean |
Yes | |
pending_organization_invitation_count |
integer |
Yes | |
pending_organization_invitation_count_label |
string |
Yes | |
picture_url |
string |
Yes | |
superadmin |
boolean |
No | |
time_zone |
string |
No | The IANA zone the person chose for their agents' replies; null follows their app. |
202: Signup accepted for email verification
application/json
| Property | Type | Required | Description |
|---|---|---|---|
email_verification_required |
enum: true |
Yes |
401: Unauthorized
403: Signup requires waitlist approval or access
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
string |
Yes | |
error |
string |
Yes | |
waitlist_reference |
integer |
No |
404: Not found
422: Unprocessable entity
502: Bad gateway
load
GET /api/v1/auth/csrf
Operation ID: api_v1_auth_csrf.
Authentication: bearer token (bearerAuth).
Responses
200: Browser CSRF token
application/json
| Property | Type | Required | Description |
|---|---|---|---|
csrf_token |
string |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
GET /api/v1/auth/impersonation
Operation ID: api_v1_auth_impersonation.
Authentication: bearer token (bearerAuth).
Responses
200: Available only to the active superadmin who began this session
application/json
| Property | Type | Required | Description |
|---|---|---|---|
impersonation |
object,null |
Yes | |
impersonation.operator_email |
string (email) |
Yes | |
impersonation.user_email |
string (email) |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
remove
DELETE /api/v1/auth/impersonation
Operation ID: delete_api_v1_auth_impersonation.
Authentication: bearer token (bearerAuth).
Responses
200: Success
application/json
The response is object.