Skip to main content
POST
/
v1
/
api
/
connection
/
create-connection
Create a new database connection
curl --request POST \
  --url https://api.upsolve.ai/v1/api/connection/create-connection \
  --header 'Content-Type: application/json' \
  --data '{
  "apiKey": "up_embed_************",
  "connection": {
    "name": "Production Database",
    "type": "Postgres",
    "organization_id": "abde6f24-af0f-4f87-b871-7944b2c8c3b3",
    "config": {
      "type": "Postgres",
      "user": "postgres_user",
      "password": "secure_password_123",
      "host": "db.example.com",
      "database": "production_db",
      "port": 5432
    }
  }
}'
{
  "status": "success",
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000"
  }
}

Authorizations

apiKey
string
query
required

apiKey MUST be supplied within the request body instead of query

Body

application/json

POST /v1/api/connection/create-connection Request body

apiKey
string
required

Upsolve API key, generated in the Deploy tab of the Upsolve Hub.

Minimum length: 1
Examples:

"up_embed_************"

connection
object
required

Response

POST /v1/api/connection/create-connection Positive response

status
string
required
Allowed value: "success"
data
object
required