API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console
Getting started

Quickstart

Reading time · 8 minUpdated · 1 May 2026

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

  1. 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).

  2. Set the tenant context. Every call to the tenant API (/api/v1/...) needs the header X-Tenant-Id with the UUID of the tenant whose data you are working with.

    export TENANT="0192f2c0-8d1c-7a3b-9e4f-d3e7f1a2b5c8"
  3. Send your first read request. List endpoints return paginated results. limit, offset and cursor can be controlled as query parameters.

    curl https://os.codemeta.de/api/v1/tickets?limit=10 \
      -H "X-Tenant-Id: $TENANT" \
      -b cookies.txt
  4. Create an entity. POST requests are idempotent via the X-Idempotency-Key header: 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?

Search