---
title: "POST /api/v1/auth/github"
method: POST
path: "/api/v1/auth/github"
tags: ["auth"]
---

# POST /api/v1/auth/github

`POST /api/v1/auth/github`

## Request

- Base URL: `https://composal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://composal.com/api/v1/auth/github`
- Auth: none required

## Request body

- object
  - `code` string, required
  - `redirect_uri` string, uri, required
  - `state` string, required
  - `invite_code` string: Optional signup invitation code.

## Response `200`

Authenticated user session

- AuthSession
  - `id` string, required
  - `email` string, email, required
  - `name` string, nullable, required
  - `picture_url` string, nullable, required
  - `superadmin` boolean
  - `app_promotion` AppPromotion, required
    - `desktop` boolean, required: Whether to offer the desktop app.
    - `mobile` boolean, required: Whether to offer mobile testing.
    - `ios_testing_requested` boolean, required
    - `android_testing_requested` boolean, required
  - `analytics_distinct_id` string
  - `commit_author_email` string, email, required
  - `github_prs_authored_by_change_author` boolean, required
  - `github_pr_user_authorization_connected` boolean, required
  - `github_pr_user_authorization_login` string, nullable, required
  - `organizations` OrganizationSummary[], required
    - `id` string, required
    - `slug` string, required
    - `name` string, required
    - `timezone` string, required: Default IANA timezone for organization-local schedules such as nightly dreaming.
    - `logo_url` string, nullable, required
    - `role` string, nullable, required
    - `personal` boolean, required
    - `member_count` integer, required
    - `pending_invitation_count` integer, required
    - `repository_count` integer, required
    - `source_ui_enabled` boolean: Organization-scoped Source workspace rollout; missing values mean disabled.
    - `source_control_providers` string[]: Connected source control providers for this organization. Missing values mean no providers are known.
    - `activated_products` string[], required: Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement.
    - `can_activate_products` boolean, required: Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces.
    - `sandbox_region` 'us-was-1' | 'us-pdx-1' | 'eu-lon-1' | 'eu-fra-1' | 'auto', required
    - `github_prs_authored_by_change_author` boolean, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `created_at_label` string, nullable, required
    - `updated_at_label` string, nullable, required
  - `active_organization` OrganizationSummary, required
    - `id` string, required
    - `slug` string, required
    - `name` string, required
    - `timezone` string, required: Default IANA timezone for organization-local schedules such as nightly dreaming.
    - `logo_url` string, nullable, required
    - `role` string, nullable, required
    - `personal` boolean, required
    - `member_count` integer, required
    - `pending_invitation_count` integer, required
    - `repository_count` integer, required
    - `source_ui_enabled` boolean: Organization-scoped Source workspace rollout; missing values mean disabled.
    - `source_control_providers` string[]: Connected source control providers for this organization. Missing values mean no providers are known.
    - `activated_products` string[], required: Products this organization has activated (PRD 144). Activation is what makes a product's surfaces visible; it is neither permission nor entitlement.
    - `can_activate_products` boolean, required: Whether the current user may activate a product for this organization: the organization-admin rule the activation endpoint enforces.
    - `sandbox_region` 'us-was-1' | 'us-pdx-1' | 'eu-lon-1' | 'eu-fra-1' | 'auto', required
    - `github_prs_authored_by_change_author` boolean, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `created_at_label` string, nullable, required
    - `updated_at_label` string, nullable, required
  - `pending_organization_invitation_count` integer, required
  - `pending_organization_invitation_count_label` string, required
  - `enabled_features` string[], required
  - `api_token` string
  - `api_base_url` string, uri

## Other responses

- `401`: Unauthorized
- `403`: Sign-in requires account access, email verification, or a different existing sign-in method
- `404`: Not found
- `422`: Unprocessable entity
- `502`: Bad gateway

---

[API](https://skmtc.dev/composal/apis/vex-api.md) - [All operations](https://skmtc.dev/composal/apis/vex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/composal/apis/vex-api/revisions/74298a24e040?raw)
