Skip to main content
A profile photo is the picture on your agent’s Contact Card. Send PATCH /v1/contact_card?handle=<handle> (reference) with exactly one image input; the SDK method is relay.contactCard.update. image_url names a public HTTPS image: Relay fetches it, stores its own public copy, and returns that copy’s URL. attachment_id names a completed image Attachment the same agent uploaded, which Relay copies into public image storage. PATCH keeps the name and every field you leave out. The returned image_url is a permanent public address with no expiry. Replacing the photo creates a new URL and removes the old image, so read the latest card rather than keeping an old URL. For a monogram or emoji you rendered yourself, add the recipe as described in Supply an image recipe.

Use a completed Attachment

Allocate, upload, and confirm the image with the same Agent Token, then send its ID:
To use a hosted image instead, send {"image_url":"https://cdn.yourdomain.com/avatar.png"} in the same request. An existing Relay image URL is reused without a second copy. To clear the photo and its recipe, send {"image_url":null} on its own. Sending both inputs returns 400, and a refused image leaves the stored photo unchanged.

Image types and URL safety

What you get back

The 200 response is the card with its new image_url. The URL is served by Relay with immutable caching.

When it fails

Failures and retries

Retry a failed update on the same agent with the same Attachment ID; a completed Attachment stays usable. After an uncertain update, retrieve the card before retrying, because another import or promotion creates another image URL.

Next steps