Skip to main content
POST
/
api
/
identity-providers
/
{alias}
/
mappers
Create a mapper
curl --request POST \
  --url https://api.example.com/api/identity-providers/{alias}/mappers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "identity_provider_mapper": "<string>",
  "id": "<string>",
  "config": {}
}
'
{
  "name": "<string>",
  "identity_provider_mapper": "<string>",
  "id": "<string>",
  "config": {}
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

alias
string
required

Body

application/json

A single IdP mapper (claim/attribute mapping).

name
string
required

Mapper name (e.g. 'email-mapper')

identity_provider_mapper
string
required

Mapper type (e.g. 'oidc-user-attribute-idp-mapper', 'saml-user-attribute-idp-mapper')

id
string | null

Mapper ID (set by Keycloak, omit on create)

config
Config · object

Mapper config (keys vary by mapper type: syncMode, claim, user.attribute, etc.)

Response

Mapper created

A single IdP mapper (claim/attribute mapping).

name
string
required

Mapper name (e.g. 'email-mapper')

identity_provider_mapper
string
required

Mapper type (e.g. 'oidc-user-attribute-idp-mapper', 'saml-user-attribute-idp-mapper')

id
string | null

Mapper ID (set by Keycloak, omit on create)

config
Config · object

Mapper config (keys vary by mapper type: syncMode, claim, user.attribute, etc.)