Upload an attachment
POST
/issues/{issue}/attachments
const url = 'http://localhost:8100/api/v1/issues/WEB-12/attachments';const form = new FormData();form.append('file', 'file');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8100/api/v1/issues/WEB-12/attachments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@fileAuthorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”issue
required
string
Issue key (WEB-12, case-insensitive) or numeric id
Request Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
object
file
required
string format: binary
Responses
Section titled “Responses”Stored
Media typeapplication/json
object
data
object
id
integer
name
string
size
integer
type
string
url
string format: uri
Example generated
{ "data": { "id": 1, "name": "example", "size": 1, "type": "example", "url": "https://example.com" }}