---
title: "Create or update an OAuth app for script credential bindings"
method: POST
path: "/api/oauth-apps"
tags: ["Script Connections"]
---

# Create or update an OAuth app for script credential bindings

`POST /api/oauth-apps`

## Request body

- object
  - `id` string
  - `presetId` string
  - `provider` string
  - `clientId` string, required
  - `clientSecret` string
  - `authorizeUrl` string, uri
  - `tokenUrl` string, uri
  - `userinfoUrl` string, uri
  - `revocationUrl` string, uri
  - `scopes` string[]
  - `extraParams` object
  - `tokenAuthStyle` 'body' | 'basic'
  - `tokenBodyFormat` 'form' | 'json'

## Response `200`

Saved OAuth app without client secret

## Other responses

- `400` — Validation error
- `403` — Only the lead agent can manage script connections

## Changes

- **2026-07-24** `5caa2f4d1afb` — 8 info
  - added the new optional request property `id`
  - added the new optional request property `presetId`
  - added the new optional request property `revocationUrl`
  - added the new optional request property `userinfoUrl`
  - …4 more
- **2026-07-09** `4f56890cc278` — 1 info
  - endpoint added
- **2026-07-02** `0c910612f9ac` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/changes/api/oauth-apps/post.md)

---

[API](https://skmtc.dev/desplega-ai/apis/agent-swarm-api.md) · [All operations](https://skmtc.dev/desplega-ai/apis/agent-swarm-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/desplega-ai/agent-swarm-api/revisions/92a1dcbd2fc7/schema)
