---
title: "Create a new app"
method: POST
path: "/api/v1/apps"
tags: ["Apps"]
---

# Create a new app

`POST /api/v1/apps`

Required scope - write_app

## Request body

- PostAppReq
  - `name` string, required
  - `type` 'spa' | 's2s', required
  - `scopes` string[], required
  - `redirectUris` string[], required

## Response `201`

- object
  - `app` AppDetail
    - `id` number
    - `clientId` string
    - `name` string
    - `isActive` boolean
    - `type` 'spa' | 's2s'
    - `secret` string
    - `redirectUris` string[]
    - `createdAt` string
    - `updatedAt` string
    - `deletedAt` string, nullable
    - `scopes` string[]

## Changes

- **2024-08-11** `11e2773b3a1e` — 1 breaking, 3 info
  - removed the required property `app/allOf[subschema #2]/secret` from the response with the `201` status
  - added the optional property `app/allOf[subschema #2]/scopes` to the response with the `201` status
  - added `#/components/schemas/App` to the `app` response property `allOf` list for the response status `201`
  - removed `#/components/schemas/AppDetail` from the `app` response property `allOf` list for the response status `201`

[Change history](https://skmtc.dev/valuemelody/apis/melody-auth-s2s-api/changes/api/v1/apps/post.md)

---

[API](https://skmtc.dev/valuemelody/apis/melody-auth-s2s-api.md) · [All operations](https://skmtc.dev/valuemelody/apis/melody-auth-s2s-api/llms.txt) · [OpenAPI document](https://skmtc.dev/valuemelody/apis/melody-auth-s2s-api/revisions/ffd604cd7944?raw)
