> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/api/api-pt-br/api-de-devops/pull-requests.md).

# Pull Requests

## Create pull request.

> Creates a new pull request between the specified branches.

```json
{"openapi":"3.0.0","info":{"title":"Flosum Devops Api","version":"1.136.0-dev.5"},"security":[{"access-token":[]}],"components":{"securitySchemes":{"access-token":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Bearer access_token"}},"schemas":{"CreatePullRequestBodyDto":{"type":"object","properties":{"name":{"type":"string","description":"Title of the pull request."},"description":{"type":"string","description":"Initial pull request description."},"sourceBranchId":{"type":"number","description":"Identifier of the source branch."},"targetBranchId":{"type":"number","description":"Identifier of the target branch."},"reviewerIds":{"description":"Ids of users which will be assigned as reviewers.","type":"array","items":{"type":"number"}}},"required":["name","description","sourceBranchId","targetBranchId"]},"CreatePullRequestResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier of the pull request."},"name":{"type":"string","description":"Pull request title."},"description":{"type":"string","description":"Current pull request description."},"status":{"$ref":"#/components/schemas/PullRequestStatus"},"sourceBranch":{"description":"Source branch information.","allOf":[{"$ref":"#/components/schemas/CreatePullRequestBranchDto"}]},"targetBranch":{"description":"Target branch information.","allOf":[{"$ref":"#/components/schemas/CreatePullRequestBranchDto"}]},"createdBy":{"description":"User who created the pull request.","allOf":[{"$ref":"#/components/schemas/PullRequestUserDto"}]},"updatedBy":{"description":"User who most recently updated the pull request.","allOf":[{"$ref":"#/components/schemas/PullRequestUserDto"}]},"createdAt":{"format":"date-time","type":"string","description":"Timestamp when the pull request was created."},"updatedAt":{"format":"date-time","type":"string","description":"Timestamp when the pull request was last updated."},"reviewers":{"description":"Reviewers assigned to the pull request.","type":"array","items":{"$ref":"#/components/schemas/CreatePullRequestReviewerDto"}}},"required":["id","name","description","status","sourceBranch","targetBranch","createdBy","updatedBy","createdAt","updatedAt"]},"PullRequestStatus":{"type":"string","enum":["Open","Closed","Merged"]},"CreatePullRequestBranchDto":{"type":"object","properties":{"id":{"type":"number","description":"Branch identifier."},"name":{"type":"string","description":"Branch name."}},"required":["id","name"]},"PullRequestUserDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]},"CreatePullRequestReviewerDto":{"type":"object","properties":{"id":{"type":"number","description":"Reviewer assignment identifier."},"user":{"$ref":"#/components/schemas/PullRequestUserDto"},"status":{"$ref":"#/components/schemas/ReviewerStatus"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","user","status","createdAt","updatedAt"]},"ReviewerStatus":{"type":"string","enum":["Approved","Changes Requested","Review Requested"]},"ValidationExceptionDto":{"type":"object","properties":{"message":{"type":"array","items":{"type":"string"}},"error":{"type":"string","nullable":true},"statusCode":{"type":"number","enum":[100,101,102,103,200,201,202,203,204,205,206,300,301,302,303,304,307,308,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,421,422,424,428,429,500,501,502,503,504,505]}},"required":["message","error","statusCode"]},"ExceptionDto":{"type":"object","properties":{"message":{"type":"string"},"error":{"type":"string"},"statusCode":{"type":"number","enum":[400,401,403,404,405,406,408,409,410,412,413,414,415,418,420,422,428,429,431,500,502,503,504]}},"required":["message","error","statusCode"]}}},"paths":{"/topologies/{topologyId}/fit/pull-requests":{"post":{"operationId":"PullRequestsController_create","summary":"Create pull request.","description":"Creates a new pull request between the specified branches.","parameters":[{"name":"topologyId","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePullRequestBodyDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePullRequestResponseDto"}}}},"400":{"description":"Invalid pull request payload, params, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationExceptionDto"}}}},"403":{"description":"You do not have permission to create pull requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDto"}}}},"404":{"description":"Source or target branch was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDto"}}}},"409":{"description":"Pull request creation conflicts with existing branches or an existing pull request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDto"}}}},"500":{"description":"Unexpected internal error while processing pull requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDto"}}}}},"tags":["Pull Requests"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/api/api-pt-br/api-de-devops/pull-requests.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
