/api/platform-configs and require authentication.
Sensitive fields (
accessToken, webhookSecret) are masked in all responses. The raw access token is only available via the admin-only GET /api/platform-configs/:id/access-token endpoint.Platform config schema
The following fields are shared by the create and update endpoints:Human-readable name for this platform connection (e.g.,
Company GitLab, GitHub Main).Platform type:
gitlab | github.Base URL of the platform instance (e.g.,
https://gitlab.example.com or https://github.com).Authentication mechanism:
token (default) | oauth.Personal access token (for
authType: token) or OAuth2 access token. Required when authType is token.OAuth2 Application ID. Required for
authType: oauth.OAuth2 Application Secret. Required for
authType: oauth.Secret token used to validate incoming webhook requests.
Whether this platform config is active. Default:
true.Mark this as the default platform config. Default:
false.List all platform configs
GET /api/platform-configs
Returns all platform configs with secrets masked.
200
List of platform config objects.
accessToken and webhookSecret are replaced with ***.List enabled platform configs
GET /api/platform-configs/enabled
Returns only platform configs with enabled: true.
List platform configs by type
GET /api/platform-configs/type/:platformType
gitlab | github200
Platform configs of the specified type.
Get default platform config
GET /api/platform-configs/default
Returns the platform config marked as isDefault: true, or null if none is set.
Response 200
The default platform config, or
null.Get a platform config
GET /api/platform-configs/:id
UUID of the platform config.
200
Platform config with secrets masked.
Get decrypted access token
GET /api/platform-configs/:id/access-token
Returns the decrypted access token. Requires the admin role.
UUID of the platform config.
200
The raw, decrypted access token.
Create a platform config
POST /api/platform-configs
Creates a new platform connection. Requires config:create permission.
For GitLab with authType: token, the server validates that the access token has the required api scope before saving.
200
The newly created platform config with secrets masked.
Update a platform config
PATCH /api/platform-configs/:id
Partially updates an existing platform config. Requires config:update permission.
UUID of the platform config to update.
200
Updated platform config with secrets masked.
Set as default
POST /api/platform-configs/:id/default
Marks the specified platform config as the default. Requires config:update permission.
UUID of the platform config to promote.
200
Updated platform config.
Delete a platform config
DELETE /api/platform-configs/:id
Deletes a platform config. Requires config:delete permission.
If associated projects exist, the request fails with 400 unless the force=true query parameter is provided, which deletes the config and all its associated projects.
UUID of the platform config to delete.
Pass
true to also delete all projects linked to this config.200
true on successful deletion.Number of associated projects deleted (non-zero only when
force=true).Test a connection
POST /api/platform-configs/test-connection
Tests whether the provided credentials can successfully connect to the platform. Requires config:update permission.
Request body
gitlab | githubPlatform base URL.
Access token to test.
token | oauth. Default: token.200
true if the connection succeeded and at least one project was found.Human-readable result description.
Additional details such as whether any projects were returned.
GitLab user search
GET /api/platform-configs/:id/gitlab/users
Searches GitLab users using the credentials of the specified platform config. Useful for populating reviewer pickers.
UUID of a GitLab platform config.
Search term.
Limit results to members of a specific platform project.
Page number. Default:
1.Items per page. Default:
20, max: 100.200
GitLab OAuth2 flow
ForauthType: oauth, use the following endpoints to complete the OAuth2 authorization code flow.
Get the GitLab authorization URL
POST /api/platform-configs/oauth/gitlab/auth-url
Generates the GitLab OAuth2 authorization URL to redirect the user to.
UUID of the platform config with
authType: oauth.The callback URL registered in your GitLab application.
Exchange the authorization code
POST /api/platform-configs/oauth/gitlab/callback
Exchanges the authorization code from GitLab for an access token and stores it.
UUID of the platform config.
Authorization code from GitLab.
Must match the
redirectUri used in the authorization step.Refresh the access token
POST /api/platform-configs/oauth/gitlab/refresh
Uses the stored refresh token to obtain a new access token.
UUID of the platform config to refresh.