Projects
Create a project
Creates a new project within the specified organization.
At a glance
| Item | Value |
|---|---|
| Method | POST |
| Path | /v1/projects |
| Auth | Authorization: Bearer <token-or-api-key> |
Quick request
Use this as a starting point. Replace the placeholder IDs, set PGBEAM_TOKEN, and create body.json from the schema below.
curl -X POST \
"$PGBEAM_API_URL/v1/projects" \
-H "Authorization: Bearer $PGBEAM_TOKEN" \
-H "Content-Type: application/json" \
--data @body.jsonAuthorizationBearer <token>
JWT issued by Better Auth. Verified via JWKS.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.pgbeam.com/v1/projects" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "org_id": "string", "database": { "host": "string", "port": 1, "name": "string", "username": "string", "password": "pa$$word" } }'{
"project": {
"id": "prj_01h455vb4pex5vsknk084sn02q",
"org_id": "string",
"name": "string",
"description": "string",
"tags": [
"string"
],
"cloud": "aws",
"proxy_host": "string",
"queries_per_second": 2147483647,
"burst_size": 2147483647,
"max_connections": 2147483647,
"database_count": 0,
"active_connections": 0,
"status": "active",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
},
"database": {
"id": "db_01h455vb4pex5vsknk084sn02q",
"project_id": "string",
"connection_string": "postgresql://myuser:YOUR_PASSWORD@myproject.aws.pgbeam.app:5432/mydb",
"host": "db.example.com",
"port": 5432,
"name": "string",
"username": "string",
"ssl_mode": "disable",
"role": "primary",
"pool_region": "us-east-1",
"cache_config": {
"enabled": true,
"ttl_seconds": 60,
"max_entries": 10000,
"swr_seconds": 30
},
"pool_config": {
"pool_size": 10,
"min_pool_size": 1,
"pool_mode": "session",
"max_active": 200
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}