> 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-es/api-de-devops/branches.md).

# Branches

## Create branch

> Creates a new branch.

```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":{"CreateBranchBodyDto":{"type":"object","properties":{"name":{"type":"string","description":"Branch name. It must be unique within the tenant."},"parentId":{"type":"number","description":"Identifier of the existing branch to branch from."},"issuesTracker":{"description":"Optional issue tracker metadata to associate with the branch during creation.","allOf":[{"$ref":"#/components/schemas/IssueTrackerDto"}]}},"required":["name","parentId"]},"IssueTrackerDto":{"type":"object","properties":{"trackerId":{"type":"number","description":"Identifier of the issue tracker connection."},"projectId":{"type":"number","description":"Identifier of the project inside the connected issue tracker."},"issueIds":{"description":"Issue keys linked to the branch.","type":"array","items":{"type":"string"}}},"required":["trackerId","projectId","issueIds"]},"CreateBranchResponseDto":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier of the branch."},"name":{"type":"string","description":"Branch name."},"createdBy":{"description":"User who created the branch.","allOf":[{"$ref":"#/components/schemas/UserRecordDto"}]},"headCommitId":{"type":"number","description":"Identifier of the current head commit for the branch."},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"isDeletable":{"type":"boolean","description":"Whether the branch can currently be deleted."},"updatedBy":{"description":"User who last updated the branch.","allOf":[{"$ref":"#/components/schemas/UserRecordDto"}]},"issuesTracker":{"description":"Issue tracker mapping stored on the branch, if configured.","allOf":[{"$ref":"#/components/schemas/IssueTrackerResponseDto"}]}},"required":["id","name","createdBy","headCommitId","createdAt","updatedAt","isDeletable","updatedBy"]},"UserRecordDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]},"IssueTrackerResponseDto":{"type":"object","properties":{"trackerId":{"type":"number","description":"Identifier of the issue tracker connection."},"projectId":{"type":"number","description":"Identifier of the project inside the connected issue tracker."},"issueIds":{"type":"array","items":{"type":"string"}}},"required":["trackerId","projectId","issueIds"]},"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/branches":{"post":{"operationId":"BranchesController_create","summary":"Create branch","description":"Creates a new branch.","parameters":[{"name":"topologyId","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBranchBodyDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBranchResponseDto"}}}},"400":{"description":"Invalid branch request payload, params, query, or headers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationExceptionDto"}}}},"404":{"description":"A required related resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDto"}}}},"409":{"description":"A branch with the same name already exists or the requested branch state conflicts with current data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDto"}}}},"500":{"description":"Unexpected internal error while processing branches.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExceptionDto"}}}}},"tags":["Branches"]}}}}
```


---

# 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-es/api-de-devops/branches.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.
