Skip to content

Persist GitHub App installation after portal redirect

POST
/github/app/install/complete
curl --request POST \
--url https://example.com/api/github/app/install/complete \
--header 'Content-Type: application/json' \
--cookie sb-access-token=<sb-access-token> \
--data '{ "installation_id": 1, "setup_action": "install" }'

Called from the SPA with Bearer or cookie session; upserts the installations row.

Media type application/json
object
installation_id
required
integer
>= 1
setup_action
string
Allowed values: install update

Installation saved

Media type application/json
object
ok
required
boolean
status
required
string
Allowed values: installed updated

Invalid request

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number

Not authenticated

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number
reconnect

True if re-linking GitHub may fix the issue

boolean

Server error

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number