How to set avatar image from HTTP URL or via API?


  • Used Zammad version: 5.0.3-1640164755.9ed29355.bullseye
  • Used Zammad installation type: .deb
  • Operating system: Debian 11

For a number of users we have avatar URLs in the form<initials> for users with email <initials>

Is there a setting, that Zammad just takes the avatar image from an URL? Or passes the URL to the browser?

If not, I’m sure I can just use the wonderful API of Zammad to set user avatars — but I can’t find the API documentation for avatars. Thanks for any pointer!

The endpoint is /api/v1/users/avatar as POST.
As it’s undocumented, the best trick / hack would be to open your developer console and update your own avatar (and set it if not done already). This will show exactly what Zammad does and expects.

You cannot provide URLs through.
I am wondering why you’d want to do that, because Zammad uses the users name initials by default already:

Thank you!
Does this API allow to set an avatar image for any user (not myself)?
I have all admin rights, of course.

Btw. my colleagues like avatar images better than auto-generated initials, that are sometimes confusing, because the are sometimes different from the initials used elsewhere.

Yes, sending set requests as a different user shouldn’t be an issue with administrative permission.

If your agents have an gravatar account and connect their agent email address with an avatar, Zammad will automatically fetch that during account creation. You’ll need Zammads Image Service for that.

See Services — Zammad documentation for more input.

Thank you!
I’m probably still unexperienced with the Zammad API.
How would I send a request as a different user?
Would I need to create API tokens for every single user then?

Sorry for the wait - our documentation has you covered:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.