Sends workspace events to url as signed JSON POSTs: { id, type, createdAt, data }. Events: process.completed: A generation finished with outputs. process.failed: A generation failed. asset.created: A new image, video or audio asset appeared: a generation output, an upload or an import. asset.favorited: An asset was favorited. asset.unfavorited: An asset was unfavorited. asset.filed: An asset was put in a folder: a session workspace folder or a Library folder (data.folder gives its kind, id, name and path). credits.alert: A credit alert rule fired (GET /credit-alerts): the balance dropped below its level, or a member or API key reached its share of a credit limit or its spend this month. data.rule names it. Each request carries X-Yapper-Event-Id, X-Yapper-Event-Type, X-Yapper-Delivery-Id, X-Yapper-Timestamp and X-Yapper-Signature, which is one or more comma-separated v1= values, each the HMAC-SHA256 of <X-Yapper-Timestamp>.<raw body> with a signing secret: accept the request if any matches. Answer 2xx within 10 seconds. Anything else is retried after 1m, 5m, 30m, 2h, 6h, 12h, 24h, then given up (catch up with GET /events). Delivery is at least once and unordered: dedupe on the event id. An endpoint with no successful delivery for 3 days is disabled. It only receives events for assets and processes its creator can read. At most 10 endpoints per workspace.
Authorization
bearerAuth webhooks:writeIn: header
Scope: webhooks:write
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/webhooks" \ -H "Content-Type: application/json" \ -d '{ "url": "http://example.com", "events": [ "process.completed" ] }'{ "data": { "id": "string", "url": "http://example.com", "description": "string", "events": [ "process.completed" ], "enabled": true, "disabledReason": "disabled_by_user", "disabledAt": "2019-08-24T14:15:22Z", "failingSince": "2019-08-24T14:15:22Z", "lastSuccessAt": "2019-08-24T14:15:22Z", "createdBy": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "links": { "self": "string", "deliveries": "string" }, "secret": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}{ "error": { "code": "string", "message": "string", "requestId": "string" }}Create a session POST
Creates a session to group related generations in the Yapper web app. Pass its id as sessionId on POST /processes, POST /assets/import, and POST /assets/uploads. Free. Uses the processes:write scope.
Create a workspace folder POST
Creates the folder at path along with any missing folders above it (like mkdir -p) and returns the last one. A folder already at path is returned unchanged. color and semantic apply to a newly created last folder. A file in the way of the path returns conflict. Unfoldered is reserved at the top level. The change shows up in the Yapper web app and is recorded with the API key or MCP client that made it; the in-app Yapper agent in that session is told about it on its next turn. Free. Uses the processes:write scope.