{"openapi":"3.1.0","info":{"title":"Plugwire API","version":"v1"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Project API key (pw_sk_…)"}},"schemas":{"Project":{"type":"object","properties":{"id":{"type":"string","example":"proj_0192f3c4a1b27c3d9e8f001122334455"},"org_id":{"type":"string"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["id","org_id","name","created_at"],"description":"The project the calling API key belongs to"},"ProblemDetails":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"code":{"type":"string","description":"Stable machine-readable error code"},"detail":{"type":"string"},"request_id":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status","code"],"description":"RFC 9457 problem details"},"ApiKeyPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"ApiKey":{"type":"object","properties":{"id":{"type":"string","example":"key_0192f3c4a1b27c3d9e8f001122334455"},"name":{"type":"string"},"prefix":{"type":"string","description":"First characters of the key, for identification","example":"pw_sk_Xa81Qe"},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["id","name","prefix","created_at","last_used_at","revoked_at"]},"CreatedApiKey":{"type":"object","properties":{"id":{"type":"string","example":"key_0192f3c4a1b27c3d9e8f001122334455"},"name":{"type":"string"},"prefix":{"type":"string","description":"First characters of the key, for identification","example":"pw_sk_Xa81Qe"},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"last_used_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"secret":{"type":"string","description":"The full key. Returned only once, at creation."}},"required":["id","name","prefix","created_at","last_used_at","revoked_at","secret"]},"CreateApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false},"ToolkitList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Toolkit"}}},"required":["data"]},"Toolkit":{"type":"object","properties":{"slug":{"type":"string","example":"hackernews"},"name":{"type":"string"},"description":{"type":"string"},"version":{"type":"string"},"categories":{"type":"array","items":{"type":"string"}},"homepage":{"type":["string","null"]},"auth_schemes":{"type":"array","items":{"$ref":"#/components/schemas/AuthScheme"}},"connection_fields":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionField"}},"tool_count":{"type":"integer"},"no_auth":{"type":"boolean","description":"True when tools can run without a connected account"}},"required":["slug","name","description","version","categories","homepage","auth_schemes","connection_fields","tool_count","no_auth"]},"AuthScheme":{"type":"object","properties":{"id":{"type":"string","description":"Scheme id, used when creating an auth config","example":"api_key"},"type":{"type":"string","enum":["none","api_key","bearer","basic","oauth2"]},"label":{"type":"string"},"help":{"type":["string","null"]},"credential_fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"secret":{"type":"boolean"},"required":{"type":"boolean"}},"required":["name","label","secret","required"]},"description":"Fields of the `credentials` object when importing an account with this scheme"},"oauth":{"type":["object","null"],"properties":{"scopes":{"type":"array","items":{"type":"string"}},"default_scopes":{"type":"array","items":{"type":"string"}},"managed":{"type":"boolean","description":"Plugwire can provide its own OAuth app for this toolkit"},"pkce":{"type":"boolean"}},"required":["scopes","default_scopes","managed","pkce"]}},"required":["id","type","label","help","credential_fields","oauth"]},"ConnectionField":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"pattern":{"type":["string","null"]},"required":{"type":"boolean"}},"required":["name","label","description","pattern","required"],"description":"A non-secret value a connection needs, such as a subdomain"},"ToolPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Tool"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"Tool":{"type":"object","properties":{"slug":{"type":"string","example":"HACKERNEWS_GET_ITEM"},"toolkit":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"input_schema":{"type":"object","additionalProperties":{},"description":"JSON Schema 2020-12 for `arguments`"},"output_schema":{"type":"object","additionalProperties":{},"description":"JSON Schema 2020-12 for a successful result's `data`"},"hints":{"type":"object","properties":{"read_only":{"type":"boolean"},"destructive":{"type":"boolean"},"idempotent":{"type":"boolean"}},"required":["read_only","destructive","idempotent"]},"scopes":{"type":"array","items":{"type":"string"}},"verification":{"type":"string","description":"`live@YYYY-MM-DD`: last verified against the real provider; `skipped: <reason>`; or `synthetic`: tested against fakes only","example":"live@2026-11-01"}},"required":["slug","toolkit","name","description","tags","input_schema","output_schema","hints","scopes","verification"]},"AuthConfig":{"type":"object","properties":{"id":{"type":"string","example":"ac_0192f3c4a1b27c3d9e8f001122334455"},"toolkit":{"type":"string"},"scheme":{"type":"string"},"name":{"type":"string"},"oauth_app":{"type":["string","null"],"enum":["managed","custom",null],"description":"OAuth schemes: Plugwire's app or your own"},"client_id":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"redirect_uri":{"type":["string","null"],"description":"OAuth schemes: the redirect URI to register with your own OAuth app"},"is_default":{"type":"boolean","description":"Used when a request names only the toolkit"},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["id","toolkit","scheme","name","oauth_app","client_id","scopes","redirect_uri","is_default","enabled","created_at","updated_at"],"description":"How end users authenticate with a toolkit in this project"},"CreateAuthConfigRequest":{"type":"object","properties":{"toolkit":{"type":"string","minLength":1},"scheme":{"type":"string","minLength":1,"description":"Defaults to the toolkit's first scheme"},"name":{"type":"string","minLength":1,"maxLength":100},"is_default":{"type":"boolean","description":"Defaults to true when the toolkit has no default yet"},"client_id":{"type":"string","minLength":1,"maxLength":512,"description":"OAuth: your app's client id. Omit both client fields to use Plugwire's managed app."},"client_secret":{"type":"string","minLength":1,"maxLength":4096,"description":"OAuth: your app's client secret. Stored encrypted, never returned."},"scopes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":256},"maxItems":100,"description":"OAuth: scopes to request; defaults to the scheme's default scopes"}},"required":["toolkit"],"additionalProperties":false},"AuthConfigPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuthConfig"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"UpdateAuthConfigRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"is_default":{"type":"boolean"},"enabled":{"type":"boolean"}},"additionalProperties":false},"ConnectedAccount":{"type":"object","properties":{"id":{"type":"string","example":"ca_0192f3c4a1b27c3d9e8f001122334455"},"user_id":{"type":"string","description":"Your identifier for the end user (1-128 characters: A-Z a-z 0-9 . _ : @ + -)","example":"user_42"},"toolkit":{"type":"string"},"auth_config_id":{"type":"string"},"scheme":{"type":"string"},"status":{"$ref":"#/components/schemas/AccountStatus"},"status_reason":{"type":["string","null"]},"alias":{"type":["string","null"]},"provider_account":{"type":["object","null"],"properties":{"id":{"type":"string"},"label":{"type":["string","null"]}},"required":["id","label"],"description":"The account at the provider, when the toolkit can identify it"},"connection_fields":{"type":"object","additionalProperties":{"type":"string"}},"connect":{"type":["object","null"],"properties":{"url":{"type":"string"},"expires_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["url","expires_at"],"description":"Present when the account was just initiated: send the end user to this URL to finish connecting"},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["id","user_id","toolkit","auth_config_id","scheme","status","status_reason","alias","provider_account","connection_fields","created_at","updated_at"],"description":"An end user's connection to a toolkit. Credentials are never returned."},"AccountStatus":{"type":"string","enum":["INITIATED","ACTIVE","EXPIRED","FAILED","REVOKED","DISABLED"]},"CreateConnectedAccountRequest":{"type":"object","properties":{"user_id":{"type":"string","description":"Your identifier for the end user (1-128 characters: A-Z a-z 0-9 . _ : @ + -)","example":"user_42"},"auth_config_id":{"type":"string","description":"Defaults to the toolkit's default auth config"},"toolkit":{"type":"string"},"credentials":{"type":"object","additionalProperties":{"type":"string"},"description":"Import credentials the end user already has, named by the scheme's credential_fields (e.g. {\"api_key\": \"…\"}). Omit to create an INITIATED account and a hosted connect link instead."},"callback_url":{"type":"string","maxLength":2048,"description":"Where the end user is redirected after the hosted connect flow (with status and connected_account_id)"},"connection_fields":{"type":"object","additionalProperties":{"type":"string"}},"alias":{"type":"string","minLength":1,"maxLength":100}},"required":["user_id"],"additionalProperties":false},"ConnectedAccountPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectedAccount"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"UpdateConnectedAccountRequest":{"type":"object","properties":{"alias":{"type":["string","null"],"minLength":1,"maxLength":100},"enabled":{"type":"boolean","description":"false disables the account; true re-enables a disabled account"}},"additionalProperties":false},"EndUserPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EndUser"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"EndUser":{"type":"object","properties":{"user_id":{"type":"string","description":"Your identifier for the end user (1-128 characters: A-Z a-z 0-9 . _ : @ + -)","example":"user_42"},"account_count":{"type":"integer"},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["user_id","account_count","created_at"]},"ToolExecution":{"type":"object","properties":{"id":{"type":"string","example":"exec_0192f3c4a1b27c3d9e8f001122334455"},"tool":{"type":"string"},"status":{"$ref":"#/components/schemas/ExecutionStatus"},"data":{"description":"The tool's result when status is succeeded"},"error":{"$ref":"#/components/schemas/ExecutionError"},"connected_account_id":{"type":["string","null"]},"user_id":{"type":["string","null"]},"started_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"finished_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["id","tool","status","error","connected_account_id","user_id","started_at","finished_at"]},"ExecutionStatus":{"type":"string","enum":["pending","succeeded","failed","unknown"],"description":"`unknown` means the provider may have applied the call but no definite answer arrived. Check the provider's state before retrying a call that is not idempotent."},"ExecutionError":{"type":["object","null"],"properties":{"code":{"type":"string","example":"provider_error"},"message":{"type":"string"},"provider_status":{"type":["integer","null"]},"retryable":{"type":"boolean","description":"Sending the same request again is safe and may succeed"}},"required":["code","message","provider_status","retryable"]},"ExecuteToolRequest":{"type":"object","properties":{"user_id":{"type":"string","description":"Run as this end user's active connected account for the toolkit"},"connected_account_id":{"type":"string","description":"Run as this connected account"},"arguments":{"type":"object","additionalProperties":{},"default":{},"description":"Validated against the tool's input_schema"}},"additionalProperties":false},"ProxyExecution":{"type":"object","properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/ExecutionStatus"},"response":{"type":["object","null"],"properties":{"status":{"type":"integer"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"body":{},"body_encoding":{"type":"string","enum":["json","text","base64"]}},"required":["status","headers","body_encoding"],"description":"The provider's response, whenever it answered (including error statuses)"},"error":{"$ref":"#/components/schemas/ExecutionError"},"connected_account_id":{"type":"string"},"started_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"finished_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["id","status","response","error","connected_account_id","started_at","finished_at"]},"ProxyRequest":{"type":"object","properties":{"connected_account_id":{"type":"string"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE","HEAD"]},"path":{"type":"string","minLength":1,"maxLength":2048,"description":"Relative to the toolkit's base URL, or an absolute https URL on one of its egress hosts"},"query":{"type":"object","additionalProperties":{"type":"string"},"default":{}},"headers":{"type":"object","additionalProperties":{"type":"string"},"default":{},"description":"Authorization and cookies are set by Plugwire and cannot be overridden"},"body":{"description":"A string is sent as-is; anything else is sent as JSON"}},"required":["connected_account_id","method","path"],"additionalProperties":false},"ExecutionPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Execution"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"Execution":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["tool","proxy"]},"toolkit":{"type":"string"},"tool":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/ExecutionStatus"},"error":{"$ref":"#/components/schemas/ExecutionError"},"connected_account_id":{"type":["string","null"]},"user_id":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"output_retained":{"type":"boolean","description":"Results are kept only for requests sent with an Idempotency-Key"},"data":{"description":"Present on single-execution reads when retained"},"started_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"finished_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["id","kind","toolkit","tool","status","error","connected_account_id","user_id","idempotency_key","output_retained","started_at","finished_at"]},"CreatedSession":{"type":"object","properties":{"id":{"type":"string","example":"ses_0192f3c4a1b27c3d9e8f001122334455"},"user_id":{"type":"string"},"mode":{"type":"string","enum":["router","direct"],"description":"The mode in effect for the allowed tools"},"tool_count":{"type":"integer","description":"Number of allowed tools"},"policy":{"$ref":"#/components/schemas/SessionPolicy"},"expires_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"token":{"type":"string","description":"Session token (pw_st_…). Returned once; it authorizes only this session's routes and MCP endpoint."},"mcp":{"$ref":"#/components/schemas/McpAccess"}},"required":["id","user_id","mode","tool_count","policy","expires_at","revoked_at","created_at","token","mcp"]},"SessionPolicy":{"type":"object","properties":{"toolkits":{"type":"object","properties":{"allow":{"type":["array","null"],"items":{"type":"string"}},"deny":{"type":"array","items":{"type":"string"}}},"required":["allow","deny"]},"tools":{"type":"object","properties":{"allow":{"type":["array","null"],"items":{"type":"string"}},"deny":{"type":"array","items":{"type":"string"}}},"required":["allow","deny"]},"tags":{"type":"array","items":{"type":"string"}},"accounts":{"type":"object","additionalProperties":{"type":"string"}},"auth_configs":{"type":"object","additionalProperties":{"type":"string"}},"manage_connections":{"type":"boolean"},"mode":{"$ref":"#/components/schemas/SessionMode"}},"required":["toolkits","tools","tags","accounts","auth_configs","manage_connections","mode"]},"SessionMode":{"type":"string","enum":["router","direct","auto"],"description":"direct: the model sees the allowed tools. router: it sees meta tools that search for and run them. auto: router when more than 40 tools are allowed."},"McpAccess":{"type":"object","properties":{"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["url","headers"],"description":"Streamable HTTP MCP endpoint and the headers to send"},"CreateSessionRequest":{"type":"object","properties":{"user_id":{"type":"string","minLength":1,"maxLength":256,"description":"Your identifier for the end user","example":"user_42"},"toolkits":{"type":"object","properties":{"allow":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":500,"description":"Only these (omit for all)"},"deny":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":500,"description":"Never these"}},"additionalProperties":false,"description":"Toolkits to expose, e.g. { allow: [\"github\", \"slack\"] }"},"tools":{"type":"object","properties":{"allow":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":500,"description":"Only these (omit for all)"},"deny":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":500,"description":"Never these"}},"additionalProperties":false,"description":"Tools by name. A tool in tools.allow is exposed regardless of toolkits and tags."},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":50,"description":"Only tools with one of these tags, e.g. [\"read\"]"},"auth_configs":{"type":"object","additionalProperties":{"type":"string"},"description":"Toolkit → auth config id used when the session starts a connection"},"manage_connections":{"type":"boolean","description":"Let the model hand the user connect links (default true)"},"mode":{"$ref":"#/components/schemas/SessionMode"},"accounts":{"type":"object","additionalProperties":{"type":"string"},"description":"Toolkit → connected account id to use, when the user has several"},"ttl_seconds":{"type":"integer","minimum":60,"maximum":604800,"description":"Lifetime of the session token (default 3600)"}},"required":["user_id"],"additionalProperties":false},"Session":{"type":"object","properties":{"id":{"type":"string","example":"ses_0192f3c4a1b27c3d9e8f001122334455"},"user_id":{"type":"string"},"mode":{"type":"string","enum":["router","direct"],"description":"The mode in effect for the allowed tools"},"tool_count":{"type":"integer","description":"Number of allowed tools"},"policy":{"$ref":"#/components/schemas/SessionPolicy"},"expires_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"revoked_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["id","user_id","mode","tool_count","policy","expires_at","revoked_at","created_at"]},"SessionTools":{"type":"object","properties":{"mode":{"type":"string","enum":["router","direct"]},"tools":{"type":"array","items":{"$ref":"#/components/schemas/PresentedTool"}}},"required":["mode","tools"]},"PresentedTool":{"type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":{}},"read_only":{"type":"boolean"},"destructive":{"type":"boolean"},"idempotent":{"type":"boolean"}},"required":["name","title","description","input_schema","read_only","destructive","idempotent"],"description":"A tool to give a model"},"SessionCallResult":{"type":"object","properties":{"ok":{"type":"boolean"},"data":{},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{}}},"required":["code","message"]}},"required":["ok"],"description":"What the model gets back; failures (including connection_required) are results, not HTTP errors"},"SessionCallRequest":{"type":"object","properties":{"tool":{"type":"string","minLength":1,"description":"A tool name from the session's tools (a meta tool in router mode)"},"arguments":{"type":"object","additionalProperties":{},"default":{}}},"required":["tool"],"additionalProperties":false},"SessionSearchRequest":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":500},"toolkit":{"type":"string"},"limit":{"type":"integer","minimum":1,"maximum":20}},"required":["query"],"additionalProperties":false},"SessionConnections":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConnectionStatus"}}},"required":["data"]},"ConnectionStatus":{"type":"object","properties":{"toolkit":{"type":"string"},"name":{"type":"string"},"requires_auth":{"type":"boolean"},"connected":{"type":"boolean"},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"label":{"type":["string","null"]},"alias":{"type":["string","null"]}},"required":["id","status","label","alias"]}}},"required":["toolkit","name","requires_auth","connected","accounts"]},"SessionConnectLink":{"type":"object","properties":{"toolkit":{"type":"string"},"connect_url":{"type":"string"},"expires_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"account_id":{"type":"string"}},"required":["toolkit","connect_url","expires_at","account_id"]},"SessionConnectRequest":{"type":"object","properties":{"toolkit":{"type":"string","minLength":1},"callback_url":{"type":"string","format":"uri"}},"required":["toolkit"],"additionalProperties":false},"McpServer":{"type":"object","properties":{"id":{"type":"string","example":"mcp_0192f3c4a1b27c3d9e8f001122334455"},"name":{"type":"string"},"policy":{"$ref":"#/components/schemas/SessionPolicy"},"url":{"type":"string","description":"MCP endpoint; add ?user_id=<end user> and send your project API key as a bearer token"},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["id","name","policy","url","created_at"]},"CreateMcpServerRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"toolkits":{"type":"object","properties":{"allow":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":500,"description":"Only these (omit for all)"},"deny":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":500,"description":"Never these"}},"additionalProperties":false,"description":"Toolkits to expose, e.g. { allow: [\"github\", \"slack\"] }"},"tools":{"type":"object","properties":{"allow":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":500,"description":"Only these (omit for all)"},"deny":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":500,"description":"Never these"}},"additionalProperties":false,"description":"Tools by name. A tool in tools.allow is exposed regardless of toolkits and tags."},"tags":{"type":"array","items":{"type":"string","minLength":1,"maxLength":50},"maxItems":50,"description":"Only tools with one of these tags, e.g. [\"read\"]"},"auth_configs":{"type":"object","additionalProperties":{"type":"string"},"description":"Toolkit → auth config id used when the session starts a connection"},"manage_connections":{"type":"boolean","description":"Let the model hand the user connect links (default true)"},"mode":{"$ref":"#/components/schemas/SessionMode"}},"required":["name"],"additionalProperties":false},"McpServerPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/McpServer"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"TriggerTypeList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TriggerType"}}},"required":["data"]},"TriggerType":{"type":"object","properties":{"slug":{"type":"string","example":"GITHUB_ISSUE_OPENED"},"toolkit":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","enum":["poll","webhook"],"description":"poll: Plugwire checks the provider on an interval. webhook: the provider pushes events."},"interval_seconds":{"type":["integer","null"]},"config_schema":{"type":"object","additionalProperties":{}},"payload_schema":{"type":"object","additionalProperties":{}}},"required":["slug","toolkit","name","description","tags","kind","interval_seconds","config_schema","payload_schema"]},"TriggerInstance":{"type":"object","properties":{"id":{"type":"string","example":"ti_0192f3c4a1b27c3d9e8f001122334455"},"trigger":{"type":"string"},"toolkit":{"type":"string"},"kind":{"type":"string","enum":["poll","webhook"]},"connected_account_id":{"type":["string","null"]},"user_id":{"type":["string","null"]},"config":{"type":"object","additionalProperties":{}},"status":{"type":"string","enum":["ACTIVE","DISABLED","FAILED"]},"status_reason":{"type":["string","null"]},"last_polled_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"next_poll_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"last_error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["id","trigger","toolkit","kind","connected_account_id","user_id","config","status","status_reason","last_polled_at","next_poll_at","last_error","created_at","updated_at"]},"CreateTriggerInstanceRequest":{"type":"object","properties":{"trigger":{"type":"string","minLength":1},"config":{"type":"object","additionalProperties":{},"default":{}},"connected_account_id":{"type":"string"},"user_id":{"type":"string","minLength":1,"maxLength":256,"description":"Use this user's only active account for the toolkit"}},"required":["trigger"],"additionalProperties":false},"TriggerInstancePage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TriggerInstance"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"UpdateTriggerInstanceRequest":{"type":"object","properties":{"enabled":{"type":"boolean"},"config":{"type":"object","additionalProperties":{},"description":"A new config; the trigger then starts over from now"}},"additionalProperties":false},"EventPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"Event":{"type":"object","properties":{"id":{"type":"string","example":"evt_0192f3c4a1b27c3d9e8f001122334455"},"type":{"type":"string","description":"A trigger slug, or a platform event such as webhook.test"},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"occurred_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"trigger_instance_id":{"type":["string","null"]},"connected_account_id":{"type":["string","null"]},"user_id":{"type":["string","null"]},"data":{}},"required":["id","type","created_at","occurred_at","trigger_instance_id","connected_account_id","user_id"],"description":"Also the body of each webhook delivery"},"WebhookEndpointWithSecret":{"type":"object","properties":{"id":{"type":"string","example":"we_0192f3c4a1b27c3d9e8f001122334455"},"url":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"},"description":"Event types sent; empty means all"},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"secret":{"type":"string","description":"Standard Webhooks signing secret (whsec_…). Returned only when created or rotated."}},"required":["id","url","event_types","enabled","created_at","updated_at","secret"]},"CreateWebhookEndpointRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"event_types":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100}},"required":["url"],"additionalProperties":false},"WebhookEndpointPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","example":"we_0192f3c4a1b27c3d9e8f001122334455"},"url":{"type":"string"},"event_types":{"type":"array","items":{"type":"string"},"description":"Event types sent; empty means all"},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["id","url","event_types","enabled","created_at","updated_at"]},"UpdateWebhookEndpointRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"event_types":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"maxItems":100},"enabled":{"type":"boolean"}},"additionalProperties":false},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","example":"wd_0192f3c4a1b27c3d9e8f001122334455"},"endpoint_id":{"type":"string"},"event_id":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","dead"]},"attempts":{"type":"integer"},"next_attempt_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"last_status_code":{"type":["integer","null"]},"last_error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"},"delivered_at":{"type":["string","null"],"format":"date-time","description":"RFC 3339 timestamp","example":"2026-11-01T09:00:00.000Z"}},"required":["id","endpoint_id","event_id","status","attempts","next_attempt_at","last_status_code","last_error","created_at","delivered_at"]},"WebhookDeliveryPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"]}},"parameters":{}},"paths":{"/v1/project":{"get":{"tags":["Projects"],"summary":"Get the project of the calling API key","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/api_keys":{"get":{"tags":["API keys"],"summary":"List API keys","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size (1-100)"},"required":false,"description":"Page size (1-100)","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque cursor from a previous page's next_cursor"},"required":false,"description":"Opaque cursor from a previous page's next_cursor","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of API keys, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyPage"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"post":{"tags":["API keys"],"summary":"Create an API key","description":"The response contains the full secret. It is never shown again.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"description":"The created key, including its secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedApiKey"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/api_keys/{id}":{"delete":{"tags":["API keys"],"summary":"Revoke an API key","description":"Idempotent. The key stops authenticating immediately.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/toolkits":{"get":{"tags":["Catalog"],"summary":"List toolkits","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"All toolkits, by slug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolkitList"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/toolkits/{slug}":{"get":{"tags":["Catalog"],"summary":"Get a toolkit","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"The toolkit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Toolkit"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/tools":{"get":{"tags":["Catalog"],"summary":"List tools","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size (1-100)"},"required":false,"description":"Page size (1-100)","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque cursor from a previous page's next_cursor"},"required":false,"description":"Opaque cursor from a previous page's next_cursor","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"toolkit","in":"query"},{"schema":{"type":"string","description":"Comma-separated; a tool must have every tag"},"required":false,"description":"Comma-separated; a tool must have every tag","name":"tags","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":500,"description":"Search by task, e.g. \"send a slack message\": best matches first, one page (no cursor)"},"required":false,"description":"Search by task, e.g. \"send a slack message\": best matches first, one page (no cursor)","name":"query","in":"query"}],"responses":{"200":{"description":"A page of tools, by slug","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolPage"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/tools/{slug}":{"get":{"tags":["Catalog"],"summary":"Get a tool, including its input and output schemas","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"The tool","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/auth_configs":{"post":{"tags":["Auth configs"],"summary":"Create an auth config","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAuthConfigRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthConfig"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Auth configs"],"summary":"List auth configs","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size (1-100)"},"required":false,"description":"Page size (1-100)","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque cursor from a previous page's next_cursor"},"required":false,"description":"Opaque cursor from a previous page's next_cursor","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"toolkit","in":"query"}],"responses":{"200":{"description":"A page of auth configs, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthConfigPage"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/auth_configs/{id}":{"get":{"tags":["Auth configs"],"summary":"Get an auth config","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The auth config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthConfig"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"patch":{"tags":["Auth configs"],"summary":"Rename, enable/disable, or make default","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAuthConfigRequest"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthConfig"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Auth configs"],"summary":"Delete an unused auth config","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/connected_accounts":{"post":{"tags":["Connected accounts"],"summary":"Connect an end user's account","description":"With `credentials`: imports credentials the end user already has, verified with the provider when the toolkit can identify accounts. Without: creates an INITIATED account and returns `connect.url`, a hosted page where the end user signs in (OAuth) or enters their key.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectedAccountRequest"}}}},"responses":{"201":{"description":"Connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedAccount"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Rejected by the provider","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Connected accounts"],"summary":"List connected accounts","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size (1-100)"},"required":false,"description":"Page size (1-100)","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque cursor from a previous page's next_cursor"},"required":false,"description":"Opaque cursor from a previous page's next_cursor","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"toolkit","in":"query"},{"schema":{"$ref":"#/components/schemas/AccountStatus"},"required":false,"name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"auth_config_id","in":"query"}],"responses":{"200":{"description":"A page of accounts, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedAccountPage"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/connected_accounts/{id}":{"get":{"tags":["Connected accounts"],"summary":"Get a connected account","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedAccount"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"patch":{"tags":["Connected accounts"],"summary":"Rename, disable or re-enable an account","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnectedAccountRequest"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedAccount"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Connected accounts"],"summary":"Delete an account and its credentials","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/users":{"get":{"tags":["Users"],"summary":"List end users","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size (1-100)"},"required":false,"description":"Page size (1-100)","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque cursor from a previous page's next_cursor"},"required":false,"description":"Opaque cursor from a previous page's next_cursor","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of end users, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndUserPage"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/users/{user_id}":{"delete":{"tags":["Users"],"summary":"Forget an end user","description":"Deletes the user's connected accounts and their stored credentials.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"user_id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/tools/{slug}/execute":{"post":{"tags":["Execution"],"summary":"Execute a tool","description":"Provider failures are reported in the body (status failed or unknown), not as HTTP errors.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","description":"Makes retries safe: a repeated request returns the first result without calling the provider again"},"required":false,"description":"Makes retries safe: a repeated request returns the first result without calling the provider again","name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteToolRequest"}}}},"responses":{"200":{"description":"The execution","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolExecution"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/proxy":{"post":{"tags":["Execution"],"summary":"Send an authenticated request to a connected account's provider","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Makes retries safe: a repeated request returns the first result without calling the provider again"},"required":false,"description":"Makes retries safe: a repeated request returns the first result without calling the provider again","name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyRequest"}}}},"responses":{"200":{"description":"The execution, with the provider's response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyExecution"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/executions":{"get":{"tags":["Execution"],"summary":"List executions","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size (1-100)"},"required":false,"description":"Page size (1-100)","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque cursor from a previous page's next_cursor"},"required":false,"description":"Opaque cursor from a previous page's next_cursor","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"tool","in":"query"},{"schema":{"type":"string"},"required":false,"name":"toolkit","in":"query"},{"schema":{"$ref":"#/components/schemas/ExecutionStatus"},"required":false,"description":"`unknown` means the provider may have applied the call but no definite answer arrived. Check the provider's state before retrying a call that is not idempotent.","name":"status","in":"query"},{"schema":{"type":"string"},"required":false,"name":"connected_account_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user_id","in":"query"}],"responses":{"200":{"description":"A page of executions, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionPage"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/executions/{id}":{"get":{"tags":["Execution"],"summary":"Get an execution","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The execution","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Execution"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/sessions":{"post":{"tags":["Sessions"],"summary":"Create a session","description":"Scopes tools and accounts for one end user, for an agent loop (via the SDK or these routes) or an MCP client (via `mcp.url`).","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest"}}}},"responses":{"201":{"description":"Created; the token is returned only now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedSession"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/sessions/{id}":{"get":{"tags":["Sessions"],"summary":"Get a session","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Sessions"],"summary":"Revoke a session's token","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/sessions/{id}/tools":{"get":{"tags":["Sessions"],"summary":"Tools to give the model","description":"The allowed tools (direct mode) or the meta tools (router mode). Accepts the project API key or this session's token (pw_st_…).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Tools with their input schemas","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTools"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/sessions/{id}/execute":{"post":{"tags":["Sessions"],"summary":"Run a tool the model called","description":"Runs one of the session's tools (meta or real). Tool failures, including connection_required with a connect link, come back as results. Accepts the project API key or this session's token (pw_st_…).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string"},"required":false,"name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCallRequest"}}}},"responses":{"200":{"description":"The result for the model","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCallResult"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/sessions/{id}/search":{"post":{"tags":["Sessions"],"summary":"Search the session's tools","description":"Accepts the project API key or this session's token (pw_st_…).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionSearchRequest"}}}},"responses":{"200":{"description":"Matching tools","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCallResult"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/sessions/{id}/connections":{"get":{"tags":["Sessions"],"summary":"Connection status of the session's toolkits","description":"Accepts the project API key or this session's token (pw_st_…).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"One entry per toolkit","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionConnections"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"post":{"tags":["Sessions"],"summary":"Get a connect link for the session's user","description":"Accepts the project API key or this session's token (pw_st_…).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionConnectRequest"}}}},"responses":{"201":{"description":"Send the user to connect_url","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionConnectLink"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/mcp_servers":{"post":{"tags":["MCP servers"],"summary":"Create an MCP server","description":"A reusable session template served at a fixed URL; the end user is chosen per request with ?user_id=.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMcpServerRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["MCP servers"],"summary":"List MCP servers","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size (1-100)"},"required":false,"description":"Page size (1-100)","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque cursor from a previous page's next_cursor"},"required":false,"description":"Opaque cursor from a previous page's next_cursor","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of MCP servers, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServerPage"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/mcp_servers/{id}":{"get":{"tags":["MCP servers"],"summary":"Get an MCP server","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The MCP server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpServer"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["MCP servers"],"summary":"Delete an MCP server","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/trigger_types":{"get":{"tags":["Triggers"],"summary":"List trigger types","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":false,"name":"toolkit","in":"query"}],"responses":{"200":{"description":"Trigger types","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerTypeList"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/trigger_types/{slug}":{"get":{"tags":["Triggers"],"summary":"Get a trigger type","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"The trigger type","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerType"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/trigger_instances":{"post":{"tags":["Triggers"],"summary":"Start watching for a trigger","description":"Poll triggers check the provider on an interval; the first check only marks where new events start.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTriggerInstanceRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"409":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Triggers"],"summary":"List trigger instances","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size (1-100)"},"required":false,"description":"Page size (1-100)","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque cursor from a previous page's next_cursor"},"required":false,"description":"Opaque cursor from a previous page's next_cursor","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"trigger","in":"query"},{"schema":{"type":"string"},"required":false,"name":"user_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"connected_account_id","in":"query"},{"schema":{"type":"string","enum":["ACTIVE","DISABLED","FAILED"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"A page of trigger instances, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstancePage"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/trigger_instances/{id}":{"get":{"tags":["Triggers"],"summary":"Get a trigger instance","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The trigger instance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"patch":{"tags":["Triggers"],"summary":"Enable, disable or reconfigure","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTriggerInstanceRequest"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerInstance"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Triggers"],"summary":"Stop and delete a trigger instance","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/events":{"get":{"tags":["Events"],"summary":"List events","description":"Newest first. For a live feed, GET /v1/events/stream (server-sent events, resumable with Last-Event-ID).","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size (1-100)"},"required":false,"description":"Page size (1-100)","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque cursor from a previous page's next_cursor"},"required":false,"description":"Opaque cursor from a previous page's next_cursor","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"type","in":"query"},{"schema":{"type":"string"},"required":false,"name":"trigger_instance_id","in":"query"}],"responses":{"200":{"description":"A page of events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventPage"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/events/{id}":{"get":{"tags":["Events"],"summary":"Get an event","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/webhook_endpoints":{"post":{"tags":["Webhooks"],"summary":"Add a webhook endpoint","description":"Events are POSTed as JSON, signed per Standard Webhooks (webhook-id, webhook-timestamp, webhook-signature). The signing secret is returned only now.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Webhooks"],"summary":"List webhook endpoints","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size (1-100)"},"required":false,"description":"Page size (1-100)","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque cursor from a previous page's next_cursor"},"required":false,"description":"Opaque cursor from a previous page's next_cursor","name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of endpoints","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointPage"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/webhook_endpoints/{id}":{"get":{"tags":["Webhooks"],"summary":"Get a webhook endpoint","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"patch":{"tags":["Webhooks"],"summary":"Change a webhook endpoint","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointRequest"}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook endpoint","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/webhook_endpoints/{id}/rotate_secret":{"post":{"tags":["Webhooks"],"summary":"Replace the signing secret","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The endpoint with its new secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/webhook_endpoints/{id}/test":{"post":{"tags":["Webhooks"],"summary":"Send a test event now","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"How the delivery went","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/webhook_deliveries":{"get":{"tags":["Webhooks"],"summary":"List webhook deliveries","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Page size (1-100)"},"required":false,"description":"Page size (1-100)","name":"limit","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Opaque cursor from a previous page's next_cursor"},"required":false,"description":"Opaque cursor from a previous page's next_cursor","name":"cursor","in":"query"},{"schema":{"type":"string"},"required":false,"name":"endpoint_id","in":"query"},{"schema":{"type":"string"},"required":false,"name":"event_id","in":"query"},{"schema":{"type":"string","enum":["pending","succeeded","dead"]},"required":false,"name":"status","in":"query"}],"responses":{"200":{"description":"A page of deliveries, newest first","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryPage"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/webhook_deliveries/{id}":{"get":{"tags":["Webhooks"],"summary":"Get a webhook delivery","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The delivery","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v1/webhook_deliveries/{id}/retry":{"post":{"tags":["Webhooks"],"summary":"Queue a failed delivery again","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Missing or invalid API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"webhooks":{}}