> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.
# Get Contact Avatar
>
Return the avatar image for a personal contact. This route sits outside `/api/v1`, like user avatars.
Only the contact owner can fetch the image. Authenticate with `rc_uid` and `rc_token` as query parameters or cookies. Auth headers are not accepted.
If the contact has an uploaded avatar, that file is returned. Otherwise Rocket.Chat generates an SVG from the contact's `displayName` initials. Unknown contacts and contacts owned by another user return `404`.
### Changelog
| Version | Description |
| ------- | ----------- |
| 9.1.0 | Added |
## OpenAPI
````json GET /avatar/contact/{contactId}
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Miscellaneous"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Commands"
},
{
"name": "Email Inbox"
},
{
"name": "Licenses"
},
{
"name": "Mailer"
},
{
"name": "Calendar Events"
},
{
"name": "Exchange"
},
{
"name": "Contacts"
},
{
"name": "WhatsApp"
},
{
"name": "Rasa App"
},
{
"name": "Jitsi App"
}
],
"paths": {
"/avatar/contact/{contactId}": {
"parameters": [
{
"schema": {
"type": "string"
},
"name": "contactId",
"in": "path",
"required": true,
"description": "Enter the contact ID.",
"example": "690c2b2d4e7e8bcf6985b3d8"
}
],
"get": {
"summary": "Get Contact Avatar",
"tags": [
"Contacts"
],
"operationId": "get-avatar-contact-contactId",
"description": "\n\nReturn the avatar image for a personal contact. This route sits outside `/api/v1`, like user avatars.\n\nOnly the contact owner can fetch the image. Authenticate with `rc_uid` and `rc_token` as query parameters or cookies. Auth headers are not accepted.\n\nIf the contact has an uploaded avatar, that file is returned. Otherwise Rocket.Chat generates an SVG from the contact's `displayName` initials. Unknown contacts and contacts owned by another user return `404`.\n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 9.1.0 | Added |",
"parameters": [
{
"schema": {
"type": "string"
},
"in": "query",
"name": "rc_uid",
"description": "The user ID of the contact owner. Required unless provided as a cookie.",
"required": false
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "rc_token",
"description": "The login token of the contact owner. Required unless provided as a cookie.",
"required": false
},
{
"schema": {
"type": "string",
"example": "png"
},
"in": "query",
"name": "format",
"description": "Optional image format for the generated fallback avatar: `jpg`, `jpeg`, or `png`. Defaults to SVG.",
"required": false
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"image/svg+xml": {
"schema": {
"type": "string",
"format": "binary"
}
},
"image/png": {
"schema": {
"type": "string",
"format": "binary"
}
},
"image/jpeg": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"304": {
"description": "Not Modified"
},
"404": {
"description": "Not Found"
}
}
}
}
}
}
````