# OAuth providers

> OAuth providers - OAuth Providers Service API enables management of external OAuth providers
> allowing DataRobot users to connect their workflows with external provider resources.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-05-06T18:17:09.775267+00:00` (UTC).

## Primary page

- [OAuth providers](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html): Full documentation for this topic (HTML).

## Sections on this page

- [List OAuth Provider Authorizations](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#list-oauth-provider-authorizations): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#example-responses): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#responses): In-page section heading.
- [Delete OAuth Provider Authorization by authorized provider ID](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#delete-oauth-provider-authorization-by-authorized-provider-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#delete__api_v2_externaloauth_authorizedproviders_{authorizedproviderid}_-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#example-responses_1): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#responses_1): In-page section heading.
- [Acquire OAuth Provider Authorization's Access Token by authorized provider ID](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#acquire-oauth-provider-authorizations-access-token-by-authorized-provider-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#post__api_v2_externaloauth_authorizedproviders_{authorizedproviderid}_token_-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#example-responses_2): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#responses_2): In-page section heading.
- [Get User Information by authorized provider ID](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#get-user-information-by-authorized-provider-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#get__api_v2_externaloauth_authorizedproviders_{authorizedproviderid}_userinfo_-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#example-responses_3): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#responses_3): In-page section heading.
- [Get OAuth Provider Job by job ID](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#get-oauth-provider-job-by-job-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#get__api_v2_externaloauth_jobs_{jobid}_-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#example-responses_4): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#responses_4): In-page section heading.
- [List OAuth Providers](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#list-oauth-providers): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#get__api_v2_externaloauth_providers_-parameters): In-page section heading.
- [Enumerated Values](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#enumerated-values): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#example-responses_5): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#responses_5): In-page section heading.
- [Create OAuth Provider](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#create-oauth-provider): In-page section heading.
- [Body parameter](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#body-parameter): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#post__api_v2_externaloauth_providers_-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#example-responses_6): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#responses_6): In-page section heading.
- [OAuth Provider Callback](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#oauth-provider-callback): In-page section heading.
- [Body parameter](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#body-parameter_1): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#post__api_v2_externaloauth_providers_callback_-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#example-responses_7): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#responses_7): In-page section heading.
- [Delete OAuth Provider by provider ID](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#delete-oauth-provider-by-provider-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#delete__api_v2_externaloauth_providers_{providerid}_-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#example-responses_8): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#responses_8): In-page section heading.
- [Get OAuth Provider by provider ID](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#get-oauth-provider-by-provider-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#get__api_v2_externaloauth_providers_{providerid}_-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#example-responses_9): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#responses_9): In-page section heading.
- [Update OAuth Provider by provider ID](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#update-oauth-provider-by-provider-id): In-page section heading.
- [Body parameter](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#body-parameter_2): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#patch__api_v2_externaloauth_providers_{providerid}_-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#example-responses_10): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#responses_10): In-page section heading.
- [Authorize OAuth Provider by provider ID](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#authorize-oauth-provider-by-provider-id): In-page section heading.
- [Parameters](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#post__api_v2_externaloauth_providers_{providerid}_authorize_-parameters): In-page section heading.
- [Example responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#example-responses_11): In-page section heading.
- [Responses](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#responses_11): In-page section heading.
- [handler.AuthorizeProviderResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_handler.AuthorizeProviderResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties): In-page section heading.
- [handler.AuthorizedOAuthProvidersListResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_handler.AuthorizedOAuthProvidersListResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_1): In-page section heading.
- [handler.CallbackResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_handler.CallbackResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_2): In-page section heading.
- [handler.DeleteOAuthProviderResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_handler.DeleteOAuthProviderResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_3): In-page section heading.
- [handler.GetAccessTokenResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_handler.GetAccessTokenResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_4): In-page section heading.
- [handler.ListOAuthProvidersResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_handler.ListOAuthProvidersResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_5): In-page section heading.
- [handler.OAuthCallbackRequest](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_handler.OAuthCallbackRequest): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_6): In-page section heading.
- [handler.jobStatusResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_handler.jobStatusResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_7): In-page section heading.
- [handler.keyValue](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_handler.keyValue): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_8): In-page section heading.
- [httpres.ErrorField](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_httpres.ErrorField): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_9): In-page section heading.
- [httpres.ErrorResponse](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_httpres.ErrorResponse): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_10): In-page section heading.
- [models.AuthorizedProvider](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_models.AuthorizedProvider): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_11): In-page section heading.
- [models.AuthzStatus](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_models.AuthzStatus): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_12): In-page section heading.
- [Enumerated Values](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#enumerated-values_1): In-page section heading.
- [models.JobStatus](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_models.JobStatus): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_13): In-page section heading.
- [Enumerated Values](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#enumerated-values_2): In-page section heading.
- [models.JobType](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_models.JobType): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_14): In-page section heading.
- [Enumerated Values](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#enumerated-values_3): In-page section heading.
- [models.OAuthProvider](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_models.OAuthProvider): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_15): In-page section heading.
- [models.ProviderMetadata](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_models.ProviderMetadata): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_16): In-page section heading.
- [oauth.User](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_oauth.User): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_17): In-page section heading.
- [oauthprovider.Status](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_oauthprovider.Status): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_18): In-page section heading.
- [Enumerated Values](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#enumerated-values_4): In-page section heading.
- [oauthprovider.Type](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_oauthprovider.Type): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_19): In-page section heading.
- [Enumerated Values](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#enumerated-values_5): In-page section heading.
- [provider.CreateProviderRequest](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_provider.CreateProviderRequest): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_20): In-page section heading.
- [provider.UpdateProviderRequest](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#tocS_provider.UpdateProviderRequest): In-page section heading.
- [Properties](https://docs.datarobot.com/en/docs/api/reference/public-api/oauth_providers.html#properties_21): In-page section heading.

## Related documentation

- [Developer documentation](https://docs.datarobot.com/en/docs/api/index.html): Linked from this page.
- [API reference](https://docs.datarobot.com/en/docs/api/reference/index.html): Linked from this page.
- [REST API](https://docs.datarobot.com/en/docs/api/reference/public-api/index.html): Linked from this page.
- [Administration](https://docs.datarobot.com/en/docs/api/reference/public-api/tag-admin.html): Linked from this page.

## Documentation content

OAuth Providers Service API enables management of external OAuth providers allowing DataRobot users to connect their workflows with external provider resources.

## List OAuth Provider Authorizations

Operation path: `GET /api/v2/externalOAuth/authorizedProviders/`

List OAuth Provider Authorizations for the user.

### Example responses

> 200 Response

```
{
  "properties": {
    "data": {
      "items": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "credentialId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "oauthClientId": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "provider": {
            "properties": {
              "clientId": {
                "type": "string"
              },
              "createdAt": {
                "format": "date-time",
                "type": "string"
              },
              "customScopes": {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "uniqueItems": false
              },
              "id": {
                "type": "string"
              },
              "metadata": {
                "properties": {
                  "baseUrl": {
                    "type": "string"
                  },
                  "host": {
                    "type": "string"
                  },
                  "settingsUrl": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "name": {
                "type": "string"
              },
              "orgId": {
                "type": "string"
              },
              "secureConfigId": {
                "type": "string"
              },
              "skipConsent": {
                "type": "boolean"
              },
              "status": {
                "enum": [
                  "active",
                  "invalid",
                  "deleting",
                  "deletion_failed"
                ],
                "type": "string",
                "x-enum-varnames": [
                  "StatusActive",
                  "StatusInvalid",
                  "StatusDeleting",
                  "StatusDeletionFailed"
                ]
              },
              "type": {
                "enum": [
                  "github",
                  "gitlab",
                  "bitbucket",
                  "google",
                  "box",
                  "microsoft",
                  "sharepoint",
                  "jira",
                  "confluence"
                ],
                "type": "string",
                "x-enum-varnames": [
                  "TypeGithub",
                  "TypeGitlab",
                  "TypeBitbucket",
                  "TypeGoogle",
                  "TypeBox",
                  "TypeMicrosoft",
                  "TypeSharepoint",
                  "TypeJira",
                  "TypeConfluence"
                ]
              },
              "updatedAt": {
                "format": "date-time",
                "type": "string"
              }
            },
            "type": "object"
          },
          "refreshTokenExpiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "expired",
              "invalidOAuthClient",
              "invalidProviderState"
            ],
            "type": "string",
            "x-enum-varnames": [
              "AuthzStatusActive",
              "AuthzStatusExpired",
              "AuthzStatusInvalidOAuthClient",
              "AuthzInactiveProviderState"
            ]
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array",
      "uniqueItems": false
    }
  },
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | OK | handler.AuthorizedOAuthProvidersListResponse |
| 422 | Unprocessable Entity | Validation error | httpres.ErrorResponse |

## Delete OAuth Provider Authorization by authorized provider ID

Operation path: `DELETE /api/v2/externalOAuth/authorizedProviders/{authorizedProviderId}/`

Revoke an OAuth Provider Authorization by ID.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| authorizationID | path | string | true | OAuth Provider Authorization ID |

### Example responses

> 404 Response

```
{
  "properties": {
    "errorFields": {
      "items": {
        "properties": {
          "message": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array",
      "uniqueItems": false
    },
    "message": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 204 | No Content | No Content | None |
| 404 | Not Found | OAuth Provider Authorization not found | httpres.ErrorResponse |
| 422 | Unprocessable Entity | Validation error | httpres.ErrorResponse |

## Acquire OAuth Provider Authorization's Access Token by authorized provider ID

Operation path: `POST /api/v2/externalOAuth/authorizedProviders/{authorizedProviderId}/token/`

Acquire an access token for the OAuth Provider Authorization.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| authorizationID | path | string | true | OAuth Provider Authorization ID |

### Example responses

> 201 Response

```
{
  "properties": {
    "accessToken": {
      "type": "string"
    },
    "authorizedOauthProvider": {
      "properties": {
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "credentialId": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "oauthClientId": {
          "type": "string"
        },
        "orgId": {
          "type": "string"
        },
        "provider": {
          "properties": {
            "clientId": {
              "type": "string"
            },
            "createdAt": {
              "format": "date-time",
              "type": "string"
            },
            "customScopes": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "uniqueItems": false
            },
            "id": {
              "type": "string"
            },
            "metadata": {
              "properties": {
                "baseUrl": {
                  "type": "string"
                },
                "host": {
                  "type": "string"
                },
                "settingsUrl": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "name": {
              "type": "string"
            },
            "orgId": {
              "type": "string"
            },
            "secureConfigId": {
              "type": "string"
            },
            "skipConsent": {
              "type": "boolean"
            },
            "status": {
              "enum": [
                "active",
                "invalid",
                "deleting",
                "deletion_failed"
              ],
              "type": "string",
              "x-enum-varnames": [
                "StatusActive",
                "StatusInvalid",
                "StatusDeleting",
                "StatusDeletionFailed"
              ]
            },
            "type": {
              "enum": [
                "github",
                "gitlab",
                "bitbucket",
                "google",
                "box",
                "microsoft",
                "sharepoint",
                "jira",
                "confluence"
              ],
              "type": "string",
              "x-enum-varnames": [
                "TypeGithub",
                "TypeGitlab",
                "TypeBitbucket",
                "TypeGoogle",
                "TypeBox",
                "TypeMicrosoft",
                "TypeSharepoint",
                "TypeJira",
                "TypeConfluence"
              ]
            },
            "updatedAt": {
              "format": "date-time",
              "type": "string"
            }
          },
          "type": "object"
        },
        "refreshTokenExpiresAt": {
          "format": "date-time",
          "type": "string"
        },
        "status": {
          "enum": [
            "active",
            "expired",
            "invalidOAuthClient",
            "invalidProviderState"
          ],
          "type": "string",
          "x-enum-varnames": [
            "AuthzStatusActive",
            "AuthzStatusExpired",
            "AuthzStatusInvalidOAuthClient",
            "AuthzInactiveProviderState"
          ]
        },
        "userId": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "expiresAt": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 201 | Created | Created | handler.GetAccessTokenResponse |
| 403 | Forbidden | Forbidden operation for the given OAuth Provider | httpres.ErrorResponse |
| 404 | Not Found | OAuth Provider Authorization not found | httpres.ErrorResponse |
| 422 | Unprocessable Entity | Validation error | httpres.ErrorResponse |

## Get User Information by authorized provider ID

Operation path: `GET /api/v2/externalOAuth/authorizedProviders/{authorizedProviderId}/userinfo/`

Retrieve user information from the OAuth Provider using the previously obtained authorization.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| authorizationID | path | string | true | OAuth Provider Authorization ID |

### Example responses

> 200 Response

```
{
  "properties": {
    "description": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "familyName": {
      "type": "string"
    },
    "givenName": {
      "type": "string"
    },
    "locale": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "nickName": {
      "type": "string"
    },
    "picture": {
      "type": "string"
    },
    "raw": {
      "additionalProperties": {},
      "type": "object"
    },
    "sub": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | User information | oauth.User |
| 403 | Forbidden | Forbidden operation for the given OAuth Provider | httpres.ErrorResponse |
| 404 | Not Found | OAuth Provider Authorization not found | httpres.ErrorResponse |
| 410 | Gone | Authorization expired | httpres.ErrorResponse |
| 422 | Unprocessable Entity | Validation error | httpres.ErrorResponse |

## Get OAuth Provider Job by job ID

Operation path: `GET /api/v2/externalOAuth/jobs/{jobId}/`

Retrieve the status of an OAuth Provider Job by ID.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| jobID | path | string | true | Job ID |

### Example responses

> 200 Response

```
{
  "properties": {
    "details": {
      "description": "Details is a slice of key-value pairs containing additional information about the job.\nFor example, for a delete provider job, it may include the provider ID and connected authorization IDs.\nExample usage:\nDetails = []struct {\n    Name:  \"provider_id\",\n    Value: \"1234\",\n},\n{\n    Name:  \"authorization_ids\",\n    Value: []string{\"1234\", \"5678\"},\n}",
      "items": {
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array",
      "uniqueItems": false
    },
    "finishedAt": {
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "startedAt": {
      "format": "date-time",
      "type": "string"
    },
    "status": {
      "enum": [
        "PENDING",
        "RUNNING",
        "COMPLETED",
        "ERROR"
      ],
      "type": "string",
      "x-enum-varnames": [
        "JobStatusPending",
        "JobStatusRunning",
        "JobStatusCompleted",
        "JobStatusError"
      ]
    },
    "type": {
      "enum": [
        "DELETE_PROVIDER",
        "STATS"
      ],
      "type": "string",
      "x-enum-varnames": [
        "JobTypeDeleteProvider",
        "JobTypeStats"
      ]
    }
  },
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | OK | handler.jobStatusResponse |
| 404 | Not Found | Job not found | httpres.ErrorResponse |
| 422 | Unprocessable Entity | Validation error | httpres.ErrorResponse |

## List OAuth Providers

Operation path: `GET /api/v2/externalOAuth/providers/`

Returns a list of all available OAuth providers.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| ids | query | array[string] | false | Filter by provider IDs |
| types | query | array[string] | false | Filter by provider types |
| host | query | array[string] | false | Filter by host |
| orderBy | query | string | false | Order results by field |

### Enumerated Values

| Parameter | Value |
| --- | --- |
| types | [github, gitlab, bitbucket, google, box, microsoft, sharepoint, jira, confluence] |
| orderBy | [createdAt, -createdAt] |

### Example responses

> 200 Response

```
{
  "properties": {
    "data": {
      "items": {
        "properties": {
          "clientId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "customScopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": false
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "properties": {
              "baseUrl": {
                "type": "string"
              },
              "host": {
                "type": "string"
              },
              "settingsUrl": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "secureConfigId": {
            "type": "string"
          },
          "skipConsent": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              "active",
              "invalid",
              "deleting",
              "deletion_failed"
            ],
            "type": "string",
            "x-enum-varnames": [
              "StatusActive",
              "StatusInvalid",
              "StatusDeleting",
              "StatusDeletionFailed"
            ]
          },
          "type": {
            "enum": [
              "github",
              "gitlab",
              "bitbucket",
              "google",
              "box",
              "microsoft",
              "sharepoint",
              "jira",
              "confluence"
            ],
            "type": "string",
            "x-enum-varnames": [
              "TypeGithub",
              "TypeGitlab",
              "TypeBitbucket",
              "TypeGoogle",
              "TypeBox",
              "TypeMicrosoft",
              "TypeSharepoint",
              "TypeJira",
              "TypeConfluence"
            ]
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array",
      "uniqueItems": false
    }
  },
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | OK | handler.ListOAuthProvidersResponse |
| 422 | Unprocessable Entity | Validation error | httpres.ErrorResponse |

## Create OAuth Provider

Operation path: `POST /api/v2/externalOAuth/providers/`

Creates a new OAuth provider.

### Body parameter

```
{
  "properties": {
    "clientId": {
      "type": "string"
    },
    "clientSecret": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "scopes": {
      "description": "Optional custom scopes; when set, overrides the provider's default scopes.",
      "items": {
        "type": "string"
      },
      "type": "array",
      "uniqueItems": false
    },
    "skipConsent": {
      "type": "boolean"
    },
    "type": {
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "google",
        "box",
        "microsoft",
        "sharepoint",
        "jira",
        "confluence"
      ],
      "type": "string",
      "x-enum-varnames": [
        "TypeGithub",
        "TypeGitlab",
        "TypeBitbucket",
        "TypeGoogle",
        "TypeBox",
        "TypeMicrosoft",
        "TypeSharepoint",
        "TypeJira",
        "TypeConfluence"
      ]
    }
  },
  "required": [
    "clientId",
    "clientSecret",
    "name",
    "type"
  ],
  "type": "object"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| body | body | provider.CreateProviderRequest | true | Create provider request body |

### Example responses

> 201 Response

```
{
  "properties": {
    "clientId": {
      "type": "string"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "customScopes": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "uniqueItems": false
    },
    "id": {
      "type": "string"
    },
    "metadata": {
      "properties": {
        "baseUrl": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "settingsUrl": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "secureConfigId": {
      "type": "string"
    },
    "skipConsent": {
      "type": "boolean"
    },
    "status": {
      "enum": [
        "active",
        "invalid",
        "deleting",
        "deletion_failed"
      ],
      "type": "string",
      "x-enum-varnames": [
        "StatusActive",
        "StatusInvalid",
        "StatusDeleting",
        "StatusDeletionFailed"
      ]
    },
    "type": {
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "google",
        "box",
        "microsoft",
        "sharepoint",
        "jira",
        "confluence"
      ],
      "type": "string",
      "x-enum-varnames": [
        "TypeGithub",
        "TypeGitlab",
        "TypeBitbucket",
        "TypeGoogle",
        "TypeBox",
        "TypeMicrosoft",
        "TypeSharepoint",
        "TypeJira",
        "TypeConfluence"
      ]
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 201 | Created | Created | models.OAuthProvider |
| 422 | Unprocessable Entity | Validation error | httpres.ErrorResponse |

## OAuth Provider Callback

Operation path: `POST /api/v2/externalOAuth/providers/callback/`

Handles the OAuth2 callback, exchanges authorization code for an access/refresh tokens, and creates a new.

### Body parameter

```
{
  "properties": {
    "code": {
      "type": "string"
    },
    "providerId": {
      "type": "string"
    },
    "state": {
      "type": "string"
    }
  },
  "required": [
    "code",
    "providerId",
    "state"
  ],
  "type": "object"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| body | body | handler.OAuthCallbackRequest | true | OAuth callback request body |

### Example responses

> 200 Response

```
{
  "properties": {
    "authorizedProvider": {
      "properties": {
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "credentialId": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "oauthClientId": {
          "type": "string"
        },
        "orgId": {
          "type": "string"
        },
        "provider": {
          "properties": {
            "clientId": {
              "type": "string"
            },
            "createdAt": {
              "format": "date-time",
              "type": "string"
            },
            "customScopes": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "uniqueItems": false
            },
            "id": {
              "type": "string"
            },
            "metadata": {
              "properties": {
                "baseUrl": {
                  "type": "string"
                },
                "host": {
                  "type": "string"
                },
                "settingsUrl": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "name": {
              "type": "string"
            },
            "orgId": {
              "type": "string"
            },
            "secureConfigId": {
              "type": "string"
            },
            "skipConsent": {
              "type": "boolean"
            },
            "status": {
              "enum": [
                "active",
                "invalid",
                "deleting",
                "deletion_failed"
              ],
              "type": "string",
              "x-enum-varnames": [
                "StatusActive",
                "StatusInvalid",
                "StatusDeleting",
                "StatusDeletionFailed"
              ]
            },
            "type": {
              "enum": [
                "github",
                "gitlab",
                "bitbucket",
                "google",
                "box",
                "microsoft",
                "sharepoint",
                "jira",
                "confluence"
              ],
              "type": "string",
              "x-enum-varnames": [
                "TypeGithub",
                "TypeGitlab",
                "TypeBitbucket",
                "TypeGoogle",
                "TypeBox",
                "TypeMicrosoft",
                "TypeSharepoint",
                "TypeJira",
                "TypeConfluence"
              ]
            },
            "updatedAt": {
              "format": "date-time",
              "type": "string"
            }
          },
          "type": "object"
        },
        "refreshTokenExpiresAt": {
          "format": "date-time",
          "type": "string"
        },
        "status": {
          "enum": [
            "active",
            "expired",
            "invalidOAuthClient",
            "invalidProviderState"
          ],
          "type": "string",
          "x-enum-varnames": [
            "AuthzStatusActive",
            "AuthzStatusExpired",
            "AuthzStatusInvalidOAuthClient",
            "AuthzInactiveProviderState"
          ]
        },
        "userId": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "userInfo": {
      "properties": {
        "description": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "familyName": {
          "type": "string"
        },
        "givenName": {
          "type": "string"
        },
        "locale": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "nickName": {
          "type": "string"
        },
        "picture": {
          "type": "string"
        },
        "raw": {
          "additionalProperties": {},
          "type": "object"
        },
        "sub": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | OK | handler.CallbackResponse |
| 400 | Bad Request | Invalid authorization data was provided | httpres.ErrorResponse |
| 404 | Not Found | Provider not found | httpres.ErrorResponse |
| 422 | Unprocessable Entity | Validation error | httpres.ErrorResponse |

## Delete OAuth Provider by provider ID

Operation path: `DELETE /api/v2/externalOAuth/providers/{providerID}/`

Initiates a job to delete an OAuth provider by its ID, along with all associated resources.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| providerId | path | string | true | OAuth Provider ID |

### Example responses

> 202 Response

```
{
  "properties": {
    "location": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 202 | Accepted | Location of the job that will perform deletion | handler.DeleteOAuthProviderResponse |
| 422 | Unprocessable Entity | Validation error | httpres.ErrorResponse |

## Get OAuth Provider by provider ID

Operation path: `GET /api/v2/externalOAuth/providers/{providerID}/`

Retrieves an OAuth provider by its ID.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| providerId | path | string | true | OAuth Provider ID |

### Example responses

> 200 Response

```
{
  "properties": {
    "clientId": {
      "type": "string"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "customScopes": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "uniqueItems": false
    },
    "id": {
      "type": "string"
    },
    "metadata": {
      "properties": {
        "baseUrl": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "settingsUrl": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "secureConfigId": {
      "type": "string"
    },
    "skipConsent": {
      "type": "boolean"
    },
    "status": {
      "enum": [
        "active",
        "invalid",
        "deleting",
        "deletion_failed"
      ],
      "type": "string",
      "x-enum-varnames": [
        "StatusActive",
        "StatusInvalid",
        "StatusDeleting",
        "StatusDeletionFailed"
      ]
    },
    "type": {
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "google",
        "box",
        "microsoft",
        "sharepoint",
        "jira",
        "confluence"
      ],
      "type": "string",
      "x-enum-varnames": [
        "TypeGithub",
        "TypeGitlab",
        "TypeBitbucket",
        "TypeGoogle",
        "TypeBox",
        "TypeMicrosoft",
        "TypeSharepoint",
        "TypeJira",
        "TypeConfluence"
      ]
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | OK | models.OAuthProvider |
| 404 | Not Found | Provider not found | httpres.ErrorResponse |
| 422 | Unprocessable Entity | Validation error | httpres.ErrorResponse |

## Update OAuth Provider by provider ID

Operation path: `PATCH /api/v2/externalOAuth/providers/{providerID}/`

Updates an existing OAuth provider by its ID.

### Body parameter

```
{
  "properties": {
    "clientSecret": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "skipConsent": {
      "type": "boolean"
    },
    "status": {
      "enum": [
        "active",
        "invalid",
        "deleting",
        "deletion_failed"
      ],
      "type": "string",
      "x-enum-varnames": [
        "StatusActive",
        "StatusInvalid",
        "StatusDeleting",
        "StatusDeletionFailed"
      ]
    }
  },
  "type": "object"
}
```

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| providerId | path | string | true | OAuth Provider ID |
| body | body | provider.UpdateProviderRequest | true | Update provider request body |

### Example responses

> 200 Response

```
{
  "properties": {
    "clientId": {
      "type": "string"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "customScopes": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "uniqueItems": false
    },
    "id": {
      "type": "string"
    },
    "metadata": {
      "properties": {
        "baseUrl": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "settingsUrl": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "secureConfigId": {
      "type": "string"
    },
    "skipConsent": {
      "type": "boolean"
    },
    "status": {
      "enum": [
        "active",
        "invalid",
        "deleting",
        "deletion_failed"
      ],
      "type": "string",
      "x-enum-varnames": [
        "StatusActive",
        "StatusInvalid",
        "StatusDeleting",
        "StatusDeletionFailed"
      ]
    },
    "type": {
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "google",
        "box",
        "microsoft",
        "sharepoint",
        "jira",
        "confluence"
      ],
      "type": "string",
      "x-enum-varnames": [
        "TypeGithub",
        "TypeGitlab",
        "TypeBitbucket",
        "TypeGoogle",
        "TypeBox",
        "TypeMicrosoft",
        "TypeSharepoint",
        "TypeJira",
        "TypeConfluence"
      ]
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | OK | models.OAuthProvider |
| 422 | Unprocessable Entity | Validation error | httpres.ErrorResponse |

## Authorize OAuth Provider by provider ID

Operation path: `POST /api/v2/externalOAuth/providers/{providerId}/authorize/`

Returns a redirect URL to the OAuth2 provider's authorization page to get user's consent for accessing their data.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| providerId | path | string | true | OAuth Provider ID |
| state | query | string | false | Client-supplied state to correlate the authorization request with the callback |
| redirect_uri | query | string | false | Custom redirect URI which overrides the default callback URL |

### Example responses

> 200 Response

```
{
  "properties": {
    "redirectUrl": {
      "type": "string"
    },
    "state": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Responses

| Status | Meaning | Description | Schema |
| --- | --- | --- | --- |
| 200 | OK | OK | handler.AuthorizeProviderResponse |
| 404 | Not Found | Provider not found | httpres.ErrorResponse |
| 409 | Conflict | Provider is in a conflicting state | httpres.ErrorResponse |
| 422 | Unprocessable Entity | Validation error | httpres.ErrorResponse |

# Schemas

## handler.AuthorizeProviderResponse

```
{
  "properties": {
    "redirectUrl": {
      "type": "string"
    },
    "state": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| redirectUrl | string | false |  | none |
| state | string | false |  | none |

## handler.AuthorizedOAuthProvidersListResponse

```
{
  "properties": {
    "data": {
      "items": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "credentialId": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "oauthClientId": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "provider": {
            "properties": {
              "clientId": {
                "type": "string"
              },
              "createdAt": {
                "format": "date-time",
                "type": "string"
              },
              "customScopes": {
                "items": {
                  "type": "string"
                },
                "type": "array",
                "uniqueItems": false
              },
              "id": {
                "type": "string"
              },
              "metadata": {
                "properties": {
                  "baseUrl": {
                    "type": "string"
                  },
                  "host": {
                    "type": "string"
                  },
                  "settingsUrl": {
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "name": {
                "type": "string"
              },
              "orgId": {
                "type": "string"
              },
              "secureConfigId": {
                "type": "string"
              },
              "skipConsent": {
                "type": "boolean"
              },
              "status": {
                "enum": [
                  "active",
                  "invalid",
                  "deleting",
                  "deletion_failed"
                ],
                "type": "string",
                "x-enum-varnames": [
                  "StatusActive",
                  "StatusInvalid",
                  "StatusDeleting",
                  "StatusDeletionFailed"
                ]
              },
              "type": {
                "enum": [
                  "github",
                  "gitlab",
                  "bitbucket",
                  "google",
                  "box",
                  "microsoft",
                  "sharepoint",
                  "jira",
                  "confluence"
                ],
                "type": "string",
                "x-enum-varnames": [
                  "TypeGithub",
                  "TypeGitlab",
                  "TypeBitbucket",
                  "TypeGoogle",
                  "TypeBox",
                  "TypeMicrosoft",
                  "TypeSharepoint",
                  "TypeJira",
                  "TypeConfluence"
                ]
              },
              "updatedAt": {
                "format": "date-time",
                "type": "string"
              }
            },
            "type": "object"
          },
          "refreshTokenExpiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "expired",
              "invalidOAuthClient",
              "invalidProviderState"
            ],
            "type": "string",
            "x-enum-varnames": [
              "AuthzStatusActive",
              "AuthzStatusExpired",
              "AuthzStatusInvalidOAuthClient",
              "AuthzInactiveProviderState"
            ]
          },
          "userId": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array",
      "uniqueItems": false
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| data | [models.AuthorizedProvider] | false |  | none |

## handler.CallbackResponse

```
{
  "properties": {
    "authorizedProvider": {
      "properties": {
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "credentialId": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "oauthClientId": {
          "type": "string"
        },
        "orgId": {
          "type": "string"
        },
        "provider": {
          "properties": {
            "clientId": {
              "type": "string"
            },
            "createdAt": {
              "format": "date-time",
              "type": "string"
            },
            "customScopes": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "uniqueItems": false
            },
            "id": {
              "type": "string"
            },
            "metadata": {
              "properties": {
                "baseUrl": {
                  "type": "string"
                },
                "host": {
                  "type": "string"
                },
                "settingsUrl": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "name": {
              "type": "string"
            },
            "orgId": {
              "type": "string"
            },
            "secureConfigId": {
              "type": "string"
            },
            "skipConsent": {
              "type": "boolean"
            },
            "status": {
              "enum": [
                "active",
                "invalid",
                "deleting",
                "deletion_failed"
              ],
              "type": "string",
              "x-enum-varnames": [
                "StatusActive",
                "StatusInvalid",
                "StatusDeleting",
                "StatusDeletionFailed"
              ]
            },
            "type": {
              "enum": [
                "github",
                "gitlab",
                "bitbucket",
                "google",
                "box",
                "microsoft",
                "sharepoint",
                "jira",
                "confluence"
              ],
              "type": "string",
              "x-enum-varnames": [
                "TypeGithub",
                "TypeGitlab",
                "TypeBitbucket",
                "TypeGoogle",
                "TypeBox",
                "TypeMicrosoft",
                "TypeSharepoint",
                "TypeJira",
                "TypeConfluence"
              ]
            },
            "updatedAt": {
              "format": "date-time",
              "type": "string"
            }
          },
          "type": "object"
        },
        "refreshTokenExpiresAt": {
          "format": "date-time",
          "type": "string"
        },
        "status": {
          "enum": [
            "active",
            "expired",
            "invalidOAuthClient",
            "invalidProviderState"
          ],
          "type": "string",
          "x-enum-varnames": [
            "AuthzStatusActive",
            "AuthzStatusExpired",
            "AuthzStatusInvalidOAuthClient",
            "AuthzInactiveProviderState"
          ]
        },
        "userId": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "userInfo": {
      "properties": {
        "description": {
          "type": "string"
        },
        "email": {
          "type": "string"
        },
        "familyName": {
          "type": "string"
        },
        "givenName": {
          "type": "string"
        },
        "locale": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "nickName": {
          "type": "string"
        },
        "picture": {
          "type": "string"
        },
        "raw": {
          "additionalProperties": {},
          "type": "object"
        },
        "sub": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| authorizedProvider | models.AuthorizedProvider | false |  | none |
| userInfo | oauth.User | false |  | none |

## handler.DeleteOAuthProviderResponse

```
{
  "properties": {
    "location": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| location | string | false |  | none |

## handler.GetAccessTokenResponse

```
{
  "properties": {
    "accessToken": {
      "type": "string"
    },
    "authorizedOauthProvider": {
      "properties": {
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "credentialId": {
          "type": "string"
        },
        "id": {
          "type": "string"
        },
        "oauthClientId": {
          "type": "string"
        },
        "orgId": {
          "type": "string"
        },
        "provider": {
          "properties": {
            "clientId": {
              "type": "string"
            },
            "createdAt": {
              "format": "date-time",
              "type": "string"
            },
            "customScopes": {
              "items": {
                "type": "string"
              },
              "type": "array",
              "uniqueItems": false
            },
            "id": {
              "type": "string"
            },
            "metadata": {
              "properties": {
                "baseUrl": {
                  "type": "string"
                },
                "host": {
                  "type": "string"
                },
                "settingsUrl": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "name": {
              "type": "string"
            },
            "orgId": {
              "type": "string"
            },
            "secureConfigId": {
              "type": "string"
            },
            "skipConsent": {
              "type": "boolean"
            },
            "status": {
              "enum": [
                "active",
                "invalid",
                "deleting",
                "deletion_failed"
              ],
              "type": "string",
              "x-enum-varnames": [
                "StatusActive",
                "StatusInvalid",
                "StatusDeleting",
                "StatusDeletionFailed"
              ]
            },
            "type": {
              "enum": [
                "github",
                "gitlab",
                "bitbucket",
                "google",
                "box",
                "microsoft",
                "sharepoint",
                "jira",
                "confluence"
              ],
              "type": "string",
              "x-enum-varnames": [
                "TypeGithub",
                "TypeGitlab",
                "TypeBitbucket",
                "TypeGoogle",
                "TypeBox",
                "TypeMicrosoft",
                "TypeSharepoint",
                "TypeJira",
                "TypeConfluence"
              ]
            },
            "updatedAt": {
              "format": "date-time",
              "type": "string"
            }
          },
          "type": "object"
        },
        "refreshTokenExpiresAt": {
          "format": "date-time",
          "type": "string"
        },
        "status": {
          "enum": [
            "active",
            "expired",
            "invalidOAuthClient",
            "invalidProviderState"
          ],
          "type": "string",
          "x-enum-varnames": [
            "AuthzStatusActive",
            "AuthzStatusExpired",
            "AuthzStatusInvalidOAuthClient",
            "AuthzInactiveProviderState"
          ]
        },
        "userId": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "expiresAt": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| accessToken | string | false |  | none |
| authorizedOauthProvider | models.AuthorizedProvider | false |  | none |
| expiresAt | string | false |  | none |

## handler.ListOAuthProvidersResponse

```
{
  "properties": {
    "data": {
      "items": {
        "properties": {
          "clientId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "customScopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "uniqueItems": false
          },
          "id": {
            "type": "string"
          },
          "metadata": {
            "properties": {
              "baseUrl": {
                "type": "string"
              },
              "host": {
                "type": "string"
              },
              "settingsUrl": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "name": {
            "type": "string"
          },
          "orgId": {
            "type": "string"
          },
          "secureConfigId": {
            "type": "string"
          },
          "skipConsent": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              "active",
              "invalid",
              "deleting",
              "deletion_failed"
            ],
            "type": "string",
            "x-enum-varnames": [
              "StatusActive",
              "StatusInvalid",
              "StatusDeleting",
              "StatusDeletionFailed"
            ]
          },
          "type": {
            "enum": [
              "github",
              "gitlab",
              "bitbucket",
              "google",
              "box",
              "microsoft",
              "sharepoint",
              "jira",
              "confluence"
            ],
            "type": "string",
            "x-enum-varnames": [
              "TypeGithub",
              "TypeGitlab",
              "TypeBitbucket",
              "TypeGoogle",
              "TypeBox",
              "TypeMicrosoft",
              "TypeSharepoint",
              "TypeJira",
              "TypeConfluence"
            ]
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array",
      "uniqueItems": false
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| data | [models.OAuthProvider] | false |  | none |

## handler.OAuthCallbackRequest

```
{
  "properties": {
    "code": {
      "type": "string"
    },
    "providerId": {
      "type": "string"
    },
    "state": {
      "type": "string"
    }
  },
  "required": [
    "code",
    "providerId",
    "state"
  ],
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| code | string | true |  | none |
| providerId | string | true |  | none |
| state | string | true |  | none |

## handler.jobStatusResponse

```
{
  "properties": {
    "details": {
      "description": "Details is a slice of key-value pairs containing additional information about the job.\nFor example, for a delete provider job, it may include the provider ID and connected authorization IDs.\nExample usage:\nDetails = []struct {\n    Name:  \"provider_id\",\n    Value: \"1234\",\n},\n{\n    Name:  \"authorization_ids\",\n    Value: []string{\"1234\", \"5678\"},\n}",
      "items": {
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array",
      "uniqueItems": false
    },
    "finishedAt": {
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "startedAt": {
      "format": "date-time",
      "type": "string"
    },
    "status": {
      "enum": [
        "PENDING",
        "RUNNING",
        "COMPLETED",
        "ERROR"
      ],
      "type": "string",
      "x-enum-varnames": [
        "JobStatusPending",
        "JobStatusRunning",
        "JobStatusCompleted",
        "JobStatusError"
      ]
    },
    "type": {
      "enum": [
        "DELETE_PROVIDER",
        "STATS"
      ],
      "type": "string",
      "x-enum-varnames": [
        "JobTypeDeleteProvider",
        "JobTypeStats"
      ]
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| details | [handler.keyValue] | false |  | Details is a slice of key-value pairs containing additional information about the job.For example, for a delete provider job, it may include the provider ID and connected authorization IDs.Example usage:Details = []struct { Name: "provider_id", Value: "1234",},{ Name: "authorization_ids", Value: []string{"1234", "5678"},} |
| finishedAt | string(date-time) | false |  | none |
| id | string | false |  | none |
| name | string | false |  | none |
| orgId | string | false |  | none |
| startedAt | string(date-time) | false |  | none |
| status | models.JobStatus | false |  | none |
| type | models.JobType | false |  | none |

## handler.keyValue

```
{
  "properties": {
    "name": {
      "type": "string"
    },
    "value": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| name | string | false |  | none |
| value | string | false |  | none |

## httpres.ErrorField

```
{
  "properties": {
    "message": {
      "type": "string"
    },
    "name": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| message | string | false |  | none |
| name | string | false |  | none |

## httpres.ErrorResponse

```
{
  "properties": {
    "errorFields": {
      "items": {
        "properties": {
          "message": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array",
      "uniqueItems": false
    },
    "message": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| errorFields | [httpres.ErrorField] | false |  | none |
| message | string | false |  | none |

## models.AuthorizedProvider

```
{
  "properties": {
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "credentialId": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "oauthClientId": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "provider": {
      "properties": {
        "clientId": {
          "type": "string"
        },
        "createdAt": {
          "format": "date-time",
          "type": "string"
        },
        "customScopes": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "uniqueItems": false
        },
        "id": {
          "type": "string"
        },
        "metadata": {
          "properties": {
            "baseUrl": {
              "type": "string"
            },
            "host": {
              "type": "string"
            },
            "settingsUrl": {
              "type": "string"
            }
          },
          "type": "object"
        },
        "name": {
          "type": "string"
        },
        "orgId": {
          "type": "string"
        },
        "secureConfigId": {
          "type": "string"
        },
        "skipConsent": {
          "type": "boolean"
        },
        "status": {
          "enum": [
            "active",
            "invalid",
            "deleting",
            "deletion_failed"
          ],
          "type": "string",
          "x-enum-varnames": [
            "StatusActive",
            "StatusInvalid",
            "StatusDeleting",
            "StatusDeletionFailed"
          ]
        },
        "type": {
          "enum": [
            "github",
            "gitlab",
            "bitbucket",
            "google",
            "box",
            "microsoft",
            "sharepoint",
            "jira",
            "confluence"
          ],
          "type": "string",
          "x-enum-varnames": [
            "TypeGithub",
            "TypeGitlab",
            "TypeBitbucket",
            "TypeGoogle",
            "TypeBox",
            "TypeMicrosoft",
            "TypeSharepoint",
            "TypeJira",
            "TypeConfluence"
          ]
        },
        "updatedAt": {
          "format": "date-time",
          "type": "string"
        }
      },
      "type": "object"
    },
    "refreshTokenExpiresAt": {
      "format": "date-time",
      "type": "string"
    },
    "status": {
      "enum": [
        "active",
        "expired",
        "invalidOAuthClient",
        "invalidProviderState"
      ],
      "type": "string",
      "x-enum-varnames": [
        "AuthzStatusActive",
        "AuthzStatusExpired",
        "AuthzStatusInvalidOAuthClient",
        "AuthzInactiveProviderState"
      ]
    },
    "userId": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| createdAt | string(date-time) | false |  | none |
| credentialId | string | false |  | none |
| id | string | false |  | none |
| oauthClientId | string | false |  | none |
| orgId | string | false |  | none |
| provider | models.OAuthProvider | false |  | none |
| refreshTokenExpiresAt | string(date-time) | false |  | none |
| status | models.AuthzStatus | false |  | none |
| userId | string | false |  | none |

## models.AuthzStatus

```
{
  "enum": [
    "active",
    "expired",
    "invalidOAuthClient",
    "invalidProviderState"
  ],
  "type": "string",
  "x-enum-varnames": [
    "AuthzStatusActive",
    "AuthzStatusExpired",
    "AuthzStatusInvalidOAuthClient",
    "AuthzInactiveProviderState"
  ]
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| anonymous | string | false |  | none |

### Enumerated Values

| Property | Value |
| --- | --- |
| anonymous | [active, expired, invalidOAuthClient, invalidProviderState] |

## models.JobStatus

```
{
  "enum": [
    "PENDING",
    "RUNNING",
    "COMPLETED",
    "ERROR"
  ],
  "type": "string",
  "x-enum-varnames": [
    "JobStatusPending",
    "JobStatusRunning",
    "JobStatusCompleted",
    "JobStatusError"
  ]
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| anonymous | string | false |  | none |

### Enumerated Values

| Property | Value |
| --- | --- |
| anonymous | [PENDING, RUNNING, COMPLETED, ERROR] |

## models.JobType

```
{
  "enum": [
    "DELETE_PROVIDER",
    "STATS"
  ],
  "type": "string",
  "x-enum-varnames": [
    "JobTypeDeleteProvider",
    "JobTypeStats"
  ]
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| anonymous | string | false |  | none |

### Enumerated Values

| Property | Value |
| --- | --- |
| anonymous | [DELETE_PROVIDER, STATS] |

## models.OAuthProvider

```
{
  "properties": {
    "clientId": {
      "type": "string"
    },
    "createdAt": {
      "format": "date-time",
      "type": "string"
    },
    "customScopes": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "uniqueItems": false
    },
    "id": {
      "type": "string"
    },
    "metadata": {
      "properties": {
        "baseUrl": {
          "type": "string"
        },
        "host": {
          "type": "string"
        },
        "settingsUrl": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "name": {
      "type": "string"
    },
    "orgId": {
      "type": "string"
    },
    "secureConfigId": {
      "type": "string"
    },
    "skipConsent": {
      "type": "boolean"
    },
    "status": {
      "enum": [
        "active",
        "invalid",
        "deleting",
        "deletion_failed"
      ],
      "type": "string",
      "x-enum-varnames": [
        "StatusActive",
        "StatusInvalid",
        "StatusDeleting",
        "StatusDeletionFailed"
      ]
    },
    "type": {
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "google",
        "box",
        "microsoft",
        "sharepoint",
        "jira",
        "confluence"
      ],
      "type": "string",
      "x-enum-varnames": [
        "TypeGithub",
        "TypeGitlab",
        "TypeBitbucket",
        "TypeGoogle",
        "TypeBox",
        "TypeMicrosoft",
        "TypeSharepoint",
        "TypeJira",
        "TypeConfluence"
      ]
    },
    "updatedAt": {
      "format": "date-time",
      "type": "string"
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| clientId | string | false |  | none |
| createdAt | string(date-time) | false |  | none |
| customScopes | [string] | false |  | none |
| id | string | false |  | none |
| metadata | models.ProviderMetadata | false |  | none |
| name | string | false |  | none |
| orgId | string | false |  | none |
| secureConfigId | string | false |  | none |
| skipConsent | boolean | false |  | none |
| status | oauthprovider.Status | false |  | none |
| type | oauthprovider.Type | false |  | none |
| updatedAt | string(date-time) | false |  | none |

## models.ProviderMetadata

```
{
  "properties": {
    "baseUrl": {
      "type": "string"
    },
    "host": {
      "type": "string"
    },
    "settingsUrl": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| baseUrl | string | false |  | none |
| host | string | false |  | none |
| settingsUrl | string | false |  | none |

## oauth.User

```
{
  "properties": {
    "description": {
      "type": "string"
    },
    "email": {
      "type": "string"
    },
    "familyName": {
      "type": "string"
    },
    "givenName": {
      "type": "string"
    },
    "locale": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "nickName": {
      "type": "string"
    },
    "picture": {
      "type": "string"
    },
    "raw": {
      "additionalProperties": {},
      "type": "object"
    },
    "sub": {
      "type": "string"
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| description | string | false |  | none |
| email | string | false |  | none |
| familyName | string | false |  | none |
| givenName | string | false |  | none |
| locale | string | false |  | none |
| name | string | false |  | none |
| nickName | string | false |  | none |
| picture | string | false |  | none |
| raw | object | false |  | none |
| » additionalProperties | any | false |  | none |
| sub | string | false |  | none |

## oauthprovider.Status

```
{
  "enum": [
    "active",
    "invalid",
    "deleting",
    "deletion_failed"
  ],
  "type": "string",
  "x-enum-varnames": [
    "StatusActive",
    "StatusInvalid",
    "StatusDeleting",
    "StatusDeletionFailed"
  ]
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| anonymous | string | false |  | none |

### Enumerated Values

| Property | Value |
| --- | --- |
| anonymous | [active, invalid, deleting, deletion_failed] |

## oauthprovider.Type

```
{
  "enum": [
    "github",
    "gitlab",
    "bitbucket",
    "google",
    "box",
    "microsoft",
    "sharepoint",
    "jira",
    "confluence"
  ],
  "type": "string",
  "x-enum-varnames": [
    "TypeGithub",
    "TypeGitlab",
    "TypeBitbucket",
    "TypeGoogle",
    "TypeBox",
    "TypeMicrosoft",
    "TypeSharepoint",
    "TypeJira",
    "TypeConfluence"
  ]
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| anonymous | string | false |  | none |

### Enumerated Values

| Property | Value |
| --- | --- |
| anonymous | [github, gitlab, bitbucket, google, box, microsoft, sharepoint, jira, confluence] |

## provider.CreateProviderRequest

```
{
  "properties": {
    "clientId": {
      "type": "string"
    },
    "clientSecret": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "scopes": {
      "description": "Optional custom scopes; when set, overrides the provider's default scopes.",
      "items": {
        "type": "string"
      },
      "type": "array",
      "uniqueItems": false
    },
    "skipConsent": {
      "type": "boolean"
    },
    "type": {
      "enum": [
        "github",
        "gitlab",
        "bitbucket",
        "google",
        "box",
        "microsoft",
        "sharepoint",
        "jira",
        "confluence"
      ],
      "type": "string",
      "x-enum-varnames": [
        "TypeGithub",
        "TypeGitlab",
        "TypeBitbucket",
        "TypeGoogle",
        "TypeBox",
        "TypeMicrosoft",
        "TypeSharepoint",
        "TypeJira",
        "TypeConfluence"
      ]
    }
  },
  "required": [
    "clientId",
    "clientSecret",
    "name",
    "type"
  ],
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| clientId | string | true |  | none |
| clientSecret | string | true |  | none |
| name | string | true |  | none |
| scopes | [string] | false |  | Optional custom scopes; when set, overrides the provider's default scopes. |
| skipConsent | boolean | false |  | none |
| type | oauthprovider.Type | true |  | none |

## provider.UpdateProviderRequest

```
{
  "properties": {
    "clientSecret": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "skipConsent": {
      "type": "boolean"
    },
    "status": {
      "enum": [
        "active",
        "invalid",
        "deleting",
        "deletion_failed"
      ],
      "type": "string",
      "x-enum-varnames": [
        "StatusActive",
        "StatusInvalid",
        "StatusDeleting",
        "StatusDeletionFailed"
      ]
    }
  },
  "type": "object"
}
```

### Properties

| Name | Type | Required | Restrictions | Description |
| --- | --- | --- | --- | --- |
| clientSecret | string | false |  | none |
| name | string | false |  | none |
| skipConsent | boolean | false |  | none |
| status | oauthprovider.Status | false |  | none |
