Create a representation
Módulo Identity
POST/representationsrepresentations.create
One party acting for another, with scopes and expiry. The artist accepts it. Creates a representation. Requires `Idempotency-Key`; a replay returns the original response. The organization is derived from the credential or the parent row, never from the body.
- Requiere la capacidad me.profile.write.
- Alcances de OAuth: me.
- Envía el encabezado Idempotency-Key. Una repetición con la misma clave devuelve la respuesta original.
- Estados de error: 400, 401, 409, 422, 429. Los errores son detalles de problema RFC 9457.
Cuerpo de la solicitud: RepresentationCreate
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| representative_person_id | string (uuid) | null | No | Identifier of the representative. |
| artist_person_id | string (uuid) | Sí | Identifier of the represented artist. |
| scopes | array of RepresentationScope | Sí | Delegated scopes, stored as junction rows. |
| expires_on | string (date) | Sí | Expiry. |
{
"representative_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"artist_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"scopes": [
"Offers",
"Advance"
],
"expires_on": "2026-10-08"
}Respuesta 201: Representation
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| id | string (uuid) | Sí | Identifier of the representation. |
| created_at | string (date-time) | Sí | When the row was created. |
| updated_at | string (date-time) | Sí | When the row was last updated. |
| representative_person_id | string (uuid) | null | Sí | Identifier of the representative. |
| artist_person_id | string (uuid) | Sí | Identifier of the represented artist. |
| scopes | array of RepresentationScope | Sí | Delegated scopes, stored as junction rows. |
| expires_on | string (date) | Sí | Expiry. |
| accepted_at | string (date-time) | null | Sí | When the artist accepted. |
| revoked_at | string (date-time) | null | Sí | When the artist or the account revoked it. |
{
"id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"created_at": "2026-10-08T14:30:00Z",
"updated_at": "2026-10-08T14:30:00Z",
"representative_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"artist_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"scopes": [
"Offers",
"Advance"
],
"expires_on": "2026-10-08",
"accepted_at": "2026-10-08T14:30:00Z",
"revoked_at": "2026-10-08T14:30:00Z"
}Ejemplos de código
curl -X POST "$XOS_BASE_URL/representations" \
-H "Authorization: Bearer $XOS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"representative_person_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","artist_person_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","scopes":["Offers","Advance"],"expires_on":"2026-10-08"}'const { data } = await xos.representations.create({
"representative_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"artist_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
"scopes": [
"Offers",
"Advance"
],
"expires_on": "2026-10-08"
});response = xos.representations.create({"representative_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", "artist_person_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", "scopes": ["Offers", "Advance"], "expires_on": "2026-10-08"})xos representations create --data '{"representative_person_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","artist_person_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","scopes":["Offers","Advance"],"expires_on":"2026-10-08"}'