{
  "openapi": "3.1.0",
  "info": {
    "title": "MindTwins integration API",
    "version": "2026-10-29",
    "description": "Documentation revision, not an API version. Custom integrations only; automated installer and session-management routes are excluded. Source verified against Rainmaker d27b99f9cf548c512162309b43093eba3ff76a1f and mcp-twins fec2d23692a74a28c8ba287342513aebeff8237f. Examples use illustrative values."
  },
  "servers": [
    {
      "url": "https://app.mindtwins.com/api/twin-mcp"
    }
  ],
  "security": [
    {
      "bearerKey": []
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "health",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/me": {
      "get": {
        "operationId": "whoami",
        "summary": "whoami",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                },
                "example": {
                  "twin_id": "example-twin_id",
                  "mind_id": "example-mind_id",
                  "workspace_id": "example-workspace_id",
                  "user_id": "example-user_id",
                  "name": "Maya Chen",
                  "email": "maya@example.com",
                  "handle": "maya",
                  "ready": true,
                  "status": "ready",
                  "speaker_name": "Maya Chen"
                }
              }
            }
          },
          "401": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Reset-Minute": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              }
            }
          },
          "500": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "Shows your identity, the name your Mind Twin listens for as you (speaker_name when available), and whether it can answer right now. ready and status use chat's own readiness check: ready, building, or failed. The engine read has a 1.5-second cap; a slow or failed read falls back to the last stored status. Returns 404 NO_TWIN if you have no Mind Twin."
      }
    },
    "/twins": {
      "get": {
        "operationId": "listTwins",
        "summary": "listTwins",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Directory"
                },
                "example": {
                  "twins": [
                    {
                      "twin_id": "example-twin_id",
                      "mind_id": "example-mind_id",
                      "name": "Maya Chen",
                      "email": "maya@example.com",
                      "handle": "maya",
                      "ready": true,
                      "status": "ready",
                      "ownership": "self"
                    },
                    {
                      "twin_id": "example-created-id",
                      "mind_id": "example-created-mind_id",
                      "name": "Jordan Lee",
                      "email": null,
                      "ready": false,
                      "status": "needs_meeting",
                      "ownership": "created",
                      "meetings": 0
                    }
                  ],
                  "team": {
                    "name": "Acme"
                  }
                }
              }
            }
          },
          "401": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Reset-Minute": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              }
            }
          },
          "500": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "description": "List your own, team-visible, and creator-only Mind Twins, in that order. Readiness here is the stored directory status; use /me for your own chat verdict or /me/status with the intended target for detailed readiness. Listing is not proof of target permission. Created entries have no handle and may have email: null."
      },
      "post": {
        "operationId": "createMindTwin",
        "summary": "Create a private Mind Twin",
        "description": "name is required, 1 to 200 characters after trimming. email is optional, up to 320 characters; description is optional, up to 500. Include only details you know. idempotency_key is optional, 1 to 200 characters. REST also accepts Idempotency-Key; the body field wins when both are present. Reusing the same key with the same name, email, and description within 24 hours returns the first successful answer. MCP generates a key when you omit it. Creating is free and needs only twin:chat, with a separate limit of 10 per hour per person. A Mind Twin you created stays only yours, even if that person later joins MindTwins. Run list_twins first and add meetings to an existing created Mind Twin rather than creating a duplicate.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "description": "Used when the body has no idempotency_key. Preserve the key and name/email/description on retries."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRequest"
              },
              "example": {
                "name": "Jordan Lee",
                "description": "Product lead",
                "idempotency_key": "create-jordan-2026-10-29"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Empty, free, and visible only to its creator.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateResponse"
                },
                "example": {
                  "twin_id": "example-created-id",
                  "mind_id": "example-created-mind_id",
                  "name": "Jordan Lee",
                  "email": null,
                  "ownership": "created",
                  "ready": false,
                  "status": "needs_meeting",
                  "visible_to": "only_you"
                }
              }
            }
          },
          "400": {
            "description": "VALIDATION: A Mind Twin needs the person's name, so nothing was created. TOO_LONG: That name, email or description is too long, so nothing was created. BAD_IDEMPOTENCY_KEY: An idempotency_key must be 1 to 200 characters, so nothing was done.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateError"
                },
                "examples": {
                  "VALIDATION": {
                    "value": {
                      "error": "A Mind Twin needs the person's name, so nothing was created.",
                      "code": "VALIDATION"
                    }
                  },
                  "TOO_LONG": {
                    "value": {
                      "error": "That name, email or description is too long, so nothing was created.",
                      "code": "TOO_LONG"
                    }
                  },
                  "BAD_IDEMPOTENCY_KEY": {
                    "value": {
                      "error": "An idempotency_key must be 1 to 200 characters, so nothing was done.",
                      "code": "BAD_IDEMPOTENCY_KEY"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "CREATION_OFF: Creating Mind Twins is turned off for your workspace, so nothing was created. Authentication may also return NO_CALLER or insufficient scope.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/CreateError"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "CREATION_OFF": {
                    "value": {
                      "error": "Creating Mind Twins is turned off for your workspace, so nothing was created.",
                      "code": "CREATION_OFF"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "IS_YOU: That's you. Your own Mind Twin already learns from your meetings, so nothing was created. ALREADY_CREATED: You already created a Mind Twin with this name, so nothing new was created. Add the meeting to that one. IN_PROGRESS: The same request is still running, so nothing new was done. Try again in a moment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateError"
                },
                "examples": {
                  "IS_YOU": {
                    "value": {
                      "error": "That's you. Your own Mind Twin already learns from your meetings, so nothing was created.",
                      "code": "IS_YOU"
                    }
                  },
                  "ALREADY_CREATED": {
                    "value": {
                      "error": "You already created a Mind Twin with this name, so nothing new was created. Add the meeting to that one.",
                      "code": "ALREADY_CREATED",
                      "twin_id": "example-created-id"
                    }
                  },
                  "IN_PROGRESS": {
                    "value": {
                      "error": "The same request is still running, so nothing new was done. Try again in a moment.",
                      "code": "IN_PROGRESS"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "RATE_LIMITED: You've made 10 Mind Twins this hour, so nothing was created. Try again later.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/CreateError"
                    },
                    {
                      "$ref": "#/components/schemas/Error"
                    }
                  ]
                },
                "examples": {
                  "RATE_LIMITED": {
                    "value": {
                      "error": "You've made 10 Mind Twins this hour, so nothing was created. Try again later.",
                      "code": "RATE_LIMITED"
                    }
                  }
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds until the separate create-per-person limit resets. A per-key rate-limit response instead uses retryAfter in its body.",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "502": {
            "description": "INTERNAL: Failed to create the Mind Twin",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateError"
                },
                "examples": {
                  "INTERNAL": {
                    "value": {
                      "error": "Failed to create the Mind Twin",
                      "code": "INTERNAL"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/chat": {
      "post": {
        "operationId": "chat",
        "summary": "chat",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatResponse"
                },
                "example": {
                  "answer": "Start with one region.",
                  "answered_by": {
                    "name": "Maya Chen"
                  }
                }
              }
            }
          },
          "400": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "TARGET_NOT_FOUND means no reachable target; teammates on chat-only keys are indistinguishable from unknown or inaccessible Mind Twins. Upload and raw deletion may return TARGET_NEEDS_FULL_NAME for partial names. Other not-found codes vary by operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "423": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Reset-Minute": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              }
            }
          },
          "500": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "504": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": " NEEDS_MEETING: Upload a meeting first. STILL_LEARNING: Wait a few minutes and check readiness again; the core is still forming.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          }
        },
        "description": "Caller-supplied history, at most 20 turns. context is text, not binary file upload, and is accepted only on user turns. No server conversation ID. Allow 600 seconds client timeout; server execution budget is 540 seconds. REST chat may add answered_by when you supply target: { you: true } for your own Mind Twin, { name } for a teammate, or { name, ownership: 'created' } for one you created. Treat it as optional. MCP's text format shows whose Mind Twin answered; its json format keeps only answer, think, feel, say, and act.",
        "parameters": [
          {
            "name": "X-MindTwins-App",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "In Settings › Connectors, create or reuse a separate key for each app to see its usage on its own row. REST chat can send X-MindTwins-App: <slug> to label the app that asked. The slug must match ^[a-z0-9][a-z0-9-]{0,39}$; invalid values are ignored, never rejected. This header is attribution only: it never changes authentication, scopes, the Mind Twin, the key, or the workspace. The hosted MCP server sends it for you when your key was set up for a specific app."
          }
        ]
      }
    },
    "/upload": {
      "post": {
        "operationId": "upload",
        "summary": "upload",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "TARGET_NOT_FOUND means no reachable target; teammates on chat-only keys are indistinguishable from unknown or inaccessible Mind Twins. Upload and raw deletion may return TARGET_NEEDS_FULL_NAME for partial names. Other not-found codes vary by operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text. TRANSCRIPT_FAILED_BEFORE means this transcript failed twice; use a different conversation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Reset-Minute": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              }
            }
          },
          "500": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadRequest"
              }
            }
          }
        },
        "description": "Keep the encoded JSON request below the recommended 4,000,000-byte budget. Hosting limits apply before the larger application limits. transcript remains required with segments; segments bypass format normalization. A successful upload returns success: true and data.status: processing. Optional data.duplicate: true means the same transcript is already there; it is not a new upload. data.own: true identifies a target that resolved to your own Mind Twin. A Mind Twin you created instead returns data.ownership: created and data.name; it never uses own. These flags do not mean the latest meeting is ready to quote: check status. meeting_ref (MCP) and meetingRef (REST) are reserved for automated meeting delivery. Ordinary custom uploads leave them out; they are not transcript content or part of deduplication, and are ignored for a Mind Twin you created. In plain text, Name: text accepts letters, digits, spaces, and . ' - in the name, or a plain email. For other names, including + or _, use [Name]: text. Bracket labels work in plain text and on a WEBVTT cue line. A name containing ] and sound cues such as [Music] are not speaker labels. SRT does not preserve bracket labels or voice tags; use agent-json for those names. Match the person you are feeding; for your own meetings, read speaker_name fresh from whoami or GET /me."
      }
    },
    "/me/status": {
      "get": {
        "operationId": "status",
        "summary": "status",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          },
          "401": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Reset-Minute": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              }
            }
          },
          "500": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Omit target for your own Mind Twin. To reach a teammate or a Mind Twin you created, use its full name, email, @handle when available, or twin_id. Read operations also accept a first or last name alone. Upload and delete_raw require a full name or another exact identifier: a partial name returns 404 TARGET_NEEDS_FULL_NAME and nothing is saved or deleted. If a name is ambiguous, use an email or twin_id. A teammate target requires twin:upload, team visibility in the same workspace, and permission under any target allowlist attached to the key. The directory can show members that this key cannot target. A directory entry is not proof of access; verify the intended target with GET /me/status before uploading. A Mind Twin you created needs no extra scope: twin:chat alone reaches it for chat, upload, status, snapshots, and delete_raw. Only you, its creator, can reach it, subject to the key's target allowlist."
          }
        ],
        "description": "GET /me/status returns status: ready, building, or failed, plus progress and ingesting. Read them with the optional flags. needs_upload: true means upload a transcript instead of polling an empty Mind Twin. ready + hydrating: true means it can answer from previously learned material, but the latest upload is not available yet. ready + ingesting: true means a transcript is being folded in. latest_upload_failed: true means the newest upload could not be learned. On your own Mind Twin or one you created, latest_failed_upload can identify it by date, filename, optional snapshot_id, and optional reason. queued_uploads counts uploads still waiting in line. Treat absent flags as false; low or zero early progress alone does not mean failure. Recommended client strategy: check status every 15 seconds, then every 30 to 60 seconds for longer builds. These intervals are guidance, not server requirements. Build time varies; use status rather than a fixed delay. No completion webhooks are available."
      }
    },
    "/snapshots": {
      "get": {
        "operationId": "listSnapshots",
        "summary": "listSnapshots",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotList"
                },
                "example": {
                  "snapshots": [
                    {
                      "snapshot_id": "example-snapshot",
                      "date": "2026-10-07",
                      "filename": "Rollout planning",
                      "status": "completed",
                      "counts": {
                        "data_points": 120,
                        "key_topics": 4,
                        "findings": 8
                      }
                    },
                    {
                      "snapshot_id": "example-failed-snapshot",
                      "date": "2026-10-06",
                      "filename": "Earlier planning",
                      "status": "failed",
                      "counts": null
                    }
                  ],
                  "next_cursor": null,
                  "total": 2
                }
              }
            }
          },
          "400": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Reset-Minute": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              }
            }
          },
          "500": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Omit target for your own Mind Twin. To reach a teammate or a Mind Twin you created, use its full name, email, @handle when available, or twin_id. Read operations also accept a first or last name alone. Upload and delete_raw require a full name or another exact identifier: a partial name returns 404 TARGET_NEEDS_FULL_NAME and nothing is saved or deleted. If a name is ambiguous, use an email or twin_id. A teammate target requires twin:upload, team visibility in the same workspace, and permission under any target allowlist attached to the key. The directory can show members that this key cannot target. A directory entry is not proof of access; verify the intended target with GET /me/status before uploading. A Mind Twin you created needs no extra scope: twin:chat alone reaches it for chat, upload, status, snapshots, and delete_raw. Only you, its creator, can reach it, subject to the key's target allowlist."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ]
      }
    },
    "/snapshots/{id}": {
      "get": {
        "operationId": "getSnapshot",
        "summary": "getSnapshot",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SnapshotDetail"
                },
                "example": {
                  "ready": true,
                  "snapshot_id": "example-snapshot",
                  "date": "2026-10-07",
                  "filename": "Rollout planning",
                  "status": "completed",
                  "counts": {
                    "data_points": 120,
                    "key_topics": 4,
                    "findings": 8
                  },
                  "summary": {
                    "disposition": null,
                    "synthesis": [
                      {
                        "ticker": "SYN-01",
                        "label": "Decision style",
                        "value": "Prefers evidence before expanding a rollout."
                      }
                    ],
                    "categories": [
                      {
                        "index": "01",
                        "title": "Decision-making",
                        "items": [
                          {
                            "subIndex": "01.1",
                            "label": "Trade-offs",
                            "value": "Balances speed with a clear rollback plan."
                          }
                        ]
                      }
                    ]
                  },
                  "profile": {
                    "twin": "Maya Chen",
                    "proceedings": 1,
                    "findings": 8,
                    "points": 120,
                    "domainSummary": null,
                    "coreProfile": null,
                    "buckets": []
                  }
                }
              }
            }
          },
          "400": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Reset-Minute": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              }
            }
          },
          "500": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "target",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Omit target for your own Mind Twin. To reach a teammate or a Mind Twin you created, use its full name, email, @handle when available, or twin_id. Read operations also accept a first or last name alone. Upload and delete_raw require a full name or another exact identifier: a partial name returns 404 TARGET_NEEDS_FULL_NAME and nothing is saved or deleted. If a name is ambiguous, use an email or twin_id. A teammate target requires twin:upload, team visibility in the same workspace, and permission under any target allowlist attached to the key. The directory can show members that this key cannot target. A directory entry is not proof of access; verify the intended target with GET /me/status before uploading. A Mind Twin you created needs no extra scope: twin:chat alone reaches it for chat, upload, status, snapshots, and delete_raw. Only you, its creator, can reach it, subject to the key's target allowlist."
          },
          {
            "name": "detail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "concise",
                "detailed"
              ],
              "default": "detailed"
            }
          }
        ]
      }
    },
    "/snapshots/{id}/raw": {
      "delete": {
        "operationId": "deleteRaw",
        "summary": "deleteRaw",
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteResponse"
                },
                "example": {
                  "dry_run": true,
                  "snapshot_id": "example-snapshot",
                  "found": true,
                  "would_delete": {
                    "mind_sync_rows": 1
                  },
                  "expected_count": 1,
                  "message": "This is a dry run. No data has been removed."
                }
              }
            }
          },
          "400": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "TARGET_NOT_FOUND means no reachable target; teammates on chat-only keys are indistinguishable from unknown or inaccessible Mind Twins. Upload and raw deletion may return TARGET_NEEDS_FULL_NAME for partial names. Other not-found codes vary by operation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-RateLimit-Limit-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Minute": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Reset-Minute": {
                "schema": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Hour": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Limit-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              },
              "X-RateLimit-Remaining-Day": {
                "schema": {
                  "type": "integer"
                },
                "description": "Returned on a rate-limit refusal; not guaranteed on successful responses."
              }
            }
          },
          "500": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "See the error reference. Codes vary by operation; some authentication errors omit code. Hosting 413 responses can be plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteRequest"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          }
        ],
        "description": "Dry run by default. To remove recall rows, send confirm:true and the latest expected_count; dry_run:true overrides confirm. Idempotency cache is per server instance for ten minutes, not a durable guarantee. Engine snapshots and learned profiles remain."
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "MindTwins developer key. Keep it server-side."
      }
    },
    "schemas": {
      "Context": {
        "oneOf": [
          {
            "type": "string",
            "maxLength": 100000
          },
          {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100000
            },
            "maxItems": 10
          }
        ],
        "description": "Trimmed and normalized text. Each item is limited to 51,200 UTF-8 bytes. Blank items are ignored."
      },
      "Segment": {
        "type": "object",
        "properties": {
          "speaker": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "startTime": {
            "type": "number",
            "minimum": 0
          },
          "endTime": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "text"
        ]
      },
      "ChatRequest": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 800000,
            "description": "UTF-16 code units. Prepared message plus current context must also fit 1,470,000 characters after XML escaping."
          },
          "target": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Omit target for your own Mind Twin. To reach a teammate or a Mind Twin you created, use its full name, email, @handle when available, or twin_id. Read operations also accept a first or last name alone. Upload and delete_raw require a full name or another exact identifier: a partial name returns 404 TARGET_NEEDS_FULL_NAME and nothing is saved or deleted. If a name is ambiguous, use an email or twin_id. A teammate target requires twin:upload, team visibility in the same workspace, and permission under any target allowlist attached to the key. The directory can show members that this key cannot target. A directory entry is not proof of access; verify the intended target with GET /me/status before uploading. A Mind Twin you created needs no extra scope: twin:chat alone reaches it for chat, upload, status, snapshots, and delete_raw. Only you, its creator, can reach it, subject to the key's target allowlist."
          },
          "context": {
            "$ref": "#/components/schemas/Context"
          },
          "history": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "const": "user"
                    },
                    "content": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 800000
                    },
                    "context": {
                      "$ref": "#/components/schemas/Context"
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "role": {
                      "const": "assistant"
                    },
                    "content": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100000
                    }
                  },
                  "required": [
                    "role",
                    "content"
                  ],
                  "not": {
                    "required": [
                      "context"
                    ]
                  }
                }
              ]
            },
            "maxItems": 20
          }
        },
        "required": [
          "message"
        ]
      },
      "ChatResponse": {
        "type": "object",
        "properties": {
          "answer": {
            "type": "string"
          },
          "think": {
            "type": "string"
          },
          "feel": {
            "type": "string"
          },
          "say": {
            "type": "string"
          },
          "act": {
            "type": "string"
          },
          "answered_by": {
            "description": "Optional attribution on targeted REST calls; MCP JSON omits it.",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "you": {
                    "const": true
                  }
                },
                "required": [
                  "you"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "ownership": {
                    "const": "created"
                  }
                },
                "required": [
                  "name",
                  "ownership"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "answer"
        ]
      },
      "UploadRequest": {
        "type": "object",
        "properties": {
          "transcript": {
            "type": "string",
            "minLength": 1,
            "maxLength": 52428800
          },
          "date": {
            "type": "string",
            "minLength": 1,
            "description": "Use ISO 8601, from 2000-01-01 through 24 hours ahead of server time."
          },
          "title": {
            "type": "string",
            "maxLength": 500
          },
          "format": {
            "enum": [
              "vtt",
              "srt",
              "text",
              "agent-json"
            ]
          },
          "participants": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 100
          },
          "source": {
            "enum": [
              "fathom",
              "zoom",
              "gong",
              "google_meet",
              "fireflies",
              "microsoft_teams",
              "manual",
              "sybill",
              "affinity_notetaker",
              "granola",
              "raw_import"
            ]
          },
          "duration": {
            "type": "number",
            "minimum": 0
          },
          "selfSpeaker": {
            "type": "string",
            "maxLength": 200
          },
          "target": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Omit target for your own Mind Twin. To reach a teammate or a Mind Twin you created, use its full name, email, @handle when available, or twin_id. Read operations also accept a first or last name alone. Upload and delete_raw require a full name or another exact identifier: a partial name returns 404 TARGET_NEEDS_FULL_NAME and nothing is saved or deleted. If a name is ambiguous, use an email or twin_id. A teammate target requires twin:upload, team visibility in the same workspace, and permission under any target allowlist attached to the key. The directory can show members that this key cannot target. A directory entry is not proof of access; verify the intended target with GET /me/status before uploading. A Mind Twin you created needs no extra scope: twin:chat alone reaches it for chat, upload, status, snapshots, and delete_raw. Only you, its creator, can reach it, subject to the key's target allowlist."
          },
          "segments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Segment"
            },
            "maxItems": 10000
          },
          "meetingRef": {
            "type": "string",
            "description": "Reserved for automated delivery; omit from ordinary custom uploads. Never part of transcript text or the deduplication hash. Ignored for created Mind Twins."
          }
        },
        "required": [
          "transcript",
          "date"
        ]
      },
      "UploadResponse": {
        "type": "object",
        "properties": {
          "success": {
            "const": true
          },
          "data": {
            "type": "object",
            "properties": {
              "status": {
                "const": "processing"
              },
              "duplicate": {
                "const": true,
                "description": "Already present, not a new upload; own or created Mind Twins only."
              },
              "own": {
                "const": true,
                "description": "A supplied target resolved to the caller's own Mind Twin. Never used for created Mind Twins."
              },
              "ownership": {
                "const": "created"
              },
              "name": {
                "type": "string",
                "description": "Name of a created Mind Twin."
              }
            },
            "required": [
              "status"
            ]
          }
        },
        "required": [
          "success",
          "data"
        ]
      },
      "Identity": {
        "type": "object",
        "properties": {
          "twin_id": {
            "type": "string"
          },
          "mind_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "handle": {
            "type": "string"
          },
          "ready": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              "ready",
              "building",
              "failed"
            ]
          },
          "workspace_id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "speaker_name": {
            "type": "string",
            "description": "Exact owner speaker name from a capped engine read. Optional; can differ from display name. Read fresh before labeling your own turns."
          }
        },
        "required": [
          "twin_id",
          "mind_id",
          "name",
          "email",
          "handle",
          "ready",
          "status",
          "workspace_id",
          "user_id"
        ]
      },
      "DirectoryEntry": {
        "type": "object",
        "properties": {
          "twin_id": {
            "type": "string"
          },
          "mind_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "handle": {
            "type": "string"
          },
          "ready": {
            "type": "boolean"
          },
          "status": {
            "enum": [
              "ready",
              "building",
              "needs_meeting"
            ]
          },
          "ownership": {
            "enum": [
              "self",
              "team",
              "created"
            ]
          },
          "meetings": {
            "type": "integer",
            "minimum": 0,
            "description": "Created entries only: meetings still present in recall. Raw deletion can lower this count."
          }
        },
        "required": [
          "twin_id",
          "mind_id",
          "name",
          "email",
          "ready",
          "status",
          "ownership"
        ],
        "oneOf": [
          {
            "properties": {
              "ownership": {
                "enum": [
                  "self",
                  "team"
                ]
              },
              "email": {
                "type": "string"
              },
              "status": {
                "enum": [
                  "ready",
                  "building"
                ]
              }
            },
            "required": [
              "handle"
            ]
          },
          {
            "properties": {
              "ownership": {
                "const": "created"
              }
            },
            "required": [
              "meetings"
            ]
          }
        ]
      },
      "Directory": {
        "type": "object",
        "properties": {
          "twins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DirectoryEntry"
            }
          },
          "team": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "description": "Optional workspace name."
          }
        },
        "required": [
          "twins"
        ]
      },
      "Status": {
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "building",
              "ready",
              "failed"
            ]
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "ingesting": {
            "type": "boolean"
          },
          "hydrating": {
            "const": true
          },
          "needs_upload": {
            "const": true
          },
          "latest_upload_failed": {
            "const": true
          },
          "latest_failed_upload": {
            "type": "object",
            "properties": {
              "date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "filename": {
                "type": "string"
              },
              "snapshot_id": {
                "type": "string",
                "description": "Optional; only when listed."
              },
              "reason": {
                "enum": [
                  "no_speakers",
                  "owner_not_a_speaker",
                  "too_short",
                  "build_error"
                ],
                "description": "Optional; omitted when unavailable."
              }
            },
            "required": [
              "date",
              "filename"
            ],
            "description": "Own or created Mind Twins only, and only when latest_upload_failed is set and an upload can be identified."
          },
          "queued_uploads": {
            "type": "integer",
            "minimum": 1
          },
          "ownership": {
            "const": "created"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "progress",
          "ingesting"
        ]
      },
      "Health": {
        "type": "object",
        "properties": {
          "status": {
            "const": "ok"
          },
          "service": {
            "const": "twin-mcp"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "status",
          "service",
          "timestamp"
        ]
      },
      "Counts": {
        "type": "object",
        "properties": {
          "data_points": {
            "type": "number"
          },
          "key_topics": {
            "type": "number"
          },
          "findings": {
            "type": "number"
          }
        },
        "required": [
          "data_points",
          "key_topics",
          "findings"
        ]
      },
      "SnapshotRow": {
        "type": "object",
        "properties": {
          "snapshot_id": {
            "type": "string"
          },
          "date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "filename": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "Engine status or not_learned (saved without being learned). Failed entries may have counts: null and are not learned."
          },
          "counts": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Counts"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "snapshot_id",
          "date",
          "filename",
          "status",
          "counts"
        ]
      },
      "SnapshotList": {
        "type": "object",
        "properties": {
          "snapshots": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SnapshotRow"
            }
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "type": "number"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "snapshots",
          "next_cursor",
          "total"
        ]
      },
      "Findings": {
        "type": "object",
        "properties": {
          "disposition": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "synthesis": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "ticker": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              },
              "required": [
                "ticker",
                "label",
                "value"
              ]
            }
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "blurb": {
                  "type": "string"
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "subIndex": {
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "subIndex",
                      "label",
                      "value"
                    ]
                  }
                }
              },
              "required": [
                "index",
                "title",
                "items"
              ]
            }
          }
        },
        "required": [
          "disposition",
          "synthesis",
          "categories"
        ]
      },
      "Attribute": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "signal": {
            "type": "number"
          },
          "confidence": {
            "enum": [
              "Very High",
              "High",
              "Medium",
              "Low"
            ]
          },
          "snapshot": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "howApplies": {
            "type": "string"
          },
          "behavior": {
            "type": "object",
            "properties": {
              "action": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cognition": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "emotion": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "action",
              "cognition",
              "emotion"
            ]
          }
        },
        "required": [
          "name",
          "score",
          "signal",
          "confidence",
          "snapshot",
          "description",
          "howApplies",
          "behavior"
        ]
      },
      "Mindsets": {
        "type": "object",
        "properties": {
          "twin": {
            "type": "string"
          },
          "proceedings": {
            "type": "number"
          },
          "findings": {
            "type": "number"
          },
          "points": {
            "type": "number"
          },
          "domainSummary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "coreProfile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "buckets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "icon": {
                  "type": "string"
                },
                "attrs": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Attribute"
                  }
                }
              },
              "required": [
                "name",
                "icon",
                "attrs"
              ]
            }
          }
        },
        "required": [
          "twin",
          "proceedings",
          "findings",
          "points",
          "domainSummary",
          "coreProfile",
          "buckets"
        ]
      },
      "SnapshotDetail": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "ready": {
                "const": false
              },
              "status": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "ready",
              "status",
              "message"
            ]
          },
          {
            "type": "object",
            "properties": {
              "ready": {
                "const": true
              },
              "snapshot_id": {
                "type": "string"
              },
              "date": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "filename": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "counts": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Counts"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "summary": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Findings"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "profile": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/Mindsets"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "ready",
              "snapshot_id",
              "date",
              "filename",
              "status",
              "counts",
              "summary",
              "profile"
            ]
          }
        ]
      },
      "DeleteRequest": {
        "type": "object",
        "properties": {
          "confirm": {
            "type": "boolean"
          },
          "dry_run": {
            "type": "boolean"
          },
          "expected_count": {
            "type": "integer",
            "minimum": 0
          },
          "idempotency_key": {
            "type": "string"
          },
          "target": {
            "type": "string",
            "description": "Omit target for your own Mind Twin. To reach a teammate or a Mind Twin you created, use its full name, email, @handle when available, or twin_id. Read operations also accept a first or last name alone. Upload and delete_raw require a full name or another exact identifier: a partial name returns 404 TARGET_NEEDS_FULL_NAME and nothing is saved or deleted. If a name is ambiguous, use an email or twin_id. A teammate target requires twin:upload, team visibility in the same workspace, and permission under any target allowlist attached to the key. The directory can show members that this key cannot target. A directory entry is not proof of access; verify the intended target with GET /me/status before uploading. A Mind Twin you created needs no extra scope: twin:chat alone reaches it for chat, upload, status, snapshots, and delete_raw. Only you, its creator, can reach it, subject to the key's target allowlist."
          }
        },
        "required": []
      },
      "DeleteResponse": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "dry_run": {
                "const": true
              },
              "snapshot_id": {
                "type": "string"
              },
              "found": {
                "type": "boolean"
              },
              "would_delete": {
                "type": "object",
                "properties": {
                  "mind_sync_rows": {
                    "type": "number"
                  }
                },
                "required": [
                  "mind_sync_rows"
                ]
              },
              "expected_count": {
                "type": "integer",
                "minimum": 0
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "dry_run",
              "snapshot_id",
              "found",
              "would_delete",
              "expected_count",
              "message"
            ]
          },
          {
            "type": "object",
            "properties": {
              "success": {
                "const": true
              },
              "status": {
                "const": "purged"
              },
              "snapshot_id": {
                "type": "string"
              },
              "deleted": {
                "type": "object",
                "properties": {
                  "mind_sync_rows": {
                    "type": "number"
                  }
                },
                "required": [
                  "mind_sync_rows"
                ]
              },
              "summary": {
                "type": "string"
              }
            },
            "required": [
              "success",
              "status",
              "snapshot_id",
              "deleted",
              "summary"
            ]
          }
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "success": {
            "const": false
          },
          "details": {},
          "expected_count": {
            "type": "number"
          },
          "retryAfter": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "error"
        ]
      },
      "CreateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Full name, trimmed; must not be blank."
          },
          "email": {
            "type": "string",
            "maxLength": 320,
            "description": "Optional known email. Never used to find or link an account."
          },
          "description": {
            "type": "string",
            "maxLength": 500
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Body takes precedence over Idempotency-Key. Same details replay the first successful answer within 24 hours."
          }
        },
        "required": [
          "name"
        ]
      },
      "CreateResponse": {
        "type": "object",
        "properties": {
          "twin_id": {
            "type": "string"
          },
          "mind_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "ownership": {
            "const": "created"
          },
          "ready": {
            "const": false
          },
          "status": {
            "const": "needs_meeting"
          },
          "visible_to": {
            "const": "only_you"
          }
        },
        "required": [
          "twin_id",
          "mind_id",
          "name",
          "email",
          "ownership",
          "ready",
          "status",
          "visible_to"
        ]
      },
      "CreateError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "enum": [
              "VALIDATION",
              "TOO_LONG",
              "BAD_IDEMPOTENCY_KEY",
              "CREATION_OFF",
              "IS_YOU",
              "ALREADY_CREATED",
              "IN_PROGRESS",
              "RATE_LIMITED",
              "INTERNAL"
            ]
          },
          "twin_id": {
            "type": "string",
            "description": "Present with ALREADY_CREATED."
          }
        },
        "required": [
          "error",
          "code"
        ]
      }
    }
  }
}
