"openapi": "3.0.1" "info": "title": "Upstash API" "description": "API for managing Upstash resources including Redis, Teams, and Vectors." "version": "3.0.1" "servers": - "url": "https://api.upstash.com" "description": "Upstash API server" "components": "securitySchemes": "basicAuth": "type": "http" "scheme": "basic" "description": "Basic authentication using email and API key" "security": - "basicAuth": [] "paths": "/v2/redis/create-backup/{id}": "post": "summary": "Create Backup" "description": "This endpoint creates a backup for a Redis database." "parameters": - "name": "id" "in": "path" "description": "The ID of the Redis database" "required": true "schema": "type": "string" "requestBody": "content": "application/json": "schema": "type": "object" "properties": "name": "type": "string" "description": "Name of the backup" "responses": "200": "description": "OK" "/v2/redis/delete-backup/{id}/{backup_id}": "delete": "summary": "Delete Backup" "description": "This endpoint deletes a backup of a Redis database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" - "name": "backup_id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "OK" "/v2/redis/disable-dailybackup/{id}": "patch": "summary": "Disable Daily Backup" "description": "This endpoint disables daily backup for a Redis database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "OK" "/v2/redis/enable-dailybackup/{id}": "patch": "summary": "Enable Daily Backup" "description": "This endpoint enables daily backup for a Redis database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "OK" "/v2/redis/list-backup/{id}": "get": "summary": "List Backup" "description": "This endpoint lists all backups for a Redis database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "OK" "/v2/redis/restore-backup/{id}": "post": "summary": "Restore Backup" "description": "This endpoint restores data from an existing backup." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "requestBody": "content": "application/json": "schema": "type": "object" "properties": "backup_id": "type": "string" "description": "ID of the backup to restore" "responses": "200": "description": "OK" "/v2/redis/database": "post": "summary": "Create a Redis Database" "description": "This endpoint creates a new regional or global Redis database." "requestBody": "content": "application/json": "schema": "type": "object" "properties": "name": "type": "string" "description": "Name of the database" "region": "type": "string" "description": "Region of the database. For global databases only 'global' is a valid option" "default": "global" "primary_region": "type": "string" "description": "Primary region for global databases" "enum": - "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": "type": "array" "items": "type": "string" "description": "Array of read regions for the database" "enum": - "us-east-1" - "us-west-1" - "us-west-2" - "eu-west-1" - "eu-central-1" - "ap-southeast-1" - "ap-southeast-2" - "ap-northeast-1" - "sa-east-1" "tls": "type": "boolean" "description": "Set true to enable TLS" "responses": "200": "description": "Database created" "/v2/redis/database/{id}": "delete": "summary": "Delete Database" "description": "This endpoint deletes a database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "OK" "get": "summary": "Get Database" "description": "This endpoint gets details of a database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" - "name": "credentials" "in": "query" "schema": "type": "string" "responses": "200": "description": "Database details" "/v2/redis/disable-autoupgrade/{id}": "post": "summary": "Disable Auto Upgrade" "description": "This endpoint disables Auto Upgrade for a given database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "OK" "/v2/redis/disable-eviction/{id}": "post": "summary": "Disable Eviction" "description": "This endpoint disables eviction for a given database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "OK" "/v2/redis/enable-autoupgrade/{id}": "post": "summary": "Enable Auto Upgrade" "description": "This endpoint enables Auto Upgrade for a given database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "OK" "/v2/redis/enable-eviction/{id}": "post": "summary": "Enable Eviction" "description": "This endpoint enables eviction for a given database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "OK" "/v2/redis/enable-tls/{id}": "post": "summary": "Enable TLS" "description": "This endpoint enables TLS on a database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "OK" "/v2/redis/stats/{id}": "get": "summary": "Get Database Stats" "description": "This endpoint gets detailed stats of a database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "Database stats" "/v2/redis/databases": "get": "summary": "List Databases" "description": "This endpoint lists all databases of a user." "responses": "200": "description": "List of databases" "/v2/redis/move-to-team": "post": "summary": "Move To Team" "description": "This endpoint moves database under a target team." "requestBody": "content": "application/json": "schema": "type": "object" "properties": "team_id": "type": "string" "description": "The ID of the target team" "database_id": "type": "string" "description": "The ID of the database to be moved" "responses": "200": "description": "OK" "/v2/redis/rename/{id}": "post": "summary": "Rename Database" "description": "This endpoint renames a database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "requestBody": "content": "application/json": "schema": "type": "object" "properties": "name": "type": "string" "description": "The new name of the database" "responses": "200": "description": "Database renamed" "/v2/redis/reset-password/{id}": "post": "summary": "Reset Password" "description": "This endpoint updates the password of a database." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "Password reset" "/v2/redis/update-regions/{id}": "post": "summary": "Update Regions (Global)" "description": "Update the regions of global database" "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "requestBody": "content": "application/json": "schema": "type": "object" "properties": "read_regions": "type": "array" "items": "type": "string" "description": "Array of read regions for the database" "enum": - "us-east-1" - "us-west-1" - "us-west-2" - "eu-west-1" - "eu-central-1" - "ap-southeast-1" - "ap-southeast-2" - "sa-east-1" "responses": "200": "description": "Regions updated" "/v2/teams/member": "post": "summary": "Add Team Member" "description": "This endpoint adds a new team member to the specified team." "requestBody": "content": "application/json": "schema": "type": "object" "properties": "team_id": "type": "string" "description": "Id of the team to add the member to" "member_email": "type": "string" "description": "Email of the new team member" "member_role": "type": "string" "description": "Role of the new team member" "enum": - "admin" - "dev" - "finance" "responses": "200": "description": "Team member added" "delete": "summary": "Delete Team Member" "description": "This endpoint deletes a team member from the specified team." "requestBody": "content": "application/json": "schema": "type": "object" "properties": "team_id": "type": "string" "description": "Id of the team to remove the member from" "member_email": "type": "string" "description": "Email of the team member to remove" "responses": "200": "description": "Team member deleted" "/v2/team": "post": "summary": "Create Team" "description": "This endpoint creates a new team." "requestBody": "content": "application/json": "schema": "type": "object" "properties": "team_name": "type": "string" "description": "Name of the new team" "copy_cc": "type": "boolean" "description": "Copy existing credit card information to team" "responses": "200": "description": "Team created" "/v2/team/{id}": "delete": "summary": "Delete Team" "description": "This endpoint deletes a team." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "Team deleted" "/v2/teams/{team_id}": "get": "summary": "Get Team Members" "description": "This endpoint lists all members of a team." "parameters": - "name": "team_id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "List of team members" "/v2/teams": "get": "summary": "List Teams" "description": "This endpoint lists all teams of a user." "responses": "200": "description": "List of teams" "/v2/vector/index": "post": "summary": "Create Index" "description": "This endpoint creates an index." "requestBody": "content": "application/json": "schema": "type": "object" "properties": "name": "type": "string" "description": "Name of the index" "region": "type": "string" "description": "Region of the index" "enum": - "eu-west-1" - "us-east-1" "similarity_function": "type": "string" "description": "Similarity function for distance calculus" "enum": - "COSINE" - "EUCLIDIAN" - "DOT_PRODUCT" "dimension_count": "type": "integer" "description": "Amount of values in a vector" "type": "type": "string" "description": "Payment plan" "enum": - "payg" - "fixed" "embedding_model": "type": "string" "description": "Embedding model used" "enum": - "BGE_SMALL_EN_V1_5" - "BGE_BASE_EN_V1_5" - "BGE_LARGE_EN_V1_5" - "BGE_M3" - "BERT_BASE_UNCASED" - "UAE_Large_V1" - "ALL_MINILM_L6_V2" - "MXBAI_EMBED_LARGE_V1" "responses": "200": "description": "Index created" "get": "summary": "List Indices" "description": "This endpoint returns the data related to all indices of an account as a list." "responses": "200": "description": "List of indices" "/v2/vector/index/{id}": "delete": "summary": "Delete Index" "description": "This endpoint deletes an index." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "Index deleted" "get": "summary": "Get Index" "description": "This endpoint returns the data associated with an index." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "Details of the index" "/v2/vector/index/{id}/rename": "post": "summary": "Rename Index" "description": "This endpoint is used to change the name of an index." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "requestBody": "content": "application/json": "schema": "type": "object" "properties": "name": "type": "string" "description": "The new name of the index" "responses": "200": "description": "Index renamed" "/v2/vector/index/{id}/reset-password": "post": "summary": "Reset Index Passwords" "description": "This endpoint is used to reset regular and readonly tokens of an index." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "responses": "200": "description": "Password reset" "/v2/vector/index/{id}/setplan": "post": "summary": "Set Index Plan" "description": "This endpoint is used to change the plan of an index." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "requestBody": "content": "application/json": "schema": "type": "object" "properties": "target_plan": "type": "string" "description": "The new plan for the index" "responses": "200": "description": "Plan set" "/v2/vector/index/{id}/transfer": "post": "summary": "Transfer Index" "description": "This endpoint is used to transfer an index to another team." "parameters": - "name": "id" "in": "path" "required": true "schema": "type": "string" "requestBody": "content": "application/json": "schema": "type": "object" "properties": "target_account": "type": "string" "description": "The ID of the target account" "responses": "200": "description": "Index transferred"