Skip to main content

Update the caller's metadata

POST 

/api/v1/enduser/update-metadata

Merges the supplied key/value pairs into the caller's metadata map.

This is a merge, not a replace: keys you omit are left untouched. To delete a key, send it with an empty-string value.

The request examples below show setting metadata values and deleting dismissedWelcome with an empty string. If you send {"preferredView":"compact","dismissedWelcome":""} as the metadata map, preferredView is overwritten, dismissedWelcome is deleted, and an omitted key such as referralCode is left untouched.

The following access conditions are preserved as declared intent and are not implemented by generated code: Authorized scoped domain action.

Use this in a guide: Build an agent preferences screen

Request​

Responses​

Metadata merged

Merge a metadata key for the authenticated end user.​

Section ID: DOC-CP-identity-access-api-updateMetadata#example-end-users-updateMetadata-request

Request example

{
"metadata": {
"preferred_destination": "Paris"
}
}

Guide request for Variant: remember a display preference. Replace example resource identifiers with your own authorized values.​

Section ID: DOC-CP-identity-access-api-updateMetadata#example-cookbook-core-platform-identity-access-end-users-04-request

Request example

{
"metadata": {
"preferredView": "compact",
"dismissedWelcome": "true"
}
}

Guide request for Variant: remember a display preference. Replace example resource identifiers with your own authorized values.​

Section ID: DOC-CP-identity-access-api-updateMetadata#example-cookbook-core-platform-identity-access-end-users-json-05-request

Request example

{
"metadata": {
"dismissedWelcome": ""
}
}

Illustrative response shape; omitted default fields and actual outcomes depend on the operation.​

Section ID: DOC-CP-identity-access-api-updateMetadata#example-end-users-updateMetadata-response

Response example

{}

Document ID: DOC-CP-identity-access-api-updateMetadata. Section identities and revisions.

SectionStable reference
Update the caller's metadataDOC-CP-identity-access-api-updateMetadata#overview
RequestDOC-CP-identity-access-api-updateMetadata#request
ResponsesDOC-CP-identity-access-api-updateMetadata#responses