{
  "openapi": "3.1.1",
  "info": {
    "title": "EventWolf API",
    "version": "v1",
    "description": "Every operation of the EventWolf API, generated with its [API reference](https://agentpost.tools/docs/eventwolf/reference) from the code that serves it, so the two agree.\n\n- **Base URL:** every path starts with `https://api.agentpost.tools/v1/events`.\n- **Credentials:** send one as `Authorization: Bearer <token>`. Each operation lists the ones it takes, and [Platform credentials](https://agentpost.tools/docs/platform/concepts/credentials) explains each.\n- **Idempotency:** Every write (`POST`, `PUT`, `PATCH`, `DELETE`) takes `Idempotency-Key`, except [Publish an event](https://agentpost.tools/docs/eventwolf/reference/events#publish-an-event), [Import event history](https://agentpost.tools/docs/eventwolf/reference/events#import-event-history), [Validate an event](https://agentpost.tools/docs/eventwolf/reference/events#validate-an-event), [Check a schema](https://agentpost.tools/docs/eventwolf/reference/event-types#check-a-schema), and [Test a subscription](https://agentpost.tools/docs/eventwolf/reference/subscriptions#test-a-subscription), whose entries say why. A key's first answer is kept for 24 hours. [Retrying a write](https://agentpost.tools/docs/platform/api-basics#retrying-a-write) has the rule, with the codes [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch) and [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict) it answers with.\n- **Lists:** Every list takes `limit`, 1 to 200, default 50, and pages with `next` and `after`. [Lists](https://agentpost.tools/docs/platform/api-basics#lists) has the rule.\n- **IDs:** Each ID starts with its kind's prefix, such as `ifl_…`. [EventWolf's ID prefixes](https://agentpost.tools/docs/eventwolf/reference#ids) lists them.\n- **Errors:** An error's `docs` link goes to its code's entry on [EventWolf errors](https://agentpost.tools/docs/eventwolf/errors). Any operation can answer with [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated), [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden), or [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error); each operation lists the other codes it can answer with. [Errors](https://agentpost.tools/docs/platform/api-basics#errors) describes the body.\n- **Rules every API shares:** [API basics](https://agentpost.tools/docs/platform/api-basics).",
    "termsOfService": "https://agentpost.tools/terms"
  },
  "servers": [
    {
      "url": "https://api.agentpost.tools/v1/events"
    }
  ],
  "externalDocs": {
    "description": "The EventWolf API reference",
    "url": "https://agentpost.tools/docs/eventwolf/reference"
  },
  "tags": [
    {
      "name": "Config",
      "description": "The project’s one versioned config: whether unknown event types are accepted, the most data an event may hold, the delivery timeout and retry schedule, how long records are kept, and for push whether EventWolf sets the badge, the retry schedule, and the Expo access token, which is never returned.",
      "externalDocs": {
        "url": "https://agentpost.tools/docs/eventwolf/reference/config"
      }
    },
    {
      "name": "Events",
      "description": "Publish CloudEvents, import another system’s history, and read them back: the history by filter, one event by sequence or by its source and ID, what it caused, and a live tail. Erase personal fields from a stored event, and list its erasures.",
      "externalDocs": {
        "url": "https://agentpost.tools/docs/eventwolf/reference/events"
      }
    },
    {
      "name": "Ingestion failures",
      "description": "The events EventWolf rejected, with why, so a producer’s bug shows up before anyone misses its events.",
      "externalDocs": {
        "url": "https://agentpost.tools/docs/eventwolf/reference/ingest-failures"
      }
    },
    {
      "name": "Event types",
      "description": "The registry of your event types: a description, a JSON Schema for `data` with its versions, the data paths that hold references, and the types EventWolf has seen that nobody registered.",
      "externalDocs": {
        "url": "https://agentpost.tools/docs/eventwolf/reference/event-types"
      }
    },
    {
      "name": "Endpoints",
      "description": "The URLs webhooks go to, each with its signing secrets, static headers, and whether it is active. A subscription names an endpoint as its target.",
      "externalDocs": {
        "url": "https://agentpost.tools/docs/eventwolf/reference/endpoints"
      }
    },
    {
      "name": "Subscriptions",
      "description": "What to do with the events that match a filter: deliver them to an endpoint, or notify principals in their inbox. A change to the filter or target is a new version, and every match records the version it used.",
      "externalDocs": {
        "url": "https://agentpost.tools/docs/eventwolf/reference/subscriptions"
      }
    },
    {
      "name": "Deliveries",
      "description": "Each webhook EventWolf sends, one per match, and each push to a phone, one per notification and push address, with every attempt: the request, the receiver’s answer or the provider’s ID for the push, or why there was none.",
      "externalDocs": {
        "url": "https://agentpost.tools/docs/eventwolf/reference/deliveries"
      }
    },
    {
      "name": "Replays",
      "description": "Send a range of history again, to one subscription or every subscription of an endpoint. A replay makes new matches and deliveries, with new `webhook-id` values and the events’ own `id`, and never changes the old ones.",
      "externalDocs": {
        "url": "https://agentpost.tools/docs/eventwolf/reference/replays"
      }
    },
    {
      "name": "Topics",
      "description": "What notifications are about, such as `assignments`: each topic’s name, whether it reaches each channel by default, and whether it is required.",
      "externalDocs": {
        "url": "https://agentpost.tools/docs/eventwolf/reference/topics"
      }
    },
    {
      "name": "Recipients",
      "description": "The principals that notifications reach, by your own ID for each, with the topics they follow and their preferences.",
      "externalDocs": {
        "url": "https://agentpost.tools/docs/eventwolf/reference/recipients"
      }
    },
    {
      "name": "Push addresses",
      "description": "The devices a recipient’s notifications reach by push: each one a provider and the token your app got from it, such as an Expo push token. Your backend registers a token after the principal signs in and removes it when they sign out. A token belongs to one recipient at a time, so a shared phone never shows one principal’s notifications to the next.",
      "externalDocs": {
        "url": "https://agentpost.tools/docs/eventwolf/reference/push-addresses"
      }
    },
    {
      "name": "Inbox",
      "description": "Manage notifications in the inbox your credential names. List and count them, mark them read, seen, or archived, set inbox preferences, and receive new notifications live.",
      "externalDocs": {
        "url": "https://agentpost.tools/docs/eventwolf/reference/inbox"
      }
    }
  ],
  "paths": {
    "/config": {
      "get": {
        "operationId": "config.get",
        "summary": "Get the config",
        "description": "The current config and its version.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Config"],
        "externalDocs": {
          "description": "Get the config, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/config#get-the-config"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "config": {
                      "$ref": "#/components/schemas/ConfigRecord"
                    }
                  },
                  "required": ["config"]
                },
                "example": {
                  "config": {
                    "ingest": {
                      "unknownTypes": "accept",
                      "maxDataBytes": 65536
                    },
                    "delivery": {
                      "timeout": "15s",
                      "retrySchedule": [
                        "5s",
                        "5m",
                        "30m",
                        "2h",
                        "5h",
                        "10h",
                        "10h"
                      ],
                      "disableAfterFailing": "5d"
                    },
                    "retention": {
                      "events": "forever",
                      "deliveries": "90d",
                      "ingestFailures": "30d",
                      "notifications": "180d"
                    },
                    "push": {
                      "badge": true,
                      "retrySchedule": ["30s", "5m", "30m"],
                      "expo": {
                        "hasAccessToken": false
                      }
                    },
                    "version": 3,
                    "updatedAt": "2026-11-02T14:05:00.000Z",
                    "updatedBy": "key:backend"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "config.put",
        "summary": "Update the config",
        "description": "Replaces the config. Send every setting except `push.expo`, which you can omit to keep the stored access token. EventWolf answers `config_invalid` if a required setting is missing. To guard against changes since you read the config, send the version you read in the optional `If-Match` header. If the version has changed, EventWolf answers `stale_version`.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Config"],
        "externalDocs": {
          "description": "Update the config, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/config#update-the-config"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "If-Match",
            "in": "header",
            "required": false,
            "description": "Optional. The config `version` you read, as a number.",
            "schema": {
              "type": "string"
            },
            "example": "3"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ingest": {
                    "type": "object",
                    "properties": {
                      "unknownTypes": {
                        "type": "string",
                        "enum": ["accept", "reject"],
                        "description": "`accept` takes an event whose type isn’t registered; `reject` refuses it, with `unknown_type`."
                      },
                      "maxDataBytes": {
                        "type": "integer",
                        "minimum": 1024,
                        "maximum": 1048576,
                        "description": "The most bytes an event’s `data` may hold, from 1024 to 1048576."
                      }
                    },
                    "required": ["unknownTypes", "maxDataBytes"]
                  },
                  "delivery": {
                    "type": "object",
                    "properties": {
                      "timeout": {
                        "type": "string",
                        "description": "How long an attempt waits for the receiver’s answer: a duration from `\"1s\"` to `\"60s\"`."
                      },
                      "retrySchedule": {
                        "maxItems": 19,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "A duration from \"0s\" to \"1000000d\": a whole number and one unit of ms, s, m, h, or d, such as \"15m\" or \"30d\""
                        },
                        "description": "The wait before each retry after a failed attempt, as durations; the first attempt goes at once. A delivery is failed when an attempt fails with no retry left. `[]` makes one attempt only."
                      },
                      "disableAfterFailing": {
                        "type": "string",
                        "description": "An endpoint with no success for this long is disabled: a duration from `\"1d\"` to `\"365d\"`."
                      }
                    },
                    "required": [
                      "timeout",
                      "retrySchedule",
                      "disableAfterFailing"
                    ]
                  },
                  "retention": {
                    "type": "object",
                    "properties": {
                      "events": {
                        "anyOf": [
                          {
                            "type": "string",
                            "const": "forever"
                          },
                          {
                            "type": "string",
                            "description": "A duration from \"1d\" to \"1000000d\": a whole number and one unit of ms, s, m, h, or d, such as \"15m\" or \"30d\""
                          }
                        ],
                        "description": "How long an event is kept after EventWolf received it: `\"forever\"`, or a duration of at least `\"1d\"`."
                      },
                      "deliveries": {
                        "anyOf": [
                          {
                            "type": "string",
                            "const": "forever"
                          },
                          {
                            "type": "string",
                            "description": "A duration from \"1d\" to \"1000000d\": a whole number and one unit of ms, s, m, h, or d, such as \"15m\" or \"30d\""
                          }
                        ],
                        "description": "How long a delivery is kept after it finished, with its attempts: `\"forever\"`, or a duration of at least `\"1d\"`."
                      },
                      "ingestFailures": {
                        "anyOf": [
                          {
                            "type": "string",
                            "const": "forever"
                          },
                          {
                            "type": "string",
                            "description": "A duration from \"1d\" to \"1000000d\": a whole number and one unit of ms, s, m, h, or d, such as \"15m\" or \"30d\""
                          }
                        ],
                        "description": "How long an ingestion failure is kept: `\"forever\"`, or a duration of at least `\"1d\"`."
                      },
                      "notifications": {
                        "anyOf": [
                          {
                            "type": "string",
                            "const": "forever"
                          },
                          {
                            "type": "string",
                            "description": "A duration from \"1d\" to \"1000000d\": a whole number and one unit of ms, s, m, h, or d, such as \"15m\" or \"30d\""
                          }
                        ],
                        "description": "How long a notification is kept after it was made: `\"forever\"`, or a duration of at least `\"1d\"`."
                      }
                    },
                    "required": [
                      "events",
                      "deliveries",
                      "ingestFailures",
                      "notifications"
                    ]
                  },
                  "push": {
                    "type": "object",
                    "properties": {
                      "badge": {
                        "type": "boolean",
                        "description": "`true` sets the app icon’s badge on each push to the recipient’s unseen notifications on that device. `false` sends pushes with no badge, so the app keeps the badge itself."
                      },
                      "retrySchedule": {
                        "maxItems": 19,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "description": "A duration from \"0s\" to \"1000000d\": a whole number and one unit of ms, s, m, h, or d, such as \"15m\" or \"30d\""
                        },
                        "description": "The wait before each retry after a send that failed and is worth another try, such as a rate limit, as durations; the first send goes at once. `[]` sends once only."
                      },
                      "expo": {
                        "description": "The Expo credential. Leave it out to keep the access token stored.",
                        "type": "object",
                        "properties": {
                          "accessToken": {
                            "description": "Your Expo access token, which Expo asks for when your Expo project turns on enhanced push security. Stored encrypted and never returned: the config shows only whether one is set. Leave it out to keep the one stored, or send `null` to remove it.",
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1000
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "hasAccessToken": {
                            "description": "Read only: whether an access token is stored. Accepted and ignored, so a config you read can be put back as it is.",
                            "type": "boolean"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": ["badge", "retrySchedule"],
                    "additionalProperties": false
                  }
                },
                "required": ["ingest", "delivery", "retention", "push"],
                "additionalProperties": false
              },
              "example": {
                "ingest": {
                  "unknownTypes": "reject",
                  "maxDataBytes": 65536
                },
                "delivery": {
                  "timeout": "15s",
                  "retrySchedule": [
                    "5s",
                    "5m",
                    "30m",
                    "2h",
                    "5h",
                    "10h",
                    "10h"
                  ],
                  "disableAfterFailing": "5d"
                },
                "retention": {
                  "events": "forever",
                  "deliveries": "90d",
                  "ingestFailures": "30d",
                  "notifications": "180d"
                },
                "push": {
                  "badge": true,
                  "retrySchedule": ["30s", "5m", "30m"]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "config": {
                      "$ref": "#/components/schemas/ConfigRecord"
                    }
                  },
                  "required": ["config"]
                },
                "example": {
                  "config": {
                    "ingest": {
                      "unknownTypes": "reject",
                      "maxDataBytes": 65536
                    },
                    "delivery": {
                      "timeout": "15s",
                      "retrySchedule": [
                        "5s",
                        "5m",
                        "30m",
                        "2h",
                        "5h",
                        "10h",
                        "10h"
                      ],
                      "disableAfterFailing": "5d"
                    },
                    "retention": {
                      "events": "forever",
                      "deliveries": "90d",
                      "ingestFailures": "30d",
                      "notifications": "180d"
                    },
                    "push": {
                      "badge": true,
                      "retrySchedule": ["30s", "5m", "30m"],
                      "expo": {
                        "hasAccessToken": false
                      }
                    },
                    "version": 4,
                    "updatedAt": "2026-11-13T09:30:00.000Z",
                    "updatedBy": "key:backend"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`stale_version`](https://agentpost.tools/docs/eventwolf/errors#stale_version).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["stale_version"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity, with `error.code` [`config_invalid`](https://agentpost.tools/docs/eventwolf/errors#config_invalid).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["config_invalid"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/events": {
      "post": {
        "operationId": "events.publish",
        "summary": "Publish an event",
        "description": "Publishes one event as `application/cloudevents+json`, or up to 100 as an array in `application/cloudevents-batch+json`. An event is idempotent on its `source` and `id`: publishing it again answers `duplicate` with the first sequence, which is left out when your credential may not publish the stored event. One event answers `201` when accepted, `200` when a duplicate, and its rejection’s error when rejected; a batch answers `200` with a result for each event, in order.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** not taken. Publish takes no `Idempotency-Key`: an event is idempotent on its `source` and `id`.",
        "tags": ["Events"],
        "externalDocs": {
          "description": "Publish an event, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/events#publish-an-event"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "required": false,
            "description": "`application/cloudevents+json` for one event, `application/cloudevents-batch+json` for a batch.",
            "schema": {
              "type": "string"
            },
            "example": "application/cloudevents+json"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "specversion": {
                    "type": "string",
                    "const": "1.0"
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "source": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048,
                    "pattern": "^\\S+$"
                  },
                  "type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*$"
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "time": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "datacontenttype": {
                    "type": "string",
                    "pattern": "^application\\/(?:[\\w.+-]*\\+)?json(?:\\s*;.*)?$"
                  },
                  "dataschema": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  },
                  "data": {}
                },
                "required": ["specversion", "source", "type"],
                "additionalProperties": {}
              },
              "example": {
                "specversion": "1.0",
                "id": "01JD4Z3XK6R0V8C2YQ7M5N9P1T",
                "source": "/support/backend",
                "type": "request.assigned",
                "subject": "r_9",
                "actor": "user:u_ben",
                "refs": "request:r_9 user:u_ana",
                "severity": "normal",
                "data": {
                  "summary": "Ben assigned “Refund for order 1042” to you",
                  "assignee": {
                    "id": "u_ana"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublishOutcome"
                },
                "example": {
                  "result": "accepted",
                  "sequence": 42,
                  "id": "01JD4Z3XK6R0V8C2YQ7M5N9P1T",
                  "source": "/support/backend"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large) or [`data_too_large`](https://agentpost.tools/docs/eventwolf/errors#data_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large", "data_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity, with `error.code` [`invalid_envelope`](https://agentpost.tools/docs/eventwolf/errors#invalid_envelope), [`unknown_type`](https://agentpost.tools/docs/eventwolf/errors#unknown_type), or [`invalid_data`](https://agentpost.tools/docs/eventwolf/errors#invalid_data).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": [
                                "invalid_envelope",
                                "unknown_type",
                                "invalid_data"
                              ]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "events.query",
        "summary": "List events",
        "description": "The events that match a filter, in sequence order by default. Use `sort=receivedAt` to place imported history beside live events by receipt time, with sequence breaking ties. Both sorts are newest first unless `order=asc`. Pass `next` as `after` with the same sort, order, and filters; a cursor from the other sort is refused. The `from` and `to` bounds always filter occurrence time, not receipt time. Every page is also held to what your credential may read.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](https://agentpost.tools/docs/platform/api-basics#lists) has the rule.",
        "tags": ["Events"],
        "externalDocs": {
          "description": "List events, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/events#list-events"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "An ISO 8601 date and time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "An ISO 8601 date and time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "The next cursor from a page with the same sort; 1–100 characters.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`sequence` pages in the order the project accepted events. `receivedAt` pages by receipt time, with sequence breaking ties, so imported history sits beside live events; default `\"sequence\"`.",
            "schema": {
              "default": "sequence",
              "type": "string",
              "enum": ["sequence", "receivedAt"]
            },
            "example": "receivedAt"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "description": "`desc` is newest first, `asc` oldest first; default `\"desc\"`.",
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": ["asc", "desc"]
            },
            "example": "asc"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200; default `50`.",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "example": 50
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "description": "Event types, comma-separated. A trailing `.*` matches every type below it, so `request.*` matches `request.created` but not `request`, and `*` matches every type.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sources",
            "in": "query",
            "required": false,
            "description": "Sources, comma-separated. A source is exact, or ends with one `*`, such as `/support/*`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspace",
            "in": "query",
            "required": false,
            "description": "Only events whose `workspace` extension is this.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject",
            "in": "query",
            "required": false,
            "description": "Only events with this `subject`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "required": false,
            "description": "A reference, `type:id` such as `request:r_9`, or a type alone, such as `request`. Repeat `ref` for any of several.",
            "schema": {
              "type": "string"
            },
            "example": "request:r_9"
          },
          {
            "name": "ext[name]",
            "in": "query",
            "required": false,
            "description": "An extension attribute's value, such as `ext[severity]=warning`. The name matches `^[a-z0-9]{1,20}$`. A comma separates values: any of them matches. `true`, `false`, and numbers are read as themselves.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "where[path]",
            "in": "query",
            "required": false,
            "description": "The value at a data path, such as `where[assignee.id]=u_ana`. The path matches `^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$`, up to 10 paths. A comma separates values: any of them matches. `true`, `false`, and numbers are read as themselves.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "events": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EventRecord"
                      }
                    },
                    "next": {
                      "type": "string"
                    }
                  },
                  "required": ["events"]
                },
                "example": {
                  "events": [
                    {
                      "sequence": 42,
                      "receivedAt": "2026-11-12T09:41:07.000Z",
                      "publishedBy": {
                        "actor": {
                          "id": "key:backend"
                        },
                        "via": "host"
                      },
                      "refs": [
                        {
                          "type": "request",
                          "id": "r_9",
                          "role": "ref"
                        },
                        {
                          "type": "user",
                          "id": "u_ana",
                          "role": "ref"
                        },
                        {
                          "type": "user",
                          "id": "u_ben",
                          "role": "actor"
                        }
                      ],
                      "typeVersion": 1,
                      "event": {
                        "specversion": "1.0",
                        "id": "01JD4Z3XK6R0V8C2YQ7M5N9P1T",
                        "source": "/support/backend",
                        "type": "request.assigned",
                        "subject": "r_9",
                        "time": "2026-11-12T09:41:06.512Z",
                        "datacontenttype": "application/json",
                        "actor": "user:u_ben",
                        "refs": "request:r_9 user:u_ana",
                        "severity": "normal",
                        "data": {
                          "summary": "Ben assigned “Refund for order 1042” to you",
                          "assignee": {
                            "id": "u_ana"
                          }
                        },
                        "sequence": 42
                      }
                    },
                    {
                      "sequence": 57,
                      "receivedAt": "2026-11-12T16:20:31.000Z",
                      "publishedBy": {
                        "actor": {
                          "id": "key:backend"
                        },
                        "via": "host"
                      },
                      "refs": [
                        {
                          "type": "request",
                          "id": "r_9",
                          "role": "ref"
                        },
                        {
                          "type": "user",
                          "id": "u_ana",
                          "role": "actor"
                        }
                      ],
                      "event": {
                        "specversion": "1.0",
                        "id": "01JD5KQ2W8E1G3H4J5K6M7N8P9",
                        "source": "/support/backend",
                        "type": "request.resolved",
                        "subject": "r_9",
                        "time": "2026-11-12T16:20:30.884Z",
                        "datacontenttype": "application/json",
                        "actor": "user:u_ana",
                        "refs": "request:r_9",
                        "data": {
                          "resolution": "refunded"
                        },
                        "sequence": 57
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request) or [`invalid_filter`](https://agentpost.tools/docs/eventwolf/errors#invalid_filter).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request", "invalid_filter"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout, with `error.code` [`query_timeout`](https://agentpost.tools/docs/eventwolf/errors#query_timeout).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["query_timeout"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/events/import": {
      "post": {
        "operationId": "events.import",
        "summary": "Import event history",
        "description": "Imports up to 100 historical events in a request of at most 1 MB, with a result per entry. Keeps each event’s `time` and its original receipt time, records the batch and origin in `imported`, and gives each a new sequence after the events already stored. Omit an entry’s `receivedAt` only when it is unknown; the import time is used. Each event needs its original `id`. Unregistered types and data that fails today’s schema still import, and a type’s `refPaths` add no references. Imported events are history only: they make no matches, deliveries, notifications, or pushes, and the live tail leaves them out. An event carrying a record field, such as `sequence` or `projectId`, is rejected. A `source` and `id` already in this project answers `duplicate` and leaves the first record unchanged; its sequence is left out when your credential may not import the stored event.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** not taken. Import takes no `Idempotency-Key`: each event is idempotent on its `source` and `id` within this project.",
        "tags": ["Events"],
        "externalDocs": {
          "description": "Import event history, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/events#import-event-history"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "batchId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "description": "Your import batch ID, scoped to this project. Keep it when resuming the batch."
                  },
                  "origin": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048,
                    "description": "The system or export the history came from."
                  },
                  "events": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {},
                    "description": "Up to 100 entries, each { event: CloudEvent, receivedAt?: ISO timestamp }. Each event needs its original id. Entry errors are returned per event."
                  }
                },
                "required": ["batchId", "origin", "events"],
                "additionalProperties": false
              },
              "example": {
                "batchId": "support-export-2026-11",
                "origin": "legacy-support",
                "events": [
                  {
                    "event": {
                      "specversion": "1.0",
                      "id": "01JD4Z3XK6R0V8C2YQ7M5N9P1T",
                      "source": "/support/backend",
                      "type": "request.assigned",
                      "subject": "r_9",
                      "actor": "user:u_ben",
                      "refs": "request:r_9 user:u_ana",
                      "severity": "normal",
                      "data": {
                        "summary": "Ben assigned “Refund for order 1042” to you",
                        "assignee": {
                          "id": "u_ana"
                        }
                      },
                      "time": "2026-11-12T09:41:07.000Z"
                    },
                    "receivedAt": "2026-11-12T09:41:07.000Z"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PublishOutcome"
                      }
                    }
                  },
                  "required": ["results"]
                },
                "example": {
                  "results": [
                    {
                      "result": "accepted",
                      "sequence": 42,
                      "id": "01JD4Z3XK6R0V8C2YQ7M5N9P1T",
                      "source": "/support/backend"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/events/validate": {
      "post": {
        "operationId": "events.validate",
        "summary": "Validate an event",
        "description": "What publishing this event would answer, with nothing written and no failure recorded.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** not taken. This route writes nothing, so it takes no `Idempotency-Key`.",
        "tags": ["Events"],
        "externalDocs": {
          "description": "Validate an event, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/events#validate-an-event"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "specversion": {
                    "type": "string",
                    "const": "1.0"
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "source": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048,
                    "pattern": "^\\S+$"
                  },
                  "type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500,
                    "pattern": "^[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*$"
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  },
                  "time": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "datacontenttype": {
                    "type": "string",
                    "pattern": "^application\\/(?:[\\w.+-]*\\+)?json(?:\\s*;.*)?$"
                  },
                  "dataschema": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2048
                  },
                  "data": {}
                },
                "required": ["specversion", "source", "type"],
                "additionalProperties": {}
              },
              "example": {
                "specversion": "1.0",
                "id": "01JD4Z3XK6R0V8C2YQ7M5N9P1T",
                "source": "/support/backend",
                "type": "request.assigned",
                "subject": "r_9",
                "actor": "user:u_ben",
                "refs": "request:r_9 user:u_ana",
                "severity": "normal",
                "data": {
                  "summary": "Ben assigned “Refund for order 1042” to you",
                  "assignee": {
                    "id": "u_ana"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidateResponse"
                },
                "example": {
                  "valid": true,
                  "issues": []
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/events/lookup": {
      "get": {
        "operationId": "events.lookup",
        "summary": "Look up an event",
        "description": "One event by the `source` and `id` its producer gave it, as a producer checks whether an event was accepted.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Events"],
        "externalDocs": {
          "description": "Look up an event, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/events#look-up-an-event"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "source",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "example": "/support/backend"
          },
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "example": "01JD4Z3XK6R0V8C2YQ7M5N9P1T"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "event": {
                      "$ref": "#/components/schemas/EventRecord"
                    }
                  },
                  "required": ["event"]
                },
                "example": {
                  "event": {
                    "sequence": 42,
                    "receivedAt": "2026-11-12T09:41:07.000Z",
                    "publishedBy": {
                      "actor": {
                        "id": "key:backend"
                      },
                      "via": "host"
                    },
                    "refs": [
                      {
                        "type": "request",
                        "id": "r_9",
                        "role": "ref"
                      },
                      {
                        "type": "user",
                        "id": "u_ana",
                        "role": "ref"
                      },
                      {
                        "type": "user",
                        "id": "u_ben",
                        "role": "actor"
                      }
                    ],
                    "typeVersion": 1,
                    "event": {
                      "specversion": "1.0",
                      "id": "01JD4Z3XK6R0V8C2YQ7M5N9P1T",
                      "source": "/support/backend",
                      "type": "request.assigned",
                      "subject": "r_9",
                      "time": "2026-11-12T09:41:06.512Z",
                      "datacontenttype": "application/json",
                      "actor": "user:u_ben",
                      "refs": "request:r_9 user:u_ana",
                      "severity": "normal",
                      "data": {
                        "summary": "Ben assigned “Refund for order 1042” to you",
                        "assignee": {
                          "id": "u_ana"
                        }
                      },
                      "sequence": 42
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/events/stream": {
      "get": {
        "operationId": "events.stream",
        "summary": "Stream events",
        "description": "Server-Sent Events: each new event that matches the filter, as an `EventRecord` whose message `id` is its sequence, and a `heartbeat` message with `{ \"through\": <sequence> }` while nothing matches. Reconnect with `Last-Event-ID`, or `after` for a client that can’t set it, to resume with retained matching events after that sequence. Without either, the tail sends only events published after it opens. [Event retention](https://agentpost.tools/docs/eventwolf/concepts/events#limits) explains what happens when events age out.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Events"],
        "externalDocs": {
          "description": "Stream events, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/events#stream-events"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "description": "Event types, comma-separated. A trailing `.*` matches every type below it, so `request.*` matches `request.created` but not `request`, and `*` matches every type.",
            "schema": {
              "type": "string"
            },
            "example": "request.*"
          },
          {
            "name": "sources",
            "in": "query",
            "required": false,
            "description": "Sources, comma-separated. A source is exact, or ends with one `*`, such as `/support/*`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspace",
            "in": "query",
            "required": false,
            "description": "Only events whose `workspace` extension is this.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject",
            "in": "query",
            "required": false,
            "description": "Only events with this `subject`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ref",
            "in": "query",
            "required": false,
            "description": "A reference, `type:id` such as `request:r_9`, or a type alone, such as `request`. Repeat `ref` for any of several.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ext[name]",
            "in": "query",
            "required": false,
            "description": "An extension attribute's value, such as `ext[severity]=warning`. The name matches `^[a-z0-9]{1,20}$`. A comma separates values: any of them matches. `true`, `false`, and numbers are read as themselves.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "where[path]",
            "in": "query",
            "required": false,
            "description": "The value at a data path, such as `where[assignee.id]=u_ana`. The path matches `^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$`, up to 10 paths. A comma separates values: any of them matches. `true`, `false`, and numbers are read as themselves.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "required": false,
            "description": "Optional. The sequence of the last event you received.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request) or [`invalid_filter`](https://agentpost.tools/docs/eventwolf/errors#invalid_filter).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request", "invalid_filter"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout, with `error.code` [`query_timeout`](https://agentpost.tools/docs/eventwolf/errors#query_timeout).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["query_timeout"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/events/{sequence}": {
      "get": {
        "operationId": "events.get",
        "summary": "Get an event",
        "description": "One event by its sequence.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Events"],
        "externalDocs": {
          "description": "Get an event, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/events#get-an-event"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "sequence",
            "in": "path",
            "required": true,
            "description": "An event’s sequence, such as `42`. The `sequence` of a [`EventRecord`](https://agentpost.tools/docs/eventwolf/reference/events#the-eventrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "42"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "event": {
                      "$ref": "#/components/schemas/EventRecord"
                    }
                  },
                  "required": ["event"]
                },
                "example": {
                  "event": {
                    "sequence": 42,
                    "receivedAt": "2026-11-12T09:41:07.000Z",
                    "publishedBy": {
                      "actor": {
                        "id": "key:backend"
                      },
                      "via": "host"
                    },
                    "refs": [
                      {
                        "type": "request",
                        "id": "r_9",
                        "role": "ref"
                      },
                      {
                        "type": "user",
                        "id": "u_ana",
                        "role": "ref"
                      },
                      {
                        "type": "user",
                        "id": "u_ben",
                        "role": "actor"
                      }
                    ],
                    "typeVersion": 1,
                    "event": {
                      "specversion": "1.0",
                      "id": "01JD4Z3XK6R0V8C2YQ7M5N9P1T",
                      "source": "/support/backend",
                      "type": "request.assigned",
                      "subject": "r_9",
                      "time": "2026-11-12T09:41:06.512Z",
                      "datacontenttype": "application/json",
                      "actor": "user:u_ben",
                      "refs": "request:r_9 user:u_ana",
                      "severity": "normal",
                      "data": {
                        "summary": "Ben assigned “Refund for order 1042” to you",
                        "assignee": {
                          "id": "u_ana"
                        }
                      },
                      "sequence": 42
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/events/{sequence}/timeline": {
      "get": {
        "operationId": "events.timeline",
        "summary": "Get an event timeline",
        "description": "One event with what caused it and what it caused, through `causationid`, and what EventWolf did with it: its matches, deliveries with each attempt in brief, and notifications.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Events"],
        "externalDocs": {
          "description": "Get an event timeline, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/events#get-an-event-timeline"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "sequence",
            "in": "path",
            "required": true,
            "description": "An event’s sequence, such as `42`. The `sequence` of a [`EventRecord`](https://agentpost.tools/docs/eventwolf/reference/events#the-eventrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "57"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimelineRecord"
                },
                "example": {
                  "event": {
                    "sequence": 57,
                    "receivedAt": "2026-11-12T16:20:31.000Z",
                    "publishedBy": {
                      "actor": {
                        "id": "key:backend"
                      },
                      "via": "host"
                    },
                    "refs": [
                      {
                        "type": "request",
                        "id": "r_9",
                        "role": "ref"
                      },
                      {
                        "type": "user",
                        "id": "u_ana",
                        "role": "actor"
                      }
                    ],
                    "event": {
                      "specversion": "1.0",
                      "id": "01JD5KQ2W8E1G3H4J5K6M7N8P9",
                      "source": "/support/backend",
                      "type": "request.resolved",
                      "subject": "r_9",
                      "time": "2026-11-12T16:20:30.884Z",
                      "datacontenttype": "application/json",
                      "actor": "user:u_ana",
                      "refs": "request:r_9",
                      "data": {
                        "resolution": "refunded"
                      },
                      "sequence": 57
                    }
                  },
                  "causes": [],
                  "effects": [],
                  "matches": [
                    {
                      "id": "mat_01M77MA4BADJB617FSKAKFB062",
                      "eventSequence": 57,
                      "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                      "subscriptionVersion": 1,
                      "cause": "ingest",
                      "decidedAt": "2026-11-12T16:20:31.000Z"
                    }
                  ],
                  "deliveries": [
                    {
                      "id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                      "kind": "webhook",
                      "eventSequence": 57,
                      "matchId": "mat_01M77MA4BADJB617FSKAKFB062",
                      "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                      "status": "succeeded",
                      "attempts": [
                        {
                          "id": "att_01M79H5NGPEGZF2FB3WE90H645",
                          "n": 1,
                          "trigger": "automatic",
                          "outcome": "failed",
                          "startedAt": "2026-11-12T16:20:31.000Z",
                          "duration": "212ms",
                          "status": 503
                        },
                        {
                          "id": "att_01M78DATBYZV18RDVFT6Z5EKWR",
                          "n": 2,
                          "trigger": "automatic",
                          "outcome": "succeeded",
                          "startedAt": "2026-11-12T16:20:36.000Z",
                          "duration": "148ms",
                          "status": 200
                        }
                      ],
                      "createdAt": "2026-11-12T16:20:31.000Z",
                      "finishedAt": "2026-11-12T16:20:37.000Z"
                    }
                  ],
                  "notifications": []
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout, with `error.code` [`query_timeout`](https://agentpost.tools/docs/eventwolf/errors#query_timeout).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["query_timeout"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/events/{sequence}/erase": {
      "post": {
        "operationId": "events.erase",
        "summary": "Erase event fields",
        "description": "Removes named personal fields, their parsed references, and frozen notification and push text, and records the erasure atomically. Each notification the event made keeps its record with `erasedAt` and no title, body, or URL, and a push not yet sent is skipped with `event_erased`. Answers with only the erasure record, with no event values. Repeating paths is safe. Event records expose cumulative erased paths.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Events"],
        "externalDocs": {
          "description": "Erase event fields, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/events#erase-event-fields"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "sequence",
            "in": "path",
            "required": true,
            "description": "An event’s sequence, such as `42`. The `sequence` of a [`EventRecord`](https://agentpost.tools/docs/eventwolf/reference/events#the-eventrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "42"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "paths": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024
                    },
                    "description": "Fields on the public event, such as data.customer.email, subject, actor, refs, or summary. Dotted data keys follow filter syntax, up to 64 segments; __proto__, prototype, and constructor are refused. Object fields are removed; erased array slots become null. No values belong in this request."
                  }
                },
                "required": ["paths"],
                "additionalProperties": false
              },
              "example": {
                "paths": ["actor", "data.assignee.id", "data.summary"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "erasure": {
                      "$ref": "#/components/schemas/ErasureRecord"
                    }
                  },
                  "required": ["erasure"]
                },
                "example": {
                  "erasure": {
                    "id": "ers_01M79Z4K8R2T6V0X3B5D7F9H1J",
                    "eventSequence": 42,
                    "paths": ["actor", "data.assignee.id", "data.summary"],
                    "erasedAt": "2026-11-13T09:30:00.000Z",
                    "requestedBy": {
                      "actor": {
                        "id": "key:backend"
                      },
                      "via": "host"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/events/{sequence}/erasures": {
      "get": {
        "operationId": "events.erasures",
        "summary": "List event erasures",
        "description": "The event’s erasure records, newest first, including after the event ages out of retention. Kept until project deletion; records hold paths, time, and caller, never erased values.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](https://agentpost.tools/docs/platform/api-basics#lists) has the rule.",
        "tags": ["Events"],
        "externalDocs": {
          "description": "List event erasures, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/events#list-event-erasures"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "sequence",
            "in": "path",
            "required": true,
            "description": "An event’s sequence, such as `42`. The `sequence` of a [`EventRecord`](https://agentpost.tools/docs/eventwolf/reference/events#the-eventrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "42"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200; default `50`.",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "erasures": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ErasureRecord"
                      }
                    },
                    "next": {
                      "type": "string"
                    }
                  },
                  "required": ["erasures"]
                },
                "example": {
                  "erasures": [
                    {
                      "id": "ers_01M79Z4K8R2T6V0X3B5D7F9H1J",
                      "eventSequence": 42,
                      "paths": ["actor", "data.assignee.id", "data.summary"],
                      "erasedAt": "2026-11-13T09:30:00.000Z",
                      "requestedBy": {
                        "actor": {
                          "id": "key:backend"
                        },
                        "via": "host"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout, with `error.code` [`query_timeout`](https://agentpost.tools/docs/eventwolf/errors#query_timeout).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["query_timeout"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/ingest-failures": {
      "get": {
        "operationId": "ingestFailures.list",
        "summary": "List ingestion failures",
        "description": "Rejected events, newest first.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](https://agentpost.tools/docs/platform/api-basics#lists) has the rule.",
        "tags": ["Ingestion failures"],
        "externalDocs": {
          "description": "List ingestion failures, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/ingest-failures#list-ingestion-failures"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "example": "request.assigned"
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "code",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "invalid_envelope",
                "unknown_type",
                "invalid_data",
                "data_too_large"
              ]
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "An ISO 8601 date and time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200; default `50`.",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "failures": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IngestFailureRecord"
                      }
                    },
                    "next": {
                      "type": "string"
                    }
                  },
                  "required": ["failures"]
                },
                "example": {
                  "failures": [
                    {
                      "id": "ifl_01M79T232KQA2P9BYW5WJNP3N2",
                      "receivedAt": "2026-11-12T11:02:44.000Z",
                      "publishedBy": {
                        "actor": {
                          "id": "key:backend"
                        },
                        "via": "host"
                      },
                      "claimed": {
                        "id": "01JD52A7C9D0E1F2G3H4J5K6M7",
                        "source": "/support/backend",
                        "type": "request.assigned"
                      },
                      "code": "invalid_data",
                      "issues": ["data must have required property 'assignee'"],
                      "bodyExcerpt": "{\"specversion\":\"1.0\",\"id\":\"01JD52A7C9D0E1F2G3H4J5K6M7\",\"source\":\"/support/backend\",\"type\":\"request.assigned\",\"subject\":\"r_10\",\"data\":{\"summary\":\"Ben assigned a request\"}}"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout, with `error.code` [`query_timeout`](https://agentpost.tools/docs/eventwolf/errors#query_timeout).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["query_timeout"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/event-types": {
      "get": {
        "operationId": "eventTypes.list",
        "summary": "List event types",
        "description": "Registered and observed types.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](https://agentpost.tools/docs/platform/api-basics#lists) has the rule.",
        "tags": ["Event types"],
        "externalDocs": {
          "description": "List event types, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/event-types#list-event-types"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "origin",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["registered", "observed"]
            },
            "example": "registered"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["active", "deprecated"]
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "1–500 characters.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200; default `50`.",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "eventTypes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EventTypeRecord"
                      }
                    },
                    "next": {
                      "type": "string"
                    }
                  },
                  "required": ["eventTypes"]
                },
                "example": {
                  "eventTypes": [
                    {
                      "type": "request.assigned",
                      "origin": "registered",
                      "description": "A support request was assigned to someone.",
                      "refPaths": {
                        "assignee.id": {
                          "type": "user"
                        }
                      },
                      "schema": {
                        "version": 1,
                        "jsonSchema": {
                          "type": "object",
                          "required": ["assignee"],
                          "properties": {
                            "summary": {
                              "type": "string"
                            },
                            "assignee": {
                              "type": "object",
                              "required": ["id"],
                              "properties": {
                                "id": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        }
                      },
                      "versions": [
                        {
                          "version": 1,
                          "jsonSchema": {
                            "type": "object",
                            "required": ["assignee"],
                            "properties": {
                              "summary": {
                                "type": "string"
                              },
                              "assignee": {
                                "type": "object",
                                "required": ["id"],
                                "properties": {
                                  "id": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          },
                          "createdAt": "2026-11-02T14:05:00.000Z"
                        }
                      ],
                      "status": "active",
                      "firstSeenAt": "2026-11-02T14:05:00.000Z",
                      "lastSeenAt": "2026-11-12T09:41:07.000Z",
                      "createdAt": "2026-11-02T14:05:00.000Z",
                      "updatedAt": "2026-11-02T14:05:00.000Z",
                      "updatedBy": "key:backend"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/event-types/{type}": {
      "get": {
        "operationId": "eventTypes.get",
        "summary": "Get an event type",
        "description": "One type, with every version of its schema.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Event types"],
        "externalDocs": {
          "description": "Get an event type, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/event-types#get-an-event-type"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "An event type, such as `request.assigned`. The `type` of a [`EventTypeRecord`](https://agentpost.tools/docs/eventwolf/reference/event-types#the-eventtyperecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "request.assigned"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "eventType": {
                      "$ref": "#/components/schemas/EventTypeRecord"
                    }
                  },
                  "required": ["eventType"]
                },
                "example": {
                  "eventType": {
                    "type": "request.assigned",
                    "origin": "registered",
                    "description": "A support request was assigned to someone.",
                    "refPaths": {
                      "assignee.id": {
                        "type": "user"
                      }
                    },
                    "schema": {
                      "version": 1,
                      "jsonSchema": {
                        "type": "object",
                        "required": ["assignee"],
                        "properties": {
                          "summary": {
                            "type": "string"
                          },
                          "assignee": {
                            "type": "object",
                            "required": ["id"],
                            "properties": {
                              "id": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "versions": [
                      {
                        "version": 1,
                        "jsonSchema": {
                          "type": "object",
                          "required": ["assignee"],
                          "properties": {
                            "summary": {
                              "type": "string"
                            },
                            "assignee": {
                              "type": "object",
                              "required": ["id"],
                              "properties": {
                                "id": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "createdAt": "2026-11-02T14:05:00.000Z"
                      }
                    ],
                    "status": "active",
                    "firstSeenAt": "2026-11-02T14:05:00.000Z",
                    "lastSeenAt": "2026-11-12T09:41:07.000Z",
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "updatedAt": "2026-11-02T14:05:00.000Z",
                    "updatedBy": "key:backend"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "eventTypes.put",
        "summary": "Register an event type",
        "description": "Registers a type or updates it; a field you leave out keeps its value. A schema different from the current one becomes a new version, and events published after it must match it.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Event types"],
        "externalDocs": {
          "description": "Register an event type, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/event-types#register-an-event-type"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "An event type, such as `request.assigned`. The `type` of a [`EventTypeRecord`](https://agentpost.tools/docs/eventwolf/reference/event-types#the-eventtyperecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "request.assigned"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "schema": {
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "refPaths": {
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            }
                          },
                          "required": ["type"],
                          "additionalProperties": false
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": ["active", "deprecated"]
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "description": "A support request was assigned to someone.",
                "schema": {
                  "type": "object",
                  "required": ["assignee"],
                  "properties": {
                    "summary": {
                      "type": "string"
                    },
                    "assignee": {
                      "type": "object",
                      "required": ["id"],
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "refPaths": {
                  "assignee.id": {
                    "type": "user"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "eventType": {
                      "$ref": "#/components/schemas/EventTypeRecord"
                    }
                  },
                  "required": ["eventType"]
                },
                "example": {
                  "eventType": {
                    "type": "request.assigned",
                    "origin": "registered",
                    "description": "A support request was assigned to someone.",
                    "refPaths": {
                      "assignee.id": {
                        "type": "user"
                      }
                    },
                    "schema": {
                      "version": 1,
                      "jsonSchema": {
                        "type": "object",
                        "required": ["assignee"],
                        "properties": {
                          "summary": {
                            "type": "string"
                          },
                          "assignee": {
                            "type": "object",
                            "required": ["id"],
                            "properties": {
                              "id": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "versions": [
                      {
                        "version": 1,
                        "jsonSchema": {
                          "type": "object",
                          "required": ["assignee"],
                          "properties": {
                            "summary": {
                              "type": "string"
                            },
                            "assignee": {
                              "type": "object",
                              "required": ["id"],
                              "properties": {
                                "id": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "createdAt": "2026-11-02T14:05:00.000Z"
                      }
                    ],
                    "status": "active",
                    "firstSeenAt": "2026-11-02T14:05:00.000Z",
                    "lastSeenAt": "2026-11-12T09:41:07.000Z",
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "updatedAt": "2026-11-02T14:05:00.000Z",
                    "updatedBy": "key:backend"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`stale_version`](https://agentpost.tools/docs/eventwolf/errors#stale_version).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["stale_version"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/event-types/{type}/validate": {
      "post": {
        "operationId": "eventTypes.validate",
        "summary": "Check a schema",
        "description": "Checks 1 to 200 items against a schema and answers with one result per item in order. The check writes nothing. To check stored events, read them with `GET /events` and send one item per event, with its `data` if it has any.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** not taken. This route writes nothing, so it takes no `Idempotency-Key`.",
        "tags": ["Event types"],
        "externalDocs": {
          "description": "Check a schema, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/event-types#check-a-schema"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "An event type, such as `request.assigned`. The `type` of a [`EventTypeRecord`](https://agentpost.tools/docs/eventwolf/reference/event-types#the-eventtyperecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "request.assigned"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "schema": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {}
                  },
                  "items": {
                    "minItems": 1,
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "data": {}
                      },
                      "additionalProperties": false
                    }
                  }
                },
                "required": ["items"],
                "additionalProperties": false
              },
              "example": {
                "schema": {
                  "type": "object",
                  "required": ["assignee"],
                  "properties": {
                    "summary": {
                      "type": "string"
                    },
                    "assignee": {
                      "type": "object",
                      "required": ["id", "team"],
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "team": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "items": [
                  {
                    "data": {
                      "assignee": {
                        "id": "u_ben"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventTypeValidateResponse"
                },
                "example": {
                  "schema": {
                    "from": "request"
                  },
                  "items": [
                    {
                      "valid": false,
                      "issues": [
                        "data.assignee must have required property 'team'"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/event-types/{type}/deprecate": {
      "post": {
        "operationId": "eventTypes.deprecate",
        "summary": "Deprecate an event type",
        "description": "Marks a type deprecated. Its events are still accepted; the mark tells producers to move off it.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Event types"],
        "externalDocs": {
          "description": "Deprecate an event type, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/event-types#deprecate-an-event-type"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "description": "An event type, such as `request.assigned`. The `type` of a [`EventTypeRecord`](https://agentpost.tools/docs/eventwolf/reference/event-types#the-eventtyperecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "request.assigned"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "eventType": {
                      "$ref": "#/components/schemas/EventTypeRecord"
                    }
                  },
                  "required": ["eventType"]
                },
                "example": {
                  "eventType": {
                    "type": "request.assigned",
                    "origin": "registered",
                    "description": "A support request was assigned to someone.",
                    "refPaths": {
                      "assignee.id": {
                        "type": "user"
                      }
                    },
                    "schema": {
                      "version": 1,
                      "jsonSchema": {
                        "type": "object",
                        "required": ["assignee"],
                        "properties": {
                          "summary": {
                            "type": "string"
                          },
                          "assignee": {
                            "type": "object",
                            "required": ["id"],
                            "properties": {
                              "id": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    },
                    "versions": [
                      {
                        "version": 1,
                        "jsonSchema": {
                          "type": "object",
                          "required": ["assignee"],
                          "properties": {
                            "summary": {
                              "type": "string"
                            },
                            "assignee": {
                              "type": "object",
                              "required": ["id"],
                              "properties": {
                                "id": {
                                  "type": "string"
                                }
                              }
                            }
                          }
                        },
                        "createdAt": "2026-11-02T14:05:00.000Z"
                      }
                    ],
                    "status": "deprecated",
                    "firstSeenAt": "2026-11-02T14:05:00.000Z",
                    "lastSeenAt": "2026-11-12T09:41:07.000Z",
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "updatedAt": "2026-11-13T09:30:00.000Z",
                    "updatedBy": "key:backend"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/endpoints": {
      "post": {
        "operationId": "endpoints.create",
        "summary": "Create an endpoint",
        "description": "Creates an endpoint and answers with it and its signing secret, `secret`, `whsec_…`, shown this once.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Endpoints"],
        "externalDocs": {
          "description": "Create an endpoint, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/endpoints#create-an-endpoint"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri",
                    "description": "A [public HTTPS URL](https://agentpost.tools/docs/eventwolf/concepts/deliveries#endpoints) for your receiver."
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "headers": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9-]+$"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 4096
                    }
                  },
                  "workspace": {
                    "description": "The workspace it belongs to, when the app groups its principals into workspaces.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  }
                },
                "required": ["url"],
                "additionalProperties": false
              },
              "example": {
                "url": "https://support.example.com/webhooks/eventwolf",
                "description": "Support desk: resolved requests"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "endpoint": {
                      "$ref": "#/components/schemas/EndpointRecord"
                    },
                    "secret": {
                      "type": "string"
                    }
                  },
                  "required": ["endpoint", "secret"]
                },
                "example": {
                  "endpoint": {
                    "id": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                    "url": "https://support.example.com/webhooks/eventwolf",
                    "description": "Support desk: resolved requests",
                    "status": "active",
                    "secrets": [
                      {
                        "id": "whk_mhd2b8sw",
                        "alg": "hmac-sha256",
                        "createdAt": "2026-11-02T14:05:00.000Z"
                      }
                    ],
                    "hasHeaders": false,
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "createdBy": "key:backend",
                    "updatedAt": "2026-11-02T14:05:00.000Z"
                  },
                  "secret": "whsec_MfKQ9r8GKYqrTW7S1mBxmUhKnf3MCHtN"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "endpoints.list",
        "summary": "List endpoints",
        "description": "Endpoints, newest first.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](https://agentpost.tools/docs/platform/api-basics#lists) has the rule.",
        "tags": ["Endpoints"],
        "externalDocs": {
          "description": "List endpoints, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/endpoints#list-endpoints"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["active", "disabled"]
            },
            "example": "active"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200; default `50`.",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "endpoints": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EndpointRecord"
                      }
                    },
                    "next": {
                      "type": "string"
                    }
                  },
                  "required": ["endpoints"]
                },
                "example": {
                  "endpoints": [
                    {
                      "id": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                      "url": "https://support.example.com/webhooks/eventwolf",
                      "description": "Support desk: resolved requests",
                      "status": "active",
                      "secrets": [
                        {
                          "id": "whk_mhd2b8sw",
                          "alg": "hmac-sha256",
                          "createdAt": "2026-11-02T14:05:00.000Z"
                        }
                      ],
                      "hasHeaders": false,
                      "lastSuccessAt": "2026-11-12T16:20:31.000Z",
                      "createdAt": "2026-11-02T14:05:00.000Z",
                      "createdBy": "key:backend",
                      "updatedAt": "2026-11-02T14:05:00.000Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/endpoints/{id}": {
      "get": {
        "operationId": "endpoints.get",
        "summary": "Get an endpoint",
        "description": "One endpoint.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Endpoints"],
        "externalDocs": {
          "description": "Get an endpoint, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/endpoints#get-an-endpoint"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "An endpoint ID, `end_…`. The `id` of a [`EndpointRecord`](https://agentpost.tools/docs/eventwolf/reference/endpoints#the-endpointrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "endpoint": {
                      "$ref": "#/components/schemas/EndpointRecord"
                    }
                  },
                  "required": ["endpoint"]
                },
                "example": {
                  "endpoint": {
                    "id": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                    "url": "https://support.example.com/webhooks/eventwolf",
                    "description": "Support desk: resolved requests",
                    "status": "active",
                    "secrets": [
                      {
                        "id": "whk_mhd2b8sw",
                        "alg": "hmac-sha256",
                        "createdAt": "2026-11-02T14:05:00.000Z"
                      }
                    ],
                    "hasHeaders": false,
                    "lastSuccessAt": "2026-11-12T16:20:31.000Z",
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "createdBy": "key:backend",
                    "updatedAt": "2026-11-02T14:05:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "endpoints.update",
        "summary": "Update an endpoint",
        "description": "Changes an endpoint’s URL, description, or static headers; a field you leave out keeps its value, and `null` clears it.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Endpoints"],
        "externalDocs": {
          "description": "Update an endpoint, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/endpoints#update-an-endpoint"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "An endpoint ID, `end_…`. The `id` of a [`EndpointRecord`](https://agentpost.tools/docs/eventwolf/reference/endpoints#the-endpointrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "description": "A [public HTTPS URL](https://agentpost.tools/docs/eventwolf/concepts/deliveries#endpoints) for your receiver.",
                    "type": "string",
                    "maxLength": 2048,
                    "format": "uri"
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "headers": {
                    "anyOf": [
                      {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9-]+$"
                        },
                        "additionalProperties": {
                          "type": "string",
                          "maxLength": 4096
                        }
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "url": "https://support.example.com/hooks/eventwolf"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "endpoint": {
                      "$ref": "#/components/schemas/EndpointRecord"
                    }
                  },
                  "required": ["endpoint"]
                },
                "example": {
                  "endpoint": {
                    "id": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                    "url": "https://support.example.com/hooks/eventwolf",
                    "description": "Support desk: resolved requests",
                    "status": "active",
                    "secrets": [
                      {
                        "id": "whk_mhd2b8sw",
                        "alg": "hmac-sha256",
                        "createdAt": "2026-11-02T14:05:00.000Z"
                      }
                    ],
                    "hasHeaders": false,
                    "lastSuccessAt": "2026-11-12T16:20:31.000Z",
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "createdBy": "key:backend",
                    "updatedAt": "2026-11-13T09:30:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "endpoints.delete",
        "summary": "Delete an endpoint",
        "description": "Deletes an endpoint. A subscription that still sends to it answers `conflict`: delete or retarget it first.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Endpoints"],
        "externalDocs": {
          "description": "Delete an endpoint, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/endpoints#delete-an-endpoint"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "An endpoint ID, `end_…`. The `id` of a [`EndpointRecord`](https://agentpost.tools/docs/eventwolf/reference/endpoints#the-endpointrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["conflict"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/endpoints/{id}/enable": {
      "post": {
        "operationId": "endpoints.enable",
        "summary": "Enable an endpoint",
        "description": "Turns a disabled endpoint back on. Deliveries skipped while it was off stay skipped; recover them to send them.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Endpoints"],
        "externalDocs": {
          "description": "Enable an endpoint, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/endpoints#enable-an-endpoint"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "An endpoint ID, `end_…`. The `id` of a [`EndpointRecord`](https://agentpost.tools/docs/eventwolf/reference/endpoints#the-endpointrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "endpoint": {
                      "$ref": "#/components/schemas/EndpointRecord"
                    }
                  },
                  "required": ["endpoint"]
                },
                "example": {
                  "endpoint": {
                    "id": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                    "url": "https://support.example.com/webhooks/eventwolf",
                    "description": "Support desk: resolved requests",
                    "status": "active",
                    "secrets": [
                      {
                        "id": "whk_mhd2b8sw",
                        "alg": "hmac-sha256",
                        "createdAt": "2026-11-02T14:05:00.000Z"
                      }
                    ],
                    "hasHeaders": false,
                    "lastSuccessAt": "2026-11-12T16:20:31.000Z",
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "createdBy": "key:backend",
                    "updatedAt": "2026-11-13T09:30:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/endpoints/{id}/disable": {
      "post": {
        "operationId": "endpoints.disable",
        "summary": "Disable an endpoint",
        "description": "Turns an endpoint off. Its new deliveries are skipped until it is enabled.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Endpoints"],
        "externalDocs": {
          "description": "Disable an endpoint, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/endpoints#disable-an-endpoint"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "An endpoint ID, `end_…`. The `id` of a [`EndpointRecord`](https://agentpost.tools/docs/eventwolf/reference/endpoints#the-endpointrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "endpoint": {
                      "$ref": "#/components/schemas/EndpointRecord"
                    }
                  },
                  "required": ["endpoint"]
                },
                "example": {
                  "endpoint": {
                    "id": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                    "url": "https://support.example.com/webhooks/eventwolf",
                    "description": "Support desk: resolved requests",
                    "status": "disabled",
                    "secrets": [
                      {
                        "id": "whk_mhd2b8sw",
                        "alg": "hmac-sha256",
                        "createdAt": "2026-11-02T14:05:00.000Z"
                      }
                    ],
                    "hasHeaders": false,
                    "lastSuccessAt": "2026-11-12T16:20:31.000Z",
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "createdBy": "key:backend",
                    "updatedAt": "2026-11-13T09:30:00.000Z",
                    "disabledReason": "manual"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/endpoints/{id}/secrets/rotate": {
      "post": {
        "operationId": "endpoints.rotateSecret",
        "summary": "Rotate a signing secret",
        "description": "Adds a new signing secret, `secret`, shown this once. The old one keeps signing beside it until `expiresIn` passes, so the receiver can switch without missing a delivery.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Endpoints"],
        "externalDocs": {
          "description": "Rotate a signing secret, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/endpoints#rotate-a-signing-secret"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "An endpoint ID, `end_…`. The `id` of a [`EndpointRecord`](https://agentpost.tools/docs/eventwolf/reference/endpoints#the-endpointrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expiresIn": {
                    "type": "string",
                    "description": "How long the old secrets keep signing beside the new one: a duration from `\"0s\"`, which retires them at once, to `\"7d\"`."
                  }
                },
                "required": ["expiresIn"],
                "additionalProperties": false
              },
              "example": {
                "expiresIn": "24h"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "endpoint": {
                      "$ref": "#/components/schemas/EndpointRecord"
                    },
                    "secret": {
                      "type": "string"
                    }
                  },
                  "required": ["endpoint", "secret"]
                },
                "example": {
                  "endpoint": {
                    "id": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                    "url": "https://support.example.com/webhooks/eventwolf",
                    "description": "Support desk: resolved requests",
                    "status": "active",
                    "secrets": [
                      {
                        "id": "whk_mhd2b8sw",
                        "alg": "hmac-sha256",
                        "createdAt": "2026-11-02T14:05:00.000Z",
                        "expiresAt": "2026-11-14T09:30:00.000Z"
                      },
                      {
                        "id": "whk_mhfrqk5c",
                        "alg": "hmac-sha256",
                        "createdAt": "2026-11-13T09:30:00.000Z"
                      }
                    ],
                    "hasHeaders": false,
                    "lastSuccessAt": "2026-11-12T16:20:31.000Z",
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "createdBy": "key:backend",
                    "updatedAt": "2026-11-13T09:30:00.000Z"
                  },
                  "secret": "whsec_Zp4LwT1q8vHj3cXy6NbE2rKmA9sD5fGu"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/endpoints/{id}/test": {
      "post": {
        "operationId": "endpoints.test",
        "summary": "Test an endpoint",
        "description": "Publishes a `tools.agentpost.events.endpoint.test` event and delivers it to the endpoint at once, through the same signing and sending as any delivery, and answers with the first attempt. A disabled endpoint answers `conflict`.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Endpoints"],
        "externalDocs": {
          "description": "Test an endpoint, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/endpoints#test-an-endpoint"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "An endpoint ID, `end_…`. The `id` of a [`EndpointRecord`](https://agentpost.tools/docs/eventwolf/reference/endpoints#the-endpointrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "eventSequence": {
                      "type": "number"
                    },
                    "delivery": {
                      "$ref": "#/components/schemas/DeliveryRecord"
                    },
                    "attempts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AttemptRecord"
                      }
                    }
                  },
                  "required": ["eventSequence", "delivery", "attempts"]
                },
                "example": {
                  "eventSequence": 61,
                  "delivery": {
                    "id": "dlv_01M783P2S4EE4Q7Z1E2B91REK3",
                    "kind": "webhook",
                    "eventSequence": 61,
                    "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                    "status": "succeeded",
                    "attempts": 1,
                    "createdAt": "2026-11-13T09:30:00.000Z",
                    "finishedAt": "2026-11-13T09:30:00.000Z"
                  },
                  "attempts": [
                    {
                      "id": "att_01M77HY0JXP4X3GSYPZN9W6FGZ",
                      "deliveryId": "dlv_01M783P2S4EE4Q7Z1E2B91REK3",
                      "n": 1,
                      "trigger": "manual",
                      "startedAt": "2026-11-13T09:30:00.000Z",
                      "duration": "131ms",
                      "request": {
                        "target": "https://support.example.com/webhooks/eventwolf",
                        "headers": {
                          "content-type": "application/cloudevents+json",
                          "user-agent": "eventwolf/1 (+https://agentpost.tools/docs/eventwolf)",
                          "webhook-id": "dlv_01M783P2S4EE4Q7Z1E2B91REK3",
                          "webhook-timestamp": "1794562200",
                          "x-eventwolf-attempt": "1",
                          "x-eventwolf-trigger": "manual"
                        }
                      },
                      "response": {
                        "status": 200,
                        "headers": {}
                      },
                      "outcome": "succeeded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["conflict"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/endpoints/{id}/recover": {
      "post": {
        "operationId": "endpoints.recover",
        "summary": "Recover failed deliveries",
        "description": "Queues failed deliveries and deliveries skipped because the endpoint was disabled, when they were created at or after `since`. Enable the endpoint first.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Endpoints"],
        "externalDocs": {
          "description": "Recover failed deliveries, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/endpoints#recover-failed-deliveries"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "An endpoint ID, `end_…`. The `id` of a [`EndpointRecord`](https://agentpost.tools/docs/eventwolf/reference/endpoints#the-endpointrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "since": {
                    "type": "string",
                    "format": "date-time"
                  }
                },
                "required": ["since"],
                "additionalProperties": false
              },
              "example": {
                "since": "2026-11-12T00:00:00.000Z"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecoverResponse"
                },
                "example": {
                  "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                  "recovered": 3
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["conflict"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions": {
      "post": {
        "operationId": "subscriptions.create",
        "summary": "Create a subscription",
        "description": "Creates a subscription. Events accepted from now on that match its filter are matched to it as they are accepted.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Subscriptions"],
        "externalDocs": {
          "description": "Create a subscription, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/subscriptions#create-a-subscription"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "filter": {
                    "type": "object",
                    "properties": {
                      "types": {
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^(?:\\*|[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*(?:\\.\\*)?)$"
                        }
                      },
                      "sources": {
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2048,
                          "pattern": "^[^*\\s]*\\*?$"
                        }
                      },
                      "extensions": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[a-z0-9]{1,20}$"
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": ["string", "number", "boolean"]
                            },
                            {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": ["string", "number", "boolean"]
                              }
                            }
                          ]
                        }
                      },
                      "workspace": {
                        "description": "The workspace it belongs to, when the app groups its principals into workspaces.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "subject": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "refs": {
                        "minItems": 1,
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "required": ["type"]
                        }
                      },
                      "where": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": ["string", "number", "boolean"]
                            },
                            {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": ["string", "number", "boolean"]
                              }
                            }
                          ]
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "target": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "webhook"
                          },
                          "endpointId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": ["kind", "endpointId"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "notification"
                          },
                          "topic": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$"
                          },
                          "recipients": {
                            "type": "object",
                            "properties": {
                              "ids": {
                                "minItems": 1,
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200,
                                  "pattern": "^[\\x21-\\x7e]+$"
                                }
                              },
                              "fromPaths": {
                                "minItems": 1,
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                                }
                              },
                              "followers": {
                                "type": "boolean"
                              }
                            },
                            "additionalProperties": false
                          },
                          "template": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              "body": {
                                "type": "string",
                                "maxLength": 4000
                              },
                              "url": {
                                "type": "string",
                                "maxLength": 2048
                              },
                              "push": {
                                "type": "object",
                                "properties": {
                                  "title": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "body": {
                                    "type": "string",
                                    "maxLength": 1000
                                  },
                                  "sound": {
                                    "description": "The sound a push plays: left out, the device’s default sound; `null`, a silent push; or the name of a sound your app bundles.",
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": ["title"],
                            "additionalProperties": false
                          }
                        },
                        "required": ["kind", "topic", "recipients", "template"],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "required": ["name", "filter", "target"],
                "additionalProperties": false
              },
              "example": {
                "name": "Resolved requests to the support desk",
                "filter": {
                  "types": ["request.resolved"]
                },
                "target": {
                  "kind": "webhook",
                  "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscription": {
                      "$ref": "#/components/schemas/SubscriptionRecord"
                    }
                  },
                  "required": ["subscription"]
                },
                "example": {
                  "subscription": {
                    "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                    "name": "Resolved requests to the support desk",
                    "status": "active",
                    "version": 1,
                    "filter": {
                      "types": ["request.resolved"]
                    },
                    "target": {
                      "kind": "webhook",
                      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                    },
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "createdBy": "key:backend",
                    "updatedAt": "2026-11-02T14:05:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "subscriptions.list",
        "summary": "List subscriptions",
        "description": "Subscriptions, newest first. Deleted ones are listed only when `status=deleted` asks for them.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](https://agentpost.tools/docs/platform/api-basics#lists) has the rule.",
        "tags": ["Subscriptions"],
        "externalDocs": {
          "description": "List subscriptions, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/subscriptions#list-subscriptions"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["active", "paused", "deleted"]
            }
          },
          {
            "name": "endpointId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "example": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200; default `50`.",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscriptions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubscriptionRecord"
                      }
                    },
                    "next": {
                      "type": "string"
                    }
                  },
                  "required": ["subscriptions"]
                },
                "example": {
                  "subscriptions": [
                    {
                      "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                      "name": "Resolved requests to the support desk",
                      "status": "active",
                      "version": 1,
                      "filter": {
                        "types": ["request.resolved"]
                      },
                      "target": {
                        "kind": "webhook",
                        "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                      },
                      "createdAt": "2026-11-02T14:05:00.000Z",
                      "createdBy": "key:backend",
                      "updatedAt": "2026-11-02T14:05:00.000Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/test": {
      "post": {
        "operationId": "subscriptions.test",
        "summary": "Test a subscription",
        "description": "Whether a filter, or a subscription’s current filter, matches an event, given inline or by its sequence, with each clause’s outcome. Nothing is written.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** not taken. This route writes nothing, so it takes no `Idempotency-Key`.",
        "tags": ["Subscriptions"],
        "externalDocs": {
          "description": "Test a subscription, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/subscriptions#test-a-subscription"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filter": {
                    "type": "object",
                    "properties": {
                      "types": {
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^(?:\\*|[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*(?:\\.\\*)?)$"
                        }
                      },
                      "sources": {
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2048,
                          "pattern": "^[^*\\s]*\\*?$"
                        }
                      },
                      "extensions": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[a-z0-9]{1,20}$"
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": ["string", "number", "boolean"]
                            },
                            {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": ["string", "number", "boolean"]
                              }
                            }
                          ]
                        }
                      },
                      "workspace": {
                        "description": "The workspace it belongs to, when the app groups its principals into workspaces.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "subject": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "refs": {
                        "minItems": 1,
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "required": ["type"]
                        }
                      },
                      "where": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": ["string", "number", "boolean"]
                            },
                            {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": ["string", "number", "boolean"]
                              }
                            }
                          ]
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "subscriptionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "event": {},
                  "sequence": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                "sequence": 57
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionTestResponse"
                },
                "example": {
                  "matched": true,
                  "steps": [
                    {
                      "clause": "status",
                      "outcome": "matched",
                      "detail": "the subscription is active"
                    },
                    {
                      "clause": "types",
                      "outcome": "matched",
                      "detail": "request.resolved matches request.resolved"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}": {
      "get": {
        "operationId": "subscriptions.get",
        "summary": "Get a subscription",
        "description": "One subscription, as its current version.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Subscriptions"],
        "externalDocs": {
          "description": "Get a subscription, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/subscriptions#get-a-subscription"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](https://agentpost.tools/docs/eventwolf/reference/subscriptions#the-subscriptionrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscription": {
                      "$ref": "#/components/schemas/SubscriptionRecord"
                    }
                  },
                  "required": ["subscription"]
                },
                "example": {
                  "subscription": {
                    "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                    "name": "Resolved requests to the support desk",
                    "status": "active",
                    "version": 1,
                    "filter": {
                      "types": ["request.resolved"]
                    },
                    "target": {
                      "kind": "webhook",
                      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                    },
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "createdBy": "key:backend",
                    "updatedAt": "2026-11-02T14:05:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "subscriptions.update",
        "summary": "Update a subscription",
        "description": "Changes a subscription. A new filter or target makes a new version, used for events accepted from then on; a new name or description doesn’t.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Subscriptions"],
        "externalDocs": {
          "description": "Update a subscription, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/subscriptions#update-a-subscription"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](https://agentpost.tools/docs/eventwolf/reference/subscriptions#the-subscriptionrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 2000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "filter": {
                    "type": "object",
                    "properties": {
                      "types": {
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^(?:\\*|[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*(?:\\.\\*)?)$"
                        }
                      },
                      "sources": {
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2048,
                          "pattern": "^[^*\\s]*\\*?$"
                        }
                      },
                      "extensions": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[a-z0-9]{1,20}$"
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": ["string", "number", "boolean"]
                            },
                            {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": ["string", "number", "boolean"]
                              }
                            }
                          ]
                        }
                      },
                      "workspace": {
                        "description": "The workspace it belongs to, when the app groups its principals into workspaces.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "subject": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "refs": {
                        "minItems": 1,
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "required": ["type"]
                        }
                      },
                      "where": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": ["string", "number", "boolean"]
                            },
                            {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": ["string", "number", "boolean"]
                              }
                            }
                          ]
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "target": {
                    "oneOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "webhook"
                          },
                          "endpointId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": ["kind", "endpointId"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "notification"
                          },
                          "topic": {
                            "type": "string",
                            "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$"
                          },
                          "recipients": {
                            "type": "object",
                            "properties": {
                              "ids": {
                                "minItems": 1,
                                "maxItems": 100,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 200,
                                  "pattern": "^[\\x21-\\x7e]+$"
                                }
                              },
                              "fromPaths": {
                                "minItems": 1,
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                                }
                              },
                              "followers": {
                                "type": "boolean"
                              }
                            },
                            "additionalProperties": false
                          },
                          "template": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 500
                              },
                              "body": {
                                "type": "string",
                                "maxLength": 4000
                              },
                              "url": {
                                "type": "string",
                                "maxLength": 2048
                              },
                              "push": {
                                "type": "object",
                                "properties": {
                                  "title": {
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "body": {
                                    "type": "string",
                                    "maxLength": 1000
                                  },
                                  "sound": {
                                    "description": "The sound a push plays: left out, the device’s default sound; `null`, a silent push; or the name of a sound your app bundles.",
                                    "anyOf": [
                                      {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 200
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              }
                            },
                            "required": ["title"],
                            "additionalProperties": false
                          }
                        },
                        "required": ["kind", "topic", "recipients", "template"],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "filter": {
                  "types": ["request.resolved", "request.reopened"]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscription": {
                      "$ref": "#/components/schemas/SubscriptionRecord"
                    }
                  },
                  "required": ["subscription"]
                },
                "example": {
                  "subscription": {
                    "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                    "name": "Resolved requests to the support desk",
                    "status": "active",
                    "version": 2,
                    "filter": {
                      "types": ["request.resolved", "request.reopened"]
                    },
                    "target": {
                      "kind": "webhook",
                      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                    },
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "createdBy": "key:backend",
                    "updatedAt": "2026-11-13T09:30:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["conflict"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "subscriptions.delete",
        "summary": "Delete a subscription",
        "description": "Deletes a subscription: it matches nothing more, and its matches and deliveries are kept.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Subscriptions"],
        "externalDocs": {
          "description": "Delete a subscription, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/subscriptions#delete-a-subscription"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](https://agentpost.tools/docs/eventwolf/reference/subscriptions#the-subscriptionrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}/versions": {
      "get": {
        "operationId": "subscriptions.versions",
        "summary": "List subscription versions",
        "description": "Every version of a subscription’s filter and target, oldest first, with when each was in force.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Subscriptions"],
        "externalDocs": {
          "description": "List subscription versions, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/subscriptions#list-subscription-versions"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](https://agentpost.tools/docs/eventwolf/reference/subscriptions#the-subscriptionrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "versions": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubscriptionVersionRecord"
                      }
                    }
                  },
                  "required": ["versions"]
                },
                "example": {
                  "versions": [
                    {
                      "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                      "version": 1,
                      "filter": {
                        "types": ["request.resolved"]
                      },
                      "target": {
                        "kind": "webhook",
                        "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                      },
                      "effectiveFrom": "2026-11-02T14:05:00.000Z"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}/matches": {
      "get": {
        "operationId": "subscriptions.matches",
        "summary": "List subscription matches",
        "description": "The events a subscription matched, newest first, with the version each used.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](https://agentpost.tools/docs/platform/api-basics#lists) has the rule.",
        "tags": ["Subscriptions"],
        "externalDocs": {
          "description": "List subscription matches, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/subscriptions#list-subscription-matches"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](https://agentpost.tools/docs/eventwolf/reference/subscriptions#the-subscriptionrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7"
          },
          {
            "name": "eventSequence",
            "in": "query",
            "required": false,
            "description": "At least 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "An ISO 8601 date and time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-11-12T00:00:00.000Z"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200; default `50`.",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "matches": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MatchRecord"
                      }
                    },
                    "next": {
                      "type": "string"
                    }
                  },
                  "required": ["matches"]
                },
                "example": {
                  "matches": [
                    {
                      "id": "mat_01M77MA4BADJB617FSKAKFB062",
                      "eventSequence": 57,
                      "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                      "subscriptionVersion": 1,
                      "cause": "ingest",
                      "decidedAt": "2026-11-12T16:20:31.000Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}/pause": {
      "post": {
        "operationId": "subscriptions.pause",
        "summary": "Pause a subscription",
        "description": "Pauses matching for new events. Resuming the subscription applies to future events. For a webhook subscription, [replay the paused window](https://agentpost.tools/docs/eventwolf/guides/replays) to send the missed events.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Subscriptions"],
        "externalDocs": {
          "description": "Pause a subscription, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/subscriptions#pause-a-subscription"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](https://agentpost.tools/docs/eventwolf/reference/subscriptions#the-subscriptionrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscription": {
                      "$ref": "#/components/schemas/SubscriptionRecord"
                    }
                  },
                  "required": ["subscription"]
                },
                "example": {
                  "subscription": {
                    "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                    "name": "Resolved requests to the support desk",
                    "status": "paused",
                    "version": 1,
                    "filter": {
                      "types": ["request.resolved"]
                    },
                    "target": {
                      "kind": "webhook",
                      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                    },
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "createdBy": "key:backend",
                    "updatedAt": "2026-11-13T09:30:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["conflict"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/{id}/resume": {
      "post": {
        "operationId": "subscriptions.resume",
        "summary": "Resume a subscription",
        "description": "Resumes a paused subscription for events accepted from now on. For a webhook subscription, [replay the paused window](https://agentpost.tools/docs/eventwolf/guides/replays) to send the missed events.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Subscriptions"],
        "externalDocs": {
          "description": "Resume a subscription, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/subscriptions#resume-a-subscription"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A subscription ID, `sub_…`. The `id` of a [`SubscriptionRecord`](https://agentpost.tools/docs/eventwolf/reference/subscriptions#the-subscriptionrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subscription": {
                      "$ref": "#/components/schemas/SubscriptionRecord"
                    }
                  },
                  "required": ["subscription"]
                },
                "example": {
                  "subscription": {
                    "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                    "name": "Resolved requests to the support desk",
                    "status": "active",
                    "version": 1,
                    "filter": {
                      "types": ["request.resolved"]
                    },
                    "target": {
                      "kind": "webhook",
                      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                    },
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "createdBy": "key:backend",
                    "updatedAt": "2026-11-13T09:30:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["conflict"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/deliveries": {
      "get": {
        "operationId": "deliveries.list",
        "summary": "List deliveries",
        "description": "Deliveries, newest first. Use `status=failed` to list deliveries in the [failed status](https://agentpost.tools/docs/eventwolf/concepts/deliveries#statuses), including those that exhausted retries or got a `410`.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](https://agentpost.tools/docs/platform/api-basics#lists) has the rule.",
        "tags": ["Deliveries"],
        "externalDocs": {
          "description": "List deliveries, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/deliveries#list-deliveries"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["pending", "succeeded", "failed", "skipped", "canceled"]
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "`webhook` or `push`. Without it, both.",
            "schema": {
              "type": "string",
              "enum": ["webhook", "push"]
            }
          },
          {
            "name": "endpointId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "example": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
          },
          {
            "name": "pushAddressId",
            "in": "query",
            "required": false,
            "description": "Only the pushes to this push address.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "subscriptionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "eventSequence",
            "in": "query",
            "required": false,
            "description": "Only deliveries for this event's sequence; at least 1.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "An ISO 8601 date and time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200; default `50`.",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deliveries": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DeliveryRecord"
                      }
                    },
                    "next": {
                      "type": "string"
                    }
                  },
                  "required": ["deliveries"]
                },
                "example": {
                  "deliveries": [
                    {
                      "id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                      "kind": "webhook",
                      "eventSequence": 57,
                      "matchId": "mat_01M77MA4BADJB617FSKAKFB062",
                      "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                      "status": "succeeded",
                      "attempts": 2,
                      "createdAt": "2026-11-12T16:20:31.000Z",
                      "finishedAt": "2026-11-12T16:20:37.000Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/deliveries/{id}": {
      "get": {
        "operationId": "deliveries.get",
        "summary": "Get a delivery",
        "description": "One delivery and every attempt, oldest first: why each failed is in its `response.status` and `response.bodyExcerpt`, or its `error`.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Deliveries"],
        "externalDocs": {
          "description": "Get a delivery, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/deliveries#get-a-delivery"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A delivery ID, `dlv_…`. The `id` of a [`DeliveryRecord`](https://agentpost.tools/docs/eventwolf/reference/deliveries#the-deliveryrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "dlv_01M784Y1DPQHMAWEB637FMPYWZ"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "delivery": {
                      "$ref": "#/components/schemas/DeliveryRecord"
                    },
                    "attempts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AttemptRecord"
                      }
                    }
                  },
                  "required": ["delivery", "attempts"]
                },
                "example": {
                  "delivery": {
                    "id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                    "kind": "webhook",
                    "eventSequence": 57,
                    "matchId": "mat_01M77MA4BADJB617FSKAKFB062",
                    "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                    "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                    "status": "succeeded",
                    "attempts": 2,
                    "createdAt": "2026-11-12T16:20:31.000Z",
                    "finishedAt": "2026-11-12T16:20:37.000Z"
                  },
                  "attempts": [
                    {
                      "id": "att_01M79H5NGPEGZF2FB3WE90H645",
                      "deliveryId": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                      "n": 1,
                      "trigger": "automatic",
                      "startedAt": "2026-11-12T16:20:31.000Z",
                      "duration": "212ms",
                      "request": {
                        "target": "https://support.example.com/webhooks/eventwolf",
                        "headers": {
                          "content-type": "application/cloudevents+json",
                          "user-agent": "eventwolf/1 (+https://agentpost.tools/docs/eventwolf)",
                          "webhook-id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                          "webhook-timestamp": "1794500431",
                          "x-eventwolf-subscription": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                          "x-eventwolf-attempt": "1",
                          "x-eventwolf-trigger": "automatic"
                        }
                      },
                      "response": {
                        "status": 503,
                        "headers": {
                          "content-type": "text/plain"
                        },
                        "bodyExcerpt": "upstream unavailable"
                      },
                      "outcome": "failed"
                    },
                    {
                      "id": "att_01M78DATBYZV18RDVFT6Z5EKWR",
                      "deliveryId": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                      "n": 2,
                      "trigger": "automatic",
                      "startedAt": "2026-11-12T16:20:36.000Z",
                      "duration": "148ms",
                      "request": {
                        "target": "https://support.example.com/webhooks/eventwolf",
                        "headers": {
                          "content-type": "application/cloudevents+json",
                          "user-agent": "eventwolf/1 (+https://agentpost.tools/docs/eventwolf)",
                          "webhook-id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                          "webhook-timestamp": "1794500431",
                          "x-eventwolf-subscription": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                          "x-eventwolf-attempt": "2",
                          "x-eventwolf-trigger": "automatic"
                        }
                      },
                      "response": {
                        "status": 200,
                        "headers": {
                          "content-type": "application/json"
                        }
                      },
                      "outcome": "succeeded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/deliveries/{id}/retry": {
      "post": {
        "operationId": "deliveries.retry",
        "summary": "Retry a delivery",
        "description": "Puts a delivery back in the queue to be sent now, with the same `webhook-id`, so a receiver that saw it before knows it. A failed, skipped, or canceled delivery gets another attempt, and a pending one is attempted at once instead of at its scheduled time. One that succeeded answers `conflict`: replay its event to send it again.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Deliveries"],
        "externalDocs": {
          "description": "Retry a delivery, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/deliveries#retry-a-delivery"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A delivery ID, `dlv_…`. The `id` of a [`DeliveryRecord`](https://agentpost.tools/docs/eventwolf/reference/deliveries#the-deliveryrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "dlv_01M784Y1DPQHMAWEB637FMPYWZ"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "delivery": {
                      "$ref": "#/components/schemas/DeliveryRecord"
                    },
                    "attempts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AttemptRecord"
                      }
                    }
                  },
                  "required": ["delivery", "attempts"]
                },
                "example": {
                  "delivery": {
                    "id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                    "kind": "webhook",
                    "eventSequence": 57,
                    "matchId": "mat_01M77MA4BADJB617FSKAKFB062",
                    "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                    "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                    "status": "pending",
                    "attempts": 2,
                    "createdAt": "2026-11-12T16:20:31.000Z",
                    "nextAttemptAt": "2026-11-13T09:30:00.000Z"
                  },
                  "attempts": [
                    {
                      "id": "att_01M79H5NGPEGZF2FB3WE90H645",
                      "deliveryId": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                      "n": 1,
                      "trigger": "automatic",
                      "startedAt": "2026-11-12T16:20:31.000Z",
                      "duration": "212ms",
                      "request": {
                        "target": "https://support.example.com/webhooks/eventwolf",
                        "headers": {
                          "content-type": "application/cloudevents+json",
                          "user-agent": "eventwolf/1 (+https://agentpost.tools/docs/eventwolf)",
                          "webhook-id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                          "webhook-timestamp": "1794500431",
                          "x-eventwolf-subscription": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                          "x-eventwolf-attempt": "1",
                          "x-eventwolf-trigger": "automatic"
                        }
                      },
                      "response": {
                        "status": 503,
                        "headers": {
                          "content-type": "text/plain"
                        },
                        "bodyExcerpt": "upstream unavailable"
                      },
                      "outcome": "failed"
                    },
                    {
                      "id": "att_01M78DATBYZV18RDVFT6Z5EKWR",
                      "deliveryId": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                      "n": 2,
                      "trigger": "automatic",
                      "startedAt": "2026-11-12T16:20:36.000Z",
                      "duration": "148ms",
                      "request": {
                        "target": "https://support.example.com/webhooks/eventwolf",
                        "headers": {
                          "content-type": "application/cloudevents+json",
                          "user-agent": "eventwolf/1 (+https://agentpost.tools/docs/eventwolf)",
                          "webhook-id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                          "webhook-timestamp": "1794500431",
                          "x-eventwolf-subscription": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                          "x-eventwolf-attempt": "2",
                          "x-eventwolf-trigger": "automatic"
                        }
                      },
                      "response": {
                        "status": 200,
                        "headers": {
                          "content-type": "application/json"
                        }
                      },
                      "outcome": "succeeded"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["conflict"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/deliveries/{id}/cancel": {
      "post": {
        "operationId": "deliveries.cancel",
        "summary": "Cancel a delivery",
        "description": "Stops a pending delivery before its next attempt; nothing already sent is taken back. One that isn’t pending answers `conflict`.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Deliveries"],
        "externalDocs": {
          "description": "Cancel a delivery, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/deliveries#cancel-a-delivery"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A delivery ID, `dlv_…`. The `id` of a [`DeliveryRecord`](https://agentpost.tools/docs/eventwolf/reference/deliveries#the-deliveryrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "dlv_01M784Y1DPQHMAWEB637FMPYWZ"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "delivery": {
                      "$ref": "#/components/schemas/DeliveryRecord"
                    },
                    "attempts": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AttemptRecord"
                      }
                    }
                  },
                  "required": ["delivery", "attempts"]
                },
                "example": {
                  "delivery": {
                    "id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                    "kind": "webhook",
                    "eventSequence": 57,
                    "matchId": "mat_01M77MA4BADJB617FSKAKFB062",
                    "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                    "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                    "status": "canceled",
                    "attempts": 1,
                    "createdAt": "2026-11-12T16:20:31.000Z",
                    "finishedAt": "2026-11-13T09:30:00.000Z"
                  },
                  "attempts": [
                    {
                      "id": "att_01M79H5NGPEGZF2FB3WE90H645",
                      "deliveryId": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                      "n": 1,
                      "trigger": "automatic",
                      "startedAt": "2026-11-12T16:20:31.000Z",
                      "duration": "212ms",
                      "request": {
                        "target": "https://support.example.com/webhooks/eventwolf",
                        "headers": {
                          "content-type": "application/cloudevents+json",
                          "user-agent": "eventwolf/1 (+https://agentpost.tools/docs/eventwolf)",
                          "webhook-id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                          "webhook-timestamp": "1794500431",
                          "x-eventwolf-subscription": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                          "x-eventwolf-attempt": "1",
                          "x-eventwolf-trigger": "automatic"
                        }
                      },
                      "response": {
                        "status": 503,
                        "headers": {
                          "content-type": "text/plain"
                        },
                        "bodyExcerpt": "upstream unavailable"
                      },
                      "outcome": "failed"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["conflict"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/replays": {
      "post": {
        "operationId": "replays.create",
        "summary": "Replay events",
        "description": "Starts a replay, which answers `202` and runs in the background. With `dryRun: true` it answers `200` with `preview`, what it would send, and writes nothing: run that first, and start the replay once the counts are what you meant. A disabled endpoint, a deleted subscription with `definitions: \"current\"`, and a subscription with a notification target answer `conflict`.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Replays"],
        "externalDocs": {
          "description": "Replay events, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/replays#replay-events"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filter": {
                    "default": {},
                    "type": "object",
                    "properties": {
                      "types": {
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^(?:\\*|[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*(?:\\.\\*)?)$"
                        }
                      },
                      "sources": {
                        "minItems": 1,
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2048,
                          "pattern": "^[^*\\s]*\\*?$"
                        }
                      },
                      "extensions": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[a-z0-9]{1,20}$"
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": ["string", "number", "boolean"]
                            },
                            {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": ["string", "number", "boolean"]
                              }
                            }
                          ]
                        }
                      },
                      "workspace": {
                        "description": "The workspace it belongs to, when the app groups its principals into workspaces.",
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "subject": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "refs": {
                        "minItems": 1,
                        "maxItems": 20,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 500
                            }
                          },
                          "required": ["type"]
                        }
                      },
                      "where": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "type": ["string", "number", "boolean"]
                            },
                            {
                              "minItems": 1,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": ["string", "number", "boolean"]
                              }
                            }
                          ]
                        }
                      }
                    },
                    "additionalProperties": false
                  },
                  "from": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "to": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "target": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "subscriptionId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": ["subscriptionId"],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "endpointId": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "required": ["endpointId"],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "definitions": {
                    "type": "string",
                    "enum": ["current", "historical"]
                  },
                  "dryRun": {
                    "default": false,
                    "type": "boolean"
                  }
                },
                "required": ["from", "to", "target", "definitions"],
                "additionalProperties": false
              },
              "example": {
                "filter": {
                  "types": ["request.resolved"]
                },
                "from": "2026-11-11T00:00:00.000Z",
                "to": "2026-11-12T00:00:00.000Z",
                "target": {
                  "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                },
                "definitions": "current",
                "dryRun": true
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "replay": {
                          "$ref": "#/components/schemas/ReplayRecord"
                        }
                      },
                      "required": ["replay"]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "preview": {
                          "$ref": "#/components/schemas/ReplayPreview"
                        }
                      },
                      "required": ["preview"]
                    }
                  ]
                },
                "example": {
                  "preview": {
                    "dryRun": true,
                    "target": {
                      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                    },
                    "definitions": "current",
                    "counts": {
                      "scanned": 18,
                      "matched": 18,
                      "deliveries": 18
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["conflict"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "replays.list",
        "summary": "List replays",
        "description": "Replays, newest first.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](https://agentpost.tools/docs/platform/api-basics#lists) has the rule.",
        "tags": ["Replays"],
        "externalDocs": {
          "description": "List replays, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/replays#list-replays"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["running", "completed", "canceled", "failed"]
            }
          },
          {
            "name": "subscriptionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "endpointId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "example": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200; default `50`.",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "replays": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReplayRecord"
                      }
                    },
                    "next": {
                      "type": "string"
                    }
                  },
                  "required": ["replays"]
                },
                "example": {
                  "replays": [
                    {
                      "id": "rpl_01M78R4G3T1T880VR82SDPXJHK",
                      "filter": {
                        "types": ["request.resolved"]
                      },
                      "from": "2026-11-11T00:00:00.000Z",
                      "to": "2026-11-12T00:00:00.000Z",
                      "target": {
                        "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                      },
                      "definitions": "current",
                      "status": "completed",
                      "counts": {
                        "scanned": 18,
                        "matched": 18,
                        "deliveries": 18
                      },
                      "cursor": 39,
                      "requestedBy": "key:backend",
                      "createdAt": "2026-11-13T09:30:00.000Z",
                      "completedAt": "2026-11-13T09:30:02.000Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/replays/{id}": {
      "get": {
        "operationId": "replays.get",
        "summary": "Get a replay",
        "description": "One replay, with its counts so far.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Replays"],
        "externalDocs": {
          "description": "Get a replay, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/replays#get-a-replay"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A replay ID, `rpl_…`. The `id` of a [`ReplayRecord`](https://agentpost.tools/docs/eventwolf/reference/replays#the-replayrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "rpl_01M78R4G3T1T880VR82SDPXJHK"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "replay": {
                      "$ref": "#/components/schemas/ReplayRecord"
                    }
                  },
                  "required": ["replay"]
                },
                "example": {
                  "replay": {
                    "id": "rpl_01M78R4G3T1T880VR82SDPXJHK",
                    "filter": {
                      "types": ["request.resolved"]
                    },
                    "from": "2026-11-11T00:00:00.000Z",
                    "to": "2026-11-12T00:00:00.000Z",
                    "target": {
                      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                    },
                    "definitions": "current",
                    "status": "completed",
                    "counts": {
                      "scanned": 18,
                      "matched": 18,
                      "deliveries": 18
                    },
                    "cursor": 39,
                    "requestedBy": "key:backend",
                    "createdAt": "2026-11-13T09:30:00.000Z",
                    "completedAt": "2026-11-13T09:30:02.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/replays/{id}/cancel": {
      "post": {
        "operationId": "replays.cancel",
        "summary": "Cancel a replay",
        "description": "Stops a running replay. What it already queued is still delivered.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Replays"],
        "externalDocs": {
          "description": "Cancel a replay, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/replays#cancel-a-replay"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A replay ID, `rpl_…`. The `id` of a [`ReplayRecord`](https://agentpost.tools/docs/eventwolf/reference/replays#the-replayrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "rpl_01M78R4G3T1T880VR82SDPXJHK"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "replay": {
                      "$ref": "#/components/schemas/ReplayRecord"
                    }
                  },
                  "required": ["replay"]
                },
                "example": {
                  "replay": {
                    "id": "rpl_01M78R4G3T1T880VR82SDPXJHK",
                    "filter": {
                      "types": ["request.resolved"]
                    },
                    "from": "2026-11-11T00:00:00.000Z",
                    "to": "2026-11-12T00:00:00.000Z",
                    "target": {
                      "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
                    },
                    "definitions": "current",
                    "status": "canceled",
                    "counts": {
                      "scanned": 9,
                      "matched": 9,
                      "deliveries": 9
                    },
                    "cursor": 31,
                    "requestedBy": "key:backend",
                    "createdAt": "2026-11-13T09:30:00.000Z",
                    "completedAt": "2026-11-13T09:30:02.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["conflict"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/topics/{key}": {
      "put": {
        "operationId": "topics.put",
        "summary": "Create or update a topic",
        "description": "Creates a topic, or replaces what it says.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Topics"],
        "externalDocs": {
          "description": "Create or update a topic, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/topics#create-or-update-a-topic"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "description": "A topic key, such as `assignments`. The `key` of a [`TopicRecord`](https://agentpost.tools/docs/eventwolf/reference/topics#the-topicrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "assignments"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "defaults": {
                    "type": "object",
                    "properties": {
                      "inbox": {
                        "type": "boolean"
                      },
                      "push": {
                        "type": "boolean"
                      }
                    },
                    "required": ["inbox", "push"],
                    "additionalProperties": false
                  },
                  "required": {
                    "type": "boolean"
                  }
                },
                "required": ["defaults", "required"],
                "additionalProperties": false
              },
              "example": {
                "name": "Assignments",
                "description": "When a request is assigned to you",
                "defaults": {
                  "inbox": true,
                  "push": false
                },
                "required": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "topic": {
                      "$ref": "#/components/schemas/TopicRecord"
                    }
                  },
                  "required": ["topic"]
                },
                "example": {
                  "topic": {
                    "key": "assignments",
                    "name": "Assignments",
                    "description": "When a request is assigned to you",
                    "defaults": {
                      "inbox": true,
                      "push": false
                    },
                    "required": false,
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "updatedAt": "2026-11-02T14:05:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "topics.get",
        "summary": "Get a topic",
        "description": "One topic.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Topics"],
        "externalDocs": {
          "description": "Get a topic, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/topics#get-a-topic"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "description": "A topic key, such as `assignments`. The `key` of a [`TopicRecord`](https://agentpost.tools/docs/eventwolf/reference/topics#the-topicrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "assignments"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "topic": {
                      "$ref": "#/components/schemas/TopicRecord"
                    }
                  },
                  "required": ["topic"]
                },
                "example": {
                  "topic": {
                    "key": "assignments",
                    "name": "Assignments",
                    "description": "When a request is assigned to you",
                    "defaults": {
                      "inbox": true,
                      "push": false
                    },
                    "required": false,
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "updatedAt": "2026-11-02T14:05:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "topics.delete",
        "summary": "Delete a topic",
        "description": "Deletes a topic. A subscription that still notifies on it answers `conflict`: change it first.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Topics"],
        "externalDocs": {
          "description": "Delete a topic, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/topics#delete-a-topic"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "description": "A topic key, such as `assignments`. The `key` of a [`TopicRecord`](https://agentpost.tools/docs/eventwolf/reference/topics#the-topicrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "assignments"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "Conflict, with `error.code` [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["conflict"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/topics": {
      "get": {
        "operationId": "topics.list",
        "summary": "List topics",
        "description": "Topics, by key.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](https://agentpost.tools/docs/platform/api-basics#lists) has the rule.",
        "tags": ["Topics"],
        "externalDocs": {
          "description": "List topics, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/topics#list-topics"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200; default `50`.",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "topics": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TopicRecord"
                      }
                    },
                    "next": {
                      "type": "string"
                    }
                  },
                  "required": ["topics"]
                },
                "example": {
                  "topics": [
                    {
                      "key": "assignments",
                      "name": "Assignments",
                      "description": "When a request is assigned to you",
                      "defaults": {
                        "inbox": true,
                        "push": false
                      },
                      "required": false,
                      "createdAt": "2026-11-02T14:05:00.000Z",
                      "updatedAt": "2026-11-02T14:05:00.000Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/recipients/{id}": {
      "get": {
        "operationId": "recipients.get",
        "summary": "Get a recipient",
        "description": "One recipient, with their follows and preferences. A recipient exists once something is stored for them: follows, preferences, or a seen position.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Recipients"],
        "externalDocs": {
          "description": "Get a recipient, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/recipients#get-a-recipient"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A recipient ID: your own ID for the principal, such as `u_ana`, up to 200 printable characters without spaces. The `id` of a [`RecipientRecord`](https://agentpost.tools/docs/eventwolf/reference/recipients#the-recipientrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "u_ana"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recipient": {
                      "$ref": "#/components/schemas/RecipientRecord"
                    }
                  },
                  "required": ["recipient"]
                },
                "example": {
                  "recipient": {
                    "id": "u_ana",
                    "follows": ["assignments"],
                    "preferences": {
                      "assignments": {
                        "push": true
                      }
                    },
                    "seenThrough": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW",
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "updatedAt": "2026-11-13T09:30:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "recipients.delete",
        "summary": "Delete a recipient",
        "description": "Deletes a recipient with their follows, preferences, notifications, and push addresses, as when a principal leaves your product.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Recipients"],
        "externalDocs": {
          "description": "Delete a recipient, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/recipients#delete-a-recipient"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A recipient ID: your own ID for the principal, such as `u_ana`, up to 200 printable characters without spaces. The `id` of a [`RecipientRecord`](https://agentpost.tools/docs/eventwolf/reference/recipients#the-recipientrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "u_ana"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/recipients/{id}/follows": {
      "put": {
        "operationId": "recipients.follows",
        "summary": "Set the topics a recipient follows",
        "description": "Replaces the topics a recipient follows, which a subscription with `followers: true` notifies.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Recipients"],
        "externalDocs": {
          "description": "Set the topics a recipient follows, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/recipients#set-the-topics-a-recipient-follows"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A recipient ID: your own ID for the principal, such as `u_ana`, up to 200 printable characters without spaces. The `id` of a [`RecipientRecord`](https://agentpost.tools/docs/eventwolf/reference/recipients#the-recipientrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "u_ana"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "topics": {
                    "maxItems": 200,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$"
                    }
                  }
                },
                "required": ["topics"],
                "additionalProperties": false
              },
              "example": {
                "topics": ["assignments"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recipient": {
                      "$ref": "#/components/schemas/RecipientRecord"
                    }
                  },
                  "required": ["recipient"]
                },
                "example": {
                  "recipient": {
                    "id": "u_ana",
                    "follows": ["assignments"],
                    "preferences": {
                      "assignments": {
                        "push": true
                      }
                    },
                    "seenThrough": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW",
                    "createdAt": "2026-11-02T14:05:00.000Z",
                    "updatedAt": "2026-11-13T09:30:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/recipients/{id}/preferences": {
      "get": {
        "operationId": "recipients.preferences",
        "summary": "Get recipient preferences",
        "description": "Every topic as the recipient’s preferences show it: whether it reaches each channel now, and what they set.\n\n- **Who may call:** Your server, with your project’s secret key.",
        "tags": ["Recipients"],
        "externalDocs": {
          "description": "Get recipient preferences, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/recipients#get-recipient-preferences"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A recipient ID: your own ID for the principal, such as `u_ana`, up to 200 printable characters without spaces. The `id` of a [`RecipientRecord`](https://agentpost.tools/docs/eventwolf/reference/recipients#the-recipientrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "u_ana"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "topics": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TopicPreference"
                      }
                    }
                  },
                  "required": ["topics"]
                },
                "example": {
                  "topics": [
                    {
                      "topic": "assignments",
                      "name": "Assignments",
                      "description": "When a request is assigned to you",
                      "required": false,
                      "channels": {
                        "inbox": true,
                        "push": true
                      },
                      "set": {
                        "push": true
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "recipients.setPreferences",
        "summary": "Set recipient preferences",
        "description": "Sets a recipient’s preferences for the topics given; topics you leave out keep theirs, and `null` goes back to the topic’s default. A preference for a required topic is kept, and changes nothing while the topic is required.\n\n- **Who may call:** Your server, with your project’s secret key.\n- **Idempotency-Key:** optional. ",
        "tags": ["Recipients"],
        "externalDocs": {
          "description": "Set recipient preferences, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/recipients#set-recipient-preferences"
        },
        "security": [
          {
            "secretKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A recipient ID: your own ID for the principal, such as `u_ana`, up to 200 printable characters without spaces. The `id` of a [`RecipientRecord`](https://agentpost.tools/docs/eventwolf/reference/recipients#the-recipientrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "u_ana"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "topics": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "inbox": {
                          "type": ["boolean", "null"]
                        },
                        "push": {
                          "type": ["boolean", "null"]
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                },
                "required": ["topics"],
                "additionalProperties": false
              },
              "example": {
                "topics": {
                  "assignments": {
                    "push": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "topics": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TopicPreference"
                      }
                    }
                  },
                  "required": ["topics"]
                },
                "example": {
                  "topics": [
                    {
                      "topic": "assignments",
                      "name": "Assignments",
                      "description": "When a request is assigned to you",
                      "required": false,
                      "channels": {
                        "inbox": true,
                        "push": true
                      },
                      "set": {
                        "push": true
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/recipients/{id}/push-addresses": {
      "post": {
        "operationId": "pushAddresses.register",
        "summary": "Register a push address",
        "description": "Binds a device’s push token to a recipient and answers with the address, whose `id` your backend keeps beside the principal’s session to remove it at sign-out. Registering a token another recipient in this project holds moves it to this one under a new ID, and their pushes stop; registering a token this recipient holds answers with the same address, `active` again if it was `invalid`.\n\n- **Who may call:** Your server, with your project’s secret key; or a signed-in principal, for their own push addresses only, with a user token or their IdentityHound session token.\n- **Idempotency-Key:** optional. ",
        "tags": ["Push addresses"],
        "externalDocs": {
          "description": "Register a push address, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/push-addresses#register-a-push-address"
        },
        "security": [
          {
            "secretKey": []
          },
          {
            "userToken": []
          },
          {
            "sessionToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A recipient ID: your own ID for the principal, such as `u_ana`, up to 200 printable characters without spaces. The `id` of a [`RecipientRecord`](https://agentpost.tools/docs/eventwolf/reference/recipients#the-recipientrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "u_ana"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": ["expo"]
                  },
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                },
                "required": ["provider", "token"],
                "additionalProperties": false
              },
              "example": {
                "provider": "expo",
                "token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pushAddress": {
                      "$ref": "#/components/schemas/PushAddressRecord"
                    }
                  },
                  "required": ["pushAddress"]
                },
                "example": {
                  "pushAddress": {
                    "id": "pad_01M79Z4K8R2T6V0X3B5D7F9H1J",
                    "recipientId": "u_ana",
                    "provider": "expo",
                    "status": "active",
                    "createdAt": "2026-11-13T09:30:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity, with `error.code` [`push_unavailable`](https://agentpost.tools/docs/eventwolf/errors#push_unavailable).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["push_unavailable"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/push-addresses/{id}/seen": {
      "post": {
        "operationId": "pushAddresses.seen",
        "summary": "Mark a push address seen",
        "description": "Marks everything through one of the recipient’s notifications seen on this phone, including one a push carried for a topic whose inbox is off. Answers with its stored position and remaining unseen count. An older position changes nothing. Leaves the inbox and every other address alone.\n\n- **Who may call:** Your server, with your project’s secret key; or a signed-in principal, for their own push addresses only, with a user token or their IdentityHound session token.\n- **Idempotency-Key:** optional. ",
        "tags": ["Push addresses"],
        "externalDocs": {
          "description": "Mark a push address seen, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/push-addresses#mark-a-push-address-seen"
        },
        "security": [
          {
            "secretKey": []
          },
          {
            "userToken": []
          },
          {
            "sessionToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A push address ID, `pad_…`. The `id` of a [`PushAddressRecord`](https://agentpost.tools/docs/eventwolf/reference/push-addresses#the-pushaddressrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "pad_01M79Z4K8R2T6V0X3B5D7F9H1J"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "through": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": ["through"],
                "additionalProperties": false
              },
              "example": {
                "through": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeenResponse"
                },
                "example": {
                  "seenThrough": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW",
                  "unseen": 0
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/push-addresses/{id}": {
      "delete": {
        "operationId": "pushAddresses.delete",
        "summary": "Remove a push address",
        "description": "Removes a push address, as when the principal signs out on that device. Pushes waiting to go to it are canceled. An address that is already gone, or that moved to someone else under a new ID, answers the same.\n\n- **Who may call:** Your server, with your project’s secret key; or a signed-in principal, for their own push addresses only, with a user token or their IdentityHound session token.\n- **Idempotency-Key:** optional. ",
        "tags": ["Push addresses"],
        "externalDocs": {
          "description": "Remove a push address, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/push-addresses#remove-a-push-address"
        },
        "security": [
          {
            "secretKey": []
          },
          {
            "userToken": []
          },
          {
            "sessionToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A push address ID, `pad_…`. The `id` of a [`PushAddressRecord`](https://agentpost.tools/docs/eventwolf/reference/push-addresses#the-pushaddressrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "pad_01M79Z4K8R2T6V0X3B5D7F9H1J"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/push-addresses": {
      "delete": {
        "operationId": "pushAddresses.deleteByToken",
        "summary": "Remove a push address by its token",
        "description": "Removes the push address with this provider and token, whichever recipient in this project holds it, for a backend that kept the token rather than the address ID. Pushes waiting to go to it are canceled.\n\n- **Who may call:** Your server, with your project’s secret key; or a signed-in principal, for their own push addresses only, with a user token or their IdentityHound session token.\n- **Idempotency-Key:** optional. ",
        "tags": ["Push addresses"],
        "externalDocs": {
          "description": "Remove a push address by its token, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/push-addresses#remove-a-push-address-by-its-token"
        },
        "security": [
          {
            "secretKey": []
          },
          {
            "userToken": []
          },
          {
            "sessionToken": []
          }
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": ["expo"]
            },
            "example": "expo"
          },
          {
            "name": "token",
            "in": "query",
            "required": true,
            "description": "1–500 characters.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "example": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/inbox": {
      "get": {
        "operationId": "inbox.list",
        "summary": "List your notifications",
        "description": "Your delivered notifications, newest first.\n\n- **Who may call:** A signed-in caller can use a user token, an IdentityHound session token, an IdentityHound API key, or an IdentityHound delegated token to reach the [inbox that credential names](https://agentpost.tools/docs/eventwolf/concepts/notifications#the-inbox).\n- **Pages:** `limit`, 1 to 200, default 50, with `next` and `after`. [Lists](https://agentpost.tools/docs/platform/api-basics#lists) has the rule.",
        "tags": ["Inbox"],
        "externalDocs": {
          "description": "List your notifications, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/inbox#list-your-notifications"
        },
        "security": [
          {
            "userToken": []
          },
          {
            "sessionToken": []
          },
          {
            "apiKey": []
          },
          {
            "delegatedToken": []
          }
        ],
        "parameters": [
          {
            "name": "unread",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["true", "false"]
            },
            "example": "true"
          },
          {
            "name": "archived",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": ["true", "false"]
            }
          },
          {
            "name": "topic",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$"
            }
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200; default `50`.",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "notifications": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NotificationRecord"
                      }
                    },
                    "next": {
                      "type": "string"
                    }
                  },
                  "required": ["notifications"]
                },
                "example": {
                  "notifications": [
                    {
                      "id": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW",
                      "recipientId": "u_ana",
                      "topic": "assignments",
                      "title": "Ben assigned “Refund for order 1042” to you",
                      "url": "/requests/r_9",
                      "status": "delivered",
                      "eventSequence": 42,
                      "subscriptionId": "sub_01M79K2W6Q8RZ4T1NB0XJ7C3DA",
                      "createdAt": "2026-11-12T09:41:07.000Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/inbox/count": {
      "get": {
        "operationId": "inbox.count",
        "summary": "Count your notifications",
        "description": "How many inbox notifications are unread, and how many are newer than the last one you saw. Phone badges keep separate seen positions.\n\n- **Who may call:** A signed-in caller can use a user token, an IdentityHound session token, an IdentityHound API key, or an IdentityHound delegated token to reach the [inbox that credential names](https://agentpost.tools/docs/eventwolf/concepts/notifications#the-inbox).",
        "tags": ["Inbox"],
        "externalDocs": {
          "description": "Count your notifications, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/inbox#count-your-notifications"
        },
        "security": [
          {
            "userToken": []
          },
          {
            "sessionToken": []
          },
          {
            "apiKey": []
          },
          {
            "delegatedToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxCount"
                },
                "example": {
                  "unread": 1,
                  "unseen": 0
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/inbox/read-all": {
      "post": {
        "operationId": "inbox.readAll",
        "summary": "Mark all read",
        "description": "Marks every unread notification read, or one topic’s.\n\n- **Who may call:** A signed-in caller can use a user token, an IdentityHound session token, an IdentityHound API key, or an IdentityHound delegated token to reach the [inbox that credential names](https://agentpost.tools/docs/eventwolf/concepts/notifications#the-inbox).\n- **Idempotency-Key:** optional. ",
        "tags": ["Inbox"],
        "externalDocs": {
          "description": "Mark all read, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/inbox#mark-all-read"
        },
        "security": [
          {
            "userToken": []
          },
          {
            "sessionToken": []
          },
          {
            "apiKey": []
          },
          {
            "delegatedToken": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "topic": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$"
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "topic": "assignments"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadAllResponse"
                },
                "example": {
                  "read": 4
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/inbox/seen": {
      "post": {
        "operationId": "inbox.seen",
        "summary": "Mark seen",
        "description": "Marks everything through one notification seen in the inbox. Leaves phone badges alone. A position older than the one stored changes nothing.\n\n- **Who may call:** A signed-in caller can use a user token, an IdentityHound session token, an IdentityHound API key, or an IdentityHound delegated token to reach the [inbox that credential names](https://agentpost.tools/docs/eventwolf/concepts/notifications#the-inbox).\n- **Idempotency-Key:** optional. ",
        "tags": ["Inbox"],
        "externalDocs": {
          "description": "Mark seen, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/inbox#mark-seen"
        },
        "security": [
          {
            "userToken": []
          },
          {
            "sessionToken": []
          },
          {
            "apiKey": []
          },
          {
            "delegatedToken": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "through": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": ["through"],
                "additionalProperties": false
              },
              "example": {
                "through": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeenResponse"
                },
                "example": {
                  "seenThrough": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW",
                  "unseen": 0
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/inbox/{id}/read": {
      "post": {
        "operationId": "inbox.read",
        "summary": "Mark a notification read",
        "description": "Marks one notification read.\n\n- **Who may call:** A signed-in caller can use a user token, an IdentityHound session token, an IdentityHound API key, or an IdentityHound delegated token to reach the [inbox that credential names](https://agentpost.tools/docs/eventwolf/concepts/notifications#the-inbox).\n- **Idempotency-Key:** optional. ",
        "tags": ["Inbox"],
        "externalDocs": {
          "description": "Mark a notification read, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/inbox#mark-a-notification-read"
        },
        "security": [
          {
            "userToken": []
          },
          {
            "sessionToken": []
          },
          {
            "apiKey": []
          },
          {
            "delegatedToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A notification ID, `ntf_…`. The `id` of a [`NotificationRecord`](https://agentpost.tools/docs/eventwolf/reference/inbox#the-notificationrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "notification": {
                      "$ref": "#/components/schemas/NotificationRecord"
                    }
                  },
                  "required": ["notification"]
                },
                "example": {
                  "notification": {
                    "id": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW",
                    "recipientId": "u_ana",
                    "topic": "assignments",
                    "title": "Ben assigned “Refund for order 1042” to you",
                    "url": "/requests/r_9",
                    "status": "delivered",
                    "eventSequence": 42,
                    "subscriptionId": "sub_01M79K2W6Q8RZ4T1NB0XJ7C3DA",
                    "createdAt": "2026-11-12T09:41:07.000Z",
                    "readAt": "2026-11-13T09:30:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/inbox/{id}/archive": {
      "post": {
        "operationId": "inbox.archive",
        "summary": "Archive a notification",
        "description": "Archives one notification. `GET /inbox?archived=true` lists archived ones.\n\n- **Who may call:** A signed-in caller can use a user token, an IdentityHound session token, an IdentityHound API key, or an IdentityHound delegated token to reach the [inbox that credential names](https://agentpost.tools/docs/eventwolf/concepts/notifications#the-inbox).\n- **Idempotency-Key:** optional. ",
        "tags": ["Inbox"],
        "externalDocs": {
          "description": "Archive a notification, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/inbox#archive-a-notification"
        },
        "security": [
          {
            "userToken": []
          },
          {
            "sessionToken": []
          },
          {
            "apiKey": []
          },
          {
            "delegatedToken": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "A notification ID, `ntf_…`. The `id` of a [`NotificationRecord`](https://agentpost.tools/docs/eventwolf/reference/inbox#the-notificationrecord-object).",
            "schema": {
              "type": "string"
            },
            "example": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "notification": {
                      "$ref": "#/components/schemas/NotificationRecord"
                    }
                  },
                  "required": ["notification"]
                },
                "example": {
                  "notification": {
                    "id": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW",
                    "recipientId": "u_ana",
                    "topic": "assignments",
                    "title": "Ben assigned “Refund for order 1042” to you",
                    "url": "/requests/r_9",
                    "status": "delivered",
                    "eventSequence": 42,
                    "subscriptionId": "sub_01M79K2W6Q8RZ4T1NB0XJ7C3DA",
                    "createdAt": "2026-11-12T09:41:07.000Z",
                    "readAt": "2026-11-13T09:30:00.000Z",
                    "archivedAt": "2026-11-13T09:30:00.000Z"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "Not Found, with `error.code` [`not_found`](https://agentpost.tools/docs/eventwolf/errors#not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["not_found"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/inbox/preferences": {
      "get": {
        "operationId": "inbox.preferences",
        "summary": "Get your preferences",
        "description": "Your preferences for every topic. A required topic is shown with `required: true`, and setting it changes nothing.\n\n- **Who may call:** A signed-in caller can use a user token, an IdentityHound session token, an IdentityHound API key, or an IdentityHound delegated token to reach the [inbox that credential names](https://agentpost.tools/docs/eventwolf/concepts/notifications#the-inbox).",
        "tags": ["Inbox"],
        "externalDocs": {
          "description": "Get your preferences, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/inbox#get-your-preferences"
        },
        "security": [
          {
            "userToken": []
          },
          {
            "sessionToken": []
          },
          {
            "apiKey": []
          },
          {
            "delegatedToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "topics": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TopicPreference"
                      }
                    }
                  },
                  "required": ["topics"]
                },
                "example": {
                  "topics": [
                    {
                      "topic": "assignments",
                      "name": "Assignments",
                      "description": "When a request is assigned to you",
                      "required": false,
                      "channels": {
                        "inbox": true,
                        "push": true
                      },
                      "set": {
                        "push": true
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "inbox.setPreferences",
        "summary": "Set your preferences",
        "description": "Sets your preferences for the topics given; topics you leave out keep theirs, and `null` goes back to the topic’s default. A preference for a required topic is kept, and changes nothing while the topic is required.\n\n- **Who may call:** A signed-in caller can use a user token, an IdentityHound session token, an IdentityHound API key, or an IdentityHound delegated token to reach the [inbox that credential names](https://agentpost.tools/docs/eventwolf/concepts/notifications#the-inbox).\n- **Idempotency-Key:** optional. ",
        "tags": ["Inbox"],
        "externalDocs": {
          "description": "Set your preferences, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/inbox#set-your-preferences"
        },
        "security": [
          {
            "userToken": []
          },
          {
            "sessionToken": []
          },
          {
            "apiKey": []
          },
          {
            "delegatedToken": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "A key of your choosing for this request. A retry with the same key and the same request within 24 hours answers with the first answer, while you may still make the request; the same key with a different request answers [`idempotency_mismatch`](https://agentpost.tools/docs/eventwolf/errors#idempotency_mismatch), and one whose first request is still running answers [`conflict`](https://agentpost.tools/docs/eventwolf/errors#conflict).",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "topics": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$"
                    },
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "inbox": {
                          "type": ["boolean", "null"]
                        },
                        "push": {
                          "type": ["boolean", "null"]
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                },
                "required": ["topics"],
                "additionalProperties": false
              },
              "example": {
                "topics": {
                  "assignments": {
                    "push": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "topics": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TopicPreference"
                      }
                    }
                  },
                  "required": ["topics"]
                },
                "example": {
                  "topics": [
                    {
                      "topic": "assignments",
                      "name": "Assignments",
                      "description": "When a request is assigned to you",
                      "required": false,
                      "channels": {
                        "inbox": true,
                        "push": true
                      },
                      "set": {
                        "push": true
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large, with `error.code` [`payload_too_large`](https://agentpost.tools/docs/eventwolf/errors#payload_too_large).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["payload_too_large"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/inbox/stream": {
      "get": {
        "operationId": "inbox.stream",
        "summary": "Stream your notifications",
        "description": "Server-Sent Events: each new notification as a `NotificationRecord` whose message `id` is its ID, and a `heartbeat` message with your `InboxCount`. The stream sends a message with only an `id` after any catch-up, and each heartbeat has an `id` too. These IDs are cursors in digits that mark how far the stream has read. Reconnect with the last `id` you received as `Last-Event-ID`, or `after` for a client that can’t set it, to resume from that point within the retained history. Your credential is checked again at each heartbeat, and once it stops working the stream ends with an `error` message: `unauthenticated` when your user token expired, so reconnect with a fresh one, or `forbidden` when access was withdrawn. [Notification retention](https://agentpost.tools/docs/eventwolf/concepts/notifications#limits) explains how the stream handles removed notifications.\n\n- **Who may call:** A signed-in caller can use a user token, an IdentityHound session token, an IdentityHound API key, or an IdentityHound delegated token to reach the [inbox that credential names](https://agentpost.tools/docs/eventwolf/concepts/notifications#the-inbox).",
        "tags": ["Inbox"],
        "externalDocs": {
          "description": "Stream your notifications, in the API reference",
          "url": "https://agentpost.tools/docs/eventwolf/reference/inbox#stream-your-notifications"
        },
        "security": [
          {
            "userToken": []
          },
          {
            "sessionToken": []
          },
          {
            "apiKey": []
          },
          {
            "delegatedToken": []
          }
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "description": "The last message `id` you received, a notification ID or a cursor, for a client that can’t set `Last-Event-ID`.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "required": false,
            "description": "Optional. The last message `id` you received: a notification ID or a cursor.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request, with `error.code` [`invalid_request`](https://agentpost.tools/docs/eventwolf/errors#invalid_request).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["invalid_request"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized, with `error.code` [`unauthenticated`](https://agentpost.tools/docs/eventwolf/errors#unauthenticated).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["unauthenticated"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden, with `error.code` [`forbidden`](https://agentpost.tools/docs/eventwolf/errors#forbidden).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["forbidden"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error, with `error.code` [`internal_error`](https://agentpost.tools/docs/eventwolf/errors#internal_error).",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "properties": {
                        "error": {
                          "properties": {
                            "code": {
                              "enum": ["internal_error"]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ConfigRecord": {
        "description": "A config in the API's answer: the settings, their version, and who last changed them.",
        "type": "object",
        "properties": {
          "ingest": {
            "type": "object",
            "properties": {
              "unknownTypes": {
                "type": "string",
                "enum": ["accept", "reject"],
                "description": "`accept` takes an event whose type isn’t registered; `reject` refuses it, with `unknown_type`."
              },
              "maxDataBytes": {
                "type": "integer",
                "minimum": 1024,
                "maximum": 1048576,
                "description": "The most bytes an event’s `data` may hold, from 1024 to 1048576."
              }
            },
            "required": ["unknownTypes", "maxDataBytes"],
            "additionalProperties": false
          },
          "delivery": {
            "type": "object",
            "properties": {
              "timeout": {
                "type": "string",
                "description": "How long an attempt waits for the receiver’s answer: a duration from `\"1s\"` to `\"60s\"`."
              },
              "retrySchedule": {
                "maxItems": 19,
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A duration from \"0s\" to \"1000000d\": a whole number and one unit of ms, s, m, h, or d, such as \"15m\" or \"30d\""
                },
                "description": "The wait before each retry after a failed attempt, as durations; the first attempt goes at once. A delivery is failed when an attempt fails with no retry left. `[]` makes one attempt only."
              },
              "disableAfterFailing": {
                "type": "string",
                "description": "An endpoint with no success for this long is disabled: a duration from `\"1d\"` to `\"365d\"`."
              }
            },
            "required": ["timeout", "retrySchedule", "disableAfterFailing"],
            "additionalProperties": false
          },
          "retention": {
            "type": "object",
            "properties": {
              "events": {
                "anyOf": [
                  {
                    "type": "string",
                    "const": "forever"
                  },
                  {
                    "type": "string",
                    "description": "A duration from \"1d\" to \"1000000d\": a whole number and one unit of ms, s, m, h, or d, such as \"15m\" or \"30d\""
                  }
                ],
                "description": "How long an event is kept after EventWolf received it: `\"forever\"`, or a duration of at least `\"1d\"`."
              },
              "deliveries": {
                "anyOf": [
                  {
                    "type": "string",
                    "const": "forever"
                  },
                  {
                    "type": "string",
                    "description": "A duration from \"1d\" to \"1000000d\": a whole number and one unit of ms, s, m, h, or d, such as \"15m\" or \"30d\""
                  }
                ],
                "description": "How long a delivery is kept after it finished, with its attempts: `\"forever\"`, or a duration of at least `\"1d\"`."
              },
              "ingestFailures": {
                "anyOf": [
                  {
                    "type": "string",
                    "const": "forever"
                  },
                  {
                    "type": "string",
                    "description": "A duration from \"1d\" to \"1000000d\": a whole number and one unit of ms, s, m, h, or d, such as \"15m\" or \"30d\""
                  }
                ],
                "description": "How long an ingestion failure is kept: `\"forever\"`, or a duration of at least `\"1d\"`."
              },
              "notifications": {
                "anyOf": [
                  {
                    "type": "string",
                    "const": "forever"
                  },
                  {
                    "type": "string",
                    "description": "A duration from \"1d\" to \"1000000d\": a whole number and one unit of ms, s, m, h, or d, such as \"15m\" or \"30d\""
                  }
                ],
                "description": "How long a notification is kept after it was made: `\"forever\"`, or a duration of at least `\"1d\"`."
              }
            },
            "required": [
              "events",
              "deliveries",
              "ingestFailures",
              "notifications"
            ],
            "additionalProperties": false
          },
          "push": {
            "type": "object",
            "properties": {
              "badge": {
                "type": "boolean",
                "description": "Whether a push sets the app icon’s badge."
              },
              "retrySchedule": {
                "type": "array",
                "items": {
                  "type": "string",
                  "description": "A length of time as a request, a record, or a config holds it, such as `\"30d\"`."
                },
                "description": "The wait before each retry of a push, as durations."
              },
              "expo": {
                "type": "object",
                "properties": {
                  "hasAccessToken": {
                    "type": "boolean"
                  }
                },
                "required": ["hasAccessToken"]
              }
            },
            "required": ["badge", "retrySchedule", "expo"],
            "description": "The push settings as the config shows them: never a credential, only whether one is set."
          },
          "version": {
            "type": "number"
          },
          "updatedAt": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "required": [
          "ingest",
          "delivery",
          "retention",
          "push",
          "version",
          "updatedAt",
          "updatedBy"
        ],
        "examples": [
          {
            "ingest": {
              "unknownTypes": "accept",
              "maxDataBytes": 65536
            },
            "delivery": {
              "timeout": "15s",
              "retrySchedule": ["5s", "5m", "30m", "2h", "5h", "10h", "10h"],
              "disableAfterFailing": "5d"
            },
            "retention": {
              "events": "forever",
              "deliveries": "90d",
              "ingestFailures": "30d",
              "notifications": "180d"
            },
            "push": {
              "badge": true,
              "retrySchedule": ["30s", "5m", "30m"],
              "expo": {
                "hasAccessToken": false
              }
            },
            "version": 3,
            "updatedAt": "2026-11-02T14:05:00.000Z",
            "updatedBy": "key:backend"
          }
        ]
      },
      "PublishOutcome": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "result": {
                "const": "accepted"
              },
              "sequence": {
                "type": "number"
              },
              "id": {
                "type": "string"
              },
              "source": {
                "type": "string"
              }
            },
            "required": ["result", "sequence", "id", "source"]
          },
          {
            "type": "object",
            "properties": {
              "result": {
                "const": "duplicate"
              },
              "sequence": {
                "type": "number",
                "description": "The stored event's sequence. Left out when the host would not let this caller submit the stored event, such as one under another workspace."
              },
              "id": {
                "type": "string"
              },
              "source": {
                "type": "string"
              }
            },
            "required": ["result", "id", "source"]
          },
          {
            "type": "object",
            "properties": {
              "result": {
                "const": "rejected"
              },
              "code": {
                "type": "string",
                "enum": [
                  "invalid_envelope",
                  "unknown_type",
                  "invalid_data",
                  "data_too_large",
                  "forbidden"
                ]
              },
              "issues": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "failureId": {
                "type": "string",
                "description": "An ingestion failure ID, `ifl_…`"
              },
              "id": {
                "type": "string"
              },
              "source": {
                "type": "string"
              }
            },
            "required": ["result", "code", "issues"]
          }
        ],
        "examples": [
          {
            "result": "accepted",
            "sequence": 42,
            "id": "01JD4Z3XK6R0V8C2YQ7M5N9P1T",
            "source": "/support/backend"
          }
        ]
      },
      "ValidateResponse": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "code": {
            "type": "string",
            "enum": [
              "invalid_envelope",
              "unknown_type",
              "invalid_data",
              "data_too_large",
              "forbidden"
            ]
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": ["valid", "issues"],
        "examples": [
          {
            "valid": true,
            "issues": []
          }
        ]
      },
      "EventRecord": {
        "description": "One accepted event, with EventWolf's record context around it.",
        "type": "object",
        "properties": {
          "sequence": {
            "type": "number",
            "description": "The project's total order. Breaks receipt-time ties and resumes the live tail."
          },
          "receivedAt": {
            "type": "string"
          },
          "publishedBy": {
            "type": "object",
            "properties": {
              "actor": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The principal's ID."
                  },
                  "kind": {
                    "type": "string",
                    "enum": ["human", "agent", "service"],
                    "description": "The kind a principal may declare. A principal that declared none has no `kind`."
                  }
                },
                "required": ["id"],
                "description": "The principal that made the request with its own credential. Your project's secret key is `key:` and the key's name, with no `kind`."
              },
              "onBehalfOf": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The principal's ID."
                  },
                  "kind": {
                    "type": "string",
                    "enum": ["human", "agent", "service"],
                    "description": "The kind a principal may declare. A principal that declared none has no `kind`."
                  }
                },
                "required": ["id"],
                "description": "The delegator, when the actor acted under a delegation."
              },
              "via": {
                "type": "string",
                "enum": ["host", "in_process", "import"]
              }
            },
            "required": ["actor", "via"],
            "description": "How a publisher is recorded beside the `source` it claimed."
          },
          "refs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "role": {
                  "type": "string",
                  "enum": ["subject", "actor", "onbehalfof", "ref"],
                  "description": "The envelope attribute the reference came from. One read from a `refPaths` data path is `ref`."
                },
                "path": {
                  "type": "string",
                  "description": "The data path a registry `refPaths` entry named, when that's where it came from."
                }
              },
              "required": ["type", "id", "role"],
              "description": "Where an event points: parsed from `subject`, `actor`, `onbehalfof`, `refs`, and the registry's `refPaths`."
            }
          },
          "typeVersion": {
            "type": "number"
          },
          "erased": {
            "type": "object",
            "properties": {
              "paths": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "lastErasedAt": {
                "type": "string"
              }
            },
            "required": ["paths", "lastErasedAt"],
            "description": "Removed fields, including requested paths that were already absent."
          },
          "imported": {
            "type": "object",
            "properties": {
              "batchId": {
                "type": "string"
              },
              "origin": {
                "type": "string"
              },
              "originalReceivedAt": {
                "type": "string"
              }
            },
            "required": ["batchId", "origin"],
            "description": "Present only on history imported from another system."
          },
          "event": {
            "type": "object",
            "properties": {
              "specversion": {
                "const": "1.0"
              },
              "id": {
                "type": "string"
              },
              "source": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "subject": {
                "type": "string"
              },
              "time": {
                "type": "string"
              },
              "datacontenttype": {
                "const": "application/json"
              },
              "dataschema": {
                "type": "string"
              },
              "data": {},
              "sequence": {
                "type": "number"
              }
            },
            "required": [
              "specversion",
              "id",
              "source",
              "type",
              "time",
              "datacontenttype",
              "sequence"
            ],
            "description": "The event after any erasures, with `sequence` added as an extension."
          }
        },
        "required": ["sequence", "receivedAt", "publishedBy", "refs", "event"],
        "examples": [
          {
            "sequence": 42,
            "receivedAt": "2026-11-12T09:41:07.000Z",
            "publishedBy": {
              "actor": {
                "id": "key:backend"
              },
              "via": "host"
            },
            "refs": [
              {
                "type": "request",
                "id": "r_9",
                "role": "ref"
              },
              {
                "type": "user",
                "id": "u_ana",
                "role": "ref"
              },
              {
                "type": "user",
                "id": "u_ben",
                "role": "actor"
              }
            ],
            "typeVersion": 1,
            "event": {
              "specversion": "1.0",
              "id": "01JD4Z3XK6R0V8C2YQ7M5N9P1T",
              "source": "/support/backend",
              "type": "request.assigned",
              "subject": "r_9",
              "time": "2026-11-12T09:41:06.512Z",
              "datacontenttype": "application/json",
              "actor": "user:u_ben",
              "refs": "request:r_9 user:u_ana",
              "severity": "normal",
              "data": {
                "summary": "Ben assigned “Refund for order 1042” to you",
                "assignee": {
                  "id": "u_ana"
                }
              },
              "sequence": 42
            }
          }
        ]
      },
      "TimelineRecord": {
        "type": "object",
        "properties": {
          "event": {
            "$ref": "#/components/schemas/EventRecord"
          },
          "causes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventRecord"
            },
            "description": "The causation chain upward, nearest cause first, at most 20 deep."
          },
          "effects": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventRecord"
            },
            "description": "Events whose causation points at this one, in sequence order, at most 100."
          },
          "matches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MatchRecord"
            },
            "description": "Present when the caller may manage deliveries."
          },
          "deliveries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Also the `webhook-id` header on every attempt of a webhook."
                },
                "kind": {
                  "type": "string",
                  "enum": ["webhook", "push"],
                  "description": "What a delivery sends: a signed webhook to an endpoint, or a push to one of a recipient's devices."
                },
                "eventSequence": {
                  "type": "number"
                },
                "matchId": {
                  "type": "string",
                  "description": "Absent for an endpoint's test ping, which has no subscription."
                },
                "subscriptionId": {
                  "type": "string",
                  "description": "A subscription ID, `sub_…`"
                },
                "endpointId": {
                  "type": "string",
                  "description": "A webhook's endpoint."
                },
                "notificationId": {
                  "type": "string",
                  "description": "A push's notification, whose text and `url` it carries."
                },
                "pushAddressId": {
                  "type": "string",
                  "description": "A push's address: one device of the notification's recipient."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "succeeded",
                    "failed",
                    "skipped",
                    "canceled"
                  ],
                  "description": "A push stays `pending` after it is sent until the provider reports whether it reached the device."
                },
                "skipReason": {
                  "type": "string",
                  "enum": [
                    "endpoint_disabled",
                    "about_endpoint",
                    "address_invalid",
                    "event_erased"
                  ],
                  "description": "Why a delivery was skipped: the endpoint was disabled, the event is about that endpoint, the push address was invalid, or the event was erased before the push was sent."
                },
                "nextAttemptAt": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "finishedAt": {
                  "type": "string"
                },
                "attempts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "An attempt ID, `att_…`"
                      },
                      "n": {
                        "type": "number"
                      },
                      "trigger": {
                        "type": "string",
                        "enum": ["automatic", "manual", "recover", "replay"]
                      },
                      "outcome": {
                        "type": "string",
                        "enum": ["succeeded", "failed"]
                      },
                      "startedAt": {
                        "type": "string"
                      },
                      "duration": {
                        "type": "string",
                        "description": "How long the attempt took, such as `\"240ms\"`."
                      },
                      "status": {
                        "type": "number",
                        "description": "The HTTP status the receiver answered, when it answered."
                      },
                      "error": {
                        "type": "string",
                        "enum": [
                          "timeout",
                          "dns",
                          "connection",
                          "tls",
                          "redirect",
                          "ssrf_blocked",
                          "push_send_failed",
                          "push_delivery_failed",
                          "device_not_registered"
                        ],
                        "description": "Why there was no answer, or why the answer did not count."
                      }
                    },
                    "required": [
                      "id",
                      "n",
                      "trigger",
                      "outcome",
                      "startedAt",
                      "duration"
                    ],
                    "description": "One attempt in brief: enough to see what happened without the request and response."
                  }
                }
              },
              "required": [
                "id",
                "kind",
                "eventSequence",
                "status",
                "createdAt",
                "attempts"
              ],
              "description": "A delivery with its attempts in brief, in place of the count."
            },
            "description": "Present when the caller may manage deliveries."
          },
          "notifications": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationRecord"
            },
            "description": "Present when the caller may manage recipients: every notification the event made, skipped ones included, at most 500."
          }
        },
        "required": ["event", "causes", "effects"],
        "examples": [
          {
            "event": {
              "sequence": 57,
              "receivedAt": "2026-11-12T16:20:31.000Z",
              "publishedBy": {
                "actor": {
                  "id": "key:backend"
                },
                "via": "host"
              },
              "refs": [
                {
                  "type": "request",
                  "id": "r_9",
                  "role": "ref"
                },
                {
                  "type": "user",
                  "id": "u_ana",
                  "role": "actor"
                }
              ],
              "event": {
                "specversion": "1.0",
                "id": "01JD5KQ2W8E1G3H4J5K6M7N8P9",
                "source": "/support/backend",
                "type": "request.resolved",
                "subject": "r_9",
                "time": "2026-11-12T16:20:30.884Z",
                "datacontenttype": "application/json",
                "actor": "user:u_ana",
                "refs": "request:r_9",
                "data": {
                  "resolution": "refunded"
                },
                "sequence": 57
              }
            },
            "causes": [],
            "effects": [],
            "matches": [
              {
                "id": "mat_01M77MA4BADJB617FSKAKFB062",
                "eventSequence": 57,
                "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                "subscriptionVersion": 1,
                "cause": "ingest",
                "decidedAt": "2026-11-12T16:20:31.000Z"
              }
            ],
            "deliveries": [
              {
                "id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                "kind": "webhook",
                "eventSequence": 57,
                "matchId": "mat_01M77MA4BADJB617FSKAKFB062",
                "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
                "status": "succeeded",
                "attempts": [
                  {
                    "id": "att_01M79H5NGPEGZF2FB3WE90H645",
                    "n": 1,
                    "trigger": "automatic",
                    "outcome": "failed",
                    "startedAt": "2026-11-12T16:20:31.000Z",
                    "duration": "212ms",
                    "status": 503
                  },
                  {
                    "id": "att_01M78DATBYZV18RDVFT6Z5EKWR",
                    "n": 2,
                    "trigger": "automatic",
                    "outcome": "succeeded",
                    "startedAt": "2026-11-12T16:20:36.000Z",
                    "duration": "148ms",
                    "status": 200
                  }
                ],
                "createdAt": "2026-11-12T16:20:31.000Z",
                "finishedAt": "2026-11-12T16:20:37.000Z"
              }
            ],
            "notifications": []
          }
        ]
      },
      "ErasureRecord": {
        "description": "One completed request, including paths that were already absent. No erased values.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "An erasure ID, `ers_…`"
          },
          "eventSequence": {
            "type": "number"
          },
          "paths": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "erasedAt": {
            "type": "string"
          },
          "requestedBy": {
            "type": "object",
            "properties": {
              "actor": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The principal's ID."
                  },
                  "kind": {
                    "type": "string",
                    "enum": ["human", "agent", "service"],
                    "description": "The kind a principal may declare. A principal that declared none has no `kind`."
                  }
                },
                "required": ["id"],
                "description": "The principal that made the request with its own credential. Your project's secret key is `key:` and the key's name, with no `kind`."
              },
              "onBehalfOf": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The principal's ID."
                  },
                  "kind": {
                    "type": "string",
                    "enum": ["human", "agent", "service"],
                    "description": "The kind a principal may declare. A principal that declared none has no `kind`."
                  }
                },
                "required": ["id"],
                "description": "The delegator, when the actor acted under a delegation."
              },
              "via": {
                "type": "string",
                "enum": ["host", "in_process", "import"]
              }
            },
            "required": ["actor", "via"],
            "description": "How a publisher is recorded beside the `source` it claimed."
          }
        },
        "required": ["id", "eventSequence", "paths", "erasedAt", "requestedBy"],
        "examples": [
          {
            "id": "ers_01M79Z4K8R2T6V0X3B5D7F9H1J",
            "eventSequence": 42,
            "paths": ["actor", "data.assignee.id", "data.summary"],
            "erasedAt": "2026-11-13T09:30:00.000Z",
            "requestedBy": {
              "actor": {
                "id": "key:backend"
              },
              "via": "host"
            }
          }
        ]
      },
      "IngestFailureRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "An ingestion failure ID, `ifl_…`"
          },
          "receivedAt": {
            "type": "string"
          },
          "publishedBy": {
            "type": "object",
            "properties": {
              "actor": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The principal's ID."
                  },
                  "kind": {
                    "type": "string",
                    "enum": ["human", "agent", "service"],
                    "description": "The kind a principal may declare. A principal that declared none has no `kind`."
                  }
                },
                "required": ["id"],
                "description": "The principal that made the request with its own credential. Your project's secret key is `key:` and the key's name, with no `kind`."
              },
              "onBehalfOf": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The principal's ID."
                  },
                  "kind": {
                    "type": "string",
                    "enum": ["human", "agent", "service"],
                    "description": "The kind a principal may declare. A principal that declared none has no `kind`."
                  }
                },
                "required": ["id"],
                "description": "The delegator, when the actor acted under a delegation."
              },
              "via": {
                "type": "string",
                "enum": ["host", "in_process", "import"]
              }
            },
            "required": ["actor", "via"],
            "description": "How a publisher is recorded beside the `source` it claimed."
          },
          "claimed": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "source": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": []
          },
          "code": {
            "type": "string",
            "enum": [
              "invalid_envelope",
              "unknown_type",
              "invalid_data",
              "data_too_large"
            ]
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bodyExcerpt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "receivedAt",
          "publishedBy",
          "claimed",
          "code",
          "issues"
        ],
        "examples": [
          {
            "id": "ifl_01M79T232KQA2P9BYW5WJNP3N2",
            "receivedAt": "2026-11-12T11:02:44.000Z",
            "publishedBy": {
              "actor": {
                "id": "key:backend"
              },
              "via": "host"
            },
            "claimed": {
              "id": "01JD52A7C9D0E1F2G3H4J5K6M7",
              "source": "/support/backend",
              "type": "request.assigned"
            },
            "code": "invalid_data",
            "issues": ["data must have required property 'assignee'"],
            "bodyExcerpt": "{\"specversion\":\"1.0\",\"id\":\"01JD52A7C9D0E1F2G3H4J5K6M7\",\"source\":\"/support/backend\",\"type\":\"request.assigned\",\"subject\":\"r_10\",\"data\":{\"summary\":\"Ben assigned a request\"}}"
          }
        ]
      },
      "EventTypeRecord": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "origin": {
            "type": "string",
            "enum": ["registered", "observed"],
            "description": "`observed`: first seen in accept mode, with nothing registered."
          },
          "description": {
            "type": "string"
          },
          "refPaths": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                }
              },
              "required": ["type"]
            }
          },
          "schema": {
            "type": "object",
            "properties": {
              "version": {
                "type": "number"
              },
              "jsonSchema": {
                "type": "object",
                "additionalProperties": {}
              }
            },
            "required": ["version", "jsonSchema"]
          },
          "versions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "version": {
                  "type": "number"
                },
                "jsonSchema": {
                  "type": "object",
                  "additionalProperties": {}
                },
                "createdAt": {
                  "type": "string"
                }
              },
              "required": ["version", "jsonSchema", "createdAt"]
            }
          },
          "status": {
            "type": "string",
            "enum": ["active", "deprecated"]
          },
          "firstSeenAt": {
            "type": "string"
          },
          "lastSeenAt": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "updatedBy": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "origin",
          "versions",
          "status",
          "createdAt",
          "updatedAt"
        ],
        "examples": [
          {
            "type": "request.assigned",
            "origin": "registered",
            "description": "A support request was assigned to someone.",
            "refPaths": {
              "assignee.id": {
                "type": "user"
              }
            },
            "schema": {
              "version": 1,
              "jsonSchema": {
                "type": "object",
                "required": ["assignee"],
                "properties": {
                  "summary": {
                    "type": "string"
                  },
                  "assignee": {
                    "type": "object",
                    "required": ["id"],
                    "properties": {
                      "id": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            },
            "versions": [
              {
                "version": 1,
                "jsonSchema": {
                  "type": "object",
                  "required": ["assignee"],
                  "properties": {
                    "summary": {
                      "type": "string"
                    },
                    "assignee": {
                      "type": "object",
                      "required": ["id"],
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "createdAt": "2026-11-02T14:05:00.000Z"
              }
            ],
            "status": "active",
            "firstSeenAt": "2026-11-02T14:05:00.000Z",
            "lastSeenAt": "2026-11-12T09:41:07.000Z",
            "createdAt": "2026-11-02T14:05:00.000Z",
            "updatedAt": "2026-11-02T14:05:00.000Z",
            "updatedBy": "key:backend"
          }
        ]
      },
      "EventTypeValidateResponse": {
        "type": "object",
        "properties": {
          "schema": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "from": {
                    "const": "request"
                  }
                },
                "required": ["from"]
              },
              {
                "type": "object",
                "properties": {
                  "from": {
                    "const": "registered"
                  },
                  "version": {
                    "type": "number"
                  }
                },
                "required": ["from", "version"]
              }
            ],
            "description": "Which schema the check used."
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "valid": {
                  "type": "boolean"
                },
                "issues": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": ["valid", "issues"],
              "description": "Whether some data meets the schema, and what it would be rejected for."
            },
            "description": "One result per item, in the order given."
          }
        },
        "required": ["schema", "items"],
        "examples": [
          {
            "schema": {
              "from": "request"
            },
            "items": [
              {
                "valid": false,
                "issues": ["data.assignee must have required property 'team'"]
              }
            ]
          }
        ]
      },
      "EndpointRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "An endpoint ID, `end_…`"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": ["active", "disabled"]
          },
          "disabledReason": {
            "type": "string",
            "enum": ["manual", "gone", "failing"]
          },
          "secrets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "alg": {
                  "const": "hmac-sha256"
                },
                "createdAt": {
                  "type": "string"
                },
                "expiresAt": {
                  "type": "string"
                }
              },
              "required": ["id", "alg", "createdAt"]
            },
            "description": "The signing secrets by ID. The secret itself is shown once, when the endpoint is created or a secret rotated."
          },
          "hasHeaders": {
            "type": "boolean",
            "description": "Whether static headers are set. Their values are never returned."
          },
          "workspace": {
            "type": "string",
            "description": "The workspace it belongs to, when the app groups its principals into workspaces."
          },
          "failingSince": {
            "type": "string"
          },
          "lastSuccessAt": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "status",
          "secrets",
          "hasHeaders",
          "createdAt",
          "createdBy",
          "updatedAt"
        ],
        "examples": [
          {
            "id": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
            "url": "https://support.example.com/webhooks/eventwolf",
            "description": "Support desk: resolved requests",
            "status": "active",
            "secrets": [
              {
                "id": "whk_mhd2b8sw",
                "alg": "hmac-sha256",
                "createdAt": "2026-11-02T14:05:00.000Z"
              }
            ],
            "hasHeaders": false,
            "lastSuccessAt": "2026-11-12T16:20:31.000Z",
            "createdAt": "2026-11-02T14:05:00.000Z",
            "createdBy": "key:backend",
            "updatedAt": "2026-11-02T14:05:00.000Z"
          }
        ]
      },
      "DeliveryRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Also the `webhook-id` header on every attempt of a webhook."
          },
          "kind": {
            "type": "string",
            "enum": ["webhook", "push"],
            "description": "What a delivery sends: a signed webhook to an endpoint, or a push to one of a recipient's devices."
          },
          "eventSequence": {
            "type": "number"
          },
          "matchId": {
            "type": "string",
            "description": "Absent for an endpoint's test ping, which has no subscription."
          },
          "subscriptionId": {
            "type": "string",
            "description": "A subscription ID, `sub_…`"
          },
          "endpointId": {
            "type": "string",
            "description": "A webhook's endpoint."
          },
          "notificationId": {
            "type": "string",
            "description": "A push's notification, whose text and `url` it carries."
          },
          "pushAddressId": {
            "type": "string",
            "description": "A push's address: one device of the notification's recipient."
          },
          "status": {
            "type": "string",
            "enum": ["pending", "succeeded", "failed", "skipped", "canceled"],
            "description": "A push stays `pending` after it is sent until the provider reports whether it reached the device."
          },
          "skipReason": {
            "type": "string",
            "enum": [
              "endpoint_disabled",
              "about_endpoint",
              "address_invalid",
              "event_erased"
            ],
            "description": "Why a delivery was skipped: the endpoint was disabled, the event is about that endpoint, the push address was invalid, or the event was erased before the push was sent."
          },
          "attempts": {
            "type": "number",
            "description": "How many attempts have been made."
          },
          "nextAttemptAt": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "finishedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "eventSequence",
          "status",
          "attempts",
          "createdAt"
        ],
        "examples": [
          {
            "id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
            "kind": "webhook",
            "eventSequence": 57,
            "matchId": "mat_01M77MA4BADJB617FSKAKFB062",
            "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
            "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
            "status": "succeeded",
            "attempts": 2,
            "createdAt": "2026-11-12T16:20:31.000Z",
            "finishedAt": "2026-11-12T16:20:37.000Z"
          }
        ]
      },
      "AttemptRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "An attempt ID, `att_…`"
          },
          "deliveryId": {
            "type": "string",
            "description": "A delivery ID, `dlv_…`"
          },
          "n": {
            "type": "number",
            "description": "1 for the first attempt."
          },
          "trigger": {
            "type": "string",
            "enum": ["automatic", "manual", "recover", "replay"]
          },
          "startedAt": {
            "type": "string"
          },
          "duration": {
            "type": "string",
            "description": "How long the attempt took, such as `\"240ms\"`."
          },
          "request": {
            "type": "object",
            "properties": {
              "target": {
                "type": "string"
              },
              "headers": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              }
            },
            "required": ["target", "headers"],
            "description": "The request as sent, without the signature and the endpoint's own headers. A push's target is its provider, such as `expo`, never the token."
          },
          "response": {
            "type": "object",
            "properties": {
              "status": {
                "type": "number"
              },
              "headers": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "bodyExcerpt": {
                "type": "string",
                "description": "The first 2 KB of the body."
              }
            },
            "required": ["status", "headers"]
          },
          "providerMessageId": {
            "type": "string",
            "description": "The provider's ID for a push it accepted, by which it later reports whether the push reached the device."
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "timeout",
                  "dns",
                  "connection",
                  "tls",
                  "redirect",
                  "ssrf_blocked",
                  "push_send_failed",
                  "push_delivery_failed",
                  "device_not_registered"
                ]
              },
              "message": {
                "type": "string"
              }
            },
            "required": ["code", "message"]
          },
          "outcome": {
            "type": "string",
            "enum": ["succeeded", "failed"],
            "description": "For a push, `succeeded` means the provider accepted it; when the provider then reports it undelivered, or never confirms it, the attempt becomes `failed` with that error."
          }
        },
        "required": [
          "id",
          "deliveryId",
          "n",
          "trigger",
          "startedAt",
          "duration",
          "request",
          "outcome"
        ],
        "examples": [
          {
            "id": "att_01M79H5NGPEGZF2FB3WE90H645",
            "deliveryId": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
            "n": 1,
            "trigger": "automatic",
            "startedAt": "2026-11-12T16:20:31.000Z",
            "duration": "212ms",
            "request": {
              "target": "https://support.example.com/webhooks/eventwolf",
              "headers": {
                "content-type": "application/cloudevents+json",
                "user-agent": "eventwolf/1 (+https://agentpost.tools/docs/eventwolf)",
                "webhook-id": "dlv_01M784Y1DPQHMAWEB637FMPYWZ",
                "webhook-timestamp": "1794500431",
                "x-eventwolf-subscription": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
                "x-eventwolf-attempt": "1",
                "x-eventwolf-trigger": "automatic"
              }
            },
            "response": {
              "status": 503,
              "headers": {
                "content-type": "text/plain"
              },
              "bodyExcerpt": "upstream unavailable"
            },
            "outcome": "failed"
          }
        ]
      },
      "RecoverResponse": {
        "type": "object",
        "properties": {
          "endpointId": {
            "type": "string",
            "description": "An endpoint ID, `end_…`"
          },
          "recovered": {
            "type": "number",
            "description": "Deliveries put back to `pending`."
          }
        },
        "required": ["endpointId", "recovered"],
        "examples": [
          {
            "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y",
            "recovered": 3
          }
        ]
      },
      "SubscriptionRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A subscription ID, `sub_…`"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": ["active", "paused", "deleted"]
          },
          "version": {
            "type": "number"
          },
          "filter": {
            "type": "object",
            "properties": {
              "types": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^(?:\\*|[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*(?:\\.\\*)?)$"
                }
              },
              "sources": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048,
                  "pattern": "^[^*\\s]*\\*?$"
                }
              },
              "extensions": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[a-z0-9]{1,20}$"
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": ["string", "number", "boolean"]
                    },
                    {
                      "minItems": 1,
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": ["string", "number", "boolean"]
                      }
                    }
                  ]
                }
              },
              "workspace": {
                "description": "The workspace it belongs to, when the app groups its principals into workspaces.",
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "subject": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "refs": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": ["type"],
                  "additionalProperties": false
                }
              },
              "where": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": ["string", "number", "boolean"]
                    },
                    {
                      "minItems": 1,
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": ["string", "number", "boolean"]
                      }
                    }
                  ]
                }
              }
            },
            "additionalProperties": false
          },
          "constraint": {
            "type": "object",
            "properties": {
              "types": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^(?:\\*|[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*(?:\\.\\*)?)$"
                }
              },
              "sources": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048,
                  "pattern": "^[^*\\s]*\\*?$"
                }
              },
              "extensions": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[a-z0-9]{1,20}$"
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": ["string", "number", "boolean"]
                    },
                    {
                      "minItems": 1,
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": ["string", "number", "boolean"]
                      }
                    }
                  ]
                }
              },
              "workspace": {
                "description": "The workspace it belongs to, when the app groups its principals into workspaces.",
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "subject": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "refs": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": ["type"],
                  "additionalProperties": false
                }
              },
              "where": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": ["string", "number", "boolean"]
                    },
                    {
                      "minItems": 1,
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": ["string", "number", "boolean"]
                      }
                    }
                  ]
                }
              }
            },
            "additionalProperties": false,
            "description": "What the credential that set this version's filter could read, when that was less than every event. An event matches only when it meets both."
          },
          "target": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "webhook"
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": ["kind", "endpointId"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "notification"
                  },
                  "topic": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$"
                  },
                  "recipients": {
                    "type": "object",
                    "properties": {
                      "ids": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[\\x21-\\x7e]+$"
                        }
                      },
                      "fromPaths": {
                        "minItems": 1,
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                        }
                      },
                      "followers": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "template": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "body": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "url": {
                        "type": "string",
                        "maxLength": 2048
                      },
                      "push": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "maxLength": 200
                          },
                          "body": {
                            "type": "string",
                            "maxLength": 1000
                          },
                          "sound": {
                            "description": "The sound a push plays: left out, the device’s default sound; `null`, a silent push; or the name of a sound your app bundles.",
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": ["title"],
                    "additionalProperties": false
                  }
                },
                "required": ["kind", "topic", "recipients", "template"],
                "additionalProperties": false
              }
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "version",
          "filter",
          "target",
          "createdAt",
          "createdBy",
          "updatedAt"
        ],
        "examples": [
          {
            "id": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
            "name": "Resolved requests to the support desk",
            "status": "active",
            "version": 1,
            "filter": {
              "types": ["request.resolved"]
            },
            "target": {
              "kind": "webhook",
              "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
            },
            "createdAt": "2026-11-02T14:05:00.000Z",
            "createdBy": "key:backend",
            "updatedAt": "2026-11-02T14:05:00.000Z"
          }
        ]
      },
      "SubscriptionTestResponse": {
        "type": "object",
        "properties": {
          "matched": {
            "type": "boolean"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "clause": {
                  "type": "string",
                  "description": "`status`, `constraint`, `filter`, `types`, `sources`, `workspace`, `subject`, `extensions.<name>`, `refs`, or `where.<path>`."
                },
                "outcome": {
                  "type": "string",
                  "enum": ["matched", "not_matched"]
                },
                "detail": {
                  "type": "string"
                }
              },
              "required": ["clause", "outcome", "detail"]
            }
          }
        },
        "required": ["matched", "steps"],
        "examples": [
          {
            "matched": true,
            "steps": [
              {
                "clause": "status",
                "outcome": "matched",
                "detail": "the subscription is active"
              },
              {
                "clause": "types",
                "outcome": "matched",
                "detail": "request.resolved matches request.resolved"
              }
            ]
          }
        ]
      },
      "SubscriptionVersionRecord": {
        "type": "object",
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "A subscription ID, `sub_…`"
          },
          "version": {
            "type": "number"
          },
          "filter": {
            "type": "object",
            "properties": {
              "types": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^(?:\\*|[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*(?:\\.\\*)?)$"
                }
              },
              "sources": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048,
                  "pattern": "^[^*\\s]*\\*?$"
                }
              },
              "extensions": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[a-z0-9]{1,20}$"
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": ["string", "number", "boolean"]
                    },
                    {
                      "minItems": 1,
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": ["string", "number", "boolean"]
                      }
                    }
                  ]
                }
              },
              "workspace": {
                "description": "The workspace it belongs to, when the app groups its principals into workspaces.",
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "subject": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "refs": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": ["type"],
                  "additionalProperties": false
                }
              },
              "where": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": ["string", "number", "boolean"]
                    },
                    {
                      "minItems": 1,
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": ["string", "number", "boolean"]
                      }
                    }
                  ]
                }
              }
            },
            "additionalProperties": false
          },
          "constraint": {
            "type": "object",
            "properties": {
              "types": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^(?:\\*|[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*(?:\\.\\*)?)$"
                }
              },
              "sources": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048,
                  "pattern": "^[^*\\s]*\\*?$"
                }
              },
              "extensions": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[a-z0-9]{1,20}$"
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": ["string", "number", "boolean"]
                    },
                    {
                      "minItems": 1,
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": ["string", "number", "boolean"]
                      }
                    }
                  ]
                }
              },
              "workspace": {
                "description": "The workspace it belongs to, when the app groups its principals into workspaces.",
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "subject": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "refs": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": ["type"],
                  "additionalProperties": false
                }
              },
              "where": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": ["string", "number", "boolean"]
                    },
                    {
                      "minItems": 1,
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": ["string", "number", "boolean"]
                      }
                    }
                  ]
                }
              }
            },
            "additionalProperties": false
          },
          "target": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "webhook"
                  },
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": ["kind", "endpointId"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "notification"
                  },
                  "topic": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9_-]{0,99}$"
                  },
                  "recipients": {
                    "type": "object",
                    "properties": {
                      "ids": {
                        "minItems": 1,
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 200,
                          "pattern": "^[\\x21-\\x7e]+$"
                        }
                      },
                      "fromPaths": {
                        "minItems": 1,
                        "maxItems": 10,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                        }
                      },
                      "followers": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  },
                  "template": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 500
                      },
                      "body": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "url": {
                        "type": "string",
                        "maxLength": 2048
                      },
                      "push": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string",
                            "maxLength": 200
                          },
                          "body": {
                            "type": "string",
                            "maxLength": 1000
                          },
                          "sound": {
                            "description": "The sound a push plays: left out, the device’s default sound; `null`, a silent push; or the name of a sound your app bundles.",
                            "anyOf": [
                              {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 200
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "required": ["title"],
                    "additionalProperties": false
                  }
                },
                "required": ["kind", "topic", "recipients", "template"],
                "additionalProperties": false
              }
            ]
          },
          "effectiveFrom": {
            "type": "string"
          },
          "effectiveTo": {
            "type": "string"
          }
        },
        "required": [
          "subscriptionId",
          "version",
          "filter",
          "target",
          "effectiveFrom"
        ],
        "examples": [
          {
            "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
            "version": 1,
            "filter": {
              "types": ["request.resolved"]
            },
            "target": {
              "kind": "webhook",
              "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
            },
            "effectiveFrom": "2026-11-02T14:05:00.000Z"
          }
        ]
      },
      "MatchRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A match ID, `mat_…`"
          },
          "eventSequence": {
            "type": "number"
          },
          "subscriptionId": {
            "type": "string",
            "description": "A subscription ID, `sub_…`"
          },
          "subscriptionVersion": {
            "type": "number"
          },
          "cause": {
            "type": "string",
            "enum": ["ingest", "replay"]
          },
          "replayId": {
            "type": "string"
          },
          "decidedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "eventSequence",
          "subscriptionId",
          "subscriptionVersion",
          "cause",
          "decidedAt"
        ],
        "examples": [
          {
            "id": "mat_01M77MA4BADJB617FSKAKFB062",
            "eventSequence": 57,
            "subscriptionId": "sub_01M78RJ7EYFM9WGJ5F35VT6GM7",
            "subscriptionVersion": 1,
            "cause": "ingest",
            "decidedAt": "2026-11-12T16:20:31.000Z"
          }
        ]
      },
      "ReplayRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A replay ID, `rpl_…`"
          },
          "filter": {
            "type": "object",
            "properties": {
              "types": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^(?:\\*|[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*(?:\\.\\*)?)$"
                }
              },
              "sources": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 2048,
                  "pattern": "^[^*\\s]*\\*?$"
                }
              },
              "extensions": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[a-z0-9]{1,20}$"
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": ["string", "number", "boolean"]
                    },
                    {
                      "minItems": 1,
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": ["string", "number", "boolean"]
                      }
                    }
                  ]
                }
              },
              "workspace": {
                "description": "The workspace it belongs to, when the app groups its principals into workspaces.",
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "subject": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "refs": {
                "minItems": 1,
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100
                    },
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 500
                    }
                  },
                  "required": ["type"],
                  "additionalProperties": false
                }
              },
              "where": {
                "type": "object",
                "propertyNames": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_$-]+(?:\\.[A-Za-z0-9_$-]+)*$"
                },
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": ["string", "number", "boolean"]
                    },
                    {
                      "minItems": 1,
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": ["string", "number", "boolean"]
                      }
                    }
                  ]
                }
              }
            },
            "additionalProperties": false
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "target": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "subscriptionId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": ["subscriptionId"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": ["endpointId"],
                "additionalProperties": false
              }
            ]
          },
          "definitions": {
            "type": "string",
            "enum": ["current", "historical"]
          },
          "status": {
            "type": "string",
            "enum": ["running", "completed", "canceled", "failed"]
          },
          "counts": {
            "type": "object",
            "properties": {
              "scanned": {
                "type": "number",
                "description": "Events in the range that met the filter."
              },
              "matched": {
                "type": "number",
                "description": "Matches written, one per event and subscription."
              },
              "deliveries": {
                "type": "number",
                "description": "Deliveries written, including those skipped for a disabled endpoint."
              }
            },
            "required": ["scanned", "matched", "deliveries"]
          },
          "cursor": {
            "type": "number",
            "description": "The last sequence scanned. Progress, and where a resumed replay would pick up."
          },
          "error": {
            "type": "string",
            "description": "Why it failed, when it did."
          },
          "requestedBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "completedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "filter",
          "from",
          "to",
          "target",
          "definitions",
          "status",
          "counts",
          "requestedBy",
          "createdAt"
        ],
        "examples": [
          {
            "id": "rpl_01M78R4G3T1T880VR82SDPXJHK",
            "filter": {
              "types": ["request.resolved"]
            },
            "from": "2026-11-11T00:00:00.000Z",
            "to": "2026-11-12T00:00:00.000Z",
            "target": {
              "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
            },
            "definitions": "current",
            "status": "completed",
            "counts": {
              "scanned": 18,
              "matched": 18,
              "deliveries": 18
            },
            "cursor": 39,
            "requestedBy": "key:backend",
            "createdAt": "2026-11-13T09:30:00.000Z",
            "completedAt": "2026-11-13T09:30:02.000Z"
          }
        ]
      },
      "ReplayPreview": {
        "description": "The answer to a dry run: what a replay would do, with nothing written. It counts up to 5,000 events; `partial` marks a longer range.",
        "type": "object",
        "properties": {
          "dryRun": {
            "const": true
          },
          "target": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "subscriptionId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": ["subscriptionId"],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "endpointId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": ["endpointId"],
                "additionalProperties": false
              }
            ]
          },
          "definitions": {
            "type": "string",
            "enum": ["current", "historical"]
          },
          "counts": {
            "type": "object",
            "properties": {
              "scanned": {
                "type": "number",
                "description": "Events in the range that met the filter."
              },
              "matched": {
                "type": "number",
                "description": "Matches written, one per event and subscription."
              },
              "deliveries": {
                "type": "number",
                "description": "Deliveries written, including those skipped for a disabled endpoint."
              }
            },
            "required": ["scanned", "matched", "deliveries"]
          },
          "partial": {
            "type": "boolean",
            "description": "True when the preview stopped before the range's end; `cursor` is the last sequence it counted."
          },
          "cursor": {
            "type": "number"
          }
        },
        "required": ["dryRun", "target", "definitions", "counts"],
        "examples": [
          {
            "dryRun": true,
            "target": {
              "endpointId": "end_01M7A4A7MV7ACEEPN21HTHJE6Y"
            },
            "definitions": "current",
            "counts": {
              "scanned": 18,
              "matched": 18,
              "deliveries": 18
            }
          }
        ]
      },
      "TopicRecord": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "defaults": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            }
          },
          "required": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "name",
          "defaults",
          "required",
          "createdAt",
          "updatedAt"
        ],
        "examples": [
          {
            "key": "assignments",
            "name": "Assignments",
            "description": "When a request is assigned to you",
            "defaults": {
              "inbox": true,
              "push": false
            },
            "required": false,
            "createdAt": "2026-11-02T14:05:00.000Z",
            "updatedAt": "2026-11-02T14:05:00.000Z"
          }
        ]
      },
      "RecipientRecord": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "follows": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "preferences": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "type": "boolean"
              }
            },
            "description": "Only what the recipient set; a topic missing here follows its defaults."
          },
          "seenThrough": {
            "type": "string",
            "description": "The newest notification the recipient has seen."
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": ["id", "follows", "preferences", "createdAt", "updatedAt"],
        "examples": [
          {
            "id": "u_ana",
            "follows": ["assignments"],
            "preferences": {
              "assignments": {
                "push": true
              }
            },
            "seenThrough": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW",
            "createdAt": "2026-11-02T14:05:00.000Z",
            "updatedAt": "2026-11-13T09:30:00.000Z"
          }
        ]
      },
      "TopicPreference": {
        "description": "One topic as a principal's preferences show it.",
        "type": "object",
        "properties": {
          "topic": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "required": {
            "type": "boolean",
            "description": "A required topic's notifications are delivered whatever is set, so your preference page can lock its control."
          },
          "channels": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "Whether a notification on this topic reaches each channel now: the preference, or else the default."
          },
          "set": {
            "type": "object",
            "additionalProperties": {
              "type": "boolean"
            },
            "description": "What the recipient set, apart from the defaults."
          }
        },
        "required": ["topic", "name", "required", "channels", "set"],
        "examples": [
          {
            "topic": "assignments",
            "name": "Assignments",
            "description": "When a request is assigned to you",
            "required": false,
            "channels": {
              "inbox": true,
              "push": true
            },
            "set": {
              "push": true
            }
          }
        ]
      },
      "PushAddressRecord": {
        "description": "One push address: a provider and a token, bound to a recipient. The token is never returned.",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A push address ID, `pad_…`"
          },
          "recipientId": {
            "type": "string"
          },
          "provider": {
            "const": "expo",
            "description": "The push providers EventWolf sends through. Expo first; direct APNs, FCM, and Web Push would be new values."
          },
          "status": {
            "type": "string",
            "enum": ["active", "invalid"],
            "description": "`invalid` once the provider reports the app gone from the device; deliveries to it are then skipped. Registering the token again makes it `active`."
          },
          "invalidatedAt": {
            "type": "string"
          },
          "invalidReason": {
            "const": "device_not_registered",
            "description": "Why an address stopped being used: the provider said the app is no longer on the device."
          },
          "seenThrough": {
            "type": "string",
            "description": "This phone's newest seen notification. Absent on a new address, which starts with nothing seen."
          },
          "createdAt": {
            "type": "string"
          },
          "lastDeliveredAt": {
            "type": "string",
            "description": "When a push to it last reached the device, as the provider reported."
          }
        },
        "required": ["id", "recipientId", "provider", "status", "createdAt"],
        "examples": [
          {
            "id": "pad_01M79Z4K8R2T6V0X3B5D7F9H1J",
            "recipientId": "u_ana",
            "provider": "expo",
            "status": "active",
            "createdAt": "2026-11-02T14:05:00.000Z",
            "lastDeliveredAt": "2026-11-12T09:41:07.000Z",
            "seenThrough": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW"
          }
        ]
      },
      "SeenResponse": {
        "type": "object",
        "properties": {
          "seenThrough": {
            "type": "string",
            "description": "The stored position after the call: the one given, or a newer one already stored."
          },
          "unseen": {
            "type": "number",
            "description": "Remaining unseen notifications on the target surface."
          }
        },
        "required": ["seenThrough", "unseen"],
        "examples": [
          {
            "seenThrough": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW",
            "unseen": 0
          }
        ]
      },
      "NotificationRecord": {
        "description": "One notification: rendered, with a `title`, or erased, with `erasedAt` and no text.",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "A notification ID, `ntf_…`"
              },
              "recipientId": {
                "type": "string"
              },
              "topic": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": ["delivered", "skipped"],
                "description": "`skipped` notifications are recorded, never shown in an inbox."
              },
              "skipReason": {
                "const": "preference_off"
              },
              "eventSequence": {
                "type": "number"
              },
              "subscriptionId": {
                "type": "string",
                "description": "A subscription ID, `sub_…`"
              },
              "readAt": {
                "type": "string"
              },
              "archivedAt": {
                "type": "string"
              },
              "createdAt": {
                "type": "string"
              },
              "title": {
                "type": "string",
                "description": "Present on every notification but an erased one, which has none."
              },
              "body": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "recipientId",
              "topic",
              "status",
              "eventSequence",
              "subscriptionId",
              "createdAt",
              "title"
            ],
            "description": "A notification with its text, rendered once when its event was accepted and never re-rendered."
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "A notification ID, `ntf_…`"
              },
              "recipientId": {
                "type": "string"
              },
              "topic": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": ["delivered", "skipped"],
                "description": "`skipped` notifications are recorded, never shown in an inbox."
              },
              "skipReason": {
                "const": "preference_off"
              },
              "eventSequence": {
                "type": "number"
              },
              "subscriptionId": {
                "type": "string",
                "description": "A subscription ID, `sub_…`"
              },
              "readAt": {
                "type": "string"
              },
              "archivedAt": {
                "type": "string"
              },
              "createdAt": {
                "type": "string"
              },
              "erasedAt": {
                "type": "string",
                "description": "When the notification’s event was erased. Present only on an erased notification, which has no `title`, `body`, or `url`."
              }
            },
            "required": [
              "id",
              "recipientId",
              "topic",
              "status",
              "eventSequence",
              "subscriptionId",
              "createdAt",
              "erasedAt"
            ],
            "description": "A notification whose event was erased: its title, body, and URL are gone, and `erasedAt` says when. The app shows it in its own words, or leaves it out."
          }
        ],
        "examples": [
          {
            "id": "ntf_01M79YXJ3F3P1VQPWS0ZVBHHAW",
            "recipientId": "u_ana",
            "topic": "assignments",
            "title": "Ben assigned “Refund for order 1042” to you",
            "url": "/requests/r_9",
            "status": "delivered",
            "eventSequence": 42,
            "subscriptionId": "sub_01M79K2W6Q8RZ4T1NB0XJ7C3DA",
            "createdAt": "2026-11-12T09:41:07.000Z"
          }
        ]
      },
      "InboxCount": {
        "description": "What is waiting in an inbox, archived notifications left out.",
        "type": "object",
        "properties": {
          "unread": {
            "type": "number"
          },
          "unseen": {
            "type": "number",
            "description": "Newer than the recipient's inbox seen position. Phone badges have their own positions."
          }
        },
        "required": ["unread", "unseen"],
        "examples": [
          {
            "unread": 1,
            "unseen": 0
          }
        ]
      },
      "ReadAllResponse": {
        "type": "object",
        "properties": {
          "read": {
            "type": "number",
            "description": "Notifications marked read by this call."
          }
        },
        "required": ["read"],
        "examples": [
          {
            "read": 4
          }
        ]
      },
      "Error": {
        "description": "The body of every error. Act on `error.code`: each code has an entry on [EventWolf errors](https://agentpost.tools/docs/eventwolf/errors).",
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "What to act on. It never changes for a given error. Each error response lists the codes it can carry."
              },
              "message": {
                "type": "string",
                "description": "What went wrong, for humans. It may change."
              },
              "details": {
                "description": "What the code needs, when it needs more, such as `issues` for `invalid_request`."
              },
              "docs": {
                "type": "string",
                "format": "uri",
                "description": "The code’s entry on the errors page."
              }
            },
            "required": ["code", "message", "docs"]
          }
        },
        "required": ["error"]
      }
    },
    "securitySchemes": {
      "secretKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "sk_…",
        "description": "Your project’s secret key, sent from your server. It reaches every operation but the inbox."
      },
      "userToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "ut_…",
        "description": "A user token for a signed-in principal, which reaches only their own inbox and push addresses. Your server mints one for a principal of your own sign-in, whose ID becomes their recipient ID."
      },
      "sessionToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "agp_st_…",
        "description": "The IdentityHound session token of a principal signed in to your project, which reaches only their own inbox and push addresses."
      },
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "agp_ak_…",
        "description": "A principal's API key, which reaches only their own inbox and push addresses."
      },
      "delegatedToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "agp_dt_…",
        "description": "A delegated token, with which an agent acts for a principal through a delegation, which reaches only that principal’s own inbox and push addresses."
      }
    }
  }
}
