# POST /v1/sessions/{session_id}/databases

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

POST

/v1/sessions/{session\_id}/databases

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/sessions/example/databases';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"name":"refund_history"}'
};


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/databases \
  --header 'Content-Type: application/json' \
  --data '{ "name": "refund_history" }'
```

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

## Parameters

### Path Parameters

**session\_id**

required

string

Session ID

## Request Bodyrequired

Media typeapplication/json

Request body for creating a database.

object

**name**

required

Database name (alphanumeric + underscores, max 64 chars).

string

##### Example

```plaintext
refund_history
```

## Responses

### 201

Database created

Media typeapplication/json

Database info response.

object

**created\_at**

required

Timestamp when this resource was created (RFC 3339).

string

**name**

required

Human-readable name. Safe to render in user-facing messages.

string

**page\_count**

required

integer format: int32

**size\_bytes**

required

integer format: int64

**updated\_at**

required

Timestamp when this resource was last updated (RFC 3339).

string

##### Examplegenerated

```json
{
  "created_at": "example",
  "name": "example",
  "page_count": 1,
  "size_bytes": 1,
  "updated_at": "example"
}
```

### 400

Invalid name or session ID

### 409

Database already exists

### 422

Session database limit exceeded