{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"SlideDrift Agent API","version":"1.3.0","summary":"Discovery contract for the SlideDrift MCP server and versioned HTTP API.","description":"SlideDrift provides two OAuth-protected interfaces over one shared operation registry: Model Context Protocol and a versioned JSON HTTP API. MCP clients discover live tool schemas through tools/list. HTTP clients use /api/v1/openapi.json for a concrete path and schema for every available operation. SlideDrift's private browser APIs remain unsupported and outside this public contract. SlideDrift negotiates the MCP protocol version during initialize and honors MCP-Protocol-Version on subsequent HTTP requests. Additive tools and optional fields may be introduced within the current implementation version. Breaking tool, authentication, or transport changes require a new implementation version and a documented migration path. SlideDrift gives at least 90 days of public notice before removing a supported agent operation or required field. During that period, affected HTTP operations are documented as deprecated and return Deprecation and Sunset headers where the transport can represent them. Security, legal, or active-abuse issues may require a shorter emergency window."},"servers":[{"url":"https://slidedrift.com","description":"SlideDrift production"}],"externalDocs":{"description":"SlideDrift developer resources and connection guidance","url":"https://slidedrift.com/developers"},"x-slidedrift-mcp":{"implementationVersion":"0.3.1","transport":"streamable-http","endpoint":"https://slidedrift.com/mcp","protocolVersioning":"SlideDrift negotiates the MCP protocol version during initialize and honors MCP-Protocol-Version on subsequent HTTP requests. Additive tools and optional fields may be introduced within the current implementation version. Breaking tool, authentication, or transport changes require a new implementation version and a documented migration path.","deprecationPolicy":"SlideDrift gives at least 90 days of public notice before removing a supported agent operation or required field. During that period, affected HTTP operations are documented as deprecated and return Deprecation and Sunset headers where the transport can represent them. Security, legal, or active-abuse issues may require a shorter emergency window.","deprecationPolicyUrl":"https://slidedrift.com/developers/deprecation","rateLimitPolicies":{"read":{"userLimit":60,"clientLimit":30,"windowSeconds":60},"plan":{"userLimit":20,"clientLimit":10,"windowSeconds":60},"upload":{"userLimit":80,"clientLimit":60,"windowSeconds":60},"generation":{"plans":{"free":{"userLimit":5,"clientLimit":5,"windowSeconds":3600},"starter":{"userLimit":5,"clientLimit":5,"windowSeconds":600},"pro":{"userLimit":10,"clientLimit":10,"windowSeconds":600},"agency":{"userLimit":20,"clientLimit":20,"windowSeconds":600}}},"cover":{"userLimit":5,"clientLimit":5,"windowSeconds":600},"campaign":{"userLimit":5,"clientLimit":3,"windowSeconds":3600},"edit":{"userLimit":30,"clientLimit":15,"windowSeconds":3600},"export_share":{"userLimit":20,"clientLimit":10,"windowSeconds":3600},"feedback":{"userLimit":5,"clientLimit":3,"windowSeconds":3600}}},"tags":[{"name":"Discovery","description":"Public machine-readable descriptions of the supported agent interface."},{"name":"MCP","description":"OAuth-protected Streamable HTTP transport for SlideDrift MCP."},{"name":"API","description":"Versioned OAuth-protected JSON API with MCP tool parity."}],"paths":{"/server.json":{"get":{"operationId":"getSlideDriftMcpServerManifest","summary":"Read the SlideDrift MCP server manifest","description":"Returns the schema-valid MCP Registry server.json document for the supported remote Streamable HTTP endpoint.","tags":["Discovery"],"responses":{"200":{"description":"The current SlideDrift MCP server manifest.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerManifest"}}}}}}},"/openapi.json":{"get":{"operationId":"getSlideDriftAgentOpenApi","summary":"Read the SlideDrift agent OpenAPI description","description":"Returns this public OpenAPI 3.1 document. It is a discovery contract and does not start a job or mutate account data.","tags":["Discovery"],"responses":{"200":{"description":"The current SlideDrift agent transport contract.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiDocument"}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"operationId":"getSlideDriftProtectedResourceMetadata","summary":"Discover SlideDrift MCP authorization metadata","description":"Returns RFC 9728 protected-resource metadata, including the MCP resource URL, authorization server, and enforced SlideDrift permission vocabulary.","tags":["Discovery"],"responses":{"200":{"description":"Protected-resource metadata for the SlideDrift MCP server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProtectedResourceMetadata"}}}}}}},"/mcp":{"post":{"operationId":"callSlideDriftMcp","summary":"Send a JSON-RPC request to SlideDrift MCP","description":"Sends an MCP JSON-RPC request over Streamable HTTP. Start with initialize, then use tools/list to retrieve the live function-calling schemas. Tool calls remain subject to ownership, plan, credit, application-permission, rate-limit, and explicit-confirmation checks. The SlideDrift consent screen lets the user select task-based permission bundles for each connection.","tags":["MCP"],"parameters":[{"name":"MCP-Protocol-Version","in":"header","required":false,"description":"MCP protocol version negotiated during initialize. MCP clients send this header on subsequent Streamable HTTP requests.","schema":{"type":"string","examples":["2025-06-18"]}}],"security":[{"slideDriftOAuth":[]}],"requestBody":{"required":true,"description":"A Model Context Protocol JSON-RPC request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcRequest"}}}},"responses":{"200":{"description":"An MCP JSON-RPC response. Tool-level quota failures are returned as MCP error results with code RATE_LIMITED and a retryAfterSeconds value because the transport request itself completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}},"400":{"description":"The JSON-RPC or MCP request was invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcResponse"}}}},"401":{"description":"A valid SlideDrift OAuth bearer token is required.","headers":{"WWW-Authenticate":{"description":"Bearer challenge with RFC 9728 protected-resource metadata URL.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpAuthorizationError"}}}}}}},"/api/v1":{"get":{"operationId":"getSlideDriftApiMetadata","summary":"Read SlideDrift API metadata","description":"Returns the current API version, OAuth resource, tool count, and discovery links.","tags":["API"],"responses":{"200":{"description":"Current SlideDrift API metadata.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/v1/openapi.json":{"get":{"operationId":"getSlideDriftApiOpenApi","summary":"Read the full versioned API contract","description":"Returns a concrete OpenAPI 3.1 operation for every SlideDrift tool available through both the HTTP API and MCP.","tags":["API"],"responses":{"200":{"description":"The current SlideDrift API v1 contract.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiDocument"}}}}}}}},"components":{"securitySchemes":{"slideDriftOAuth":{"type":"oauth2","description":"OAuth 2.1 authorization-code flow with PKCE. Supabase handles identity authorization. SlideDrift's access-token hook adds signed application permissions, and the MCP server validates issuer, audience, expiry, enabled connection state, ownership, and those permissions on every request.","flows":{"authorizationCode":{"authorizationUrl":"https://slidedrift.com/api/auth/oauth2/authorize","tokenUrl":"https://slidedrift.com/api/auth/oauth2/token","scopes":{}}}}},"schemas":{"OpenApiDocument":{"type":"object","required":["openapi","info","paths","components"],"properties":{"openapi":{"type":"string","const":"3.1.0"},"jsonSchemaDialect":{"type":"string","format":"uri"},"info":{"type":"object","required":["title","version","description"],"properties":{"title":{"type":"string"},"version":{"type":"string"},"summary":{"type":"string"},"description":{"type":"string"}},"additionalProperties":true},"servers":{"type":"array","items":{"type":"object"}},"tags":{"type":"array","items":{"type":"object"}},"paths":{"type":"object","additionalProperties":true},"components":{"type":"object","additionalProperties":true},"externalDocs":{"type":"object","additionalProperties":true}},"additionalProperties":true},"McpServerManifest":{"type":"object","required":["$schema","name","title","description","version","websiteUrl","remotes"],"properties":{"$schema":{"type":"string","format":"uri"},"name":{"type":"string","pattern":"^[a-zA-Z0-9.-]+/[a-zA-Z0-9._-]+$"},"title":{"type":"string"},"description":{"type":"string","minLength":1,"maxLength":100},"version":{"type":"string"},"websiteUrl":{"type":"string","format":"uri"},"remotes":{"type":"array","minItems":1,"items":{"type":"object","required":["type","url"],"properties":{"type":{"type":"string","const":"streamable-http"},"url":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"ProtectedResourceMetadata":{"type":"object","required":["resource","authorization_servers","slidedrift_permissions_supported"],"properties":{"resource":{"type":"string","format":"uri"},"authorization_servers":{"type":"array","minItems":1,"items":{"type":"string","format":"uri"}},"slidedrift_permissions_supported":{"type":"array","uniqueItems":true,"items":{"type":"string","enum":["carousels:read","carousels:write","covers:read","covers:write","brand_kits:read","exports:create","shares:write","social:write"]}}}},"JsonRpcRequest":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"method":{"type":"string","description":"MCP method such as initialize, tools/list, or tools/call."},"params":{"type":"object","additionalProperties":true}},"additionalProperties":false},"JsonRpcResponse":{"type":"object","required":["jsonrpc"],"properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"null"}]},"result":{"type":"object","additionalProperties":true},"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","additionalProperties":true}}}}},"McpAuthorizationError":{"type":"object","required":["error","error_description"],"properties":{"error":{"type":"string","examples":["invalid_token"]},"error_description":{"type":"string","examples":["No authorization provided"]}}},"ProblemDetails":{"type":"object","required":["type","title","status","detail","code","resolution"],"properties":{"type":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"code":{"type":"string"},"resolution":{"type":"string"},"instance":{"type":"string","format":"uri-reference"}}}}}}