1ConsentConsentDocs
Reference

API Reference

The supported customer REST surface is /api/v1/cli/* on the Dashboard API. Administrative Dashboard routes, billing webhooks, service-to-service endpoints, and the Internal system publisher are operational interfaces—not public customer contracts.

Authentication

Bearer API key with the design_manager right. Keys may be scoped to an organization, project, or app; requested child scopes must be contained by the key scope.

curl -H "Authorization: Bearer $ONECONSENT_TOKEN" \
  "<dashboard-origin>/api/v1/cli/validate"

Requests and responses use JSON. Invalid JSON or schema violations return 400; missing or invalid keys return 401; insufficient rights or an out-of-scope target return 403. Mutation bodies are strict: unknown fields are rejected, scope and scopeId must be supplied together, and public identifiers are short IDs rather than database UUIDs.

GET /api/v1/cli/validate

Validate an API key. Returns the authenticated customer scope, its public short ID and display name, and the key rights.

Request example

No query parameters or body.

Success response schema

Open the generated api-key-info JSON Schema.

Success response example

{
  "scope": "org",
  "scopeId": "org_demo",
  "scopeName": "Example Organization",
  "rights": ["design_manager"]
}

GET /api/v1/cli/scope-tree

List the accessible hierarchy. Returns projects and apps visible beneath the API key scope. All IDs are public short IDs, never database UUIDs.

Request example

No query parameters or body.

Success response schema

Open the generated scope-tree JSON Schema.

Success response example

{
  "scope": "org",
  "scopeId": "org_demo",
  "scopeName": "Example Organization",
  "projects": [{
    "id": "project_demo",
    "slug": "website",
    "name": "Website",
    "apps": [{ "id": "app_demo", "name": "Store", "domain": "shop.example.com" }]
  }]
}

GET /api/v1/cli/resources

Read resources for a scope. Returns standalone designs, themes, and collections for one authorized organization, project, or app scope.

Request schema

Open the generated scope-reference JSON Schema.

Request example

Query parameters:
- scope: org | project | app
- scopeId: public short ID

Success response schema

Open the generated scoped-resources JSON Schema.

Success response example

{
  "collections": [],
  "templates": [{
    "id": "design_demo",
    "name": "GDPR notice",
    "description": null,
    "version": 1,
    "status": "DRAFT",
    "frameworkType": "GDPR",
    "files": []
  }],
  "themes": []
}

POST /api/v1/cli/designs

Create or update a standalone design. Upserts a standalone design by short ID within the authorized scope. Omit scope and scopeId together to use the API key scope.

Request schema

Open the generated upsert-design JSON Schema.

Request example

{
  "scope": "app",
  "scopeId": "app_demo",
  "shortId": "design_demo",
  "name": "GDPR notice",
  "description": "Primary notice",
  "frameworkType": "GDPR",
  "files": [{ "kind": "view", "filename": "main.1cl", "content": "..." }]
}

Success response schema

Open the generated upsert-result JSON Schema.

Success response example

{ "success": true, "id": "design_demo", "action": "updated" }

POST /api/v1/cli/themes

Create or update a theme. Upserts a validated token theme by short ID within the authorized scope. Omit scope and scopeId together to use the API key scope.

Request schema

Open the generated upsert-theme JSON Schema.

Request example

{
  "scope": "app",
  "scopeId": "app_demo",
  "shortId": "theme_demo",
  "name": "Brand theme",
  "themeMode": "single",
  "tokens": { "...": "validated theme token configuration" }
}

Success response schema

Open the generated upsert-result JSON Schema.

Success response example

{ "success": true, "id": "theme_demo", "action": "updated" }

POST /api/v1/cli/collections

Create or update a design collection. Atomically replaces a collection's shared files and at most one GDPR, TCF, and US design within the authorized scope.

Request schema

Open the generated upsert-collection JSON Schema.

Request example

{
  "scope": "app",
  "scopeId": "app_demo",
  "shortId": "collection_demo",
  "name": "Default collection",
  "description": null,
  "sharedFiles": [{ "filename": "button.1cl", "content": "..." }],
  "templates": [{
    "shortId": "gdpr_demo",
    "name": "GDPR",
    "frameworkType": "GDPR",
    "files": []
  }]
}

Success response schema

Open the generated upsert-result JSON Schema.

Success response example

{ "success": true, "id": "collection_demo", "action": "updated" }

On this page