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

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

POST

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

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/sessions/example/git/commit';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"author_email":"support-agent@example.com","author_name":"Support Agent","branch":"main","message":"feat: draft migration plan"}'
};


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/commit \
  --header 'Content-Type: application/json' \
  --data '{ "author_email": "support-agent@example.com", "author_name": "Support Agent", "branch": "main", "message": "feat: draft migration plan" }'
```

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

## Parameters

### Path Parameters

**session\_id**

required

string

## Request Bodyrequired

Media typeapplication/json

Request to create a commit

object

**author\_email**

Author email (defaults to “<agent@everruns.local>”)

string | null

##### Example

```plaintext
support-agent@example.com
```

**author\_name**

Author name (defaults to “Agent”)

string | null

##### Example

```plaintext
Support Agent
```

**branch**

Branch name (defaults to “refs/heads/main”); short names like “main” are normalized

string | null

##### Example

```plaintext
main
```

**message**

required

Commit message

string

##### Example

```plaintext
feat: draft migration plan
```

## Responses

### 201

Commit created

Media typeapplication/json

Result of a commit operation

object

**objects\_created**

required

integer

**oid**

required

string

**tree\_oid**

required

string

##### Examplegenerated

```json
{
  "objects_created": 1,
  "oid": "example",
  "tree_oid": "example"
}
```

### 400

Invalid request

### 404

Session not found