Skip to content

API Reference

The ioenv HTTP API provides programmatic access to environment variables and secrets. All endpoints require authentication via an API token.

Base URL

https://api.ioenv.com/api/v1

Authentication

Include your API token in the Authorization header:

Authorization: Bearer ioenv_xxxxxxxxxxxx

Tokens are scoped to a single project. Create tokens via the dashboard or CLI (ioenv token create).

Endpoints

Export Variables

Export all variables for an environment as a .env formatted string.

GET /env/{envId}/variables/export

Response:

API_URL=https://api.internal
DB_HOST=db.cluster.local
OPENAI_KEY=sk-proj-xxxxxxxxxxxx

List Variables

List all variables in an environment.

GET /env/{envId}/variables

Response:

json
{
  "variables": [
    {
      "key": "API_URL",
      "value": "https://api.internal",
      "isSecret": false,
      "updatedAt": "2025-01-15T10:30:00Z"
    }
  ]
}

Set Variable

Create or update a variable.

PUT /env/{envId}/variables/{key}

Body:

json
{
  "value": "https://api.internal",
  "isSecret": false
}

Delete Variable

DELETE /env/{envId}/variables/{key}

List Environments

GET /project/{projectId}/environments

Response:

json
{
  "environments": [
    { "id": "env_abc", "name": "_base" },
    { "id": "env_def", "name": "dev" },
    { "id": "env_ghi", "name": "staging" },
    { "id": "env_jkl", "name": "prod" }
  ]
}

Error Responses

All errors follow a consistent format:

json
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Environment not found"
  }
}
StatusCodeDescription
401UNAUTHORIZEDMissing or invalid API token
403FORBIDDENToken lacks required permissions
404NOT_FOUNDResource not found
422VALIDATION_ERRORInvalid request body
429RATE_LIMITEDToo many requests

Environment Cloud for Developers & AI Teams