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

# network.avatar-write-request@1 · OpenVibe.Services

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

# NetworkAvatarWriteRequest `network.avatar-write-request@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

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

network.avatar-write-request@1: the body of POST /internal/user-avatar on OpenVibe.Network (capability network.avatar.write, held by the site a person picked the avatar on; Live posts here through its notify helper). Adopts the picture as the account's avatar and fans it out to the other sites. Only an openvibe.media address is accepted, so an avatar can never be a tracking pixel or a third-party file. Refusals are { error }: 400 without a user\_id, 404 for an unknown user, 422 for anything but an openvibe.media address, 503 while the avatar service is down.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `user_id` | integer | yes | The Network (SSO) user id. | - `minimum 1` |
| `avatar_url` | string \| null | yes | An https://openvibe.media/… picture; null clears the avatar. | - `pattern ^https://openvibe\.media/`<br>- `maxLength 500` |
| `origin` | string |  | Who asked ('live', 'network'); kept in the audit row and used to avoid echoing a push back. | - `maxLength 40` |

## Examples

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

 Valid: live-pick

~~~~
{
  "user_id": 4821,
  "avatar_url": "https://openvibe.media/p/hero-shot/screenshot",
  "origin": "live"
}
~~~~

Rejected: no-user

~~~~
{
  "avatar_url": "https://openvibe.media/p/hero-shot/screenshot",
  "origin": "live"
}
~~~~

## Validate

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