Public API v1
Automate your Odoo deployments, integrate oec.sh into your CI/CD pipelines, and build infrastructure-as-code workflows with the oec.sh Public API.
Requires Starter plan or higher. API access is available on Starter (39/mo), and Agency ($199/mo) plans.
What You Can Automate
The Public API gives you programmatic access to the core oec.sh platform:
| Resource | What you can do |
|---|---|
| Projects | List projects, get details, check status |
| Environments | List, get, start, stop, restart environments |
| Deploy Actions | Trigger deployments, redeploys, module updates |
| Webhooks | Create and manage outgoing webhook subscriptions |
| API Keys | List and revoke API keys |
Common Use Cases
- CI/CD pipelines — Trigger a deployment after your Git branch is merged
- Infrastructure as code — Manage environments from Terraform or Ansible
- Status dashboards — Poll environment health for custom monitoring
- Slack bots — Deploy on slash command, post status updates to channels
- Staging automation — Auto-deploy to staging on every push, deploy to production on tag
Base URL
https://api.oec.sh/api/public/v1All API endpoints are relative to this base URL.
Interactive Documentation
Explore and test every endpoint directly in your browser:
| Tool | URL |
|---|---|
| Swagger UI | api.oec.sh/api/public/v1/docs (opens in a new tab) |
| ReDoc | api.oec.sh/api/public/v1/redoc (opens in a new tab) |
Both are generated live from the OpenAPI schema — they always reflect the current API.
Quick Start
Create an API Key
- Log in to the oec.sh platform
- Go to Settings → API Keys
- Click Create Key
- Choose a key type:
- Read-only — for monitoring, dashboards, read-only integrations
- Full access — for deployments, automation, CI/CD pipelines
- Choose the scope:
- Organization — access all projects in your org
- Project — scoped to a single project
- Copy the key immediately — it is shown only once
Store your API key in a secrets manager (GitHub Secrets, HashiCorp Vault, AWS Secrets Manager, etc.). It cannot be retrieved after creation — only revoked and recreated.
Make Your First Request
List all projects in your organization:
curl https://api.oec.sh/api/public/v1/projects \
-H "Authorization: Bearer oec_live_rw_your_key_here"A successful response looks like:
{
"items": [
{
"id": "proj_01abc...",
"name": "Client ERP",
"slug": "client-erp",
"environment_count": 3,
"created_at": "2025-09-15T10:30:00Z"
}
],
"total": 1,
"page": 1,
"page_size": 20
}Explore Endpoints
From here you can:
GET /projects/{id}/environments— list environments for a projectPOST /environments/{id}/actions/redeploy— trigger a redeploymentGET /environments/{id}— check environment status
See the sidebar for full documentation on each resource.
Versioning
The current version is v1. The base path includes the version: /api/public/v1.
When breaking changes are introduced, a new version (v2) will be added and v1 will continue working with a deprecation notice. Non-breaking additions (new fields, new endpoints) are added to the current version without a version bump.
Response Format
All responses are JSON. Successful responses return the resource directly or a paginated list:
{
"items": [...],
"total": 42,
"page": 1,
"page_size": 20
}Errors use a consistent format documented in Errors & Status Codes.