How to add attachment file in a Jira ticket?

How can I add attachment file in a Jira ticket?

Hi Helen,

To upload an attachment to the issue TEST-123 on your-domain.atlassian.net, you can use the following curl command:

curl --location --request POST 'https://your-domain.atlassian.net/rest/api/3/issue/TEST-123/attachments' \
-u 'email@example.com:<api_token>' \
-H 'X-Atlassian-Token: no-check' \
--form 'file=@"myfile.txt"'

Please replace ‘your-domain’ with your actual domain, ‘email@example.com’ with your email address, and ‘<api_token>’ with your specific API token. Also, make sure to specify the correct file path for ‘myfile.txt’ or replace it with the path to your desired file.