OAuth Applications

REST endpoints for oauth applications. Bearer-auth required.

POST /api/oauth-applications

Register a new OAuth application

Request body

JSON
{
  "ownerOrgId": "string",
  "name": "string",
  "type": "web | native | public | user-agent-based",
  "redirectUrls": ["string"],
  "allowedScopes?": ["workspace:read | workspace:write"]
}

Response

JSON
{
  "application": {
    "clientId": "<...>",
    "name": "<...>",
    "type": "<...>",
    "redirectUrls": "<...>",
    "ownerOrgId": "<...>",
    "allowedScopes": "<...>",
    "isFirstParty": "<...>",
    "disabled": "<...>",
    "createdAt": "<...>",
    "updatedAt": "<...>"
  },
  "clientSecret": "string"
}

GET /api/oauth-applications/{id}

Get an OAuth application by ID.

Path parameters

  • id (required): The OAuth client_id (acts as the SDK lookup key).

Response

JSON
{
  "clientId": "string",
  "name": "string",
  "type": "web | native | public | user-agent-based",
  "redirectUrls": ["string"],
  "ownerOrgId": "string",
  "allowedScopes": ["workspace:read | workspace:write"],
  "isFirstParty": "boolean",
  "disabled": "boolean",
  "createdAt": "string",
  "updatedAt": "string"
}

PATCH /api/oauth-applications/{id}

Update an OAuth application

Path parameters

  • id (required):

Request body

JSON
{
  "name?": "string",
  "redirectUrls?": ["string"],
  "allowedScopes?": ["workspace:read | workspace:write"]
}

Response

JSON
{
  "clientId": "string",
  "name": "string",
  "type": "web | native | public | user-agent-based",
  "redirectUrls": ["string"],
  "ownerOrgId": "string",
  "allowedScopes": ["workspace:read | workspace:write"],
  "isFirstParty": "boolean",
  "disabled": "boolean",
  "createdAt": "string",
  "updatedAt": "string"
}

DELETE /api/oauth-applications/{id}

Disable an OAuth application (soft)

Path parameters

  • id (required):

Response

JSON
{
  "success": "boolean"
}

POST /api/oauth-applications/{id}/rotate-secret

Rotate an OAuth application's client_secret

Path parameters

  • id (required):

Response

JSON
{
  "application": {
    "clientId": "<...>",
    "name": "<...>",
    "type": "<...>",
    "redirectUrls": "<...>",
    "ownerOrgId": "<...>",
    "allowedScopes": "<...>",
    "isFirstParty": "<...>",
    "disabled": "<...>",
    "createdAt": "<...>",
    "updatedAt": "<...>"
  },
  "clientSecret": "string"
}