Avatar for an address
GET
/mail/avatars/emails/{email}
const url = 'https://mail.work.optidata.cloud/api/mail/avatars/emails/jane.doe%40acme.example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”email
required
string format: email
The address to resolve.
Responses
Section titled “ Responses ”Redirect to the avatar image.
Headers
Section titled “Headers”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."}