{"openapi":"3.1.0","info":{"title":"RepoMuse API","version":"1.0.0","description":"Create projects and author voices, queue credit-backed social generation, poll results, and edit immutable post revisions. Failed generations refund automatically.\n\n## Getting started\n\nCreate an `rm_live_...` token in RepoMuse, then send it as `Authorization: Bearer <token>`. Never embed a static token in browser code.\n\nMCP clients can instead obtain a token via OAuth 2.1: `initialize` / `tools/list` are open; `tools/call` answers an unauthenticated request with `401` and a `WWW-Authenticate` header pointing at `/.well-known/oauth-protected-resource/mcp`. Authorization code + PKCE is required and clients may register dynamically. OAuth tokens are opaque, carry the same `read` and `generate` scopes as API keys, expire after an hour, and can be revoked immediately by the user.\n\n`POST /generations` requires a fresh `Idempotency-Key`. Medium costs 1 credit and High costs 3 credits per generated child. A batch charges each child atomically; a terminal failure refunds that child automatically. The accepted response gives a generation or batch ID to poll with `GET /generations/{generationId}` or `GET /generation-batches/{batchId}`.\n\nAll part edits and approve/reject/publish calls require the latest `expectedRevisionId`. A stale ID returns `409 REVISION_CONFLICT` rather than overwriting another edit. Publication records an immutable snapshot; RepoMuse never publishes to the social platform itself.\n\nThe API is JSON-only, limited to 120 requests per account per minute, and versioned under `/api/v1`. The equivalent MCP tools are available at `POST /mcp`."},"servers":[{"url":"/api/v1"}],"externalDocs":{"description":"Interactive RepoMuse API reference","url":"/docs/api"},"tags":[{"name":"Projects"},{"name":"Authors"},{"name":"Generation"},{"name":"Posts"}],"paths":{"/projects":{"get":{"operationId":"listProjects","summary":"List projects.","description":"List projects. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createProject","summary":"Create a project with a default main author.","description":"Create a project with a default main author. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":80},"notes":{"type":"string","maxLength":2000}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{projectId}":{"get":{"operationId":"getProject","summary":"Get project studio state.","description":"Get project studio state. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"projectId","in":"path","required":true,"description":"Owned project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateProjectProfile","summary":"Update the project profile with revision CAS.","description":"Update the project profile with revision CAS. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"projectId","in":"path","required":true,"description":"Owned project ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["expectedRevision","profile"],"properties":{"expectedRevision":{"type":"integer","minimum":1},"profile":{"$ref":"#/components/schemas/ProjectProfile"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteProject","summary":"Delete a project.","description":"Delete a project. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"projectId","in":"path","required":true,"description":"Owned project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{projectId}/authors":{"get":{"operationId":"listProjectAuthors","summary":"List project authors.","description":"List project authors. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"projectId","in":"path","required":true,"description":"Owned project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createProjectAuthor","summary":"Create a project author.","description":"Create a project author. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"projectId","in":"path","required":true,"description":"Owned project ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["profile"],"properties":{"profile":{"$ref":"#/components/schemas/AuthorProfile"},"isDefault":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/authors/{authorId}":{"get":{"operationId":"getProjectAuthor","summary":"Get one author.","description":"Get one author. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"authorId","in":"path","required":true,"description":"Project author ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateProjectAuthor","summary":"Update one author with revision CAS.","description":"Update one author with revision CAS. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"authorId","in":"path","required":true,"description":"Project author ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"archiveProjectAuthor","summary":"Archive one author.","description":"Archive one author. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"authorId","in":"path","required":true,"description":"Project author ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-accounts":{"get":{"operationId":"listSocialAccounts","summary":"List social account identities.","description":"List social account identities. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createSocialAccount","summary":"Create a social account identity.","description":"Create a social account identity. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-accounts/{socialAccountId}":{"patch":{"operationId":"updateSocialAccount","summary":"Update an account identity.","description":"Update an account identity. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"socialAccountId","in":"path","required":true,"description":"Stable social account ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/generations":{"post":{"operationId":"generateSocialPosts","summary":"Queue social generation.","description":"Queue social generation. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialGenerationRequest"}}}},"responses":{"202":{"description":"Generation accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/generations/{generationId}":{"get":{"operationId":"getGeneration","summary":"Poll one generation.","description":"Poll one generation. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"generationId","in":"path","required":true,"description":"Generation ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/generation-batches/{batchId}":{"get":{"operationId":"getGenerationBatch","summary":"Poll one generation batch.","description":"Poll one generation batch. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"batchId","in":"path","required":true,"description":"Generation batch ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{projectId}/generations":{"get":{"operationId":"listProjectGenerations","summary":"List project generations.","description":"List project generations. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"projectId","in":"path","required":true,"description":"Owned project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{projectId}/social-posts":{"get":{"operationId":"listSocialPosts","summary":"List project posts.","description":"List project posts. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"projectId","in":"path","required":true,"description":"Owned project ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}":{"get":{"operationId":"getSocialPost","summary":"Get one post and its revisions.","description":"Get one post and its revisions. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/import":{"post":{"operationId":"importSocialPosts","summary":"Import prior published posts.","description":"Import prior published posts. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{projectId}/drafting-packet":{"post":{"operationId":"getDraftingPacket","summary":"Assemble voice, profile, and wrapped research for local agent drafting. Does not spend credits.","description":"Assemble voice, profile, and wrapped research for local agent drafting. Does not spend credits. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"projectId","in":"path","required":true,"description":"Owned project ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/validate":{"post":{"operationId":"validateSocialParts","summary":"Validate post parts against platform length, byte, and thread rules. Does not spend credits.","description":"Validate post parts against platform length, byte, and thread rules. Does not spend credits. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/agent-draft":{"post":{"operationId":"createAgentDraft","summary":"Store a locally written draft as a normal DRAFT post. Does not spend credits.","description":"Store a locally written draft as a normal DRAFT post. Does not spend credits. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}/parts/{partId}":{"patch":{"operationId":"updateSocialPostPart","summary":"Replace one part.","description":"Replace one part. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}},{"name":"partId","in":"path","required":true,"description":"Stable post-part ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteSocialPostPart","summary":"Delete one part.","description":"Delete one part. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}},{"name":"partId","in":"path","required":true,"description":"Stable post-part ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}/parts":{"post":{"operationId":"insertSocialPostPart","summary":"Insert one part.","description":"Insert one part. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"replaceSocialPostParts","summary":"Replace all parts.","description":"Replace all parts. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["expectedRevisionId","parts"],"properties":{"expectedRevisionId":{"type":"string"},"parts":{"$ref":"#/components/schemas/SocialPostParts"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}/parts/order":{"put":{"operationId":"reorderSocialPostParts","summary":"Reorder all parts.","description":"Reorder all parts. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}/validation-issues/acknowledge":{"post":{"operationId":"acknowledgeSocialPostIssues","summary":"Acknowledge reviewable issues.","description":"Acknowledge reviewable issues. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}/approve":{"post":{"operationId":"approveSocialPost","summary":"Approve the current revision.","description":"Approve the current revision. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}/reject":{"post":{"operationId":"rejectSocialPost","summary":"Reject the current revision.","description":"Reject the current revision. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}/restore":{"post":{"operationId":"restoreSocialPost","summary":"Restore a rejected post to draft.","description":"Restore a rejected post to draft. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}/duplicate":{"post":{"operationId":"duplicateSocialPost","summary":"Duplicate a post as a new draft - the way to edit published content.","description":"Duplicate a post as a new draft - the way to edit published content. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}/refine":{"post":{"operationId":"refineSocialPost","summary":"Queue an AI refinement of an exact revision into comparison proposals.","description":"Queue an AI refinement of an exact revision into comparison proposals. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"202":{"description":"Generation accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}/proposals/{proposalId}/accept":{"post":{"operationId":"acceptSocialPostProposal","summary":"Accept one refinement proposal as the new current revision.","description":"Accept one refinement proposal as the new current revision. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}},{"name":"proposalId","in":"path","required":true,"description":"Refinement proposal ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}/proposals/{proposalId}/reject":{"post":{"operationId":"rejectSocialPostProposal","summary":"Reject one refinement proposal.","description":"Reject one refinement proposal. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}},{"name":"proposalId","in":"path","required":true,"description":"Refinement proposal ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/social-posts/{postId}/publish":{"post":{"operationId":"markSocialPostPublished","summary":"Record an exact publication snapshot.","description":"Record an exact publication snapshot. Requires the `generate` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"generate","parameters":[{"name":"postId","in":"path","required":true,"description":"Canonical social post ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me/balance":{"get":{"operationId":"getBalance","summary":"Get credit balances.","description":"Get credit balances. Requires the `read` API-key scope.","security":[{"bearerAuth":[]}],"x-required-scope":"read","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationResult"}}}},"400":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Operation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"rm_live_..."},"oauth2":{"type":"oauth2","description":"OAuth 2.1 authorization code with PKCE, for MCP clients. Tokens are bound to the /mcp resource.","flows":{"authorizationCode":{"authorizationUrl":"/api/auth/oauth2/authorize","tokenUrl":"/api/auth/oauth2/token","refreshUrl":"/api/auth/oauth2/token","scopes":{"read":"Read projects, authors, drafts, and credit balance.","generate":"Create and edit drafts, and spend credits.","offline_access":"Receive a refresh token."}}}}},"schemas":{"OperationResult":{"description":"The operation-specific JSON result. Responses are objects or arrays; inspect the operation description and interactive reference for the returned resource.","oneOf":[{"type":"object","additionalProperties":true},{"type":"array","items":{}}]},"ProjectProfile":{"type":"object","properties":{"schemaVersion":{"const":1},"revision":{"type":"integer","minimum":1},"summary":{"type":"object","properties":{"product":{"type":"string","maxLength":200,"minLength":1},"websiteUrls":{"type":"array","items":{"type":"string","format":"uri","maxLength":2000},"maxItems":20},"audience":{"type":"string","maxLength":1000},"goals":{"type":"array","items":{"type":"string","maxLength":300,"minLength":1},"maxItems":20}},"required":["product","websiteUrls","audience","goals"]},"strategy":{"type":"object","properties":{"platforms":{"type":"array","items":{"enum":["x","threads","linkedin","bluesky"],"type":"string"},"minItems":1,"maxItems":5},"contentPillars":{"type":"array","items":{"type":"string","maxLength":120,"minLength":1},"maxItems":20},"defaultCta":{"type":"string","maxLength":300},"topicsToAvoid":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1},"maxItems":30},"claims":{"type":"object","properties":{"approved":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":80,"minLength":1},"wording":{"type":"string","maxLength":500,"minLength":1},"evidenceUrl":{"type":"string","format":"uri","maxLength":2000},"reviewedAt":{"type":"string","maxLength":40,"minLength":1,"format":"date-time"},"expiresAt":{"type":"string","maxLength":40,"minLength":1,"format":"date-time"}},"required":["id","wording","reviewedAt"]},"maxItems":100},"prohibited":{"type":"array","items":{"type":"string","maxLength":500,"minLength":1},"maxItems":100},"requiringEvidence":{"type":"array","items":{"type":"string","maxLength":500,"minLength":1},"maxItems":100}},"required":["approved","prohibited","requiringEvidence"]}},"required":["platforms","contentPillars","topicsToAvoid","claims"]},"preferences":{"type":"object","properties":{"defaultLanguage":{"type":"string","maxLength":35,"minLength":1},"defaultTier":{"enum":["MEDIUM","HIGH"],"type":"string"},"defaultResearch":{"enum":["none","first-party","web"],"type":"string"},"variantCount":{"type":"integer","minimum":1,"maximum":5},"preferredLength":{"enum":["short","balanced","detailed"],"type":"string"}},"required":["defaultLanguage","defaultTier","defaultResearch","variantCount","preferredLength"]},"contentMix":{"type":"array","items":{"type":"object","properties":{"archetype":{"enum":["educational","opinion","story","build-in-public","proof","product","community","humorous","curated-commentary"],"type":"string"},"weight":{"type":"integer","minimum":0,"maximum":100}},"required":["archetype","weight"]},"minItems":1,"maxItems":9},"legacyNotes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["schemaVersion","revision","summary","strategy","preferences","contentMix"],"$schema":"https://json-schema.org/draft/2020-12/schema"},"AuthorProfile":{"type":"object","properties":{"schemaVersion":{"const":1},"key":{"type":"string","maxLength":60,"minLength":1,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"kind":{"enum":["main","founder","collaborator","employee","creator","custom"],"type":"string"},"displayName":{"type":"string","maxLength":100,"minLength":1},"role":{"type":"string","maxLength":100,"minLength":1},"bio":{"type":"string","maxLength":1000},"expertise":{"type":"array","items":{"type":"string","maxLength":100,"minLength":1},"maxItems":30},"pointOfView":{"enum":["I","we","third-person"],"type":"string"},"socialAccountIds":{"type":"object","propertyNames":{"enum":["x","threads","linkedin","bluesky"],"type":"string"},"additionalProperties":{"type":"string","maxLength":100,"minLength":1}},"voice":{"type":"object","properties":{"traits":{"type":"array","items":{"type":"string","maxLength":60,"minLength":1},"maxItems":20},"toneNotes":{"type":"string","maxLength":1000},"preferredTerms":{"type":"array","items":{"type":"string","maxLength":100,"minLength":1},"maxItems":50},"bannedPhrases":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1},"maxItems":100},"emoji":{"enum":["never","light","natural"],"type":"string"},"hashtags":{"enum":["never","light","platform-native"],"type":"string"}},"required":["traits","preferredTerms","bannedPhrases","emoji","hashtags"]},"overrides":{"type":"object","properties":{"audience":{"type":"string","maxLength":1000},"contentPillars":{"type":"array","items":{"type":"string","maxLength":120,"minLength":1},"maxItems":20},"defaultCta":{"type":"string","maxLength":300},"topicsToAvoid":{"type":"array","items":{"type":"string","maxLength":200,"minLength":1},"maxItems":30},"defaultLanguage":{"type":"string","maxLength":35,"minLength":1},"preferredLength":{"enum":["short","balanced","detailed"],"type":"string"},"contentMix":{"type":"array","items":{"type":"object","properties":{"archetype":{"enum":["educational","opinion","story","build-in-public","proof","product","community","humorous","curated-commentary"],"type":"string"},"weight":{"type":"integer","minimum":0,"maximum":100}},"required":["archetype","weight"]},"minItems":1,"maxItems":9}},"required":[]}},"required":["schemaVersion","key","kind","displayName","role","expertise","pointOfView","socialAccountIds","voice","overrides"],"$schema":"https://json-schema.org/draft/2020-12/schema"},"SocialGenerationRequest":{"type":"object","properties":{"schemaVersion":{"const":1},"projectId":{"type":"string","maxLength":100,"minLength":1},"authorId":{"type":"string","maxLength":100,"minLength":1},"platform":{"enum":["x","threads","linkedin","bluesky"],"type":"string"},"format":{"enum":["POST","THREAD"],"type":"string"},"mode":{"enum":["variants","batch"],"type":"string"},"prompt":{"type":"string","maxLength":5000,"minLength":1},"tier":{"enum":["MEDIUM","HIGH"],"type":"string"},"language":{"type":"string","maxLength":35,"minLength":1},"researchPolicy":{"enum":["none","first-party","best-effort-web","required-web"],"type":"string"},"selectedSourceUrls":{"type":"array","items":{"type":"string","format":"uri","maxLength":2000},"maxItems":10},"variantCount":{"type":"integer","minimum":1,"maximum":5},"postCount":{"type":"integer","minimum":1,"maximum":10},"archetype":{"enum":["educational","opinion","story","build-in-public","proof","product","community","humorous","curated-commentary"],"type":"string"}},"required":["schemaVersion","projectId","authorId","platform","format","mode","prompt"],"$schema":"https://json-schema.org/draft/2020-12/schema"},"SocialPostParts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","maxLength":100,"minLength":1},"text":{"type":"string","maxLength":10000,"minLength":1}},"required":["id","text"]},"minItems":1,"maxItems":25,"$schema":"https://json-schema.org/draft/2020-12/schema"},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","hint","requestId"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"hint":{"type":"string","description":"A safe, actionable next step for resolving the error."},"requestId":{"type":"string"},"details":{"type":"object","additionalProperties":true}}}}}}}}