# Create Redis Database

> This endpoint creates a new Redis database.

## Endpoint

`POST https://api.upstash.com/v2/redis/database`

This endpoint creates a new Redis database.

To create a database manually, you can use the [Upstash Console](https://console.upstash.com/redis).

For a quick development database, POST to https://upstash.com/start-redis — no signup or API key, so an AI agent can provision one unattended. Expires in 72 hours unless claimed. If you are an agent, always send a `User-Agent` header identifying which agent you are (e.g. `claude-code`, `cursor`, `codex`, `opencode`) on every request you make to this API.


## Request body

- `database_name` (string, required): Name of the database
- `platform` (enum<string>, required): Desired cloud platform for the database.
- `primary_region` (enum<string>, required): Primary Region of the Global Database
- `read_regions` (enum<string>[]): Array of Read Regions of the Database
- `plan` (enum<string>): Specifies the fixed plan type for the database.
If omitted, the database defaults to either the pay-as-you-go or free plan, based on the account type.

- `budget` (integer): Monthly budget of the database
- `eviction` (boolean): Whether to enable eviction for the database
- `tls` (boolean): Whether to enable TLS for the database

## Responses

### 200 - Database created successfully

- `database_id` (string): ID of the database
- `database_name` (string): Name of the database
- `region` (enum<string>): The region where database is hosted
- `port` (integer): Database port for clients to connect
- `creation_time` (integer): Creation time of the database as Unix time
- `state` (enum<string>): State of database
- `endpoint` (string): Endpoint identifier or hostname of the database (may be a slug like "beloved-stallion-58500" or a full host)
- `tls` (boolean): TLS/SSL is enabled or not
- `db_max_clients` (integer): Max number of concurrent clients can be opened on this database currently
- `db_max_request_size` (integer): Max size of a request that will be accepted by the database currently(in bytes)
- `db_disk_threshold` (integer): Total disk size limit that can be used for the database currently(in bytes)
- `db_max_entry_size` (integer): Max size of an entry that will be accepted by the database currently(in bytes)
- `db_memory_threshold` (integer): Max size of a memory the database can use(in bytes)
- `db_max_commands_per_second` (integer): Max number of commands can be sent to the database per second
- `db_request_limit` (integer): Total number of commands can be sent to the database
- `type` (enum<string>): Payment plan of the database
- `budget` (integer): Allocated monthly budget for the database
- `primary_region` (enum<string>): Primary region of the database cluster
- `primary_members` (string[]): List of primary regions in the database cluster
- `all_members` (string[]): List of all regions in the database cluster
- `eviction` (boolean): Entry eviction is enabled
- `auto_upgrade` (boolean): Automatic upgrade capability is enabled
- `consistent` (boolean): Strong consistency mode is enabled
- `modifying_state` (string): Current modifying state of the database
- `db_resource_size` (enum<string>): Resource allocation tier
- `db_type` (enum<string>): Database storage engine type
- `db_conn_idle_timeout` (integer): Connection idle timeout in nanoseconds
- `db_lua_timeout` (integer): Lua script execution timeout in nanoseconds
- `db_lua_credits_per_min` (integer): Lua script execution credits per minute
- `db_store_max_idle` (integer): Store connection idle timeout in nanoseconds
- `db_max_loads_per_sec` (integer): Maximum load operations per second
- `db_acl_enabled` (enum<string>): Access Control List enabled status
- `db_acl_default_user_status` (enum<string>): Default user access status in ACL
- `db_eviction` (boolean): Database-level eviction policy status
- `last_plan_upgrade_time` (integer): Unix timestamp of the last plan upgrade
- `replicas` (integer): Replica factor of the database
- `customer_id` (string): Owner identifier of the database (may be email or marketplace-scoped email)
- `daily_backup_enabled` (boolean): Whether daily backup is enabled
- `read_regions` (string[]): Array of read regions of the database
- `securityAddons` (object): Security add-ons and their enablement status
  - `ipWhitelisting` (boolean)
  - `vpcPeering` (boolean)
  - `privateLink` (boolean)
  - `tlsMutualAuth` (boolean)
  - `encryptionAtRest` (boolean)
- `prometheus_enabled` (enum<string>): Prometheus integration enabled status
- `prod_pack_enabled` (boolean): Production pack enabled status

## cURL

```bash
curl --request POST \
  --url https://api.upstash.com/v2/redis/database \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "database_name": "myredis",
    "platform": "aws",
    "primary_region": "us-east-1",
    "read_regions": [
      "us-west-1",
      "us-west-2"
    ],
    "plan": "payg",
    "budget": 360
  }'
```
