title: Resource not found - Triggering BitBucket Pipeline using curl
body: <p>I created a new project and added a repository to it in my workspace. Further, I added a <code>bitbucket-pipelines.yml</code> to build a pipeline. I am able to trigger the pipeline manually however while trying to execute it using BitBucket API using curl, I get the below error every time:</p>
  <p>Can anyone suggest what I am missing here?</p>
  <p><strong>NOTE:</strong> The same curl command (below) is able to run other pipelines in different repositories in the same workspace, so do I need to enable something in my current repository to access pipeline using BitBucket APIs. TIA</p>
  <p><strong>Error:</strong></p>
  <pre><code>{&quot;type&quot;: &quot;error&quot;, &quot;error&quot;: {&quot;message&quot;: &quot;Resource not found&quot;}}% 
  </code></pre>
  <p><strong>cURL command:</strong></p>
  <pre><code>curl -X POST -is -u username:password \
          -H 'Content-Type: application/json' \
          https://api.bitbucket.org/2.0/repositories/workspace-name/repo-name/pipelines/ \
          -d '
          {
              &quot;target&quot;: {
              &quot;type&quot;: &quot;pipeline_ref_target&quot;,
              &quot;ref_type&quot;: &quot;branch&quot;,
              &quot;ref_name&quot;: &quot;master&quot;,
              &quot;selector&quot;: {
              &quot;type&quot;: &quot;custom&quot;,
              &quot;pattern&quot;: &quot;create-tenant&quot;
          }
         }}'
  </code></pre>