add_attachment
Attach a file to an issue: pass its bytes as 'contentBase64', or its content as 'text' when the file is text. Attaching a filename the issue already has replaces that file rather than adding a second copy, so retrying this call cannot double it. Returns the attachment's download URL. Requires permission to edit issues in that project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Issue key, e.g. 'UK-1'. | |
| text | No | The file's content as text, stored as UTF-8 — for a log, CSV or Markdown file you are writing here. Alternative to 'contentBase64'; passing both is refused. | |
| filename | Yes | File name to store, e.g. 'report.pdf'. Any directory part is dropped. | |
| mimeType | No | Content type to record for the listing, e.g. 'text/csv'. Ignored when the bytes identify themselves (a PNG is a PNG whatever you call it), and never used to serve the file. | |
| contentBase64 | No | The file's bytes, base64-encoded (a 'data:…;base64,…' URL is accepted and unwrapped). Use 'text' instead when the file is text. |