Skip to main content

Environments

Environments provide logical isolation for resources within your organization.

Create Environment

POST /v1/environments

Request Body:

FieldTypeRequiredDescription
namestringYesEnvironment name (1-50 chars, lowercase alphanumeric, hyphens, underscores)

Example:

curl -X POST https://api.embedd.to/v1/environments \
-H "Authorization: Bearer sk_your_key" \
-H "Content-Type: application/json" \
-d '{"name": "production"}'

Response (201):

{
"id": "env_abc123",
"org_id": "org_xyz",
"name": "production",
"created_at": "2025-01-15T10:00:00Z"
}

List Environments

GET /v1/environments

Query Parameters:

ParameterTypeDefaultDescription
limitinteger20Items per page (1-100)
cursorstringnullPagination cursor

Response (200):

{
"data": [
{
"id": "env_abc123",
"org_id": "org_xyz",
"name": "production",
"created_at": "2025-01-15T10:00:00Z"
}
],
"pagination": {
"limit": 20,
"has_more": false,
"next_cursor": null
}
}

Get Environment

GET /v1/environments/{environment_id}

Response (200): Same as single environment object above.

Delete Environment

DELETE /v1/environments/{environment_id}

Fails with 409 Conflict if the environment has connections or vector tables attached.

Response: 204 No Content