Skip to main content
POST
Link a GitHub source repository

Authorizations

Authorization
string
header
required

WorkOS access JWT or a user-owned WorkOS API key. User keys are bound to one organization and restricted to their enabled product permissions. Session-only onboarding and session revocation require an interactive access JWT. No cookie session is assumed.

Headers

X-Request-Id
string

Optional caller-provided correlation identifier.

Required string length: 1 - 128
Idempotency-Key
string
required

Identifies one mutation and its canonical request payload.

Required string length: 1 - 128

Path Parameters

project_id
string
required

Project identifier.

Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$

Body

application/json
repository_owner
string
required
Required string length: 1 - 39
Pattern: ^[A-Za-z0-9](?:[A-Za-z0-9-]{0,37}[A-Za-z0-9])?$
repository_name
string
required
Required string length: 1 - 100
Pattern: ^[A-Za-z0-9._-]+$

Response

Bound GitHub authorization handoff or its current replay status.

authorization_id
string
required
Pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
status
enum<string>
required
Available options:
pending,
authorizing,
authorized,
failed,
expired
authorization_url
string<uri> | null
required

Open only when pending; contains the single-use state and PKCE challenge, never a provider credential.

installation_url
string<uri> | null
required

Install or update the GitHub App's selected repository access before authorizing, if required.

expires_at
string<date-time>
required
operation_id
string | null
required
Pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
installation_id
string | null
required
Pattern: ^[1-9][0-9]*$
repository_id
string | null
required
Pattern: ^[1-9][0-9]*$
repository_owner
string
required
repository_name
string
required