Skip to content

Link a GitHub App installation

POST/v1/git-connections/github-app/installations/{uid}/link

Connects a GitHub account you already connected in another workspace to this workspace, without visiting GitHub. Use a uid from List reusable GitHub App installations. Send no request body.

The connection is checked with GitHub first. If the app was uninstalled from that GitHub account, the request fails with 409 and you need to connect again with Get the GitHub App install URL. Linking an account that is already connected here refreshes the existing connection.

Requires the secrets manage permission (owner, admin or developer role).

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Path parameters

uidstringRequired

The uid of a connection you made in another workspace, from List reusable GitHub App installations.

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

Response

200

The GitHub account is now connected to this workspace. No data is returned.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

Errors

StatusMeaning
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, or your role cannot connect GitHub in it.
404No GitHub connection with this uid was made by you.
409The GitHub App is no longer installed on that GitHub account.

Errors use the standard error format.