I tried the api https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-issue-issueidorkey-attachments-post
But it seems the "rest/api" only works for administrator users not for customer users.
Is there any REST API available for customer users to create a jira ticket comment with an attachment?