POST
/
v2
/
redis
/
database
curl -X POST \
  https://api.upstash.com/v2/redis/database \
  -u 'EMAIL:API_KEY' \
  -d '{"name":"myredis", "region":"global", "primary_region":"us-east-1", "read_regions":["us-west-1","us-west-2"], "tls": true}'
{
  "database_id": "93e3a3e-342c-4683-ba75-344c08ae143b",
  "database_name": "global-test",
  "database_type": "Pay as You Go",
  "region": "global",
  "type": "paid",
  "port": 32559,
  "creation_time": 1674596896,
  "state": "active",
  "password": "dd1803832a2746309e118373549e574d",
  "user_email": "support@upstash.com",
  "endpoint": "steady-stud-32559.upstash.io",
  "tls": false,
  "rest_token": "AX8vACQgOTMyY2UyYy00NjgzLWJhNzUtMzQ0YzA4YWUxNDNiZMyYTI3NDYzMDllMTE4MzczNTQ5ZTU3NGQ=",
  "read_only_rest_token": "An8vACQg2UtMzQyYy00NjgzLWJhNzUtMzQ0YzA4YBVsUsyn19xDnTAvjbsiq79GRDrURNLzIYIOk="
}

Request Parameters

name
string
required

Name of the database

region
string
default: "global"required

Region of the database. Only valid option is global.

primary_region
string
required

Primary Region of the Global Database.

Available regions: us-east-1, us-west-1, us-west-2, eu-west-1, eu-central-1, ap-southeast-1, ap-southeast-2, sa-east-1

read_regions
Array<string>

Array of Read Regions of the Database.

Available regions: us-east-1, us-west-1, us-west-2, eu-west-1, eu-central-1, ap-southeast-1, ap-southeast-2, sa-east-1

tls
boolean
required

Set true to enable tls.

Response Parameters

database_id
string

ID of the created database

database_name
string

Name of the database

database_type
string

Type of the database in terms of pricing model(Free, Pay as You Go or Enterprise)

region
string

The region where database is hosted

port
int

Database port for clients to connect

creation_time
int

Creation time of the database as Unix time

state
string

State of database (active or deleted)

password
string

Password of the database

user_email
string

Email or team id of the owner of the database

endpoint
string

Endpoint URL of the database

tls
boolean

TLS/SSL is enabled or not