Skip to content

Avatar for an address

GET
/mail/avatars/emails/{email}
curl --request GET \
--url https://mail.work.optidata.cloud/api/mail/avatars/emails/jane.doe%40acme.example \
--header 'Authorization: Bearer <token>'

Redirects to the avatar image of the Optiwork user behind an e-mail address, or to the default placeholder when the address does not belong to one. The redirect is cacheable, so a client can point an <img> straight at this endpoint instead of resolving addresses itself.

email
required
string format: email

The address to resolve.

Redirect to the avatar image.

Location
string format: uri

Absolute URL of the image.

Cache-Control
string

How long the redirect may be cached.

Missing, malformed or expired authentication key.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

Rate limit exceeded. Retry after the window resets.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplethrottled
{
"message": "Too Many Attempts."
}