---
title: "Upsert an actor mapping"
method: PUT
path: "/v1/governance/actor-mappings/{actorId}"
tags: ["Governance"]
---

# Upsert an actor mapping

`PUT /v1/governance/actor-mappings/{actorId}`

Use this endpoint to create or update an actor mapping. Actor mappings associate system actor identifiers with human-readable display names and email addresses for audit log readability.

## Path parameters

- `actorId` string, required

## Headers

- `X-Request-Id` string
- `X-Idempotency-Key` string

## Request body

- UpsertActorMappingRequest — Request payload for creating or updating an actor mapping
  - `displayName` string — Human-readable display name for the actor
  - `email` string, email — Email address associated with the actor

## Response `200`

Actor mapping created or updated.

The response includes the `X-Idempotency-Replayed` header.

If the value is false, the request was just processed. If the value is true, the response is a replay of a previously processed request.

See [Retries and idempotency](/en/reference/retries-idempotency) for more details.

- ActorMappingResponse — An actor mapping associating a system identifier with display information
  - `actorId` string — The actor identifier
  - `displayName` string — Human-readable display name
  - `email` string — Email address
  - `createdAt` string, date-time — Timestamp when the mapping was created
  - `updatedAt` string, date-time — Timestamp when the mapping was last updated

## Other responses

- `400` — The request contains invalid parameters or payload.
- `401` — The request lacks valid authentication credentials.
- `403` — You do not have permission to access this resource.
- `500` — An unexpected error occurred on the server.

---

[API](https://skmtc.net/lerian/apis/identity-plugin.md) · [All operations](https://skmtc.net/lerian/apis/identity-plugin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lerian/identity-plugin/versions/25daba385532/schema)
