---
title: "Create a new SAML IDP"
method: POST
path: "/api/v1/saml/idps"
tags: ["SAML"]
---

# Create a new SAML IDP

`POST /api/v1/saml/idps`

Required scope - root

## Request body

- PostSamlIdpReq
  - `name` string, required
  - `userIdAttribute` string, required
  - `emailAttribute` string, nullable, required
  - `firstNameAttribute` string, nullable, required
  - `lastNameAttribute` string, nullable, required
  - `metadata` string, required

## Response `201`

- object
  - `idp` SamlIdp
    - `id` number, required
    - `name` string, required
    - `isActive` boolean, required
    - `userIdAttribute` string, required
    - `emailAttribute` string, nullable, required
    - `firstNameAttribute` string, nullable, required
    - `lastNameAttribute` string, nullable, required
    - `metadata` string, required
    - `createdAt` string, required
    - `updatedAt` string, required
    - `deletedAt` string, nullable, required

## Changes

- **2025-06-13** `d5d5891dee18` — 1 info
  - added the required property `idp/isActive` to the response with the `201` status
- **2025-06-05** `fa91e1b32a49` — 1 info
  - endpoint added
- **2024-08-11** `11e2773b3a1e` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/valuemelody/apis/melody-auth-s2s-api/changes/api/v1/saml/idps/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-service-production.skmtc.workers.dev/v1/apis/valuemelody/melody-auth-s2s-api/revisions/2e1471620fd7/schema)
