▸ IndieLogs operation reference

drafts.create

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

Access: Bearer token required. Additional scope: drafts:write. MCP allowed: op_drafts_create.

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": {
    "project_id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "summary": {
      "type": "string",
      "minLength": 1,
      "maxLength": 10000
    },
    "title": {
      "type": "string",
      "maxLength": 200
    },
    "description": {
      "type": "string",
      "maxLength": 10000
    },
    "why": {
      "type": "string",
      "maxLength": 2000
    },
    "commits": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "scheduled_for": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "publication_date": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
        },
        {
          "type": "null"
        }
      ]
    },
    "visual": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "card",
            "screenshot",
            "none"
          ]
        },
        "card": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 100
            },
            {
              "type": "object",
              "properties": {
                "k": {
                  "type": "string",
                  "maxLength": 100
                },
                "big": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 100
                    },
                    {
                      "type": "number"
                    }
                  ]
                },
                "sub": {
                  "type": "string",
                  "maxLength": 300
                }
              },
              "required": [
                "k",
                "big",
                "sub"
              ]
            }
          ]
        },
        "url": {
          "type": "string",
          "maxLength": 2048,
          "format": "uri"
        },
        "caption": {
          "type": "string",
          "maxLength": 500
        }
      },
      "required": [
        "kind"
      ]
    },
    "variants": {
      "type": "object",
      "properties": {
        "x": {
          "type": "string",
          "maxLength": 3000
        },
        "linkedin": {
          "type": "string",
          "maxLength": 3000
        },
        "outputs": {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "type": "boolean"
          }
        }
      }
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._:-]{1,200}$"
    }
  },
  "required": [
    "project_id",
    "summary"
  ],
  "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":"drafts.create","input":<input-object matching schema>}

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