---
title: "Create a new SSO claim mapping"
method: POST
path: "/v1/sso-claim-mapping"
tags: ["SSO Claim Mappings"]
---

# Create a new SSO claim mapping

`POST /v1/sso-claim-mapping`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/sso-claim-mapping`
- Auth: none declared

Creates a new SSO claim mapping that assigns roles when token claims match

## Request body

- WriteSsoClaimMapping
  - `claimKey` string, required
  - `claimValue` string, required
  - `roleIds` string[], required
  - `teamAssignments` TeamAssignment[], required
    - `role` 'LEADER' | 'MEMBER', required: The role within the team
    - `teamId` string, required: The ID of the team
    - `teamName` string: Team name (response-only, enriched by server)

## Response `201`

Claim mapping created successfully

## Other responses

- `400`: Invalid request data (missing required fields, invalid role/team IDs, or validation failed)
- `403`: Insufficient permissions
- `409`: Claim mapping with this key-value pair already exists

---

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