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

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

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

# MediaAvatarAdoptResult `media.avatar-adopt-result@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-result.v1.json`](/docs/contracts/media.avatar-adopt-result.json)

media.avatar-adopt-result@1: the answer of POST /internal/avatar-adopt on OpenVibe.Media: { ok: true, ref }, the active reference the slot now holds. A reference is released, never deleted, so Media keeps the history of the objects a person's picture moved through.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `ok` | const | yes |  | - `= true` |
| `ref` | object | yes |  |  |
| `ref.id` | integer \| string |  |  |  |
| `ref.object_id` | string | yes | The avatar object (med\_…) the slot points at. | - `pattern ^med_` |
| `ref.subject` | string \| null |  | The person (usr\_…) when the product knows it; Media refuses an object owned by someone else. | - `pattern ^usr_` |
| `ref.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.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` |
| `ref.created_at` | string | yes | When the slot started pointing at the object. |  |
| `ref.released_at` | string \| null |  | Always null in this answer: the reference is the active one. |  |

## Examples

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

 Valid: active

~~~~
{
  "ok": true,
  "ref": {
    "id": 7,
    "object_id": "med_01JC5Z8K2Q4X7V9B3N6M1R0T2Y",
    "subject": null,
    "product": "network",
    "ref": "42",
    "created_at": "2026-11-06 22:40:00",
    "released_at": null
  }
}
~~~~

Rejected: no-ref

~~~~
{
  "ok": true
}
~~~~

## Validate

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