How to upload avatar to custom issue type

Hi there,

I have created custom issue types from the Forge REST api. I am trying to upload a custom avatar icon, but it seems part of the documentation is missing:

I have tried using an image stream as the body, which did not work.

Has anyone successfully uploaded an avatar to a custom image through the Forge REST api?


I tested and it worked. My uploaded image appears when changing avatar for the issue type.

which did not work.

And what HTTP error code/error message you get?

The page provided a CURL command example. Did you test with it?

curl --request POST \ –user<api_token> \ –header ‘X-Atlassian-Token: no-check’ \ –header ‘Content-Type: image/< image_type>’ \ –data-binary “<@/path/to/file/with/your/avatar>” \ –url ‘{issueTypeId}

Hey thanks for the reply. So I have it working with a CURL command, however I can’t get it working with the Forge API.

I would like the Forge app to upload the avatar at runtime, which doesn’t require an API key. I don’t think this would be possible with a CURL command, as each installation of the app would need an API key? As far as I can see, Forge cannot generate an API key at runtime without the user explicitly requesting it?

In the Forge API example, the docs seem to be missing an example of the body parameters.

Please let me know if you have any more advice.

Show us your code calling the REST API and the error you are getting.

Saves everyone’s time.