Optimly OAuth API

The Oauth API from Optimly — 5 operation(s) for oauth.

GitHub OpenAPI

Operations 5

POST /api/oauth/authorize Authorize #
POST /api/oauth/token Token #
POST /api/oauth/revoke Revoke #
GET /api/oauth/connections List Connections #
DELETE /api/oauth/connections/{connection_id} Delete Connection #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/optimly-ai:optimly-ai-oauth-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

optimly-ai-oauth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Optimly OAuth API
  version: 0.1.0
tags:
- name: OAuth
paths:
  /api/oauth/authorize:
    post:
      summary: Authorize
      description: 'Validate the consent request and mint a one-time code. The SPA then

        redirects the browser to `redirect_uri?code=…&state=…&iss=…` itself.


        **Two kinds of failure, split per RFC 6749 §4.1.2.1** (`_redirect_error`):

        a failure we cannot trust the destination for is shown to the user on this

        page and MUST NOT be redirected; every other failure returns the same

        descriptor shape as a success, with `error` in place of `code`, for the SPA to

        deliver. Both carry `iss`, which is what OpenAI''s stable-callback

        qualification keys off.


        **The admin gate is gone** — any member may consent — and the reason it was

        here is worth keeping visible, because it is the shape of the mistake rather

        than of this code. It lived in the handler rather than on the route

        (`require_admin`) so a member''s rejection would be a funnel event instead of

        a 403 the handler never saw, which was an improvement on the thing it

        replaced and still the wrong question: the funnel could then *count* the wall

        while the persona stood in front of it.


        What replaced it is ownership, not a role: the connection belongs to whoever

        consented it (`oauth_connections.created_by`), so a member''s grant is theirs

        to use and theirs to revoke, and one member''s consent can neither stand in

        for nor interfere with a colleague''s. `require_org` still applies, so a

        caller with no active organization is refused before any of this.'
      operationId: authorize_api_oauth_authorize_post
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: true
              type: object
              title: Payload
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response Authorize Api Oauth Authorize Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - OAuth
  /api/oauth/token:
    post:
      summary: Token
      description: 'The connector''s token endpoint — grant_type=authorization_code with

        PKCE, or refresh_token for rotation.'
      operationId: token_api_oauth_token_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - OAuth
  /api/oauth/revoke:
    post:
      summary: Revoke
      description: 'RFC 7009 — always 200, even for unknown tokens (no state leaked). A

        refresh-token revoke cascades to the whole connection; an access-token

        revoke kills just that token.'
      operationId: revoke_api_oauth_revoke_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - OAuth
  /api/oauth/connections:
    get:
      summary: List Connections
      description: 'The caller''s own connections, or the whole org''s for an admin.


        Scoped by ownership because a connection belongs to whoever consented it: a

        member sees the grants they made, an admin sees every one in the org — which

        is what keeps an orphaned grant (its owner deleted, or from before per-user

        connections) findable and revocable at all.


        A member reaching this today finds an empty list, since the consent screen

        still requires an admin role; the gate comes off with member consent

        (`spec/03` §2.6), and the list is already the right shape for it.'
      operationId: list_connections_api_oauth_connections_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
                title: Response List Connections Api Oauth Connections Get
      tags:
      - OAuth
  /api/oauth/connections/{connection_id}:
    delete:
      summary: Delete Connection
      description: 'Revoke a connection — immediate: every token it holds stops working.


        The owner or an admin. A member reaching someone else''s row gets 403 rather

        than 404: the row is in their own org, so its existence is not the secret —

        404 would read as "already revoked" and send them looking for a bug.'
      operationId: delete_connection_api_oauth_connections__connection_id__delete
      parameters:
      - name: connection_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Connection Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Delete Connection Api Oauth Connections  Connection Id  Delete
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - OAuth
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError