{
  "components": {
    "schemas": {
      "AccountExport": {
        "properties": {
          "exported_at": {
            "format": "date-time",
            "type": "string"
          },
          "feedback": {
            "items": {
              "$ref": "#/components/schemas/ExportedFeedback"
            },
            "type": "array"
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/ExportedOrganization"
            },
            "type": "array"
          },
          "sessions": {
            "items": {
              "$ref": "#/components/schemas/ExportedSession"
            },
            "type": "array"
          },
          "user": {
            "$ref": "#/components/schemas/ExportedUser"
          }
        },
        "required": [
          "exported_at",
          "user",
          "organizations",
          "sessions",
          "feedback"
        ],
        "type": "object"
      },
      "Actor": {
        "properties": {
          "id": {
            "description": "`usr_` or `key_` ID.",
            "type": "string"
          },
          "name": {
            "description": "The person's email, or the key's name.",
            "type": "string"
          },
          "type": {
            "description": "`user` or `api_key`.",
            "type": "string"
          }
        },
        "required": [
          "type",
          "id",
          "name"
        ],
        "type": "object"
      },
      "AddSourceSecret": {
        "properties": {
          "overlap_seconds": {
            "description": "How long the previous secret keeps working, 0 to 2592000 seconds;\na day when left out.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "value": {
            "description": "The secret as the provider shows it, such as Stripe's `whsec_...`.",
            "example": "whsec_...",
            "type": "string"
          }
        },
        "required": [
          "value"
        ],
        "type": "object"
      },
      "Alert": {
        "properties": {
          "id": {
            "example": "alt_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AlertKind"
          },
          "opened_at": {
            "format": "date-time",
            "type": "string"
          },
          "resolved_at": {
            "description": "None while it is open.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "rule_id": {
            "example": "alr_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "subject_id": {
            "description": "The `src_` or `dst_` ID it is about; none for `quota`.",
            "type": [
              "string",
              "null"
            ]
          },
          "subject_name": {
            "description": "Its name now; none once it is deleted.",
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "example": "billing-api has failed for 12 minutes, with no successful delivery.",
            "type": "string"
          },
          "value": {
            "description": "What the rule measured when it opened: minutes, events, deliveries\nor a percentage.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "rule_id",
          "kind",
          "value",
          "summary",
          "opened_at"
        ],
        "type": "object"
      },
      "AlertChannel": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "example": "ach_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "target": {
            "description": "The address, or the URL's scheme, host and first path segment: the\nrest of a webhook URL, often its secret, is never shown again.",
            "example": "https://hooks.slack.com/services/…",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/ChannelType"
          }
        },
        "required": [
          "id",
          "type",
          "target",
          "created_at"
        ],
        "type": "object"
      },
      "AlertKind": {
        "description": "What a rule watches.",
        "enum": [
          "destination_failing",
          "verification_failures",
          "dead_letters",
          "quota",
          "source_silent"
        ],
        "type": "string"
      },
      "AlertRule": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "destination_id": {
            "description": "The one destination watched (`destination_failing`, `dead_letters`);\nnone watches every destination of the environment.",
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "description": "A disabled rule is not evaluated, and its open alerts resolve.",
            "type": "boolean"
          },
          "id": {
            "example": "alr_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/AlertKind"
          },
          "minutes": {
            "description": "The window, 1 to 1440; for `destination_failing` and\n`source_silent`, how long the condition must have held.",
            "format": "int32",
            "type": "integer"
          },
          "open_alerts": {
            "description": "Its alerts open now.",
            "format": "int64",
            "type": "integer"
          },
          "source_id": {
            "description": "The one source watched (`verification_failures`, `source_silent`);\nnone watches every source of the environment.",
            "type": [
              "string",
              "null"
            ]
          },
          "threshold": {
            "description": "Events or deliveries in the window (`verification_failures`,\n`dead_letters`), or a percentage of the month's events (`quota`).",
            "format": "int32",
            "type": "integer"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "minutes",
          "threshold",
          "enabled",
          "open_alerts",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "ApiKey": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "hint": {
            "description": "The secret's first characters, to tell keys apart.",
            "example": "rk_a1B2",
            "type": "string"
          },
          "id": {
            "example": "key_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "kind": {
            "description": "`personal`, `service`, or a revoked, unclassified `legacy` credential.",
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "owner_user_id": {
            "description": "Human subject for personal keys; absent for service and legacy keys.",
            "type": [
              "string",
              "null"
            ]
          },
          "revoked_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "description": "Original permission ceiling, not the personal owner's effective role.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "hint",
          "role",
          "kind",
          "created_at"
        ],
        "type": "object"
      },
      "Attempt": {
        "properties": {
          "duration_ms": {
            "format": "int32",
            "type": "integer"
          },
          "error": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AttemptError",
                "description": "Why it failed, explained; none when it was answered with a 2xx (P3-61)."
              }
            ]
          },
          "number": {
            "format": "int32",
            "type": "integer"
          },
          "remote_ip": {
            "description": "The address it connected to, once TCP connected (P3-56).",
            "example": "203.0.113.7",
            "type": [
              "string",
              "null"
            ]
          },
          "started_at": {
            "format": "date-time",
            "type": "string"
          },
          "status_code": {
            "description": "The destination's response status, or none if the request failed.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "number",
          "started_at",
          "duration_ms"
        ],
        "type": "object"
      },
      "AttemptError": {
        "description": "A failed attempt, explained. The fault and outcome are a best guess from\nhow the attempt failed, never certain.",
        "properties": {
          "fault": {
            "description": "Who is probably at fault: `destination`, `network`, `ricochet` or\n`configuration`.",
            "example": "destination",
            "type": "string"
          },
          "hint": {
            "description": "What to do about it.",
            "type": "string"
          },
          "kind": {
            "description": "How it failed: `dns`, `refused`, `connect_timeout`, `tls`, `send`,\n`response_timeout`, `closed_by_peer`, `blocked_target` or `other`\n(which includes a response that was not a 2xx).",
            "example": "closed_by_peer",
            "type": "string"
          },
          "message": {
            "description": "What happened.",
            "example": "Your server closed the connection before answering.",
            "type": "string"
          },
          "outcome": {
            "description": "Whether the destination got the request: `not_received`, `unknown`\n(it may have, so a retry can repeat it) or `received`.",
            "example": "unknown",
            "type": "string"
          },
          "phase": {
            "description": "Where it failed: `connect`, `tls`, `send`, `wait_first_byte`,\n`read_headers` or `read_body`; none when no connection phase applies.",
            "example": "wait_first_byte",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "kind",
          "message",
          "hint",
          "fault",
          "outcome"
        ],
        "type": "object"
      },
      "AttemptErrorGroup": {
        "properties": {
          "count": {
            "description": "Failed attempts in the group.",
            "format": "int64",
            "type": "integer"
          },
          "key": {
            "description": "The failure kind, the `dst_` ID, or the minute (`2026-10-14T18:17:00Z`).",
            "example": "closed_by_peer",
            "type": "string"
          },
          "name": {
            "description": "The destination's name, when grouped by destination and it still exists.",
            "type": [
              "string",
              "null"
            ]
          },
          "slowest": {
            "$ref": "#/components/schemas/SlowestAttempt",
            "description": "The one that took longest."
          }
        },
        "required": [
          "key",
          "count",
          "slowest"
        ],
        "type": "object"
      },
      "AttemptErrors": {
        "properties": {
          "after": {
            "format": "date-time",
            "type": "string"
          },
          "before": {
            "format": "date-time",
            "type": "string"
          },
          "group_by": {
            "example": "kind",
            "type": "string"
          },
          "groups": {
            "description": "By count, largest first; by minute, oldest first. At most 500.",
            "items": {
              "$ref": "#/components/schemas/AttemptErrorGroup"
            },
            "type": "array"
          },
          "total": {
            "description": "Failed attempts in the range, in every group.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "after",
          "before",
          "group_by",
          "total",
          "groups"
        ],
        "type": "object"
      },
      "AuditEntry": {
        "description": "One line of the log.",
        "properties": {
          "action": {
            "description": "`<subject>.<verb>`: `source`, `destination` or `connection`\n`.created`, `.updated` or `.deleted`; `environment.created`,\n`.updated` or `.deleted`; `project.created`, `.renamed` or\n`.deleted`; `organization.renamed`; `member.joined`, `.role_changed`,\n`.removed` or `.left`; `invite.created`, `.revoked` or `.declined`;\n`api_key.created` or `.revoked`; `alert_rule.created`, `.updated` or\n`.deleted`; `alert_channel.created` or `.deleted`; `replay.created`; `replay_job.created`,\n`.started`, `.paused` or `.cancelled`; `event.resent` or `.released`.",
            "example": "member.role_changed",
            "type": "string"
          },
          "actor": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Actor",
                "description": "Who did it; absent when it was not done through the API, or the\nperson or key is gone."
              }
            ]
          },
          "actor_name": {
            "description": "The person's email or the key's name when it was done, kept after\nthey are gone.",
            "type": [
              "string",
              "null"
            ]
          },
          "at": {
            "format": "date-time",
            "type": "string"
          },
          "details": {
            "description": "What changed, by action: `fields` for an update, `from` and `to` for\na role, `role` for an invite or key; never secret values.",
            "type": "object"
          },
          "environment_id": {
            "example": "env_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "description": "Increases with each line; pass as `before` for older ones.",
            "format": "int64",
            "type": "integer"
          },
          "project_id": {
            "example": "prj_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": [
              "string",
              "null"
            ]
          },
          "subject_id": {
            "description": "What it was done to; it may no longer exist.",
            "example": "usr_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": [
              "string",
              "null"
            ]
          },
          "subject_name": {
            "description": "Its name or address at the time.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "action",
          "details",
          "at"
        ],
        "type": "object"
      },
      "AuditPage": {
        "description": "One page of the log.",
        "properties": {
          "data": {
            "description": "Newest first.",
            "items": {
              "$ref": "#/components/schemas/AuditEntry"
            },
            "type": "array"
          },
          "next_before": {
            "description": "Pass as `before` for the next, older page; absent on the last page.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "Body": {
        "properties": {
          "base64": {
            "description": "The body's exact bytes.",
            "type": "string"
          },
          "text": {
            "description": "The body as text, when it is valid UTF-8.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "base64"
        ],
        "type": "object"
      },
      "BuildUpdate": {
        "properties": {
          "subject": {
            "description": "The email's subject.",
            "type": "string"
          },
          "test": {
            "description": "Send it only to `OWNER_EMAIL`, to read it first. Not recorded.",
            "type": "boolean"
          },
          "text": {
            "description": "The email's plain text; the unsubscribe link is added after it.",
            "type": "string"
          }
        },
        "required": [
          "subject",
          "text"
        ],
        "type": "object"
      },
      "BuildUpdateSent": {
        "properties": {
          "recipients": {
            "description": "The emails queued.",
            "format": "int64",
            "type": "integer"
          },
          "test": {
            "type": "boolean"
          }
        },
        "required": [
          "recipients",
          "test"
        ],
        "type": "object"
      },
      "Candidate": {
        "description": "A waitlist signup that can be invited, with its survey answers.",
        "properties": {
          "current_tool": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "events": {
            "type": [
              "string",
              "null"
            ]
          },
          "fit": {
            "description": "Survey fit, 0 to 7; the order invites go out in.",
            "format": "int32",
            "type": "integer"
          },
          "providers": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "signed_up_at": {
            "format": "date-time",
            "type": "string"
          },
          "team": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "email",
          "signed_up_at",
          "fit"
        ],
        "type": "object"
      },
      "Certificate": {
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "issuer": {
            "example": "Let's Encrypt R11",
            "type": "string"
          },
          "subject": {
            "type": "string"
          }
        },
        "required": [
          "issuer",
          "subject",
          "expires_at"
        ],
        "type": "object"
      },
      "ChallengeAnswer": {
        "properties": {
          "challenge": {
            "type": "string"
          },
          "code": {
            "description": "A code from the authenticator app, or a recovery code.",
            "type": "string"
          }
        },
        "required": [
          "challenge",
          "code"
        ],
        "type": "object"
      },
      "Change": {
        "description": "One change.",
        "properties": {
          "action": {
            "description": "`created`, `updated` or `deleted`.",
            "type": "string"
          },
          "actor": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Actor",
                "description": "Who made it; absent when it was not made through the API, or the\nperson or key is gone."
              }
            ]
          },
          "changed_at": {
            "format": "date-time",
            "type": "string"
          },
          "fields": {
            "description": "For `updated`, what changed: column names such as `url` or `paused`,\nand `secrets` or `credential`. Never the values.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "description": "Increases with each change; pass as `before` for older ones.",
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "description": "Its name at the time; a connection's is its source's and destination's.",
            "type": [
              "string",
              "null"
            ]
          },
          "subject": {
            "description": "`source`, `destination` or `connection`.",
            "type": "string"
          },
          "subject_id": {
            "description": "Its `src_`, `dst_` or `con_` ID; it may no longer exist.",
            "example": "src_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          }
        },
        "required": [
          "id",
          "subject",
          "subject_id",
          "action",
          "fields",
          "changed_at"
        ],
        "type": "object"
      },
      "ChangePage": {
        "description": "One page of changes.",
        "properties": {
          "data": {
            "description": "Newest first.",
            "items": {
              "$ref": "#/components/schemas/Change"
            },
            "type": "array"
          },
          "next_before": {
            "description": "Pass as `before` for the next, older page; absent on the last page.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ChannelType": {
        "enum": [
          "email",
          "webhook"
        ],
        "type": "string"
      },
      "CheckDestination": {
        "properties": {
          "method": {
            "$ref": "#/components/schemas/CheckRequest"
          }
        },
        "type": "object"
      },
      "CheckRequest": {
        "description": "What to send.",
        "enum": [
          "head",
          "options",
          "event"
        ],
        "type": "string"
      },
      "CheckSignature": {
        "properties": {
          "secret": {
            "description": "A secret to check with, as the provider shows it; omitted, the\nsource's current secrets.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "CheckStep": {
        "description": "One step of the request.",
        "properties": {
          "detail": {
            "description": "What it found: the address, the certificate, the status.",
            "example": "Port 443 accepted the connection",
            "type": [
              "string",
              "null"
            ]
          },
          "duration_ms": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "description": "`dns` (the name lookup and the address rules), `connect`, `tls`,\n`send`, `first_byte` or `status`.",
            "example": "connect",
            "type": "string"
          },
          "state": {
            "description": "`ok`, `failed`, `skipped` (TLS for an `http` URL) or `not_run`\n(after the step that failed).",
            "example": "ok",
            "type": "string"
          }
        },
        "required": [
          "name",
          "state"
        ],
        "type": "object"
      },
      "CheckedWith": {
        "description": "Which secret was checked.",
        "enum": [
          "candidate",
          "current"
        ],
        "type": "string"
      },
      "Circuit": {
        "description": "A destination's circuit breaker, as the gateway sees it now.",
        "properties": {
          "consecutive_failures": {
            "description": "Failed deliveries in a row.",
            "format": "int64",
            "type": "integer"
          },
          "in_flight": {
            "description": "Requests to it in progress now.",
            "format": "int64",
            "type": "integer"
          },
          "opened_at": {
            "description": "When the circuit opened; null while closed.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "retry_at": {
            "description": "When an open circuit lets a probe through.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "$ref": "#/components/schemas/CircuitState"
          }
        },
        "required": [
          "state",
          "consecutive_failures",
          "in_flight"
        ],
        "type": "object"
      },
      "CircuitState": {
        "description": "A circuit's state (P2-22).",
        "enum": [
          "closed",
          "open",
          "half_open"
        ],
        "type": "string"
      },
      "ClaimedInstant": {
        "description": "Where a claimed URL now lives (P3-22).",
        "properties": {
          "environment_id": {
            "description": "`env_` ID.",
            "type": "string"
          },
          "project_id": {
            "description": "`prj_` ID.",
            "type": "string"
          },
          "source_id": {
            "description": "`src_` ID.",
            "type": "string"
          }
        },
        "required": [
          "project_id",
          "environment_id",
          "source_id"
        ],
        "type": "object"
      },
      "Code": {
        "description": "A code from the authenticator app, or a recovery code.",
        "properties": {
          "code": {
            "type": "string"
          }
        },
        "required": [
          "code"
        ],
        "type": "object"
      },
      "Connection": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "destination_id": {
            "type": "string"
          },
          "filter": {
            "description": "Which events it takes; none takes them all. `{\"and\": [...]}`,\n`{\"or\": [...]}`, `{\"not\": filter}` or a condition\n`{\"path\": path, <operator>: operand}`, where a path is\n`headers.<name>`, `body`, `body.<key>...` or `event_type` (the\nprovider's name for the event) and the operator is\n`equals`, `one_of`, `exists`, `gt`, `gte`, `lt`, `lte` or `matches`\n(a PCRE pattern). At most 8 levels and 100 nodes.",
            "type": [
              "object",
              "null"
            ]
          },
          "id": {
            "example": "con_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "paused": {
            "description": "A paused connection holds its deliveries until it is resumed.",
            "type": "boolean"
          },
          "source_id": {
            "type": "string"
          },
          "transformation": {
            "description": "How the JSON body is reshaped for the destination; none sends it as\nstored. Up to 50 steps, in order: `{\"rename\": path, \"to\": path}`,\n`{\"drop\": path}`, `{\"add\": path, \"value\": json}`,\n`{\"add\": path, \"from\": path}` or\n`{\"map\": path, \"values\": {...}, \"default\": json}`, with paths into the\nbody such as `data.object.id`.",
            "example": [
              {
                "rename": "data.object",
                "to": "invoice"
              }
            ],
            "items": {
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "source_id",
          "destination_id",
          "paused",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "Count": {
        "properties": {
          "confirmed": {
            "format": "int64",
            "type": "integer"
          },
          "key": {
            "description": "The source or campaign; null when the signup had none.",
            "type": [
              "string",
              "null"
            ]
          },
          "submitted": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "submitted",
          "confirmed"
        ],
        "type": "object"
      },
      "CreateAlertChannel": {
        "properties": {
          "target": {
            "description": "A member's email address, or the webhook's URL.",
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/ChannelType",
            "description": "Read after the caller's access is checked."
          }
        },
        "type": "object"
      },
      "CreateAlertRule": {
        "properties": {
          "destination_id": {
            "description": "`dst_` ID, for a destination rule; every destination when left out.",
            "type": [
              "string",
              "null"
            ]
          },
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "kind": {
            "$ref": "#/components/schemas/AlertKind",
            "description": "Read after the caller's access is checked, so an unknown kind is a\n422 only for someone who may make rules."
          },
          "minutes": {
            "description": "Default 10 for `destination_failing`, 5 for\n`verification_failures`, 60 otherwise.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "source_id": {
            "description": "`src_` ID, for a source rule; every source when left out.",
            "type": [
              "string",
              "null"
            ]
          },
          "threshold": {
            "description": "Default 10 for `verification_failures`, 1 for `dead_letters`, 80 for\n`quota`.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "CreateApiKey": {
        "properties": {
          "kind": {
            "$ref": "#/components/schemas/KeyKind",
            "description": "Defaults to personal. Service credentials require a human admin."
          },
          "name": {
            "example": "CI",
            "type": "string"
          },
          "role": {
            "description": "Personal: optional ceiling, at most the caller's role (never owner).\nService: required independent `viewer` or `developer` grant.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateConnection": {
        "properties": {
          "destination_id": {
            "example": "dst_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "filter": {
            "description": "As in `Connection`; every event when left out.",
            "type": [
              "object",
              "null"
            ]
          },
          "source_id": {
            "example": "src_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "transformation": {
            "description": "As in `Connection`; the body as stored when left out.",
            "items": {
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "required": [
          "source_id",
          "destination_id"
        ],
        "type": "object"
      },
      "CreateDestination": {
        "properties": {
          "name": {
            "example": "billing-api",
            "type": "string"
          },
          "settings": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DestinationSettings",
                "description": "The gateway's defaults when left out."
              }
            ]
          },
          "type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DestinationType",
                "description": "`http` when left out. A `cli` destination belongs to the caller (for\nan API key, the person who made it) and has no URL."
              }
            ]
          },
          "url": {
            "description": "For an `http` destination: a public `http` or `https` URL.",
            "example": "https://api.example.com/webhooks/stripe",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateEnvironment": {
        "properties": {
          "kind": {
            "description": "`staging` or `production` (or `dev`, if it was deleted).",
            "example": "production",
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "type": "object"
      },
      "CreateInstant": {
        "properties": {
          "cli": {
            "description": "From `ricochet listen`: the URL also gets a CLI destination to\nforward from.",
            "type": "boolean"
          },
          "turnstile_token": {
            "description": "From the site's Turnstile widget: required unless `cli`, when the API\nchecks Turnstile.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "CreateReplayJob": {
        "properties": {
          "destination_environment_id": {
            "description": "`env_` ID of another of the project's environments the destination is\nin.",
            "type": [
              "string",
              "null"
            ]
          },
          "destination_id": {
            "description": "`dst_` ID to replay every event to; without one, each event goes to\nits original destinations.",
            "type": [
              "string",
              "null"
            ]
          },
          "rate_per_second": {
            "description": "Replays started per second, 1 to 100; default 10. The destination's\nown limits still apply.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "selection": {
            "$ref": "#/components/schemas/Selection"
          }
        },
        "required": [
          "selection"
        ],
        "type": "object"
      },
      "CreateShare": {
        "properties": {
          "expires_in_hours": {
            "description": "How long the link works: 1 to 720 hours; 168 (a week) when left out.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "CreateSource": {
        "properties": {
          "deduplication": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Deduplication"
              }
            ]
          },
          "handshake": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Handshake",
                "description": "Defaults to `none`."
              }
            ]
          },
          "methods": {
            "description": "Defaults to `[\"POST\"]`.",
            "items": {
              "$ref": "#/components/schemas/Method"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "name": {
            "example": "Stripe",
            "type": "string"
          },
          "response": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SourceResponse",
                "description": "Defaults to 200 with an empty body."
              }
            ]
          },
          "search_fields": {
            "description": "Up to 5 fields its events can be searched by; none by default.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "verification": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Verification",
                "description": "Defaults to `{\"method\": \"none\"}`: every request is accepted."
              }
            ]
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreatedDestination": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Destination"
          },
          {
            "properties": {
              "signing_secret": {
                "description": "What the receiver verifies signatures with, shown only now; none\nfor a `cli` destination, or when the API has no `MASTER_KEYS`, until\none is made with `POST .../secrets`.",
                "example": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "type": "object"
          }
        ],
        "description": "A new destination, with its first signing secret."
      },
      "CredentialType": {
        "enum": [
          "bearer",
          "basic",
          "header"
        ],
        "type": "string"
      },
      "Deduplication": {
        "description": "Provider identity policy, independent of signature verification.",
        "oneOf": [
          {
            "description": "Preserve existing ingestion behavior.",
            "properties": {
              "preset": {
                "enum": [
                  "none"
                ],
                "type": "string"
              }
            },
            "required": [
              "preset"
            ],
            "type": "object"
          },
          {
            "description": "Stripe's top-level event id.",
            "properties": {
              "preset": {
                "enum": [
                  "stripe"
                ],
                "type": "string"
              },
              "window_seconds": {
                "format": "int32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "preset"
            ],
            "type": "object"
          },
          {
            "description": "GitHub's X-GitHub-Delivery header.",
            "properties": {
              "preset": {
                "enum": [
                  "github"
                ],
                "type": "string"
              },
              "window_seconds": {
                "format": "int32",
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "preset"
            ],
            "type": "object"
          }
        ]
      },
      "Delivery": {
        "properties": {
          "attempts": {
            "description": "In order.",
            "items": {
              "$ref": "#/components/schemas/Attempt"
            },
            "type": "array"
          },
          "connection_id": {
            "description": "The connection that routed it (`con_` ID), which may since be deleted.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "destination_id": {
            "example": "dst_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "destination_name": {
            "description": "The destination's name, unless it was deleted.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "example": "dlv_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "status": {
            "description": "`pending`, `delivered` or `dead`.",
            "example": "pending",
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "destination_id",
          "status",
          "created_at",
          "updated_at",
          "attempts"
        ],
        "type": "object"
      },
      "DeliveryStatus": {
        "description": "A delivery's status.",
        "enum": [
          "pending",
          "delivered",
          "dead"
        ],
        "type": "string"
      },
      "Destination": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "credential": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DestinationCredential",
                "description": "The credential sent with each delivery, without its secret."
              }
            ]
          },
          "id": {
            "example": "dst_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "owner_id": {
            "description": "The developer whose `ricochet listen` sessions a `cli` destination\nrelays to.",
            "example": "usr_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": [
              "string",
              "null"
            ]
          },
          "owner_name": {
            "description": "The owner's name, or email when they have none.",
            "type": [
              "string",
              "null"
            ]
          },
          "paused": {
            "description": "A paused destination holds its deliveries until it is resumed.",
            "type": "boolean"
          },
          "settings": {
            "$ref": "#/components/schemas/DestinationSettings",
            "description": "Retry policy, limits and header rules."
          },
          "type": {
            "$ref": "#/components/schemas/DestinationType"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "description": "Where an `http` destination delivers.",
            "example": "https://api.example.com/webhooks/stripe",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "type",
          "paused",
          "settings",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "DestinationCheck": {
        "properties": {
          "certificate": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Certificate",
                "description": "The destination's TLS certificate, for an `https` URL."
              }
            ]
          },
          "duration_ms": {
            "description": "The whole check.",
            "format": "int64",
            "type": "integer"
          },
          "error": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/AttemptError",
                "description": "How it failed and what to do, as for an attempt (P3-61); none when it\nwas answered with a 2xx."
              }
            ]
          },
          "method": {
            "description": "`HEAD`, `OPTIONS` or `POST`.",
            "example": "HEAD",
            "type": "string"
          },
          "remote_ip": {
            "description": "The checked address it connected to.",
            "type": [
              "string",
              "null"
            ]
          },
          "request": {
            "$ref": "#/components/schemas/CheckRequest"
          },
          "started_at": {
            "format": "date-time",
            "type": "string"
          },
          "status_code": {
            "description": "The response's status, if one came.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "steps": {
            "description": "In order; each is `ok` until the one that failed.",
            "items": {
              "$ref": "#/components/schemas/CheckStep"
            },
            "type": "array"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "method",
          "request",
          "started_at",
          "duration_ms",
          "steps"
        ],
        "type": "object"
      },
      "DestinationCredential": {
        "description": "What is shown of a credential; its secret never is.",
        "properties": {
          "header": {
            "description": "The header a `header` credential is sent in, lowercase.",
            "example": "x-api-key",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/CredentialType"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "username": {
            "description": "A `basic` credential's username.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "type",
          "updated_at"
        ],
        "type": "object"
      },
      "DestinationHealth": {
        "properties": {
          "after": {
            "format": "date-time",
            "type": "string"
          },
          "before": {
            "format": "date-time",
            "type": "string"
          },
          "errors": {
            "description": "The most frequent first; at most 10.",
            "items": {
              "$ref": "#/components/schemas/ErrorGroup"
            },
            "type": "array"
          },
          "failed_attempts": {
            "description": "The range's failed attempts, in every group.",
            "format": "int64",
            "type": "integer"
          },
          "last_failure_at": {
            "description": "The latest failed attempt, in any range.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "last_success_at": {
            "description": "The latest attempt answered with a 2xx, in any range; none if no\nstored attempt was.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "after",
          "before",
          "failed_attempts",
          "errors"
        ],
        "type": "object"
      },
      "DestinationSettings": {
        "additionalProperties": false,
        "description": "Unset fields use the gateway's defaults.",
        "properties": {
          "headers": {
            "description": "Applied in order to each delivery's headers; at most 50.",
            "items": {
              "$ref": "#/components/schemas/HeaderRule"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "hold_max_age_seconds": {
            "description": "How long a held delivery waits before it fails, 60 seconds to 7\ndays; 1 day when left out.",
            "example": 86400,
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "hold_max_events": {
            "description": "How many deliveries it holds at most, 1 to 1000; 100 when left out.",
            "example": 100,
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "hold_offline": {
            "description": "CLI destinations only (P3-26): hold deliveries while no\n`ricochet listen` session is connected and send them when one\njoins. Off when left out: such a delivery fails, and the event stays\nreplayable.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "max_age_seconds": {
            "description": "How long after the event arrived retries stop, 60 seconds to 30\ndays; 3 days when left out.",
            "example": 259200,
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "max_attempts": {
            "description": "Attempts before a delivery is dead, 1 to 50; 10 when left out.",
            "example": 10,
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "max_in_flight": {
            "description": "Requests in flight at once, 1 to 100; 10 when left out.",
            "example": 10,
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "max_per_second": {
            "description": "Requests per second, 1 to 1000; no limit when left out.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "retry_statuses": {
            "description": "3xx and 4xx statuses to retry as well as 5xx, 408 and 429.",
            "example": [
              409
            ],
            "items": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "timeout_ms": {
            "description": "How long one attempt waits for an answer, 1000 to 60000 ms; 30 s\nwhen left out.",
            "example": 30000,
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "DestinationType": {
        "enum": [
          "http",
          "cli"
        ],
        "type": "string"
      },
      "DeviceLogin": {
        "description": "A login waiting for the person to confirm it.",
        "properties": {
          "device_code": {
            "description": "What the CLI polls with; secret.",
            "type": "string"
          },
          "expires_in": {
            "description": "Seconds until the codes stop working.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "interval": {
            "description": "Seconds to wait between polls.",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "user_code": {
            "description": "What the person checks in the dashboard.",
            "example": "WDJB-MJHT",
            "type": "string"
          },
          "verification_uri": {
            "description": "Where the person confirms it.",
            "example": "https://app.getricochet.dev/device",
            "type": "string"
          },
          "verification_uri_complete": {
            "description": "The same, with the code filled in.",
            "example": "https://app.getricochet.dev/device?code=WDJB-MJHT",
            "type": "string"
          }
        },
        "required": [
          "device_code",
          "user_code",
          "verification_uri",
          "verification_uri_complete",
          "expires_in",
          "interval"
        ],
        "type": "object"
      },
      "DeviceToken": {
        "description": "The poll's answer while the login is open, and once it is confirmed.",
        "properties": {
          "expires_at": {
            "description": "With `approved`: when the token stops working.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/DeviceTokenStatus",
            "description": "`pending` until the person confirms, then `approved`."
          },
          "token": {
            "description": "With `approved`, once: sent as `Authorization: Bearer rd_…`.",
            "example": "rd_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSwq7R8s9T0u1V",
            "type": [
              "string",
              "null"
            ]
          },
          "user": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/User",
                "description": "With `approved`: who signed in."
              }
            ]
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "DeviceTokenRequest": {
        "properties": {
          "device_code": {
            "type": "string"
          }
        },
        "required": [
          "device_code"
        ],
        "type": "object"
      },
      "DeviceTokenStatus": {
        "enum": [
          "pending",
          "approved"
        ],
        "type": "string"
      },
      "Done": {
        "description": "The JSON answer to a request that worked.",
        "properties": {
          "ok": {
            "example": true,
            "type": "boolean"
          }
        },
        "required": [
          "ok"
        ],
        "type": "object"
      },
      "Environment": {
        "properties": {
          "id": {
            "example": "env_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "kind": {
            "description": "`dev`, `staging` or `production`.",
            "type": "string"
          },
          "retention_days": {
            "description": "How many days its events are kept: its own limit or its plan's. None\nkeeps them for the operational ceiling, 30 days by default (P2-29).",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "kind"
        ],
        "type": "object"
      },
      "EnvironmentDetail": {
        "description": "An environment with its limits.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "effective": {
            "$ref": "#/components/schemas/Limits",
            "description": "In force: the plan's, lowered by the overrides."
          },
          "id": {
            "example": "env_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "kind": {
            "description": "`dev`, `staging` or `production`.",
            "type": "string"
          },
          "limits": {
            "$ref": "#/components/schemas/Limits",
            "description": "Its own overrides."
          },
          "plan": {
            "$ref": "#/components/schemas/Limits",
            "description": "The organization's plan; null is unlimited."
          }
        },
        "required": [
          "id",
          "kind",
          "created_at",
          "limits",
          "plan",
          "effective"
        ],
        "type": "object"
      },
      "ErrorExample": {
        "properties": {
          "attempt": {
            "description": "The attempt's number in its delivery.",
            "format": "int32",
            "type": "integer"
          },
          "delivery_id": {
            "example": "dlv_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "event_id": {
            "example": "evt_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          }
        },
        "required": [
          "event_id",
          "delivery_id",
          "attempt"
        ],
        "type": "object"
      },
      "ErrorGroup": {
        "description": "Failed attempts that failed the same way: the same kind, phase and status.",
        "properties": {
          "count": {
            "description": "Failed attempts in the range.",
            "format": "int64",
            "type": "integer"
          },
          "example": {
            "$ref": "#/components/schemas/ErrorExample",
            "description": "The latest of them."
          },
          "fault": {
            "type": "string"
          },
          "hint": {
            "type": "string"
          },
          "kind": {
            "description": "As in `AttemptError`.",
            "example": "closed_by_peer",
            "type": "string"
          },
          "last_seen_at": {
            "format": "date-time",
            "type": "string"
          },
          "message": {
            "description": "What happened, as in `AttemptError`.",
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "phase": {
            "example": "wait_first_byte",
            "type": [
              "string",
              "null"
            ]
          },
          "status_code": {
            "description": "The response's status, for a response that was not a 2xx.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "kind",
          "message",
          "hint",
          "fault",
          "outcome",
          "count",
          "last_seen_at",
          "example"
        ],
        "type": "object"
      },
      "Event": {
        "allOf": [
          {
            "$ref": "#/components/schemas/EventSummary"
          },
          {
            "properties": {
              "body": {
                "$ref": "#/components/schemas/Body"
              },
              "deliveries": {
                "description": "One per destination, oldest first.",
                "items": {
                  "$ref": "#/components/schemas/Delivery"
                },
                "type": "array"
              },
              "headers": {
                "description": "In the order received, duplicates kept; bytes that are not UTF-8 are\nreplaced.",
                "items": {
                  "$ref": "#/components/schemas/Header"
                },
                "type": "array"
              },
              "parent_request_id": {
                "description": "When that request was itself a delivery from Ricochet (a destination\nthat is a Ricochet source), the request ID it carried: the event it\ncame from.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "request_id": {
                "description": "The ingest request that brought it in: its `ricochet-request-id`\nanswer header and log lines carry the same ID, and its deliveries send\nit on (P3-58). None for test events and events stored before.",
                "example": "req_2xkqgy4m7ztbdu5wnfrh3o6vla",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resent_from": {
                "description": "For an edited copy (P3-17), the event it was resent from (`evt_` ID).",
                "type": [
                  "string",
                  "null"
                ]
              },
              "search_fields": {
                "description": "Its source's search fields (P4-09) and the values it was stored with.",
                "items": {
                  "$ref": "#/components/schemas/SearchField"
                },
                "type": "array"
              },
              "sender_ip": {
                "description": "The sender's address as the edge saw it (`X-Real-IP`).",
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "headers",
              "body",
              "deliveries"
            ],
            "type": "object"
          }
        ]
      },
      "EventPage": {
        "properties": {
          "data": {
            "description": "Newest first.",
            "items": {
              "$ref": "#/components/schemas/EventSummary"
            },
            "type": "array"
          },
          "next_cursor": {
            "description": "Pass as `cursor` for the next, older page; absent on the last page.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "EventStatus": {
        "description": "Where an event stands, from its deliveries (replays not counted).",
        "enum": [
          "received",
          "pending",
          "delivered",
          "failed"
        ],
        "type": "string"
      },
      "EventSummary": {
        "properties": {
          "content_type": {
            "description": "The first `Content-Type` header, if any.",
            "type": [
              "string",
              "null"
            ]
          },
          "delivered_count": {
            "description": "Of those, how many succeeded.",
            "format": "int64",
            "type": "integer"
          },
          "delivery_count": {
            "description": "Original deliveries, one per destination.",
            "format": "int64",
            "type": "integer"
          },
          "event_type": {
            "description": "As its provider names it: the `X-GitHub-Event`, `X-Gitlab-Event` or\n`X-Shopify-Topic` header, else the JSON body's `type`, `event_type`\nor `event`.",
            "example": "invoice.paid",
            "type": [
              "string",
              "null"
            ]
          },
          "failed_attempt_count": {
            "description": "Attempts on those deliveries with no response or a response that was\nnot a 2xx, including ones a retry later made good.",
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "example": "evt_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "last_error_kind": {
            "description": "The latest failed attempt's kind (P3-56; `other` for one recorded\nbefore kinds were), or none without a failed attempt.",
            "example": "closed_by_peer",
            "type": [
              "string",
              "null"
            ]
          },
          "last_error_status": {
            "description": "That attempt's response status, when it got a response.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "method": {
            "example": "POST",
            "type": "string"
          },
          "quarantined": {
            "description": "Failed verification and held, not delivered, by the source's\nquarantine policy (P2-14).",
            "type": "boolean"
          },
          "received_at": {
            "format": "date-time",
            "type": "string"
          },
          "size": {
            "description": "The body's size in bytes.",
            "format": "int32",
            "type": "integer"
          },
          "source_id": {
            "example": "src_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/EventStatus"
          },
          "target": {
            "description": "The request's path and query, as received.",
            "example": "/src_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "verification": {
            "$ref": "#/components/schemas/VerificationResult"
          },
          "verification_reason": {
            "description": "Why verification failed, as a reason code.",
            "example": "signature_mismatch",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "source_id",
          "received_at",
          "status",
          "verification",
          "quarantined",
          "method",
          "target",
          "size",
          "delivery_count",
          "delivered_count",
          "failed_attempt_count"
        ],
        "type": "object"
      },
      "ExportedFeedback": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "page": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "message",
          "created_at"
        ],
        "type": "object"
      },
      "ExportedOrganization": {
        "properties": {
          "id": {
            "type": "string"
          },
          "joined_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "projects": {
            "items": {
              "$ref": "#/components/schemas/ExportedProject"
            },
            "type": "array"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "role",
          "joined_at",
          "projects"
        ],
        "type": "object"
      },
      "ExportedProject": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "created_at"
        ],
        "type": "object"
      },
      "ExportedSession": {
        "properties": {
          "client": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "last_used_at": {
            "format": "date-time",
            "type": "string"
          },
          "user_agent": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "created_at",
          "last_used_at",
          "expires_at"
        ],
        "type": "object"
      },
      "ExportedUser": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "github_linked": {
            "description": "Signs in with GitHub too.",
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "onboarding": {
            "description": "The first-run setup's answers (P3-10), if given.",
            "type": [
              "object",
              "null"
            ]
          },
          "second_factor": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "email",
          "created_at",
          "github_linked",
          "second_factor"
        ],
        "type": "object"
      },
      "Feedback": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "page": {
            "description": "The dashboard path it was sent from.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "email",
          "message",
          "created_at"
        ],
        "type": "object"
      },
      "FinishOnboarding": {
        "description": "The first-run setup's end (P3-10).",
        "properties": {
          "needs": {
            "description": "Which other providers and destinations they will connect, in their\nwords; at most 2,000 characters.",
            "type": [
              "string",
              "null"
            ]
          },
          "provider": {
            "description": "The provider picked to start with, e.g. `stripe`.",
            "type": [
              "string",
              "null"
            ]
          },
          "skipped": {
            "description": "Skipped rather than finished.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "Fixture": {
        "allOf": [
          {
            "$ref": "#/components/schemas/FixtureSummary"
          },
          {
            "properties": {
              "body": {
                "description": "The JSON body, as text ready to send.",
                "type": "string"
              },
              "headers": {
                "description": "`[name, value]` pairs as the provider sends them, without the\nsignature.",
                "items": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "type": "array"
              }
            },
            "required": [
              "headers",
              "body"
            ],
            "type": "object"
          }
        ]
      },
      "FixtureSummary": {
        "description": "A fixture without its request, as the list shows it.",
        "properties": {
          "description": {
            "example": "A subscription invoice was paid",
            "type": "string"
          },
          "event_type": {
            "description": "As the events list shows it.",
            "example": "invoice.paid",
            "type": "string"
          },
          "provider": {
            "description": "The preset it belongs to: `stripe` or `github`.",
            "example": "stripe",
            "type": "string"
          }
        },
        "required": [
          "provider",
          "event_type",
          "description"
        ],
        "type": "object"
      },
      "Handshake": {
        "description": "A provider's URL check that a source answers without creating an event\n(P2-05): the challenge it sends is echoed back.",
        "enum": [
          "none",
          "slack",
          "meta",
          "microsoft_graph",
          "dropbox"
        ],
        "type": "string"
      },
      "Header": {
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object"
      },
      "HeaderRule": {
        "additionalProperties": false,
        "description": "One of `{\"set\": name, \"value\": value}` (replaces the header or adds\nit), `{\"add\": name, \"value\": value}` (adds it, keeping others) or\n`{\"remove\": name}`. Credentials go in the destination's credential.",
        "example": {
          "set": "x-team",
          "value": "billing"
        },
        "properties": {
          "add": {
            "type": [
              "string",
              "null"
            ]
          },
          "remove": {
            "type": [
              "string",
              "null"
            ]
          },
          "set": {
            "type": [
              "string",
              "null"
            ]
          },
          "value": {
            "description": "For `set` and `add`; at most 8 KiB, on one line.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "HeldDeliveries": {
        "description": "Deliveries held by a pause, for one destination and connection.",
        "properties": {
          "connection_id": {
            "description": "`con_` ID; null for a replay's deliveries.",
            "type": [
              "string",
              "null"
            ]
          },
          "count": {
            "format": "int64",
            "type": "integer"
          },
          "destination_id": {
            "description": "`dst_` ID.",
            "type": "string"
          },
          "oldest_held_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "destination_id",
          "count",
          "oldest_held_at"
        ],
        "type": "object"
      },
      "HeldDeliveriesList": {
        "properties": {
          "data": {
            "description": "Oldest first.",
            "items": {
              "$ref": "#/components/schemas/HeldDeliveries"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "HmacAlgorithm": {
        "enum": [
          "sha1",
          "sha256",
          "sha512"
        ],
        "type": "string"
      },
      "InstantToken": {
        "properties": {
          "token": {
            "description": "The `ri_` token.",
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "type": "object"
      },
      "InstantView": {
        "description": "A temporary URL and what it received.",
        "properties": {
          "destination_id": {
            "description": "With a CLI destination: its `dst_` ID.",
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "description": "The newest events first, at most 20.",
            "items": {
              "$ref": "#/components/schemas/Event"
            },
            "type": "array"
          },
          "events_left": {
            "description": "How many more events it takes; ingest may let a few more through\nwhile it catches up.",
            "format": "int64",
            "type": "integer"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "view_url": {
            "description": "The live page, with the token in its fragment.",
            "type": "string"
          }
        },
        "required": [
          "url",
          "view_url",
          "expires_at",
          "events",
          "events_left"
        ],
        "type": "object"
      },
      "Invite": {
        "description": "An invite and whether it was used.",
        "properties": {
          "email": {
            "type": "string"
          },
          "from_waitlist": {
            "description": "Whether it came from the waitlist.",
            "type": "boolean"
          },
          "invited_at": {
            "format": "date-time",
            "type": "string"
          },
          "signed_up_at": {
            "description": "When its account was made; null until the first sign-in.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "email",
          "invited_at",
          "from_waitlist"
        ],
        "type": "object"
      },
      "InviteRequest": {
        "description": "A batch from the waitlist, or addresses by hand.",
        "properties": {
          "count": {
            "description": "Invites this many from the waitlist, best fit first (1 to 500).",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "emails": {
            "description": "Invites these addresses, on the waitlist or not.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "Invited": {
        "properties": {
          "emails": {
            "description": "Newly invited, each sent an invite email; addresses already invited\nor with an account are left out.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "emails"
        ],
        "type": "object"
      },
      "Issue": {
        "description": "Deliveries to one destination that failed for good the same way.",
        "properties": {
          "cause": {
            "description": "A status class (`5xx`) or an error kind (`refused`): select a bulk\nreplay by it with `causes`.",
            "example": "5xx",
            "type": "string"
          },
          "deliveries": {
            "description": "Original deliveries, one per event and destination.",
            "format": "int64",
            "type": "integer"
          },
          "destination_id": {
            "example": "dst_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "destination_name": {
            "description": "Its name now; none once it is deleted.",
            "type": [
              "string",
              "null"
            ]
          },
          "example_event_id": {
            "description": "The latest of them.",
            "example": "evt_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "fault": {
            "type": "string"
          },
          "first_failed_at": {
            "description": "When the first and the latest of them failed for good.",
            "format": "date-time",
            "type": "string"
          },
          "hint": {
            "type": "string"
          },
          "last_failed_at": {
            "format": "date-time",
            "type": "string"
          },
          "message": {
            "description": "What happened, how to fix it and whose fault it probably is, as for\nthe latest attempt (P3-61).",
            "type": "string"
          }
        },
        "required": [
          "destination_id",
          "cause",
          "message",
          "hint",
          "fault",
          "deliveries",
          "first_failed_at",
          "last_failed_at",
          "example_event_id"
        ],
        "type": "object"
      },
      "IssueList": {
        "properties": {
          "after": {
            "format": "date-time",
            "type": "string"
          },
          "before": {
            "format": "date-time",
            "type": "string"
          },
          "data": {
            "description": "The largest first; at most 100.",
            "items": {
              "$ref": "#/components/schemas/Issue"
            },
            "type": "array"
          }
        },
        "required": [
          "after",
          "before",
          "data"
        ],
        "type": "object"
      },
      "JoinRequest": {
        "description": "The join form's fields. A JSON body has the same names, with string\nvalues; unknown fields are ignored. The attribution fields come from the\npage script; a plain form post gets them from its `Referer` instead.",
        "properties": {
          "cf-turnstile-response": {
            "description": "The Cloudflare Turnstile token, checked when the API has `TURNSTILE_SECRET`.",
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": "string"
          },
          "fbclid": {
            "type": [
              "string",
              "null"
            ]
          },
          "gclid": {
            "type": [
              "string",
              "null"
            ]
          },
          "landing_page": {
            "description": "The landing page's path and query, e.g. `/?utm_source=google`.",
            "type": [
              "string",
              "null"
            ]
          },
          "li_fat_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "msclkid": {
            "type": [
              "string",
              "null"
            ]
          },
          "ref": {
            "description": "A share link's referral code (10 hex characters).",
            "type": [
              "string",
              "null"
            ]
          },
          "referrer": {
            "description": "The page that linked to the landing page; only its origin and path are kept.",
            "type": [
              "string",
              "null"
            ]
          },
          "ttclid": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_campaign": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_content": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_medium": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_term": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "KeyKind": {
        "enum": [
          "personal",
          "service"
        ],
        "type": "string"
      },
      "Limits": {
        "description": "Limits by name; absent or null means none (unlimited, or the plan's).",
        "properties": {
          "ingest_max_body_bytes": {
            "description": "The largest request body a source accepts.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "ingest_max_header_bytes": {
            "description": "The most header bytes (names and values) a request may carry.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "ingest_requests_per_minute": {
            "description": "Requests each source accepts a minute.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "retention_days": {
            "description": "Days its events are kept.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "LinkRequest": {
        "properties": {
          "email": {
            "type": "string"
          },
          "turnstile_token": {
            "description": "The Cloudflare Turnstile token, checked when the API has `TURNSTILE_SECRET`.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "Listeners": {
        "description": "A CLI destination's `ricochet listen` sessions, as the gateway sees them\nnow (#415).",
        "properties": {
          "sessions": {
            "description": "Sessions connected now; none for an HTTP destination.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "sessions"
        ],
        "type": "object"
      },
      "LogPage": {
        "properties": {
          "lines": {
            "description": "Matching lines, oldest first, each one JSON object as logged. API keys\nand bearer credentials are replaced with `[redacted]`.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "next_offset": {
            "description": "Pass as `offset` for the next, newer lines; absent at the end.",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "offset": {
            "description": "The position of the first returned line among the matching ones.",
            "minimum": 0,
            "type": "integer"
          },
          "service": {
            "example": "api",
            "type": "string"
          },
          "total": {
            "description": "Matching lines in all the service's files.",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "service",
          "lines",
          "total",
          "offset"
        ],
        "type": "object"
      },
      "Member": {
        "properties": {
          "email": {
            "type": "string"
          },
          "joined_at": {
            "format": "date-time",
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "description": "`owner`, `admin`, `developer` or `viewer`.",
            "type": "string"
          },
          "user_id": {
            "example": "usr_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          }
        },
        "required": [
          "user_id",
          "email",
          "role",
          "joined_at"
        ],
        "type": "object"
      },
      "MemberInvite": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "example": "inv_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "invited_by": {
            "description": "Who sent it; absent once they are gone.",
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "description": "`admin`, `developer` or `viewer`.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "email",
          "role",
          "created_at",
          "expires_at"
        ],
        "type": "object"
      },
      "MemberInviteRequest": {
        "properties": {
          "email": {
            "type": "string"
          },
          "role": {
            "description": "`admin`, `developer` or `viewer`.",
            "type": "string"
          }
        },
        "required": [
          "email",
          "role"
        ],
        "type": "object"
      },
      "MemberList": {
        "description": "The members, oldest first, and the open invites, newest first.",
        "properties": {
          "invites": {
            "items": {
              "$ref": "#/components/schemas/MemberInvite"
            },
            "type": "array"
          },
          "members": {
            "items": {
              "$ref": "#/components/schemas/Member"
            },
            "type": "array"
          }
        },
        "required": [
          "members",
          "invites"
        ],
        "type": "object"
      },
      "Method": {
        "description": "An HTTP method a source accepts; others get 405.",
        "enum": [
          "GET",
          "POST",
          "PUT",
          "PATCH",
          "DELETE"
        ],
        "type": "string"
      },
      "MetricBucket": {
        "description": "One bucket's counts. Latency percentiles are of the attempts' durations;\nwhen several destinations are combined, each is their mean weighted by\nattempts, an approximation.",
        "properties": {
          "attempts": {
            "description": "Delivery attempts that started in the bucket.",
            "format": "int64",
            "type": "integer"
          },
          "events": {
            "description": "Events stored.",
            "format": "int64",
            "type": "integer"
          },
          "failed": {
            "format": "int64",
            "type": "integer"
          },
          "failed_by_kind": {
            "additionalProperties": {
              "format": "int64",
              "type": "integer"
            },
            "description": "The failed attempts by kind (P3-63): a failure without a response\nby its kind (`closed_by_peer`, `refused`...; `other` when recorded\nbefore kinds were), a response that was not a 2xx by its status class\n(`5xx`). Empty for attempts rolled up before kinds were counted.",
            "example": {
              "5xx": 1,
              "closed_by_peer": 3
            },
            "propertyNames": {
              "type": "string"
            },
            "type": "object"
          },
          "p50_ms": {
            "description": "None without attempts.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "p95_ms": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "p99_ms": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "quarantined": {
            "description": "Of those, held after failed verification (P2-14).",
            "format": "int64",
            "type": "integer"
          },
          "start": {
            "description": "When the bucket starts; it lasts one `resolution`.",
            "format": "date-time",
            "type": "string"
          },
          "succeeded": {
            "description": "Of those, answered with a 2xx.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "start",
          "events",
          "quarantined",
          "attempts",
          "succeeded",
          "failed",
          "failed_by_kind"
        ],
        "type": "object"
      },
      "Metrics": {
        "properties": {
          "after": {
            "format": "date-time",
            "type": "string"
          },
          "before": {
            "format": "date-time",
            "type": "string"
          },
          "buckets": {
            "description": "Every bucket in the range, oldest first, empty ones included.",
            "items": {
              "$ref": "#/components/schemas/MetricBucket"
            },
            "type": "array"
          },
          "resolution": {
            "$ref": "#/components/schemas/Resolution"
          },
          "totals": {
            "$ref": "#/components/schemas/MetricBucket",
            "description": "The whole range, its `start` being the first bucket's."
          }
        },
        "required": [
          "resolution",
          "after",
          "before",
          "buckets",
          "totals"
        ],
        "type": "object"
      },
      "NameRequest": {
        "properties": {
          "name": {
            "example": "Acme",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "NewApiKey": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ApiKey"
          },
          {
            "properties": {
              "secret": {
                "example": "rk_a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6q7R8s9T0u1V",
                "type": "string"
              }
            },
            "required": [
              "secret"
            ],
            "type": "object"
          }
        ],
        "description": "A new key, with the secret: the only time it is shown."
      },
      "NewInstant": {
        "description": "A new temporary URL; its token is shown only now.",
        "properties": {
          "destination_id": {
            "description": "With `cli`: the `dst_` ID to listen on with the token.",
            "type": [
              "string",
              "null"
            ]
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "token": {
            "description": "`ri_…`: opens the live page and lets the CLI listen, until it expires\nor is claimed. Keep it private.",
            "type": "string"
          },
          "url": {
            "description": "Where to send webhooks.",
            "type": "string"
          },
          "view_url": {
            "description": "The live page, with the token in its fragment.",
            "type": "string"
          }
        },
        "required": [
          "token",
          "url",
          "view_url",
          "expires_at"
        ],
        "type": "object"
      },
      "NewShare": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Share"
          },
          {
            "properties": {
              "url": {
                "description": "The link to send; whoever has it can read the event until it expires.",
                "type": "string"
              }
            },
            "required": [
              "url"
            ],
            "type": "object"
          }
        ],
        "description": "A new link: its URL is shown only now."
      },
      "NewSigningSecret": {
        "allOf": [
          {
            "$ref": "#/components/schemas/SigningSecret"
          },
          {
            "properties": {
              "value": {
                "description": "What the receiver verifies signatures with.",
                "example": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw",
                "type": "string"
              }
            },
            "required": [
              "value"
            ],
            "type": "object"
          }
        ],
        "description": "A secret just made: the only time its value is shown."
      },
      "OnFailure": {
        "description": "What happens to a request that fails verification.",
        "enum": [
          "reject",
          "quarantine"
        ],
        "type": "string"
      },
      "OnboardingAnswer": {
        "description": "What someone said in the first-run setup (P3-10).",
        "properties": {
          "email": {
            "type": "string"
          },
          "needs": {
            "description": "What else they will connect, in their words.",
            "type": [
              "string",
              "null"
            ]
          },
          "onboarded_at": {
            "format": "date-time",
            "type": "string"
          },
          "provider": {
            "description": "The provider they started with.",
            "type": [
              "string",
              "null"
            ]
          },
          "skipped": {
            "description": "Skipped rather than finished.",
            "type": "boolean"
          }
        },
        "required": [
          "email",
          "onboarded_at",
          "skipped"
        ],
        "type": "object"
      },
      "Organization": {
        "properties": {
          "id": {
            "example": "org_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "projects": {
            "items": {
              "$ref": "#/components/schemas/Project"
            },
            "type": "array"
          },
          "role": {
            "description": "The signed-in user's role: `owner`, `admin`, `developer` or `viewer`.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "role",
          "projects"
        ],
        "type": "object"
      },
      "PendingDeviceLogin": {
        "description": "A login as the confirm page shows it.",
        "properties": {
          "client": {
            "example": "ricochet CLI on laptop",
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "user_code": {
            "example": "WDJB-MJHT",
            "type": "string"
          }
        },
        "required": [
          "user_code",
          "client",
          "created_at",
          "expires_at"
        ],
        "type": "object"
      },
      "Problem": {
        "description": "An error. `type` is omitted, which RFC 9457 reads as `about:blank`: the\nstatus says what kind of problem it is.",
        "example": {
          "detail": "Enter a valid email address.",
          "status": 422,
          "title": "Unprocessable Entity"
        },
        "properties": {
          "detail": {
            "description": "What went wrong, written for the person using the client.",
            "type": "string"
          },
          "status": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "title": {
            "description": "The status's reason phrase.",
            "type": "string"
          }
        },
        "required": [
          "title",
          "status",
          "detail"
        ],
        "type": "object"
      },
      "Project": {
        "properties": {
          "environments": {
            "items": {
              "$ref": "#/components/schemas/Environment"
            },
            "type": "array"
          },
          "id": {
            "example": "prj_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organization_id": {
            "example": "org_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "name",
          "environments"
        ],
        "type": "object"
      },
      "ReadShare": {
        "properties": {
          "token": {
            "description": "The token after `#` in the link.",
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "type": "object"
      },
      "ReceivedInvite": {
        "description": "An invite to the signed-in person.",
        "properties": {
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "example": "inv_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "invited_by": {
            "description": "The inviter's name or email; absent once they are gone.",
            "type": [
              "string",
              "null"
            ]
          },
          "organization_id": {
            "example": "org_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "organization_name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "organization_id",
          "organization_name",
          "role",
          "expires_at"
        ],
        "type": "object"
      },
      "RecoveryCodes": {
        "description": "Recovery codes, shown once: each signs in once in place of a code.",
        "properties": {
          "codes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "codes"
        ],
        "type": "object"
      },
      "Released": {
        "description": "A released event.",
        "properties": {
          "event_id": {
            "description": "`evt_` ID.",
            "type": "string"
          },
          "released": {
            "type": "boolean"
          }
        },
        "required": [
          "event_id",
          "released"
        ],
        "type": "object"
      },
      "Replay": {
        "properties": {
          "delivery_id": {
            "description": "The replay's own delivery, with its own attempts.",
            "type": "string"
          },
          "destination_environment_id": {
            "description": "The event's own environment unless the replay was sent to another.",
            "type": "string"
          },
          "destination_id": {
            "type": "string"
          },
          "event_id": {
            "type": "string"
          },
          "id": {
            "example": "rpl_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "label": {
            "example": "Replay #1",
            "type": "string"
          },
          "number": {
            "description": "The event's first replay is 1.",
            "format": "int64",
            "type": "integer"
          },
          "requested_at": {
            "format": "date-time",
            "type": "string"
          },
          "requested_by": {
            "description": "Who asked: a `usr_` or `key_` ID.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "number",
          "label",
          "event_id",
          "destination_id",
          "destination_environment_id",
          "delivery_id",
          "requested_by",
          "requested_at"
        ],
        "type": "object"
      },
      "ReplayEvent": {
        "properties": {
          "destination_environment_id": {
            "description": "`env_` ID of another of the project's environments the destination is\nin; the event's own by default.",
            "type": [
              "string",
              "null"
            ]
          },
          "destination_id": {
            "description": "`dst_` ID: the event's original destination or another one.",
            "example": "dst_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          }
        },
        "required": [
          "destination_id"
        ],
        "type": "object"
      },
      "ReplayJob": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "destination_environment_id": {
            "description": "Where its replays go: the events' environment unless sent to another.",
            "type": "string"
          },
          "destination_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "events": {
            "description": "Events matched.",
            "format": "int64",
            "type": "integer"
          },
          "finished_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "example": "rpj_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "processed": {
            "description": "Of `total`, replayed or skipped so far.",
            "format": "int64",
            "type": "integer"
          },
          "rate_per_second": {
            "format": "int64",
            "type": "integer"
          },
          "requested_by": {
            "type": "string"
          },
          "selection": {
            "$ref": "#/components/schemas/Selection"
          },
          "skipped": {
            "description": "Of `processed`, events retention removed before their turn.",
            "format": "int64",
            "type": "integer"
          },
          "started_at": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/ReplayJobStatus"
          },
          "summary": {
            "$ref": "#/components/schemas/ReplayJobSummary"
          },
          "total": {
            "description": "Replays it makes: one per event and destination.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "status",
          "destination_environment_id",
          "selection",
          "requested_by",
          "events",
          "total",
          "processed",
          "skipped",
          "rate_per_second",
          "summary",
          "created_at"
        ],
        "type": "object"
      },
      "ReplayJobStatus": {
        "enum": [
          "ready",
          "running",
          "paused",
          "completed",
          "cancelled"
        ],
        "type": "string"
      },
      "ReplayJobSummary": {
        "description": "How a job's replays went so far.",
        "properties": {
          "delivered": {
            "format": "int64",
            "type": "integer"
          },
          "failed": {
            "description": "Dead, including those a cancellation stopped.",
            "format": "int64",
            "type": "integer"
          },
          "not_sent": {
            "description": "A cancelled job's replays it never reached.",
            "format": "int64",
            "type": "integer"
          },
          "pending": {
            "description": "Still being delivered.",
            "format": "int64",
            "type": "integer"
          },
          "skipped": {
            "description": "Events retention removed before their turn.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "delivered",
          "failed",
          "pending",
          "skipped",
          "not_sent"
        ],
        "type": "object"
      },
      "ReplayList": {
        "properties": {
          "data": {
            "description": "Oldest first.",
            "items": {
              "$ref": "#/components/schemas/ReplayWithStatus"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "ReplayWithStatus": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Replay"
          },
          {
            "properties": {
              "attempts": {
                "format": "int64",
                "type": "integer"
              },
              "status": {
                "$ref": "#/components/schemas/DeliveryStatus",
                "description": "Its delivery's status."
              }
            },
            "required": [
              "status",
              "attempts"
            ],
            "type": "object"
          }
        ]
      },
      "Resolution": {
        "enum": [
          "minute",
          "hour"
        ],
        "type": "string"
      },
      "RoleRequest": {
        "properties": {
          "role": {
            "description": "`owner`, `admin`, `developer` or `viewer`.",
            "type": "string"
          }
        },
        "required": [
          "role"
        ],
        "type": "object"
      },
      "RotateSigningSecret": {
        "properties": {
          "overlap_seconds": {
            "description": "How long the previous secret keeps signing, 0 to 2592000 seconds;\na day when left out.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "RuleTestResult": {
        "properties": {
          "body": {
            "description": "The body the transformation gives; null without one.",
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "description": "Why the transformation fails, as the delivery would.",
            "type": [
              "string",
              "null"
            ]
          },
          "event_id": {
            "description": "`evt_` ID.",
            "type": "string"
          },
          "found": {
            "description": "False when the event is not stored in this environment.",
            "type": "boolean"
          },
          "passes": {
            "description": "Whether it passes the filter.",
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "event_id",
          "found"
        ],
        "type": "object"
      },
      "RuleTestResults": {
        "properties": {
          "data": {
            "description": "One per event, in the order asked.",
            "items": {
              "$ref": "#/components/schemas/RuleTestResult"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "SearchField": {
        "description": "A search field's value, as stored with the event.",
        "properties": {
          "name": {
            "example": "body.data.customer",
            "type": "string"
          },
          "value": {
            "example": "cus_42",
            "type": "string"
          }
        },
        "required": [
          "name",
          "value"
        ],
        "type": "object"
      },
      "SecondFactor": {
        "description": "Whether the second factor is on.",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "recovery_codes_left": {
            "description": "Recovery codes not used yet.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "enabled",
          "recovery_codes_left"
        ],
        "type": "object"
      },
      "SecondFactorRequired": {
        "description": "The answer to a sign-in that needs the second factor.",
        "properties": {
          "challenge": {
            "description": "Send it back with the code to `POST /api/auth/second-factor`.",
            "type": "string"
          }
        },
        "required": [
          "challenge"
        ],
        "type": "object"
      },
      "SecondFactorSetup": {
        "description": "A second factor being set up: the secret to put in an authenticator app.",
        "properties": {
          "qr_svg": {
            "description": "The URI as a QR code, an SVG image.",
            "type": "string"
          },
          "secret": {
            "description": "Base32, to type in.",
            "type": "string"
          },
          "uri": {
            "description": "The `otpauth://` URI the QR code holds.",
            "type": "string"
          }
        },
        "required": [
          "secret",
          "uri",
          "qr_svg"
        ],
        "type": "object"
      },
      "Selection": {
        "description": "Which events a bulk replay takes. Quarantined events and provider\nduplicates are never taken.",
        "properties": {
          "causes": {
            "description": "Why an original delivery's last attempt failed, as Issues groups\nthem (P4-14): a status class (`5xx`) or, with no response, the error\nkind (`refused`). Events with such a delivery, in one of `statuses`\nand to one of `destination_ids` when those are given.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "destination_ids": {
            "description": "`dst_` IDs: events with an original delivery to one of these, in one\nof `statuses` when both are given. Without a job destination, each\nevent is replayed to those it matched.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "event_types": {
            "description": "Event types, as the events list shows them.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "filter": {
            "description": "A connection filter (P3-03) the event must pass.",
            "type": [
              "object",
              "null"
            ]
          },
          "from": {
            "description": "Received at or after.",
            "format": "date-time",
            "type": "string"
          },
          "source_ids": {
            "description": "`src_` IDs; any of them.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "statuses": {
            "description": "Events with an original delivery in one of these.",
            "items": {
              "$ref": "#/components/schemas/DeliveryStatus"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "to": {
            "description": "Received before.",
            "format": "date-time",
            "type": "string"
          },
          "unresolved": {
            "description": "`true` leaves out an original delivery whose destination a replay of\nthe event has delivered to, or is delivering to.",
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "from",
          "to"
        ],
        "type": "object"
      },
      "SendFeedback": {
        "properties": {
          "message": {
            "description": "1 to 5,000 characters.",
            "type": "string"
          },
          "page": {
            "description": "The dashboard path it was sent from.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "message"
        ],
        "type": "object"
      },
      "SendTestEvent": {
        "properties": {
          "body": {
            "description": "The raw body, as the provider would send it; at most 60,000 bytes.",
            "example": "{\"type\":\"invoice.paid\"}",
            "type": "string"
          },
          "headers": {
            "description": "`[name, value]` pairs, in order; at most 100. Ricochet adds the\nsignature unless `sign` is false.",
            "example": [
              [
                "content-type",
                "application/json"
              ]
            ],
            "items": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "method": {
            "description": "One the source accepts. Default `POST`.",
            "type": [
              "string",
              "null"
            ]
          },
          "sign": {
            "description": "Sign it with the source's newest secret, as its verification method\nexpects. Default true; false sends it exactly as given.",
            "type": [
              "boolean",
              "null"
            ]
          }
        },
        "required": [
          "body"
        ],
        "type": "object"
      },
      "Session": {
        "description": "The signed-in user and everything they can open.",
        "properties": {
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/Organization"
            },
            "type": "array"
          },
          "user": {
            "$ref": "#/components/schemas/User"
          }
        },
        "required": [
          "user",
          "organizations"
        ],
        "type": "object"
      },
      "SessionInfo": {
        "description": "A session the person is signed in with: a browser, or a CLI login.",
        "properties": {
          "client": {
            "description": "The machine a CLI login was made for; none for a browser.",
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "current": {
            "description": "The session this request came with.",
            "type": "boolean"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_used_at": {
            "description": "To the nearest five minutes.",
            "format": "date-time",
            "type": "string"
          },
          "user_agent": {
            "description": "The browser, as it named itself when it signed in.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "last_used_at",
          "expires_at",
          "current"
        ],
        "type": "object"
      },
      "SetCredential": {
        "description": "The credential to send; it replaces any the destination had.",
        "oneOf": [
          {
            "description": "Sent as `Authorization: Bearer <token>`.",
            "properties": {
              "token": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "bearer"
                ],
                "type": "string"
              }
            },
            "required": [
              "token",
              "type"
            ],
            "type": "object"
          },
          {
            "description": "Sent as `Authorization: Basic ...`; the password may be empty.",
            "properties": {
              "password": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "basic"
                ],
                "type": "string"
              },
              "username": {
                "type": "string"
              }
            },
            "required": [
              "username",
              "password",
              "type"
            ],
            "type": "object"
          },
          {
            "description": "Sent as `<name>: <value>`.",
            "properties": {
              "name": {
                "type": "string"
              },
              "type": {
                "enum": [
                  "header"
                ],
                "type": "string"
              },
              "value": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "value",
              "type"
            ],
            "type": "object"
          }
        ]
      },
      "Share": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "created_by": {
            "description": "Who made it: a `usr_` or `key_` ID.",
            "type": "string"
          },
          "event_id": {
            "description": "`evt_` ID.",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "example": "shr_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          }
        },
        "required": [
          "id",
          "event_id",
          "created_by",
          "created_at",
          "expires_at"
        ],
        "type": "object"
      },
      "ShareList": {
        "properties": {
          "data": {
            "description": "The links that still work, newest first.",
            "items": {
              "$ref": "#/components/schemas/Share"
            },
            "type": "array"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "SharedEvent": {
        "description": "The event behind a link.",
        "properties": {
          "event": {
            "$ref": "#/components/schemas/Event",
            "description": "Credentials and signatures are masked."
          },
          "expires_at": {
            "description": "When the link stops working.",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "event",
          "expires_at"
        ],
        "type": "object"
      },
      "SignatureCheck": {
        "properties": {
          "method": {
            "description": "The source's verification method, as it is now.",
            "type": "string"
          },
          "reason": {
            "description": "Why it failed, as stored on events.",
            "type": [
              "string",
              "null"
            ]
          },
          "result": {
            "description": "`verified`, `not_configured` or `failed`.",
            "type": "string"
          },
          "secret": {
            "$ref": "#/components/schemas/CheckedWith"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/SignatureStep"
            },
            "type": "array"
          }
        },
        "required": [
          "method",
          "result",
          "secret",
          "steps"
        ],
        "type": "object"
      },
      "SignatureEncoding": {
        "enum": [
          "hex",
          "base64"
        ],
        "type": "string"
      },
      "SignatureStep": {
        "description": "One step of the check.",
        "properties": {
          "allowed": {
            "description": "The source's allowed address ranges.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "body_bytes": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "detail": {
            "type": "string"
          },
          "expected": {
            "description": "The signature the secret computes; with the current secrets, its\nfirst 12 characters and an ellipsis.",
            "type": [
              "string",
              "null"
            ]
          },
          "header": {
            "description": "The header it read.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "`method`, `allowed_ips`, `content_digest`, `settings`, `header`,\n`timestamp`, `signed_content`, `signature` or `credential`.",
            "type": "string"
          },
          "ok": {
            "description": "Null when the step was not checked.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "received": {
            "description": "What the request carried: a header value, a timestamp, or a list of\nsignatures.",
            "type": [
              "object",
              "null"
            ]
          },
          "template": {
            "description": "What is signed, with `{body}` standing for the body as received.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "name",
          "detail"
        ],
        "type": "object"
      },
      "SigningSecret": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "description": "When it stops signing; none while it is the current secret.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "example": "sec_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at"
        ],
        "type": "object"
      },
      "SimulateFailures": {
        "properties": {
          "count": {
            "description": "How many of the next deliveries: 1 to 100, default 1.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "mode": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SimulationMode",
                "description": "Required; checked after access, so another tenant's ID is a 404."
              }
            ]
          },
          "status_code": {
            "description": "With `status`: 200 to 599.",
            "example": 503,
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "mode"
        ],
        "type": "object"
      },
      "Simulation": {
        "description": "A destination's simulation in progress.",
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "destination_id": {
            "description": "`dst_` ID.",
            "type": "string"
          },
          "mode": {
            "$ref": "#/components/schemas/SimulationMode"
          },
          "remaining": {
            "description": "Deliveries left to fail.",
            "format": "int32",
            "type": "integer"
          },
          "requested_by": {
            "description": "Who set it: a `usr_` or `key_` ID.",
            "type": "string"
          },
          "status_code": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "destination_id",
          "mode",
          "remaining",
          "requested_by",
          "created_at"
        ],
        "type": "object"
      },
      "SimulationMode": {
        "description": "How the simulated deliveries fail.",
        "enum": [
          "timeout",
          "status"
        ],
        "type": "string"
      },
      "SimulationState": {
        "properties": {
          "simulation": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Simulation",
                "description": "Null when none is left."
              }
            ]
          }
        },
        "type": "object"
      },
      "SlowestAttempt": {
        "properties": {
          "delivery_id": {
            "example": "dlv_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "destination_id": {
            "example": "dst_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "duration_ms": {
            "format": "int32",
            "type": "integer"
          },
          "event_id": {
            "example": "evt_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "message": {
            "description": "How it failed, explained as the Events API does (P3-61).",
            "type": "string"
          },
          "number": {
            "format": "int32",
            "type": "integer"
          },
          "project_id": {
            "example": "prj_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "started_at": {
            "format": "date-time",
            "type": "string"
          },
          "status_code": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "project_id",
          "event_id",
          "delivery_id",
          "destination_id",
          "number",
          "started_at",
          "duration_ms",
          "message"
        ],
        "type": "object"
      },
      "Source": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "deduplication": {
            "$ref": "#/components/schemas/Deduplication"
          },
          "handshake": {
            "$ref": "#/components/schemas/Handshake"
          },
          "id": {
            "example": "src_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "methods": {
            "items": {
              "$ref": "#/components/schemas/Method"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          },
          "response": {
            "$ref": "#/components/schemas/SourceResponse"
          },
          "search_fields": {
            "description": "Fields its events can be searched by (P4-09), as filter paths:\n`body.data.object.customer` or `headers.x-shop-id`.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "description": "Where providers send webhooks.",
            "example": "https://in.getricochet.dev/src_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "verification": {
            "$ref": "#/components/schemas/Verification"
          }
        },
        "required": [
          "id",
          "name",
          "url",
          "methods",
          "response",
          "verification",
          "deduplication",
          "handshake",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "SourceResponse": {
        "description": "What a source answers the sender once a request is stored. Unset fields\nmean 200 with an empty body.",
        "properties": {
          "body": {
            "description": "At most 4 KiB; none for 204.",
            "example": "ok",
            "type": [
              "string",
              "null"
            ]
          },
          "content_type": {
            "description": "The body's type; `text/plain` when a body has none.",
            "example": "text/plain",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "200 to 204.",
            "example": 200,
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "SourceSecret": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "description": "When it stops verifying; none while it is the current secret.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "example": "sec_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          }
        },
        "required": [
          "id",
          "created_at"
        ],
        "type": "object"
      },
      "StartDeviceLogin": {
        "properties": {
          "client": {
            "description": "What the token will be called, e.g. the machine's name.",
            "example": "ricochet CLI on laptop",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "Stats": {
        "properties": {
          "by_campaign": {
            "items": {
              "$ref": "#/components/schemas/Count"
            },
            "type": "array"
          },
          "by_source": {
            "items": {
              "$ref": "#/components/schemas/Count"
            },
            "type": "array"
          },
          "confirmed": {
            "format": "int64",
            "type": "integer"
          },
          "referred": {
            "description": "Signups that came through someone's share link.",
            "format": "int64",
            "type": "integer"
          },
          "submitted": {
            "format": "int64",
            "type": "integer"
          },
          "unsubscribed": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "submitted",
          "confirmed",
          "unsubscribed",
          "referred",
          "by_source",
          "by_campaign"
        ],
        "type": "object"
      },
      "SurveyRequest": {
        "description": "Every answer is optional; unknown values are dropped. A form post repeats `providers`; JSON sends it as an array.",
        "properties": {
          "current_tool": {
            "description": "What they use today",
            "enum": [
              "none",
              "tunnel",
              "hookdeck",
              "svix",
              "in_house",
              "other"
            ],
            "type": "string"
          },
          "events": {
            "description": "Webhook events a month",
            "enum": [
              "lt_10k",
              "10k_100k",
              "100k_1m",
              "gt_1m",
              "unsure"
            ],
            "type": "string"
          },
          "providers": {
            "description": "Providers whose webhooks they receive",
            "items": {
              "description": "A provider",
              "enum": [
                "stripe",
                "github",
                "shopify",
                "twilio",
                "slack",
                "paypal",
                "other"
              ],
              "type": "string"
            },
            "type": "array"
          },
          "team": {
            "description": "Team size",
            "enum": [
              "solo",
              "2_10",
              "11_50",
              "51_plus"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "TestEvent": {
        "properties": {
          "event_id": {
            "description": "The stored event: open it in the events list.",
            "example": "evt_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "quarantined": {
            "description": "Failed verification and held by the source's policy, not delivered.",
            "type": "boolean"
          },
          "received_at": {
            "format": "date-time",
            "type": "string"
          },
          "resent_from": {
            "description": "For an edited copy (P3-17), the event it was resent from.",
            "type": [
              "string",
              "null"
            ]
          },
          "verification": {
            "$ref": "#/components/schemas/TestVerification"
          }
        },
        "required": [
          "event_id",
          "received_at",
          "verification",
          "quarantined"
        ],
        "type": "object"
      },
      "TestRules": {
        "properties": {
          "connection_id": {
            "description": "`con_` ID: its current filter and transformation, instead of the\ntwo above.",
            "type": [
              "string",
              "null"
            ]
          },
          "event_ids": {
            "description": "1 to 50 `evt_` IDs.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "filter": {
            "description": "A connection filter (P3-03); none passes every event.",
            "type": [
              "object",
              "null"
            ]
          },
          "transformation": {
            "description": "A connection transformation's steps (P2-38); none keeps the body.",
            "items": {
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "TestVerification": {
        "properties": {
          "reason": {
            "description": "Why it failed, as a reason code.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/VerificationResult"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "UpdateAlertRule": {
        "description": "What can change; to watch something else, make another rule.",
        "properties": {
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "minutes": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "threshold": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UpdateConnection": {
        "description": "The fields to change; the others stay. `null` clears a filter or a\ntransformation.",
        "properties": {
          "filter": {
            "type": [
              "object",
              "null"
            ]
          },
          "paused": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "transformation": {
            "items": {
              "type": "object"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UpdateDestination": {
        "description": "The fields to change; the others stay. `settings` replaces the whole\nobject.",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "paused": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "settings": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DestinationSettings"
              }
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UpdateEnvironment": {
        "properties": {
          "limits": {
            "$ref": "#/components/schemas/Limits",
            "description": "Replaces every override: a limit left out or null is the plan's."
          }
        },
        "type": "object"
      },
      "UpdateSource": {
        "description": "The fields to change; the others stay. `response` and `verification`\nand `deduplication` replace the whole object.",
        "properties": {
          "deduplication": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Deduplication"
              }
            ]
          },
          "handshake": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Handshake",
                "description": "Defaults to `none`."
              }
            ]
          },
          "methods": {
            "items": {
              "$ref": "#/components/schemas/Method"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "response": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SourceResponse"
              }
            ]
          },
          "search_fields": {
            "description": "Replaces the list; events already stored keep what they had.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "verification": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Verification"
              }
            ]
          }
        },
        "type": "object"
      },
      "User": {
        "properties": {
          "email": {
            "type": "string"
          },
          "id": {
            "example": "usr_01k6zv3f8ve8tb5m6bq6bnqh0r",
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "onboarded": {
            "description": "Finished or skipped the first-run setup (P3-10).",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "email"
        ],
        "type": "object"
      },
      "UserCode": {
        "description": "The code the person typed or followed a link with.",
        "properties": {
          "user_code": {
            "example": "WDJB-MJHT",
            "type": "string"
          }
        },
        "required": [
          "user_code"
        ],
        "type": "object"
      },
      "Verification": {
        "additionalProperties": false,
        "description": "How a source verifies requests. Which fields apply depends on `method`;\nthe others must be left out.",
        "example": {
          "header": "x-signature",
          "method": "hmac",
          "prefix": "sha256="
        },
        "properties": {
          "algorithm": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/HmacAlgorithm",
                "description": "`hmac`; `sha256` when left out."
              }
            ]
          },
          "allowed_ips": {
            "description": "Any method: the only addresses requests are accepted from, as\nIPv4 or IPv6 CIDR ranges.",
            "example": [
              "203.0.113.0/24"
            ],
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "encoding": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/SignatureEncoding",
                "description": "`hmac`; `hex` when left out."
              }
            ]
          },
          "field": {
            "description": "`shared_secret`: the body field holding the token; a dotted path\nin JSON.",
            "type": [
              "string",
              "null"
            ]
          },
          "header": {
            "description": "`hmac`: the signature header. `api_key`: the key's header.",
            "type": [
              "string",
              "null"
            ]
          },
          "method": {
            "$ref": "#/components/schemas/VerificationMethod"
          },
          "on_failure": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/OnFailure",
                "description": "Any method; `reject` when left out."
              }
            ]
          },
          "prefix": {
            "description": "`hmac`: text before the signature, such as `sha256=`.",
            "type": [
              "string",
              "null"
            ]
          },
          "query": {
            "description": "`api_key`: the key's query parameter, instead of `header`.",
            "type": [
              "string",
              "null"
            ]
          },
          "signed_content": {
            "description": "`hmac`: what is signed, `{body}` when left out; `{timestamp}` is\nthe `timestamp_header` value.",
            "example": "{timestamp}.{body}",
            "type": [
              "string",
              "null"
            ]
          },
          "timestamp_header": {
            "description": "`hmac`, when `signed_content` has `{timestamp}`.",
            "type": [
              "string",
              "null"
            ]
          },
          "tolerance_seconds": {
            "description": "`hmac` with a timestamp, and `stripe`: how far a signed timestamp\nmay be from now, in seconds; 300 when left out.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "method"
        ],
        "type": "object"
      },
      "VerificationMethod": {
        "enum": [
          "none",
          "hmac",
          "stripe",
          "github",
          "basic",
          "api_key",
          "shared_secret"
        ],
        "type": "string"
      },
      "VerificationResult": {
        "description": "How the source verified the event when it arrived (P2-08).",
        "enum": [
          "verified",
          "not_configured",
          "failed"
        ],
        "type": "string"
      },
      "VerifyRequest": {
        "properties": {
          "token": {
            "description": "The token from the link.",
            "type": "string"
          }
        },
        "required": [
          "token"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "api_key": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "The public API. Authenticate with an API key made in the dashboard: `Authorization: Bearer rk_…`. A key acts in one project's environment. Personal keys require current membership and are capped by their original grant; service keys have independent viewer/developer grants, with no administrative authority. Each key may make a limited number of requests a minute; over it the answer is 429 with `Retry-After`. Errors are problem details (RFC 9457); every response carries an `x-request-id` header. Version 1 changes only by adding operations, fields and optional parameters.",
    "license": {
      "name": ""
    },
    "title": "Ricochet API",
    "version": "1"
  },
  "openapi": "3.1.0",
  "paths": {
    "/api/v1/projects/{project_id}/environments/{environment_id}/alert-channels": {
      "get": {
        "operationId": "list_alert_channels",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AlertChannel"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Oldest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/alert-channels`.",
        "tags": [
          "alerts"
        ]
      },
      "post": {
        "operationId": "create_alert_channel",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAlertChannel"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertChannel"
                }
              }
            },
            "description": "Created; alerts opened from now on are sent to it"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A viewer"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The environment already sends to it"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not a member's address, or not a public URL"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/alert-channels`.",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/alert-channels/{alert_channel_id}": {
      "delete": {
        "operationId": "delete_alert_channel",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`ach_` ID",
            "in": "path",
            "name": "alert_channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted; notices already queued for it are dropped"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A viewer"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such channel, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`DELETE /api/projects/{project_id}/environments/{environment_id}/alert-channels/{alert_channel_id}`.",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/alert-channels/{alert_channel_id}/test": {
      "post": {
        "operationId": "test_alert_channel",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`ach_` ID",
            "in": "path",
            "name": "alert_channel_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Queued; it is sent within seconds"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A viewer"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such channel, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/alert-channels/{alert_channel_id}/test`:\nsend it a test notice.",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/alert-rules": {
      "get": {
        "operationId": "list_alert_rules",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/AlertRule"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Oldest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/alert-rules`.",
        "tags": [
          "alerts"
        ]
      },
      "post": {
        "operationId": "create_alert_rule",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAlertRule"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRule"
                }
              }
            },
            "description": "Created; evaluated from the next minute"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A viewer"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An invalid subject, window or threshold"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/alert-rules`.",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/alert-rules/{alert_rule_id}": {
      "delete": {
        "operationId": "delete_alert_rule",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`alr_` ID",
            "in": "path",
            "name": "alert_rule_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A viewer"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such rule, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`DELETE /api/projects/{project_id}/environments/{environment_id}/alert-rules/{alert_rule_id}`:\nthe rule and its alerts.",
        "tags": [
          "alerts"
        ]
      },
      "get": {
        "operationId": "get_alert_rule",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`alr_` ID",
            "in": "path",
            "name": "alert_rule_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRule"
                }
              }
            },
            "description": "The rule"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such rule, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/alert-rules/{alert_rule_id}`.",
        "tags": [
          "alerts"
        ]
      },
      "patch": {
        "operationId": "update_alert_rule",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`alr_` ID",
            "in": "path",
            "name": "alert_rule_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAlertRule"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AlertRule"
                }
              }
            },
            "description": "Updated"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A viewer"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such rule, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An invalid window or threshold"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`PATCH /api/projects/{project_id}/environments/{environment_id}/alert-rules/{alert_rule_id}`.",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/alerts": {
      "get": {
        "operationId": "list_alerts",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only alerts still open.",
            "in": "query",
            "name": "open",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "At most this many, 1 to 100; default 50.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Alert"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Open alerts first, then the latest resolved"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/alerts`.",
        "tags": [
          "alerts"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/changes": {
      "get": {
        "operationId": "list_changes",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only changes to this source, destination or connection.",
            "in": "query",
            "name": "subject_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only changes older than this `id`.",
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          },
          {
            "description": "1 to 100; default 50.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangePage"
                }
              }
            },
            "description": "One page, newest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not a source, destination or connection ID"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/changes`.",
        "tags": [
          "changes"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/connections": {
      "get": {
        "operationId": "list_connections",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only this source's connections (`src_` ID).",
            "in": "query",
            "name": "source_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only this destination's connections (`dst_` ID).",
            "in": "query",
            "name": "destination_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Connection"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Oldest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A malformed filter ID"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/connections`.",
        "tags": [
          "connections"
        ]
      },
      "post": {
        "operationId": "create_connection",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConnection"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Already connected"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such source or destination in the environment, or an invalid filter or transformation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/connections`:\nsends the source's next events to the destination too.",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/connections/{connection_id}": {
      "delete": {
        "operationId": "delete_connection",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`con_` ID",
            "in": "path",
            "name": "connection_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such connection, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`DELETE /api/projects/{project_id}/environments/{environment_id}/connections/{connection_id}`:\nthe source's next events stop going to the destination.",
        "tags": [
          "connections"
        ]
      },
      "get": {
        "operationId": "get_connection",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`con_` ID",
            "in": "path",
            "name": "connection_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            },
            "description": "The connection"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such connection, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/connections/{connection_id}`.",
        "tags": [
          "connections"
        ]
      },
      "patch": {
        "operationId": "update_connection",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`con_` ID",
            "in": "path",
            "name": "connection_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConnection"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            },
            "description": "Updated"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such connection, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid filter or transformation"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`PATCH /api/projects/{project_id}/environments/{environment_id}/connections/{connection_id}`:\npause or resume it, or change its filter or transformation.",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/destinations": {
      "get": {
        "operationId": "list_destinations",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Destination"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Oldest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/destinations`.",
        "tags": [
          "destinations"
        ]
      },
      "post": {
        "operationId": "create_destination",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDestination"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedDestination"
                }
              }
            },
            "description": "Created, with its signing secret"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The caller already has a CLI destination here"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid name, URL or settings"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/destinations`:\na new HTTP destination, or the caller's CLI destination.",
        "tags": [
          "destinations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}": {
      "delete": {
        "operationId": "delete_destination",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`DELETE /api/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}`:\ndeletes it with its connections. Its past deliveries stay with their\nevents until retention removes them.",
        "tags": [
          "destinations"
        ]
      },
      "get": {
        "operationId": "get_destination",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Destination"
                }
              }
            },
            "description": "The destination"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}`.",
        "tags": [
          "destinations"
        ]
      },
      "patch": {
        "operationId": "update_destination",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDestination"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Destination"
                }
              }
            },
            "description": "Updated"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid name, URL or settings, or an http:// URL for a destination with a credential"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`PATCH /api/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}`:\nrename, move, pause and resume it, or change its settings.",
        "tags": [
          "destinations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}/check": {
      "post": {
        "operationId": "check_destination",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckDestination"
              }
            }
          },
          "description": "What to send; `head` when left out",
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationCheck"
                }
              }
            },
            "description": "How far the request got, step by step"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not an HTTP destination"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}/check`.",
        "tags": [
          "destinations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}/circuit": {
      "get": {
        "operationId": "get_destination_circuit",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Circuit"
                }
              }
            },
            "description": "The circuit; closed for a destination not delivered to lately"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}/circuit`.",
        "tags": [
          "destinations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}/credential": {
      "delete": {
        "operationId": "delete_destination_credential",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such credential, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`DELETE .../destinations/{destination_id}/credential`: deliveries go\nwithout it from now on.",
        "tags": [
          "destinations"
        ]
      },
      "put": {
        "operationId": "set_destination_credential",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetCredential"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationCredential"
                }
              }
            },
            "description": "Stored; its secret is not returned"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid credential, or the destination is not https://"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API has no MASTER_KEYS to seal it with"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`PUT .../destinations/{destination_id}/credential`: sets the credential\nsent with every delivery, replacing any it had.",
        "tags": [
          "destinations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}/health": {
      "get": {
        "operationId": "get_destination_health",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "From this time (attempts started at or after), default a day before `before`.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Up to this time, default now. At most 31 days after `after`.",
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DestinationHealth"
                }
              }
            },
            "description": "Its failures in the range, and its last success and failure"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid range"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}/health`.",
        "tags": [
          "destinations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}/listeners": {
      "get": {
        "operationId": "get_destination_listeners",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Listeners"
                }
              }
            },
            "description": "How many `ricochet listen` sessions are connected"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}/listeners`.",
        "tags": [
          "destinations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}/secrets": {
      "get": {
        "operationId": "list_destination_secrets",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SigningSecret"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Newest first, without their values"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET .../destinations/{destination_id}/secrets`: newest first, expired\nones too.",
        "tags": [
          "destinations"
        ]
      },
      "post": {
        "operationId": "rotate_destination_secret",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RotateSigningSecret"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewSigningSecret"
                }
              }
            },
            "description": "Made; its value is shown only now"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid overlap"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API has no MASTER_KEYS to seal it with"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST .../destinations/{destination_id}/secrets`: makes the next secret\nand shows it once. The one before keeps signing for `overlap_seconds`;\nolder ones stop now.",
        "tags": [
          "destinations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}/secrets/{secret_id}": {
      "delete": {
        "operationId": "delete_destination_secret",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`sec_` ID",
            "in": "path",
            "name": "secret_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such secret, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`DELETE .../destinations/{destination_id}/secrets/{secret_id}`: it stops\nsigning now, e.g. to end an overlap early. Without any secret,\ndeliveries go out unsigned.",
        "tags": [
          "destinations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/destinations/{destination_id}/simulation": {
      "delete": {
        "operationId": "stop_failure_simulation",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Stopped (or there was none)"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A production environment"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`DELETE .../destinations/{destination_id}/simulation`: the next\ndeliveries reach the destination again.",
        "tags": [
          "destinations"
        ]
      },
      "get": {
        "operationId": "get_failure_simulation",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulationState"
                }
              }
            },
            "description": "The simulation in progress, if any"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A production environment"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Not an HTTP destination"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET .../destinations/{destination_id}/simulation`.",
        "tags": [
          "destinations"
        ]
      },
      "put": {
        "operationId": "simulate_failures",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`dst_` ID",
            "in": "path",
            "name": "destination_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateFailures"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulationState"
                }
              }
            },
            "description": "Set: each simulated attempt is recorded with `simulated` in its error"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A production environment"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An invalid status or count, or not an HTTP destination"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`PUT .../destinations/{destination_id}/simulation`: the next `count`\ndeliveries fail without reaching the destination. Replaces any earlier\none.",
        "tags": [
          "destinations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/event-shares/{share_id}": {
      "delete": {
        "operationId": "revoke_event_share",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`shr_` ID",
            "in": "path",
            "name": "share_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Revoked"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such link, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`DELETE /api/projects/{project_id}/environments/{environment_id}/event-shares/{share_id}`:\nthe link stops working at once.",
        "tags": [
          "events"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/events": {
      "get": {
        "operationId": "list_events",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only this source's events (`src_` ID).",
            "in": "query",
            "name": "source_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`received`, `pending`, `delivered` or `failed`.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only events of this type, exactly.",
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`verified`, `not_configured` or `failed`.",
            "in": "query",
            "name": "verification",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Received at or after this time.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Received before this time.",
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "From a previous page's `next_cursor`.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`true`: only events with a failed attempt on an original delivery (no\nresponse, or one that was not a 2xx), even when a retry then\nsucceeded.",
            "in": "query",
            "name": "had_failed_attempt",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Only events with a failed attempt of this kind on an original\ndelivery: one of the kinds of `AttemptError`.",
            "in": "query",
            "name": "error_kind",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only events with an original delivery to this destination (`dst_`\nID). With `had_failed_attempt` or `error_kind`, the failed attempt\nmust be one of that delivery's.",
            "in": "query",
            "name": "destination_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Events found by an ID or a value (P4-09): an `evt_` or `dlv_` ID, a\nrequest ID, the provider's event ID, or the value of one of the\nsource's search fields, exactly.",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "With `search`, only this search field's value (`body.data.customer`).",
            "in": "query",
            "name": "field",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page size: 1 to 100, default 50.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int64",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventPage"
                }
              }
            },
            "description": "One page, newest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid filter or cursor"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/events`.",
        "tags": [
          "events"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/events/export": {
      "get": {
        "operationId": "export_events",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`jsonl` (default) or `csv`.",
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "For CSV, extra columns after the event's own, comma separated:\n`body.<key>...` (an array item by its number, as in `body.items.0.id`),\n`body` or `headers.<name>`. At most 50.",
            "example": "body.type,body.data.object.id,headers.stripe-signature",
            "in": "query",
            "name": "columns",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only this source's events (`src_` ID).",
            "in": "query",
            "name": "source_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`received`, `pending`, `delivered` or `failed`.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only events of this type, exactly.",
            "in": "query",
            "name": "event_type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`verified`, `not_configured` or `failed`.",
            "in": "query",
            "name": "verification",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Received at or after this time.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Received before this time.",
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "As in the events list.",
            "in": "query",
            "name": "had_failed_attempt",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "As in the events list.",
            "in": "query",
            "name": "error_kind",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "As in the events list (`dst_` ID).",
            "in": "query",
            "name": "destination_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "As in the events list.",
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "As in the events list.",
            "in": "query",
            "name": "field",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/x-ndjson": {
                "schema": {
                  "type": "string"
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Every matching event, newest first, as a download. JSON Lines: one event per line, its summary with `headers`, `body` and `body_encoding` (`json`, `text` or `base64`). CSV: the event's own columns, then the chosen ones; a cell that a spreadsheet would read as a formula starts with `'`"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid filter, format or column"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/events/export`.",
        "tags": [
          "events"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/events/{event_id}": {
      "get": {
        "operationId": "get_event",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`evt_` ID",
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            },
            "description": "The event, its request and its deliveries"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such event, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/events/{event_id}`.",
        "tags": [
          "events"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/events/{event_id}/release": {
      "post": {
        "operationId": "release_event",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`evt_` ID",
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Released"
                }
              }
            },
            "description": "Released: its deliveries are queued"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such event, or no access"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The event is not quarantined"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/events/{event_id}/release`:\nroutes a quarantined event to its connections as if it had passed\nverification. It keeps its verification result.",
        "tags": [
          "events"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/events/{event_id}/replays": {
      "get": {
        "operationId": "list_replays",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`evt_` ID",
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayList"
                }
              }
            },
            "description": "The event's replays, each with its delivery's status"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such event, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/events/{event_id}/replays`.",
        "tags": [
          "replays"
        ]
      },
      "post": {
        "operationId": "replay_event",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`evt_` ID",
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplayEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Replay"
                }
              }
            },
            "description": "Replayed: its delivery's first attempt is queued"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A viewer, or into production from another environment without being an admin or owner"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such event, or no access"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The event is quarantined: release it instead"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such destination"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/events/{event_id}/replays`:\nsend the stored event again, unchanged, as a new delivery.",
        "tags": [
          "replays"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/events/{event_id}/resend": {
      "post": {
        "operationId": "resend_event",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`evt_` ID of the original",
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTestEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestEvent"
                }
              }
            },
            "description": "The copy, stored and routed unless it was held"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such event, or no access"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The event's source no longer exists"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An invalid request, a method the source refuses, or nothing to sign with"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/events/{event_id}/resend`.",
        "tags": [
          "events"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/events/{event_id}/shares": {
      "get": {
        "operationId": "list_event_shares",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`evt_` ID",
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareList"
                }
              }
            },
            "description": "The links that still work"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/events/{event_id}/shares`.",
        "tags": [
          "events"
        ]
      },
      "post": {
        "operationId": "share_event",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`evt_` ID",
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateShare"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewShare"
                }
              }
            },
            "description": "The link, shown once"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such event, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An expiry out of range"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/events/{event_id}/shares`.",
        "tags": [
          "events"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/events/{event_id}/signature-check": {
      "post": {
        "operationId": "check_event_signature",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`evt_` ID",
            "in": "path",
            "name": "event_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CheckSignature"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignatureCheck"
                }
              }
            },
            "description": "The result and its steps, under the source's current settings, as of when the event arrived"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such event, or no access"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The source is gone, or has no current secret"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An empty or too long secret"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/events/{event_id}/signature-check`.",
        "tags": [
          "events"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/held-deliveries": {
      "get": {
        "operationId": "list_held_deliveries",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only this destination's (`dst_` ID).",
            "in": "query",
            "name": "destination_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HeldDeliveriesList"
                }
              }
            },
            "description": "The held deliveries, oldest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/held-deliveries`:\ndeliveries a paused destination or connection holds, counted by\ndestination and connection.",
        "tags": [
          "destinations"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/issues": {
      "get": {
        "operationId": "list_issues",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Events received at or after, default 7 days before `before`.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Events received before, default now. At most 31 days after `after`.",
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IssueList"
                }
              }
            },
            "description": "Failed deliveries by destination and cause"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid range"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/issues`.",
        "tags": [
          "events"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/metrics": {
      "get": {
        "operationId": "get_metrics",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`minute` or `hour`, default `hour`.",
            "in": "query",
            "name": "resolution",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Resolution"
            }
          },
          {
            "description": "From this time, default a day before `before`; the bucket holding it\nis the first.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Up to this time, default now.",
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Count only this source's events (`src_` ID).",
            "in": "query",
            "name": "source_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Count only this destination's deliveries (`dst_` ID).",
            "in": "query",
            "name": "destination_id",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Metrics"
                }
              }
            },
            "description": "The range's buckets and totals"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid range or ID"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/metrics`.",
        "tags": [
          "metrics"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/replay-jobs": {
      "post": {
        "operationId": "create_replay_job",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReplayJob"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayJob"
                }
              }
            },
            "description": "Counted and ready to start; at most 10,000 replays"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "A viewer, or into production from another environment without being an admin or owner"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An invalid selection or destination"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/replay-jobs`:\nmatch a selection of events and count them; nothing is sent until the\njob is started.",
        "tags": [
          "replays"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/replay-jobs/{replay_job_id}": {
      "get": {
        "operationId": "get_replay_job",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`rpj_` ID",
            "in": "path",
            "name": "replay_job_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayJob"
                }
              }
            },
            "description": "The job and its progress"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such job, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/replay-jobs/{replay_job_id}`.",
        "tags": [
          "replays"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/replay-jobs/{replay_job_id}/cancel": {
      "post": {
        "operationId": "cancel_replay_job",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`rpj_` ID",
            "in": "path",
            "name": "replay_job_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayJob"
                }
              }
            },
            "description": "Cancelled"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such job, or no access"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "It has finished"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/replay-jobs/{replay_job_id}/cancel`:\nreplay nothing more; its replays still in progress stop and count as failed.",
        "tags": [
          "replays"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/replay-jobs/{replay_job_id}/pause": {
      "post": {
        "operationId": "pause_replay_job",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`rpj_` ID",
            "in": "path",
            "name": "replay_job_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayJob"
                }
              }
            },
            "description": "Paused"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such job, or no access"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "It is not running"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/replay-jobs/{replay_job_id}/pause`:\nstop after the current batch; replays already made go on.",
        "tags": [
          "replays"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/replay-jobs/{replay_job_id}/start": {
      "post": {
        "operationId": "start_replay_job",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`rpj_` ID",
            "in": "path",
            "name": "replay_job_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayJob"
                }
              }
            },
            "description": "Running"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such job, or no access"
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "It is running or finished"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/replay-jobs/{replay_job_id}/start`:\nstart a ready job, or resume a paused one.",
        "tags": [
          "replays"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/rule-tests": {
      "post": {
        "operationId": "test_rules",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestRules"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RuleTestResults"
                }
              }
            },
            "description": "What each event would do"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such connection, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An invalid filter, transformation or list of events"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/rule-tests`.",
        "tags": [
          "connections"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/sources": {
      "get": {
        "operationId": "list_sources",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Source"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Oldest first"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/sources`.",
        "tags": [
          "sources"
        ]
      },
      "post": {
        "operationId": "create_source",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Source"
                }
              }
            },
            "description": "Created"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such environment, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid name, methods, response, verification or deduplication"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/sources`:\na new source, which accepts any request unless `verification` says\notherwise.",
        "tags": [
          "sources"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/sources/{source_id}": {
      "delete": {
        "operationId": "delete_source",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`src_` ID",
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such source, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`DELETE /api/projects/{project_id}/environments/{environment_id}/sources/{source_id}`:\ndeletes it with its connections; its URL stops accepting requests.\nStored events stay until retention removes them.",
        "tags": [
          "sources"
        ]
      },
      "get": {
        "operationId": "get_source",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`src_` ID",
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Source"
                }
              }
            },
            "description": "The source"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such source, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET /api/projects/{project_id}/environments/{environment_id}/sources/{source_id}`.",
        "tags": [
          "sources"
        ]
      },
      "patch": {
        "operationId": "update_source",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`src_` ID",
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSource"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Source"
                }
              }
            },
            "description": "Updated"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such source, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid name, methods, response, verification or deduplication"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`PATCH /api/projects/{project_id}/environments/{environment_id}/sources/{source_id}`.\nIts URL never changes.",
        "tags": [
          "sources"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/sources/{source_id}/secrets": {
      "get": {
        "operationId": "list_source_secrets",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`src_` ID",
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/SourceSecret"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Newest first, without their values"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such source, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`GET .../sources/{source_id}/secrets`: newest first, expired ones too.",
        "tags": [
          "sources"
        ]
      },
      "post": {
        "operationId": "add_source_secret",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`src_` ID",
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddSourceSecret"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceSecret"
                }
              }
            },
            "description": "Stored; its value is not returned"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such source, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Invalid value or overlap"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The API has no MASTER_KEYS to seal it with"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST .../sources/{source_id}/secrets`: adds the current secret. The one\nbefore it keeps verifying for `overlap_seconds`; older ones stop now.",
        "tags": [
          "sources"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/sources/{source_id}/secrets/{secret_id}": {
      "delete": {
        "operationId": "delete_source_secret",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`src_` ID",
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`sec_` ID",
            "in": "path",
            "name": "secret_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such secret, or no access"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`DELETE .../sources/{source_id}/secrets/{secret_id}`: it stops verifying\nnow, e.g. to end an overlap early.",
        "tags": [
          "sources"
        ]
      }
    },
    "/api/v1/projects/{project_id}/environments/{environment_id}/sources/{source_id}/test-events": {
      "post": {
        "operationId": "send_test_event",
        "parameters": [
          {
            "description": "`prj_` ID",
            "in": "path",
            "name": "project_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`env_` ID",
            "in": "path",
            "name": "environment_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`src_` ID",
            "in": "path",
            "name": "source_id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTestEvent"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestEvent"
                }
              }
            },
            "description": "Stored, and routed unless it was held"
          },
          "401": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No API key, or it is invalid or revoked"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No such source, or no access"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "An invalid request, a method the source refuses, or nothing to sign with"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Over the key's rate limit; `Retry-After` says when to try again"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "The gateway is not answering"
          }
        },
        "security": [
          {
            "api_key": []
          }
        ],
        "summary": "`POST /api/projects/{project_id}/environments/{environment_id}/sources/{source_id}/test-events`.",
        "tags": [
          "sources"
        ]
      }
    }
  },
  "tags": [
    {
      "description": "Where webhooks come in",
      "name": "sources"
    },
    {
      "description": "Where events are delivered",
      "name": "destinations"
    },
    {
      "description": "Which destinations each source's events go to",
      "name": "connections"
    },
    {
      "description": "Who changed which source, destination or connection",
      "name": "changes"
    },
    {
      "description": "Requests the gateway stored",
      "name": "events"
    },
    {
      "description": "Rules an environment is watched for, and the alerts they raise",
      "name": "alerts"
    },
    {
      "description": "Volume, delivery success and latency over time",
      "name": "metrics"
    },
    {
      "description": "Stored events sent again, one at a time or in bulk",
      "name": "replays"
    }
  ]
}