▸ IndieLogs operation reference

tokens.create

Input validation and access metadata generated from the shared operation registry.

Access: Bearer token required. Additional scope: tokens:manage. MCP allowed: create_token.

Input JSON Schema

This schema is generated from the canonical Zod input schema in the shared contract package, not copied into the docs source. JSON Schema describes representable structure; runtime refinements and transforms remain enforced by the canonical parser and may not be fully represented here.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "scopes": {
      "maxItems": 13,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "projects:read",
          "updates:read",
          "drafts:write",
          "updates:publish",
          "tokens:manage",
          "projects:write",
          "sources:read",
          "sources:write",
          "voice:read",
          "voice:write",
          "account:read",
          "account:write",
          "account:export"
        ]
      }
    },
    "project_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "startup_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "ttl_days": {
      "type": "integer",
      "minimum": 1,
      "maximum": 365
    }
  },
  "additionalProperties": {}
}

HTTP and CLI

POST the versioned operation envelope to /api/v2/execute. Replace the placeholder with a valid input object from the schema above; this shape is not a runnable request.

{"version":1,"operation":"tokens.create","input":<input-object matching schema>}

CLI command shape: indielogs call tokens.create '<input-json>'. The placeholder is not a valid sample input.