---
title: "Create Oauth Client"
method: POST
path: "/oauth/clients"
tags: ["OAuth"]
---

# Create Oauth Client

`POST /oauth/clients`

## Request

- Base URL: `https://api.muapi.ai`
- URL: `https://api.muapi.ai/oauth/clients`
- Auth: one of:
  - API key in header `x-api-key`
  - OAuth 2 (client credentials, token URL `https://api.muapi.ai/oauth/token`)

## Request body

- CreateOAuthClientRequest
  - `name` string, required
  - `scopes` string[], nullable

## Response `201`

Successful Response

- OAuthClientCreatedOut
  - `id` integer, required
  - `name` string, required
  - `client_id` string, required
  - `allowed_scopes` string[], required
  - `is_active` boolean, required
  - `created_at` string, date-time, required
  - `last_used_at` string, date-time, nullable
  - `client_secret` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/muapi/apis/muapi-api.md) · [All operations](https://skmtc.dev/muapi/apis/muapi-api/llms.txt) · [OpenAPI document](https://skmtc.dev/muapi/apis/muapi-api/revisions/e4b7374381e5?raw)
