# Cannot trigger pipeline by api

**URL:** <https://discuss.circleci.com/t/cannot-trigger-pipeline-by-api/46223>\
**Category:** API\
**Created:** [November 25, 2022, 5:19pm UTC](https://discuss.circleci.com/t/cannot-trigger-pipeline-by-api/46223 "2022-11-25T17:19:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergio](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@Sergio](https://discuss.circleci.com/u/Sergio)\
**Post date:** [November 25, 2022, 5:19pm UTC](https://discuss.circleci.com/t/cannot-trigger-pipeline-by-api/46223/1 "2022-11-25T17:19:38Z")

</div>

Hi!

I am new at circleci and I am trying to run cypress testing from a gitlab repository.

I have created the project, the personal api token and iam trying to run the following:

```auto
curl --location --request POST 'https://circleci.com/api/v2/project/circleci/QNXJ3nyzoTQ2zESAUe2BuK/F52t7CH2t9uHH9UBjEnCCG/pipeline' \
--header 'Circle-Token: PERSONAL_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
    "branch":"run_ci"
}'

```

buy I keep getting

```auto
{
    "message": "An internal server error occurred."
}

```

But if I run get to project info api (GET [https://circleci.com/api/v2/project/circleci/QNXJ3nyzoTQ2zESAUe2BuK/F52t7CH2t9uHH9UBjEnCCG](https://circleci.com/api/v2/project/circleci/QNXJ3nyzoTQ2zESAUe2BuK/F52t7CH2t9uHH9UBjEnCCG)) it works, so the problem is with /pipeline endpoint.

If I do a commit in the repo the trigger works as expected, the problem is only with the api.

Hope someone can help me, Thanks!

---

<div class="post-metadata">

**Author:** ![owenjoliver](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/owenjoliver/32/28293_2.png) [@owenjoliver](https://discuss.circleci.com/u/owenjoliver)\
**Post date:** [December 8, 2022, 3:57pm UTC](https://discuss.circleci.com/t/cannot-trigger-pipeline-by-api/46223/3 "2022-12-08T15:57:27Z")

</div>

Hello

The reason that this is happening is that currently when using the Gitlab integration with CircleCI we do not have support for POST API requests.

As you have found you will see an error when trying to do this.

GET requests will work and it is only POST requests which will fail.

Sorry for any inconvenience this has caused you.

There are plans to support this in the future going forwards.

Kind Regards  
Owen Oliver

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [December 18, 2022, 3:57pm UTC](https://discuss.circleci.com/t/cannot-trigger-pipeline-by-api/46223/4 "2022-12-18T15:57:56Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
