Quickstart
This page shows you the shortest path to your first successful request. You
only need curl and an account with access to a tenant.
Prerequisites
- An active Codemeta OS account.
- The tenant you want to work in is assigned to your account.
- A second factor set up. Without it, calls with a session cookie answer
403(2fa-required).
Steps
Sign in and store the session cookie. The session is issued as an HTTP-only cookie and sent along with every request.
curl -X POST https://os.codemeta.de/api/auth/sign-in/email \ -H "Content-Type: application/json" \ -c cookies.txt \ -d '{"email":"alice@example.com","password":"…"}'After a successful sign-in, the session cookie is stored in
cookies.txt. Keep this file for the following requests. If the sign-in answers{ "twoFactorRedirect": true }, submit the second-factor code first (POST /api/auth/two-factor/verify-totp, see Auth & sessions).Set the tenant context. Every call to the tenant API (
/api/v1/...) needs the headerX-Tenant-Idwith the UUID of the tenant whose data you are working with.export TENANT="0192f2c0-8d1c-7a3b-9e4f-d3e7f1a2b5c8"Send your first read request. List endpoints return paginated results.
limit,offsetandcursorcan be controlled as query parameters.curl https://os.codemeta.de/api/v1/tickets?limit=10 \ -H "X-Tenant-Id: $TENANT" \ -b cookies.txtCreate an entity. POST requests are idempotent via the
X-Idempotency-Keyheader: repeated requests with the same key and body combination return the same response without creating a new entity.curl -X POST https://os.codemeta.de/api/v1/tickets \ -H "X-Tenant-Id: $TENANT" \ -H "Content-Type: application/json" \ -H "X-Idempotency-Key: 6b6e9b37-8a72-4d5b-8b2c-9a3d2c1e5f64" \ -b cookies.txt \ -d '{"title":"Printer is stuck","priority":"normal"}'
Response format
Successful responses are JSON. Lists are returned in data, the paging information
in meta — see Pagination. Single entities are returned
directly as an object.
Errors follow RFC 7807. Learn more under Platform guarantees.
What’s next?
- Understand multi-tenancy – why the
X-Tenant-Idheader exists and what happens if you forget it. - Permissions & scopes – the two-step model of functional permissions and data scopes.
- Audit history – every change as a JSON patch.
- API reference – all endpoints with schema and examples.