# POST /v1/sessions/{session_id}/git/branches

Source: <https://everruns.com/docs/api/operations/create_branch/>

POST

/v1/sessions/{session\_id}/git/branches

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/sessions/example/git/branches';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"commit_oid":"a1b2c3d4e5f60718293a4b5c6d7e8f9012345678","name":"feature/refund-flow"}'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/sessions/example/git/branches \
  --header 'Content-Type: application/json' \
  --data '{ "commit_oid": "a1b2c3d4e5f60718293a4b5c6d7e8f9012345678", "name": "feature/refund-flow" }'
```

* Production APIapp.everruns.com/api/v1/sessions/{session\_id}/git/branches

## Parameters

### Path Parameters

**session\_id**

required

string

## Request Bodyrequired

Media typeapplication/json

Request to create a branch

object

**commit\_oid**

required

Commit OID (hex) to point to

string

##### Example

```plaintext
a1b2c3d4e5f60718293a4b5c6d7e8f9012345678
```

**name**

required

Branch name (e.g., “feature-xyz”)

string

##### Example

```plaintext
feature/refund-flow
```

## Responses

### 201

Branch created

Media typeapplication/json

Generic success response

object

**ok**

required

boolean

##### Examplegenerated

```json
{
  "ok": true
}
```

### 400

Invalid request