title: Bitbucket, Api 2.0, PR attachment
body: <p>I would like to upload an attachment into a PR on bitbucket api 2.0.</p>
  <p>In comment case it works easily:</p>
  <pre><code>curl \
  --user usename:pass  \
  --request POST   \
  --url https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments   \
  --header 'Accept: application/json'   \
  --header 'Content-Type: application/json'   \
  --data '{&quot;content&quot;: { &quot;raw&quot;: &quot;test&quot; }}'
  </code></pre>
  <p>but unfortunately I don't know how can it works when I would like to upload an attachment into a PR or a branch.</p>
  <p>Similar solution: <a href="https://confluence.atlassian.com/bitbucketserverkb/how-to-enclose-file-to-pull-request-comment-via-rest-api-952073003.html" rel="nofollow noreferrer">https://confluence.atlassian.com/bitbucketserverkb/how-to-enclose-file-to-pull-request-comment-via-rest-api-952073003.html</a></p>
  <p>Thank you for your help,</p>