---
title: "POST /api/oauth/start"
method: POST
path: "/api/oauth/start"
tags: ["oauth"]
---

# POST /api/oauth/start

`POST /api/oauth/start`

## Request body

- object
  - `client` string, required
  - `clientOwner` 'org' | 'user', required
  - `owner` 'org' | 'user', required
  - `name` string, required
  - `integration` string, required
  - `template` string, required
  - `identityLabel` string, nullable
  - `newConnection` boolean, nullable
  - `redirectUri` string, nullable
  - `enterprise` EnterpriseManagedStartInput — The second client registration (at the enterprise identity provider) and the identity assertion an enterprise-managed connect presents.
    - `idpClient` string, required
    - `idpClientOwner` 'org' | 'user', required
    - `subjectToken` string, required
    - `subjectTokenType` 'urn:ietf:params:oauth:token-type:id_token' | 'urn:ietf:params:oauth:token-type:saml2' | 'urn:ietf:params:oauth:token-type:refresh_token' | 'urn:ietf:params:oauth:token-type:access_token' — RFC 8693 identifier for the security token presented as `subject_token` when exchanging an enterprise identity assertion for an ID-JAG.

## Response `200`

Success

- union
  - object
    - `status` 'connected', required
    - `connection` object, required
      - `owner` 'org' | 'user', required
      - `name` string, required
      - `integration` string, required
      - `template` string, required
      - `provider` string, required
      - `address` string, required
      - `identityLabel` string, nullable, required
      - `expiresAt` union, required
        - number
        - 'NaN'
        - 'Infinity'
        - '-Infinity'
        - 'Infinity' | '-Infinity' | 'NaN'
      - `oauthClient` string, nullable, required
      - `oauthClientOwner` 'org' | 'user', nullable, required
      - `oauthScope` string, nullable, required
      - `missingOAuthScopes` string[], required
  - object
    - `status` 'redirect', required
    - `authorizationUrl` string, required
    - `state` string, required

## Other responses

- `400` — OAuthStartError
- `500` — InternalError

---

[API](https://skmtc.dev/executor/apis/executor-api.md) · [All operations](https://skmtc.dev/executor/apis/executor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/executor/executor-api/revisions/97a522c951f2/schema)
