Organizations & Workspaces
Übersicht
qr3.app verwendet eine zweistufige Hierarchie:
Organization (Firma/Agentur) └── Workspace 1 (Kunde A) └── Workspace 2 (Kunde B) └── Workspace 3 (Internes Team)- Organisation — oberste Ebene, zugehörig zu einem Stripe-Konto und Plan
- Workspace — isolierter Bereich für QR-Codes, Scans und API-Keys
Organizations API
GET /v1/organizations
Gibt die Organisation zurück, zu der der aktuelle API-Key gehört.
curl https://qr3.app/v1/organizations \ -H "Authorization: Bearer qr3_sk_..."POST /v1/organizations
Erstellt eine neue Organisation.
curl -X POST https://qr3.app/v1/organizations \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Digital Heroes GmbH", "slug": "digital-heroes", "billing_email": "[email protected]" }'Felder:
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
name | string | ✅ | Anzeigename (max. 255 Zeichen) |
slug | string | ✅ | URL-freundlich, einzigartig (min. 2, max. 63 Zeichen, nur a-z0-9-) |
billing_email | string | — | Rechnungs-E-Mail |
PATCH /v1/organizations/:id
curl -X PATCH https://qr3.app/v1/organizations/org_a1b2c3 \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \DELETE /v1/organizations/:id
Soft-Delete der Organisation. Alle zugehörigen Workspaces und QR-Codes bleiben erhalten, sind aber nicht mehr zugänglich.
Workspaces API
GET /v1/workspaces
Alle Workspaces der Organisation auflisten.
curl https://qr3.app/v1/workspaces \ -H "Authorization: Bearer qr3_sk_..."POST /v1/workspaces
Neuen Workspace erstellen.
curl -X POST https://qr3.app/v1/workspaces \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Kunde Bäckerei Schmidt", "slug": "baeckerei-schmidt", "default_locale": "de", "primary_color": "#8B4513", "approval_required": false }'Felder:
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
name | string | — | Anzeigename (Pflicht) |
slug | string | — | URL-freundlich, einzigartig pro Org (Pflicht) |
default_locale | string | de | Standardsprache |
approval_required | boolean | false | Freigabe-Workflow aktivieren |
primary_color | string | — | Branding-Farbe (#RRGGBB) |
Plan-Limits:
| Plan | Max. Workspaces |
|---|---|
| Free | 1 |
| Pro | 3 |
| Business | 10 |
| Agency | Unbegrenzt |
PATCH /v1/workspaces/:id
curl -X PATCH https://qr3.app/v1/workspaces/ws_xyz789 \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Neuer Name", "approval_required": true, "custom_domain": "qr.baeckerei-schmidt.de" }'DELETE /v1/workspaces/:id
Archiviert den Workspace. Kann nicht auf den eigenen Workspace angewendet werden.
Audit-Logs
GET /v1/audit-logs
Nachvollziehbares Protokoll aller Änderungen im Workspace.
curl "https://qr3.app/v1/audit-logs?resource_type=codes&limit=50" \ -H "Authorization: Bearer qr3_sk_..."Query-Parameter:
| Parameter | Typ | Beschreibung |
|---|---|---|
resource_type | string | Filter nach Ressource: codes, api_keys, webhooks, workspaces |
resource_id | string | Filter nach spezifischer Ressource-ID |
action | string | Filter nach Aktion (z.B. codes.created) |
cursor | string | Pagination-Cursor |
limit | integer | Max. 100 (Standard: 50) |
Beispiel-Response:
{ "data": [ { "id": "aud_a1b2c3", "actor_type": "api", "action": "codes.created", "resource_type": "codes", "resource_id": "qr_xyz123", "changes": {}, "created_at": "2026-03-15T10:00:00.000Z" } ]}