redis

Create Redis Database

Changed on

This endpoint creates a new Redis database.

To create a database manually, you can use the Upstash Console.

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.

post/redis/database

Request

Request body

database_namestring required

Name of the database

platform'aws' | 'gcp' required

Desired cloud platform for the database.

primary_region'us-east-1' | 'us-east-2' | 'us-west-1' | 'us-west-2' | 'ca-central-1' | 'eu-central-1' | 'eu-west-1' | 'eu-west-2' | 'sa-east-1' | 'ap-south-1' | 'ap-northeast-1' | 'ap-southeast-1' | 'ap-southeast-2' | 'af-south-1' | 'us-central1' | 'us-east4' | 'europe-west1' | 'asia-northeast1' required

Primary Region of the Global Database

read_regionsstring[]

Array of Read Regions of the Database

plan'free' | 'payg' | 'fixed_250mb' | 'fixed_1gb' | 'fixed_5gb' | 'fixed_10gb' | 'fixed_50gb' | 'fixed_100gb' | 'fixed_500gb'

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.

budgetinteger

Monthly budget of the database

evictionboolean

Whether to enable eviction for the database

tlsboolean

Whether to enable TLS for the database

Example request

{
  "database_name": "myredis",
  "platform": "aws",
  "primary_region": "us-east-1",
  "read_regions": [
    "us-west-1",
    "us-west-2"
  ],
  "plan": "payg",
  "budget": 360,
  "tls": true
}

Response

Database created successfully

database_idstring

ID of the database

database_namestring

Name of the database

database_typestring

Pricing model of the database, one of free, Pay as You Go or Enterprise

region'global'

The region where database is hosted

portinteger

Database port for clients to connect

creation_timeinteger

Creation time of the database as Unix time

state'active' | 'suspended' | 'passive'

State of database

endpointstring

Endpoint identifier or hostname of the database (may be a slug like "beloved-stallion-58500" or a full host)

rest_tokenstring

REST token for the database. Omitted when credential protection is on, when you pass the credentials=hide query parameter to Get Database, or when the API key or your team role is read-only.

read_only_rest_tokenstring

Read-only REST token for the database. Omitted when credential protection is on, or when you pass the credentials=hide query parameter to Get Database.

passwordstring

Password of the database. Omitted when credential protection is on, when you pass the credentials=hide query parameter to Get Database, or when the API key or your team role is read-only.

tlsboolean

TLS/SSL is enabled or not

db_daily_bandwidth_limitinteger

Daily bandwidth limit for the database (in bytes). The response can omit this field.

db_max_clientsinteger

Max number of concurrent clients can be opened on this database currently

db_max_request_sizeinteger

Max size of a request that will be accepted by the database currently(in bytes)

db_disk_thresholdinteger

Total disk size limit that can be used for the database currently(in bytes)

db_max_entry_sizeinteger

Max size of an entry that will be accepted by the database currently(in bytes)

db_memory_thresholdinteger

Max size of a memory the database can use(in bytes)

db_max_commands_per_secondinteger

Max number of commands can be sent to the database per second

db_request_limitinteger

Total number of commands can be sent to the database

type'free' | 'payg' | 'pro' | 'paid'

Payment plan of the database

budgetinteger

Allocated monthly budget for the database

primary_region'us-east-1' | 'us-east-2' | 'us-west-1' | 'us-west-2' | 'ca-central-1' | 'eu-central-1' | 'eu-west-1' | 'eu-west-2' | 'sa-east-1' | 'ap-south-1' | 'ap-northeast-1' | 'ap-southeast-1' | 'ap-southeast-2' | 'af-south-1' | 'us-central1' | 'us-east4' | 'europe-west1' | 'asia-northeast1'

Primary region of the database cluster

primary_membersstring[]

List of primary regions in the database cluster

all_membersstring[]

List of all regions in the database cluster

evictionboolean

Entry eviction is enabled

auto_upgradeboolean

Automatic upgrade capability is enabled

consistentboolean

Strong consistency mode is enabled

modifying_statestring

Current modifying state of the database

db_resource_size'S' | 'M' | 'L' | 'XL' | 'XXL' | '3XL'

Resource allocation tier

db_type'bolt' | 'badger' | 'pebble'

Database storage engine type

db_conn_idle_timeoutinteger

Connection idle timeout in nanoseconds

db_lua_timeoutinteger

Lua script execution timeout in nanoseconds

db_lua_credits_per_mininteger

Lua script execution credits per minute

db_store_max_idleinteger

Store connection idle timeout in nanoseconds

db_max_loads_per_secinteger

Maximum load operations per second

db_acl_enabled'true' | 'false'

Access Control List enabled status

db_acl_default_user_status'true' | 'false'

Default user access status in ACL

db_evictionboolean

Database-level eviction policy status

last_plan_upgrade_timeinteger

Unix timestamp of the last plan upgrade

replicasinteger

Replica factor of the database

user_emailstring

Owner identifier of the database (may be email or marketplace-scoped email)

daily_backup_enabledboolean

Whether daily backup is enabled

read_regionsstring[]

Array of read regions of the database

prometheus_enabled'true' | 'false'

Prometheus integration enabled status

prod_pack_enabledboolean

Production pack enabled status

Example response

{
  "database_id": "96ad0856-03b1-4ee7-9666-e81abd0349e1",
  "database_name": "MyRedis",
  "database_type": "Pay as You Go",
  "region": "global",
  "port": 6379,
  "creation_time": 1752649602,
  "state": "active",
  "endpoint": "beloved-stallion-58500",
  "tls": true,
  "db_max_clients": 10000,
  "db_max_request_size": 10485760,
  "db_disk_threshold": 107374182400,
  "db_max_entry_size": 104857600,
  "db_memory_threshold": 3221225472,
  "db_max_commands_per_second": 10000,
  "db_request_limit": 8024278031528737000,
  "type": "paid",
  "budget": 360,
  "primary_region": "us-east-1",
  "primary_members": [
    "us-east-1"
  ],
  "all_members": [
    "us-east-1"
  ],
  "db_resource_size": "L",
  "db_type": "pebble",
  "db_conn_idle_timeout": 21600000000000,
  "db_lua_timeout": 250000000,
  "db_lua_credits_per_min": 10000000000,
  "db_store_max_idle": 900000000000,
  "db_max_loads_per_sec": 1000000,
  "db_acl_enabled": "false",
  "db_acl_default_user_status": "true",
  "replicas": 5,
  "user_email": "example@upstash.com",
  "read_regions": [
    "us-east-2"
  ],
  "securityAddons": {
    "ipWhitelisting": false,
    "vpcPeering": false,
    "privateLink": false,
    "tlsMutualAuth": false,
    "encryptionAtRest": false
  },
  "prometheus_enabled": "false"
}

Changes

    • warning

      removed the optional property from the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status