HYBRID-CHAINDEVELOPERS
DOCUMENTATIONv2
POST

User Profile Data

Upload profile avatar image

/api/v2/me/avatar
AUTHENTICATIONBearer token · profile:writeAUTHORITATIVE OWNERprotected-object-serviceCONTRACT AUTHORITYCapability registry · plannedSTATUSPlanned · not executable
PLANNING CONTRACT · NOT CALLABLE

This page describes intended capability and integration boundaries so people and agents can prepare safely. Do not send this request or register it as an executable tool. Wait until the capability registry marks it implemented-contract, then re-fetch the deployed OpenAPI document and build the request from that machine contract.

PURPOSE + BUSINESS CONTEXT

Planned capability: apply the requested transition to upload profile avatar image through the authoritative trust service boundary.

WHEN THIS CALL IS USEFUL

Do not call or register this operation as an executable agent tool yet. Use this page to plan the future upload profile avatar image workflow; enable it only after the status becomes implemented-contract and the exact operation appears in deployed OpenAPI.

OUTCOME · Planned · Create or advance

What changes

None today: this route is not executable. Its intended behavior is: when promoted, creates an owner-scoped quarantined media revision. The previous avatar remains current until scanning and safe re-encoding succeed; upload acceptance is not publication.

WHY IT MATTERS

  • Lets people and agents prepare for upload profile avatar image without falsely presenting roadmap scope as a live capability.
  • Gives people and agents a contract-backed way to advance upload profile avatar image.
  • Separates subject identity, consent, evidence, provider output, review, issuer credentials, and relying-party acceptance instead of collapsing them into a universal trust score.

ISOLATION + AUTHORITY

Bearer subject, tenant, purpose, policy version, role, issuer, reviewer, provider, and relying-party boundaries remain distinct. The response or transition grants no payment, custody, settlement, publisher, matching, or trading authority and must not expose regulated evidence beyond the live schema. This planning record grants no runtime authority, and only deployed OpenAPI can define an executable public contract.

BEFORE YOU CALL

  • First confirm that this operation is marked implemented-contract and exists in the currently deployed OpenAPI document; until then, no production request is valid.
  • Its capability-registry profile is provisional integration guidance, not an executable request schema.
  • Authenticate at the documented boundary: bearer.
  • Treat the proposed image (body), content_sha256 (body) as planning input only; re-generate the request from deployed OpenAPI before making a call.
  • Use one Idempotency-Key only for retries of the same byte-equivalent logical mutation.
  • Resolve the applicable purpose, policy version, consent or role basis, and required assurance before relying on this result.

WHAT TO DO NEXT

  • Keep this operation disabled in clients, agents, SDKs, and workflow automation while it remains planned-contract.
  • Use the stated owner, lifecycle, authority boundary, and provisional upload profile avatar image profile to prepare requirements and conformance tests without sending a request.
  • Monitor the capability registry for implemented-contract, then re-fetch deployed OpenAPI and validate its exact security, parameters, schemas, responses, and agent metadata before enabling the integration.

AGENT GUIDANCE

  • Never call this planned contract, include it in an executable tool registry, or infer runtime availability from this readable page.
  • Its capability-registry profile is provisional integration guidance, not an executable request schema.
  • Use upload profile avatar image only for the purpose and lifecycle stage described by this operation; do not treat it as authority for an adjacent action.
  • Treat the proposed image (body), content_sha256 (body) as planning input only; re-generate the request from deployed OpenAPI before making a call.
  • Treat policy availability, consent, evidence capture, completed checks, review, decision, credential issuance, validity, and relying-party acceptance as separate facts.
  • After a timeout or conflict, read authoritative state before deciding whether an equivalent retry is safe.
  • When implementation lands, discard generated requests based on this planning record and rebuild them from the deployed OpenAPI operation.
MACHINE CONTRACT

This operation is a non-executable planning contract. Its capability-registry record defines the intended owner, parameters, responses, and integration boundary until an implemented Rust OpenAPI operation replaces it.

EXTENDED INTEGRATION GUIDANCE

Readable request and response reference

Examples describe the reviewed planning contract and remain non-executable until promoted into OpenAPI.

PARAMETERS

Headers, path, query, and body

NAMELOCATIONPRESENCETYPE / RULES / PURPOSE
AuthorizationheaderRequired

Bearer tokenCredential containing the profile:write scope.EXAMPLEBearer hc_live_…

Idempotency-KeyheaderRequired

ASCII string · 1–128Caller-generated key reused for every retry of the same logical mutation.EXAMPLElaunch-treasury-v1-001

Content-TypeheaderRequired

multipart/form-data; boundary=…One bounded image part plus text metadata; base64 JSON and remote-fetch URLs are forbidden.EXAMPLEmultipart/form-data; boundary=hc-avatar-01

Content-DigestheaderRequired

RFC 9530 SHA-256 digestDigest of the exact multipart request bytes covered by the request signature.EXAMPLEsha-256=:base64-request-digest:

Signature-InputheaderRequired

RFC 9421 signature parametersCovers method, path, content digest, multipart content type, and idempotency key.EXAMPLEsig1=("@method" "@path" "content-digest" "content-type" "idempotency-key");created=1786582800;nonce="01J…";keyid="machine-prod"

SignatureheaderRequired

Ed25519 HTTP Message SignatureSignature from an active public key registered to the authenticated client.EXAMPLEsig1=:base64-signature:

imagebodyRequired

multipart binary · PNG | JPEG | WebP · max 5 MiBImage bytes that the owner must decode, scan, strip of metadata, bound by pixel policy, and safely re-encode.

content_sha256bodyRequired

64-character hexadecimal SHA-256 digestDigest of the exact uploaded image part for integrity and retry reconciliation.EXAMPLEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

alt_textbodyOptional

string · max 300Accessible presentation description; not a credential or identity claim.EXAMPLEProfile portrait

cropbodyOptional

object · normalized x, y, width, height in 0–1Optional crop applied only after media validation.EXAMPLE{ x: 0.1, y: 0.05, width: 0.8, height: 0.8 }

REQUEST

JSON body example

{
  "image": "<binary PNG, JPEG, or WebP image part>",
  "content_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "alt_text": "Profile portrait",
  "crop": {
    "x": 0.1,
    "y": 0.05,
    "width": 0.8,
    "height": 0.8
  }
}

RESPONSES

Status and payload examples

202Validated upload accepted into owner-scoped quarantine; the current avatar remains active.Not executable · JSON RESPONSE+
{
  "upload_uuid": "avatar-upload-01",
  "status": "QUARANTINED",
  "current_avatar_changed": false,
  "content_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
INTEGRATION DECISION
CALLER ACTION
Do not send this request or register it as an executable agent tool. Use the implemented alternatives linked by the module guide.
RETRY SAFETY
Do not retry on a timer. Re-fetch production OpenAPI and proceed only after this exact operation appears there.
STATE RECONCILIATION
No runtime state exists to reconcile for this planning contract. Continue from the authenticated profile, tenant brand, referral, funding, and account-lifecycle projections through an implemented operation.
ESCALATE WHEN
Escalate when a fresh session resolves to an unexpected tenant or profile, or when an account lifecycle receipt cannot be found after reconciliation.
400The multipart request, digest, crop, alt text, signature, or idempotency key is malformed.Not executable · JSON RESPONSE+
{
  "code": "invalid_avatar_request",
  "message": "The multipart request, digest, crop, alt text, signature, or idempotency key is malformed."
}
INTEGRATION DECISIONinvalid_avatar_request
CALLER ACTION
Do not send this request or register it as an executable agent tool. Use the implemented alternatives linked by the module guide.
RETRY SAFETY
Do not retry on a timer. Re-fetch production OpenAPI and proceed only after this exact operation appears there.
STATE RECONCILIATION
No runtime state exists to reconcile for this planning contract. Continue from the authenticated profile, tenant brand, referral, funding, and account-lifecycle projections through an implemented operation.
ESCALATE WHEN
Escalate when a fresh session resolves to an unexpected tenant or profile, or when an account lifecycle receipt cannot be found after reconciliation.
401The bearer credential is invalid.Not executable · JSON RESPONSE+
{
  "code": "invalid_credentials",
  "message": "The bearer credential is invalid."
}
INTEGRATION DECISIONinvalid_credentials
CALLER ACTION
Do not send this request or register it as an executable agent tool. Use the implemented alternatives linked by the module guide.
RETRY SAFETY
Do not retry on a timer. Re-fetch production OpenAPI and proceed only after this exact operation appears there.
STATE RECONCILIATION
No runtime state exists to reconcile for this planning contract. Continue from the authenticated profile, tenant brand, referral, funding, and account-lifecycle projections through an implemented operation.
ESCALATE WHEN
Escalate when a fresh session resolves to an unexpected tenant or profile, or when an account lifecycle receipt cannot be found after reconciliation.
403The principal cannot update this authenticated subject's avatar.Not executable · JSON RESPONSE+
{
  "code": "insufficient_scope",
  "message": "The principal cannot update this authenticated subject's avatar."
}
INTEGRATION DECISIONinsufficient_scope
CALLER ACTION
Do not send this request or register it as an executable agent tool. Use the implemented alternatives linked by the module guide.
RETRY SAFETY
Do not retry on a timer. Re-fetch production OpenAPI and proceed only after this exact operation appears there.
STATE RECONCILIATION
No runtime state exists to reconcile for this planning contract. Continue from the authenticated profile, tenant brand, referral, funding, and account-lifecycle projections through an implemented operation.
ESCALATE WHEN
Escalate when a fresh session resolves to an unexpected tenant or profile, or when an account lifecycle receipt cannot be found after reconciliation.
409The idempotency key conflicts or an equivalent image is already processing.Not executable · JSON RESPONSE+
{
  "code": "avatar_upload_conflict",
  "message": "The idempotency key conflicts or an equivalent image is already processing."
}
INTEGRATION DECISIONavatar_upload_conflict
CALLER ACTION
Do not send this request or register it as an executable agent tool. Use the implemented alternatives linked by the module guide.
RETRY SAFETY
Do not retry on a timer. Re-fetch production OpenAPI and proceed only after this exact operation appears there.
STATE RECONCILIATION
No runtime state exists to reconcile for this planning contract. Continue from the authenticated profile, tenant brand, referral, funding, and account-lifecycle projections through an implemented operation.
ESCALATE WHEN
Escalate when a fresh session resolves to an unexpected tenant or profile, or when an account lifecycle receipt cannot be found after reconciliation.
413The encoded bytes or decoded pixel budget exceeds policy.Not executable · JSON RESPONSE+
{
  "code": "avatar_too_large",
  "message": "The encoded bytes or decoded pixel budget exceeds policy."
}
INTEGRATION DECISIONavatar_too_large
CALLER ACTION
Do not send this request or register it as an executable agent tool. Use the implemented alternatives linked by the module guide.
RETRY SAFETY
Do not retry on a timer. Re-fetch production OpenAPI and proceed only after this exact operation appears there.
STATE RECONCILIATION
No runtime state exists to reconcile for this planning contract. Continue from the authenticated profile, tenant brand, referral, funding, and account-lifecycle projections through an implemented operation.
ESCALATE WHEN
Escalate when a fresh session resolves to an unexpected tenant or profile, or when an account lifecycle receipt cannot be found after reconciliation.
415The declared or detected type is not PNG, JPEG, or WebP.Not executable · JSON RESPONSE+
{
  "code": "unsupported_avatar_media",
  "message": "The declared or detected type is not PNG, JPEG, or WebP."
}
INTEGRATION DECISIONunsupported_avatar_media
CALLER ACTION
Do not send this request or register it as an executable agent tool. Use the implemented alternatives linked by the module guide.
RETRY SAFETY
Do not retry on a timer. Re-fetch production OpenAPI and proceed only after this exact operation appears there.
STATE RECONCILIATION
No runtime state exists to reconcile for this planning contract. Continue from the authenticated profile, tenant brand, referral, funding, and account-lifecycle projections through an implemented operation.
ESCALATE WHEN
Escalate when a fresh session resolves to an unexpected tenant or profile, or when an account lifecycle receipt cannot be found after reconciliation.
422Integrity, decoding, malware, metadata, animation, dimension, crop, or content-safety validation failed.Not executable · JSON RESPONSE+
{
  "code": "avatar_rejected",
  "message": "Integrity, decoding, malware, metadata, animation, dimension, crop, or content-safety validation failed."
}
INTEGRATION DECISIONavatar_rejected
CALLER ACTION
Do not send this request or register it as an executable agent tool. Use the implemented alternatives linked by the module guide.
RETRY SAFETY
Do not retry on a timer. Re-fetch production OpenAPI and proceed only after this exact operation appears there.
STATE RECONCILIATION
No runtime state exists to reconcile for this planning contract. Continue from the authenticated profile, tenant brand, referral, funding, and account-lifecycle projections through an implemented operation.
ESCALATE WHEN
Escalate when a fresh session resolves to an unexpected tenant or profile, or when an account lifecycle receipt cannot be found after reconciliation.
503Scanning, safe re-encoding, object storage, or profile publication is unavailable; the current avatar remains unchanged.Not executable · JSON RESPONSE+
{
  "code": "avatar_service_unavailable",
  "message": "Scanning, safe re-encoding, object storage, or profile publication is unavailable; the current avatar remains unchanged."
}
INTEGRATION DECISIONavatar_service_unavailable
CALLER ACTION
Do not send this request or register it as an executable agent tool. Use the implemented alternatives linked by the module guide.
RETRY SAFETY
Do not retry on a timer. Re-fetch production OpenAPI and proceed only after this exact operation appears there.
STATE RECONCILIATION
No runtime state exists to reconcile for this planning contract. Continue from the authenticated profile, tenant brand, referral, funding, and account-lifecycle projections through an implemented operation.
ESCALATE WHEN
Escalate when a fresh session resolves to an unexpected tenant or profile, or when an account lifecycle receipt cannot be found after reconciliation.

OPERATIONAL NOTES

Security and lifecycle guarantees

  • This is a profiled planning contract and is not callable until it appears in live production OpenAPI.
  • The server derives the subject and object key, ignores client filenames for storage, rejects SVG and animation, strips EXIF and embedded metadata, and publishes only a safely re-encoded derivative after quarantine.
  • An avatar is presentation data only—not identity evidence, KYC media, a credential, an authorization image, a signing key, or proof of account ownership.
  • HTTP 202 is upload acceptance, not publication. On an ambiguous result, reconcile through the future processing receipt or GET /api/v2/me/avatar before retrying the exact body and Idempotency-Key.

UPGRADING FROM V1

Legacy calls replaced by this operation

If you maintain an older integration, use this map to find the V2 replacement. Do not translate the old request field-for-field: rebuild it from the V2 parameters and schemas above because identity, authorization, replay protection, and response semantics may have changed.

POST/api/v1/profile/uploadavatarPROFILE: Upload Profile Avatar Image
DOCUMENTATION STATUS

This planned contract now defines its public parameters, authorization boundary, replay behavior, responses, and authoritative owner. It remains non-executable until its owner adapter and conformance tests are promoted into the Rust gateway.

Return to the V2 directory