---
title: "media.avatar-adopt-request@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/media.avatar-adopt-request"
updated: null
---

# media.avatar-adopt-request@1 · OpenVibe.Services

HTML: [media.avatar-adopt-request@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/media.avatar-adopt-request)

# MediaAvatarAdoptRequest `media.avatar-adopt-request@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

- Version: 1.0.0
- Owner: media
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/media/avatar-adopt-request.v1.json`](/docs/contracts/media.avatar-adopt-request.json)

media.avatar-adopt-request@1: the body of POST /internal/avatar-adopt on OpenVibe.Media (capability media.avatar.adopt). A product records that one of its profile slots points at an avatar object, so a cleanup can never delete the picture a working profile shows (incident 2026-11-06: eleven avatars were deleted with the public screenshot copies). Recording a slot releases the slot's previous reference in the same transaction. Ingest records the reference itself; this route is for a picture the product already holds. Refusals are { ok: false, error }: 400 without object\_id, product or ref, 404 for an unknown object, 409 for an object that is not ready, 422 for an object that is not an avatar or belongs to someone else.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `object_id` | string | yes | The avatar object (med\_…) the slot points at. | - `pattern ^med_` |
| `product` | string | yes | The product whose profile holds the picture: network (users.avatar\_url) or live (its own users.avatar\_url, a channel banner). | - `pattern ^[a-z][a-z0-9-]{1,31}$` |
| `ref` | string | yes | The slot in that product: the person's id there, or the id and the slot (for example 42:banner). | - `minLength 1`<br>- `maxLength 64` |
| `subject` | string \| null |  | The person (usr\_…) when the product knows it; Media refuses an object owned by someone else. | - `pattern ^usr_` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: live-banner

~~~~
{
  "object_id": "med_01JC5Z8K2Q4X7V9B3N6M1R0T2Y",
  "product": "live",
  "ref": "42:banner"
}
~~~~

Valid: network-profile

~~~~
{
  "object_id": "med_01JC5Z8K2Q4X7V9B3N6M1R0T2Y",
  "product": "network",
  "ref": "42",
  "subject": "usr_01JC5Z8K2Q4X7V9B3N6M1R0T2Y"
}
~~~~

Rejected: no-ref

~~~~
{
  "object_id": "med_01JC5Z8K2Q4X7V9B3N6M1R0T2Y",
  "product": "network"
}
~~~~

Rejected: not-an-object

~~~~
{
  "object_id": "https://example.com/a.png",
  "product": "network",
  "ref": "42"
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('media.avatar-adopt-request@1', value);   // { valid, errors: [{ path, message }] }
~~~~
