Saltar al contenido

Update a person

Módulo Identity

PATCH/people/{id}people.update

One human, linked to one sign-in. Personal facts are owned by the person. Updates the fields sent; omitted fields are unchanged. Requires `If-Match` with the current `ETag`: a stale tag returns 412 and a missing tag returns 428.

  • Requiere la capacidad people.profile.write.
  • Alcances de OAuth: people.
  • Envía If-Match con el ETag que leíste. Una etiqueta desactualizada devuelve 412; si falta, devuelve 428.
  • Estados de error: 400, 401, 404, 412, 422, 428, 429. Los errores son detalles de problema RFC 9457.

Parámetros de ruta y de consulta

people.update: Parámetros de ruta y de consulta
CampoTipoObligatorioDescripción
idstring (uuid)SíIdentifier of the person.

Cuerpo de la solicitud: PersonUpdate

people.update: PersonUpdate
CampoTipoObligatorioDescripción
full_namestring | nullNoLegal or full name.Restricciones: length 1 to 300
given_namestring | nullNoOptional given name, as the person writes it.Restricciones: length 1 to 100
family_namestring | nullNoOptional family name, as the person writes it.Restricciones: length 1 to 100
{
  "full_name": "Alex Rivera",
  "given_name": "Ivy",
  "family_name": "Marchetti"
}

Respuesta 200: Person

people.update: Person
CampoTipoObligatorioDescripción
idstring (uuid)SíIdentifier of the person.
created_atstring (date-time)SíWhen the row was created.
updated_atstring (date-time)SíWhen the row was last updated.
full_namestring | nullSíLegal or full name.Restricciones: length 1 to 300
given_namestring | nullSíOptional given name, as the person writes it.Restricciones: length 1 to 100
family_namestring | nullSíOptional family name, as the person writes it.Restricciones: length 1 to 100
{
  "id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "created_at": "2026-10-08T14:30:00Z",
  "updated_at": "2026-10-08T14:30:00Z",
  "full_name": "Alex Rivera",
  "given_name": "Ivy",
  "family_name": "Marchetti"
}

Ejemplos de código

curl -X PATCH "$XOS_BASE_URL/people/0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f" \
  -H "Authorization: Bearer $XOS_API_KEY" \
  -H 'If-Match: W/"etag-from-your-last-read"' \
  -H "Content-Type: application/json" \
  -d '{"full_name":"Alex Rivera","given_name":"Ivy","family_name":"Marchetti"}'
const { data, etag } = await xos.people.update("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", {
    "full_name": "Alex Rivera",
    "given_name": "Ivy",
    "family_name": "Marchetti"
  }, { ifMatch: etag });
response = xos.people.update("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", {"full_name": "Alex Rivera", "given_name": "Ivy", "family_name": "Marchetti"}, if_match=etag)
xos people update 0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f --data '{"full_name":"Alex Rivera","given_name":"Ivy","family_name":"Marchetti"}' --if-match auto