Redis

Create Redis Database

This endpoint creates a new Redis database.

POST/v2/redis/database
cURL
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
  }'
200Response
{
  "database_id": "96ad0856-03b1-4ee7-9666-e81abd0349e1",
  "database_name": "MyRedis",
  "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"
  ],
  "eviction": false,
  "auto_upgrade": false,
  "consistent": false,
  "modifying_state": "",
  "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",
  "db_eviction": false,
  "last_plan_upgrade_time": 0,
  "replicas": 5,
  "customer_id": "example@upstash.com",
  "daily_backup_enabled": false,
  "read_regions": [
    "us-east-2"
  ],
  "securityAddons": {
    "ipWhitelisting": false,
    "vpcPeering": false,
    "privateLink": false,
    "tlsMutualAuth": false,
    "encryptionAtRest": false
  },
  "prometheus_enabled": "false",
  "prod_pack_enabled": false
}

Authorization

Authorizationheaderstringrequired

Bearer authentication header of the form Bearer <token>.

Body

database_namestringrequired

Name of the database

platformenum<string>required

Desired cloud platform for the database.

Available options:awsgcp
primary_regionenum<string>required

Primary Region of the Global Database

Available options:us-east-1us-east-2us-west-1us-west-2ca-central-1eu-central-1eu-west-1eu-west-2sa-east-1ap-south-1ap-northeast-1ap-southeast-1ap-southeast-2af-south-1us-central1us-east4europe-west1asia-northeast1
read_regionsenum<string>[]

Array of Read Regions of the Database

Available options:us-east-1us-east-2us-west-1us-west-2ca-central-1eu-central-1eu-west-1eu-west-2sa-east-1ap-south-1ap-northeast-1ap-southeast-1ap-southeast-2
planenum<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.

Available options:freepaygfixed_250mbfixed_1gbfixed_5gbfixed_10gbfixed_50gbfixed_100gbfixed_500gb
budgetinteger

Monthly budget of the database

evictionboolean

Whether to enable eviction for the database

tlsboolean

Whether to enable TLS for the database

Response

200 — Database created successfully

database_idstring

ID of the database

database_namestring

Name of the database

regionenum<string>

The region where database is hosted

Available options:global
portinteger

Database port for clients to connect

creation_timeinteger

Creation time of the database as Unix time

stateenum<string>

State of database

Available options:activesuspendedpassive
endpointstring

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

tlsboolean

TLS/SSL is enabled or not

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

typeenum<string>

Payment plan of the database

Available options:freepaygpropaid
budgetinteger

Allocated monthly budget for the database

primary_regionenum<string>

Primary region of the database cluster

Available options:us-east-1us-east-2us-west-1us-west-2ca-central-1eu-central-1eu-west-1eu-west-2sa-east-1ap-south-1ap-northeast-1ap-southeast-1ap-southeast-2af-south-1us-central1us-east4europe-west1asia-northeast1
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_sizeenum<string>

Resource allocation tier

Available options:SMLXLXXL3XL
db_typeenum<string>

Database storage engine type

Available options:boltbadgerpebble
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_enabledenum<string>

Access Control List enabled status

Available options:truefalse
db_acl_default_user_statusenum<string>

Default user access status in ACL

Available options:truefalse
db_evictionboolean

Database-level eviction policy status

last_plan_upgrade_timeinteger

Unix timestamp of the last plan upgrade

replicasinteger

Replica factor of the database

customer_idstring

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

securityAddonsobject

Security add-ons and their enablement status

prometheus_enabledenum<string>

Prometheus integration enabled status

Available options:truefalse
prod_pack_enabledboolean

Production pack enabled status

Loading search…