---
title: "Create an OAuth client"
method: POST
path: "/orgs/{orgId}/oauth-clients"
tags: ["OAuth Client"]
---

# Create an OAuth client

`POST /orgs/{orgId}/oauth-clients`

Creates a new OAuth client for the specified organization.

> **Note:** This is a session-only endpoint and cannot be called with an API token or OAuth 2.0 scope. It requires an active admin session with org management permissions.

#### Scopes
This endpoint is session-only and does not accept OAuth 2.0 scopes.

## Path parameters

- `orgId` string, required

## Request body

- CreateOAuthClientRequest — Request body for creating an OAuth client.
  - `name` string, required — The display name of the OAuth client.
  - `serviceAccountId` string, required — The Atlassian account ID of the service account to associate with this OAuth client.

## Response `201`

Returned if the OAuth client is successfully created.

- OAuthClient — Represents an OAuth client associated with an organization.
  - `clientId` string, required — The unique identifier of the OAuth client.
  - `name` string, required — The display name of the OAuth client.
  - `createdAt` integer — The timestamp (in milliseconds since epoch) when the OAuth client was created.
  - `updatedAt` integer — The timestamp (in milliseconds since epoch) when the OAuth client was last updated.
  - `status` 'ACTIVE' | 'REVOKED' | 'EXPIRED', required — The status of the OAuth client.

## Other responses

- `400` — Returned if the request is not in the correct format.
- `403` — Returned if the user does not have permission to create OAuth clients.
- `500` — Internal Error

---

[API](https://skmtc.net/atlassian/apis/api-access.md) · [All operations](https://skmtc.net/atlassian/apis/api-access/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/api-access/revisions/412d18f78d91/schema)
