{
  "openapi": "3.1.0",
  "info": {
    "title": "Pocketbell API",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.pocketbell.dev"
    }
  ],
  "components": {
    "securitySchemes": {
      "sourceKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "The Source's API key, pb_live_…"
      },
      "session": {
        "type": "http",
        "scheme": "bearer",
        "description": "A signed-in app's session token, pb_sess_…"
      }
    },
    "schemas": {
      "MessageStatus": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "queued",
              "sent",
              "delivered",
              "failed",
              "awaiting_acknowledgment",
              "acknowledged",
              "awaiting_answer",
              "answered",
              "canceled",
              "deleted",
              "expired"
            ],
            "description": "`failed`: no device could be reached, or the account had no device signed in to send it to; it's still in the inbox. A Critical notification or a question with no device still waits (`awaiting_acknowledgment`, `awaiting_answer`): it's answered from the inbox once a device signs in. `deleted`: a Critical notification or a question the reader deleted while it waited, unacknowledged or unanswered; it no longer waits."
          },
          "priority": {
            "type": "string",
            "enum": [
              "silent",
              "quiet",
              "normal",
              "important",
              "critical"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "acknowledged_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "acknowledged_device": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the device it was acknowledged on.",
            "example": "iPhone"
          },
          "canceled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the reader deleted it while it waited (`deleted`)."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Critical or a question: when it stops repeating or waiting."
          },
          "answer": {
            "type": [
              "string",
              "null"
            ],
            "description": "A question's answer: the label that was tapped.",
            "example": "Approve"
          },
          "answered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "answered_device": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the device it was answered on.",
            "example": "iPhone"
          },
          "deliveries": {
            "type": "object",
            "properties": {
              "queued": {
                "type": "integer"
              },
              "sent": {
                "type": "integer"
              },
              "delivered": {
                "type": "integer"
              },
              "failed": {
                "type": "integer"
              }
            },
            "required": [
              "queued",
              "sent",
              "delivered",
              "failed"
            ],
            "description": "How many of the account's devices are at each state."
          }
        },
        "required": [
          "id",
          "status",
          "priority",
          "created_at",
          "acknowledged_at",
          "acknowledged_device",
          "canceled_at",
          "deleted_at",
          "expires_at",
          "answer",
          "answered_at",
          "answered_device",
          "deliveries"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "invalid_request"
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "field",
                    "message"
                  ]
                },
                "description": "Which fields were wrong, for invalid_request."
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "MessageAccepted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "msg_01jz9k6q8r3tfv0x2m4n5p7s8a"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "scheduled",
              "awaiting_acknowledgment",
              "awaiting_answer"
            ],
            "description": "awaiting_answer for a question; awaiting_acknowledgment for a Critical notification, which repeats until acknowledged; scheduled when deliver_at is ahead."
          },
          "repeats": {
            "type": "boolean",
            "description": "Critical only: false when the account already has 10 Critical notifications repeating. This one is delivered once, without repeats, and still waits for acknowledgment until it expires. A scheduled one is counted when it goes out, not when it's sent, and is true here."
          }
        },
        "required": [
          "id",
          "status"
        ]
      },
      "SendMessage": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096,
            "description": "The notification's text. Longer text is kept whole in the inbox and shortened in the push.",
            "example": "backup-03 failed with exit code 1"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 250,
            "description": "Defaults to the Source's name.",
            "example": "Backup failed"
          },
          "markdown": {
            "type": "boolean",
            "description": "true: the message uses markdown. The apps show **bold**, *italic*, `code`, [links](https://example.com) and lists of lines starting with - or *; the notification itself shows the plain text. Off by default, so text like snake_case_names arrives as written.",
            "example": true
          },
          "priority": {
            "type": "string",
            "enum": [
              "silent",
              "quiet",
              "normal",
              "important",
              "critical"
            ],
            "description": "Defaults to the Source's default priority.",
            "example": "important"
          },
          "sound": {
            "type": "string",
            "enum": [
              "default",
              "bell",
              "chime",
              "ping",
              "pulse",
              "rise",
              "alarm",
              "none"
            ],
            "description": "The sound it plays: default is the device's own, none plays nothing. Defaults to the Source's sound. A Critical notification always plays the Critical sound, a desk bell, whatever this says.",
            "example": "chime"
          },
          "url": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri",
            "description": "A link shown with the notification in the apps, titled url_title. Opening it asks first.",
            "example": "https://status.example.com"
          },
          "url_title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "example": "View Server"
          },
          "thread": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "Groups related notifications together on the Lock Screen and in Notification Center. Without one, a Source's notifications are grouped together.",
            "example": "backups-production"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 32
            },
            "maxItems": 10,
            "example": [
              "production",
              "backup"
            ]
          },
          "ttl": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2419200,
            "description": "Seconds, from when it goes out, that Apple keeps trying a device that's offline before dropping the notification; 0 tries once. Without it, a day. It still reaches the inbox either way.",
            "example": 3600
          },
          "replace": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,64}$",
            "description": "A key for this event. A later notification from the same Source with the same key replaces this one on screen and becomes the event's latest in the inbox; this one stays there as an earlier update, with its time.",
            "example": "deploy-4f2a91c"
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 40
                },
                "url": {
                  "type": "string",
                  "maxLength": 2048,
                  "format": "uri"
                }
              },
              "required": [
                "label",
                "url"
              ],
              "additionalProperties": false
            },
            "maxItems": 3,
            "description": "Up to three buttons, on the notification and with it in the apps. Each opens its link, after asking.",
            "example": [
              {
                "label": "Open Dashboard",
                "url": "https://status.example.com"
              }
            ]
          },
          "deliver_at": {
            "type": "string",
            "format": "date-time",
            "description": "Send at this time instead of now, up to 30 days ahead.",
            "example": "2026-09-28T02:00:00Z"
          },
          "attachment": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri",
            "description": "Pro: an image (PNG, JPEG, GIF or HEIC, up to 10 MB) shown with the notification. Pocketbell fetches it from this URL when a device shows it, and keeps nothing: your devices never contact this server, so it never sees their addresses.",
            "example": "https://example.com/graph.png"
          },
          "callback": {
            "type": "string",
            "maxLength": 2048,
            "format": "uri",
            "description": "Pro, for a Critical notification or a question: POSTed when it's acknowledged or answered, when the reader deletes it first, or when it expires first. Signed to the Standard Webhooks spec with the Source's signing secret.",
            "example": "https://example.com/pocketbell/callback"
          },
          "retry": {
            "type": "integer",
            "minimum": 30,
            "maximum": 3600,
            "description": "Critical only: seconds between repeats until acknowledged. Defaults to 300.",
            "example": 300
          },
          "expire": {
            "type": "integer",
            "minimum": 60,
            "maximum": 10800,
            "description": "Critical, or a question: seconds after which it stops repeating or waiting for an answer. 60 to 10800; defaults to 3600.",
            "example": 3600
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            },
            "minItems": 1,
            "maxItems": 3,
            "description": "A question: one to three answers, shown as buttons on the notification and in the apps. The first answer, from any device, is kept, and the sender gets it from the notification's status or a callback. Put the likely answer first: a banner may show only two.",
            "example": [
              "Approve",
              "Deny"
            ]
          },
          "progress": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "Pro, with replace: 0 to 1. The event shows as a Live Activity on your iPhones, on the Lock Screen and in the Dynamic Island, and each notification with the same replace key updates it. 1, or a notification with the key and no progress, ends it. Updates between the first and the last arrive quietly.",
            "example": 0.6
          }
        },
        "required": [
          "message"
        ],
        "additionalProperties": false
      },
      "AuthNonce": {
        "type": "object",
        "properties": {
          "nonce": {
            "type": "string",
            "description": "Single use, valid for 10 minutes."
          }
        },
        "required": [
          "nonce"
        ]
      },
      "Session": {
        "type": "object",
        "properties": {
          "session_token": {
            "type": "string",
            "description": "Send as Authorization: Bearer. Shown once."
          },
          "user_id": {
            "type": "string",
            "example": "usr_01jz9k6q8r3tfv0x2m4n5p7s8a"
          }
        },
        "required": [
          "session_token",
          "user_id"
        ]
      },
      "SignInWithApple": {
        "type": "object",
        "properties": {
          "identity_token": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "The identity token from Apple, as text."
          },
          "nonce": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The nonce from POST /v1/auth/nonce, unhashed."
          }
        },
        "required": [
          "identity_token",
          "nonce"
        ],
        "additionalProperties": false
      },
      "DeleteAccount": {
        "type": "object",
        "properties": {
          "identity_token": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8192,
            "description": "From signing in with Apple again, to confirm."
          },
          "nonce": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "The nonce from POST /v1/auth/nonce, unhashed."
          },
          "authorization_code": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "description": "From the same Apple sign-in; used once, to revoke the app's access."
          }
        },
        "required": [
          "identity_token",
          "nonce",
          "authorization_code"
        ],
        "additionalProperties": false
      },
      "DeviceList": {
        "type": "object",
        "properties": {
          "devices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeviceInfo"
            }
          }
        },
        "required": [
          "devices"
        ]
      },
      "DeviceInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "dev_01jz9k6q8r3tfv0x2m4n5p7s8a"
          },
          "name": {
            "type": "string",
            "example": "iPhone"
          },
          "platform": {
            "type": "string",
            "enum": [
              "ios",
              "ipados",
              "macos"
            ]
          },
          "last_seen_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "is_this_device": {
            "type": "boolean",
            "description": "Registered by the session making the request."
          },
          "play_sounds": {
            "type": "boolean",
            "description": "Notifications play sounds here; a Critical one always does."
          },
          "quiet_hours": {
            "type": "boolean",
            "description": "The account's quiet hours apply to this device."
          }
        },
        "required": [
          "id",
          "name",
          "platform",
          "last_seen_at",
          "is_this_device",
          "play_sounds",
          "quiet_hours"
        ]
      },
      "UpdateDevice": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "play_sounds": {
            "type": "boolean"
          },
          "quiet_hours": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "Device": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "dev_01jz9k6q8r3tfv0x2m4n5p7s8a"
          },
          "name": {
            "type": "string"
          },
          "platform": {
            "type": "string",
            "enum": [
              "ios",
              "ipados",
              "macos"
            ]
          },
          "apns_environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "platform",
          "apns_environment"
        ]
      },
      "RegisterDevice": {
        "type": "object",
        "properties": {
          "apns_token": {
            "type": "string",
            "pattern": "^[0-9a-f]{64,200}$",
            "example": "bab976c0e4f96f54421bd416d8bf7e2e77811aa40b40c81023d8ab1c9638afac"
          },
          "apns_environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ],
            "description": "sandbox for builds run from Xcode, production for TestFlight and the App Store."
          },
          "platform": {
            "type": "string",
            "enum": [
              "ios",
              "ipados",
              "macos"
            ]
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "example": "iPhone"
          },
          "install_id": {
            "type": "string",
            "format": "uuid",
            "description": "A random ID the app keeps on this device, the same across reinstalls, builds and sign-ins, so each device is listed once."
          },
          "live_activity_start_token": {
            "type": "string",
            "pattern": "^[0-9a-f]{32,400}$",
            "description": "iPhone: ActivityKit's push-to-start token, so a Live Activity can be started on this device."
          }
        },
        "required": [
          "apns_token",
          "apns_environment",
          "platform",
          "name"
        ],
        "additionalProperties": false
      },
      "DeliveryList": {
        "type": "object",
        "properties": {
          "deliveries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "device": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": "iPhone",
                  "description": "Null for a device since signed in to another account: no longer this one's to name."
                },
                "platform": {
                  "type": "string",
                  "enum": [
                    "ios",
                    "ipados",
                    "macos"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "sent",
                    "delivered",
                    "failed"
                  ]
                },
                "sent_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "delivered_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "Reported by the device: best effort."
                }
              },
              "required": [
                "device",
                "platform",
                "status",
                "sent_at",
                "delivered_at"
              ]
            }
          }
        },
        "required": [
          "deliveries"
        ]
      },
      "InboxPage": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InboxMessage"
            },
            "description": "In the order they changed, oldest change first."
          },
          "next_cursor": {
            "type": "string",
            "description": "Send as since next time, to get only what changed after this page."
          },
          "has_more": {
            "type": "boolean",
            "description": "More changes are waiting: ask again at once with since set to next_cursor."
          }
        },
        "required": [
          "messages",
          "next_cursor",
          "has_more"
        ]
      },
      "InboxMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "msg_01jz9k6q8r3tfv0x2m4n5p7s8a"
          },
          "source": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "message": {
            "type": "string",
            "description": "The whole text, even when the push carried a shortened one."
          },
          "markdown": {
            "type": "boolean",
            "description": "The message uses markdown."
          },
          "priority": {
            "type": "string",
            "enum": [
              "silent",
              "quiet",
              "normal",
              "important",
              "critical"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "url_title": {
            "type": [
              "string",
              "null"
            ]
          },
          "thread": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "label",
                "url"
              ]
            }
          },
          "attachment_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-27T21:00:41.750Z"
          },
          "read_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "acknowledged_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "acknowledged_device": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the device it was acknowledged on, when known."
          },
          "canceled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Canceled by the sender: no longer waiting for acknowledgment or an answer."
          },
          "options": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A question's answers, as buttons; empty for any other notification."
          },
          "answer": {
            "type": [
              "string",
              "null"
            ]
          },
          "answered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "answered_device": {
            "type": [
              "string",
              "null"
            ]
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "A question stops waiting at this time; a Critical notification stops repeating."
          },
          "deleted": {
            "type": "boolean",
            "description": "Out of the inbox. Without replaced_by, deleted: remove it; its text is empty."
          },
          "replaced_by": {
            "type": [
              "string",
              "null"
            ],
            "description": "Replaced by this newer message, with the same replace key: no longer in the inbox on its own, but kept, text and all, as an earlier update of that message."
          }
        },
        "required": [
          "id",
          "source",
          "title",
          "message",
          "markdown",
          "priority",
          "url",
          "url_title",
          "thread",
          "tags",
          "actions",
          "attachment_url",
          "created_at",
          "read_at",
          "acknowledged_at",
          "acknowledged_device",
          "canceled_at",
          "options",
          "answer",
          "answered_at",
          "answered_device",
          "expires_at",
          "deleted"
        ]
      },
      "MarkRead": {
        "type": "object",
        "properties": {
          "read": {
            "type": "boolean"
          }
        },
        "required": [
          "read"
        ],
        "additionalProperties": false
      },
      "Answer": {
        "type": "object",
        "properties": {
          "answer": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40,
            "description": "One of the question's options, exactly.",
            "example": "Approve"
          }
        },
        "required": [
          "answer"
        ],
        "additionalProperties": false
      },
      "DeliveryReceipt": {
        "type": "object",
        "properties": {
          "delivered_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the push reached the device. A receipt can be sent late, so the device's own time is recorded, never later than now and never before the message was sent.",
            "example": "2026-09-27T21:00:42.100Z"
          }
        },
        "required": [
          "delivered_at"
        ],
        "additionalProperties": false
      },
      "RegisterLiveActivity": {
        "type": "object",
        "properties": {
          "source_id": {
            "type": "string",
            "example": "src_01jz9k6q8r3tfv0x2m4n5p7s8a"
          },
          "key": {
            "type": "string",
            "pattern": "^[A-Za-z0-9._:-]{1,64}$",
            "description": "The event's replace key.",
            "example": "deploy-4f2a91c"
          },
          "push_token": {
            "type": "string",
            "pattern": "^[0-9a-f]{32,400}$"
          }
        },
        "required": [
          "source_id",
          "key",
          "push_token"
        ],
        "additionalProperties": false
      },
      "SourceList": {
        "type": "object",
        "properties": {
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Source"
            }
          }
        },
        "required": [
          "sources"
        ]
      },
      "Source": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "src_01jz9k6q8r3tfv0x2m4n5p7s8a"
          },
          "name": {
            "type": "string",
            "example": "Production Servers"
          },
          "kind": {
            "type": "string",
            "enum": [
              "api",
              "webhook"
            ],
            "description": "api: sends with an API key. webhook: another service posts events to its URL."
          },
          "title_template": {
            "type": [
              "string",
              "null"
            ],
            "description": "Webhook only: the title, with {{field}} placeholders."
          },
          "message_template": {
            "type": [
              "string",
              "null"
            ],
            "description": "Webhook only: the message; empty means a summary of the event."
          },
          "last_event_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Webhook only: when the latest event arrived."
          },
          "priority_field": {
            "type": [
              "string",
              "null"
            ],
            "description": "Webhook only: the field whose value sets the priority; null: always the default.",
            "example": "status"
          },
          "priority_values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriorityValue"
            },
            "description": "Webhook only: the priority for each value of priority_field, the first match winning. Any other value gets the default."
          },
          "replace_field": {
            "type": [
              "string",
              "null"
            ],
            "description": "Webhook only: the field whose value is the replace key, so a later event with the same value replaces the earlier notification; null: none.",
            "example": "check"
          },
          "device_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "The devices it sends to, of those still receiving; null: every device, including new ones. If every chosen device is removed, it sends to every device."
          },
          "api_key_hint": {
            "type": "string",
            "description": "Identifies the key without revealing it.",
            "example": "pb_live_8fK2…Qx4a"
          },
          "default_priority": {
            "type": "string",
            "enum": [
              "silent",
              "quiet",
              "normal",
              "important",
              "critical"
            ]
          },
          "sound": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "default",
              "bell",
              "chime",
              "ping",
              "pulse",
              "rise",
              "alarm",
              "none",
              null
            ],
            "description": "The sound its notifications play; null: the device's own."
          },
          "critical_sound": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "default",
              "bell",
              "chime",
              "ping",
              "pulse",
              "rise",
              "alarm",
              "none",
              null
            ],
            "deprecated": true,
            "description": "Always null: every Critical notification plays the Critical sound."
          },
          "messages_24h": {
            "type": "integer",
            "description": "Notifications sent in the last 24 hours."
          },
          "automatic_tool": {
            "type": [
              "string",
              "null"
            ],
            "description": "Webhook only: the tool its latest event is from, when Pocketbell writes its notifications (no template of its own); null otherwise.",
            "example": "Uptime Kuma"
          },
          "last_message_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When it last sent a notification that was taken, within the plan's history."
          },
          "last_refused": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "The error the sender got: monthly_limit_reached, rate_limited, pro_required or question_limit.",
                "example": "monthly_limit_reached"
              },
              "at": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "code",
              "at"
            ],
            "description": "The last notification it sent that was refused, and why: the sender alone saw the error."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "title_template",
          "message_template",
          "last_event_at",
          "priority_field",
          "replace_field",
          "device_ids",
          "api_key_hint",
          "default_priority",
          "sound",
          "critical_sound",
          "messages_24h",
          "created_at"
        ]
      },
      "PriorityValue": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "example": "down"
          },
          "priority": {
            "type": "string",
            "enum": [
              "silent",
              "quiet",
              "normal",
              "important",
              "critical"
            ],
            "example": "critical"
          }
        },
        "required": [
          "value",
          "priority"
        ],
        "additionalProperties": false
      },
      "SourceOrder": {
        "type": "object",
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 1000,
            "description": "Source IDs, first to last."
          }
        },
        "required": [
          "ids"
        ]
      },
      "SourceWithKey": {
        "type": "object",
        "properties": {
          "source": {
            "$ref": "#/components/schemas/Source"
          },
          "api_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "API Sources. Shown once: only its hash is kept.",
            "example": "pb_live_…"
          },
          "webhook_token": {
            "type": [
              "string",
              "null"
            ],
            "description": "Webhook Sources. Shown once. The URL is /v1/hooks/{webhook_token} on this server.",
            "example": "pbw_…"
          }
        },
        "required": [
          "source",
          "api_key",
          "webhook_token"
        ]
      },
      "CreateSource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "example": "Production Servers"
          },
          "kind": {
            "type": "string",
            "enum": [
              "api",
              "webhook"
            ],
            "description": "Defaults to api."
          },
          "default_priority": {
            "type": "string",
            "enum": [
              "silent",
              "quiet",
              "normal",
              "important",
              "critical"
            ],
            "description": "Defaults to normal."
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      },
      "UpdateSource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "example": "Production Servers"
          },
          "default_priority": {
            "type": "string",
            "enum": [
              "silent",
              "quiet",
              "normal",
              "important",
              "critical"
            ]
          },
          "sound": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "default",
              "bell",
              "chime",
              "ping",
              "pulse",
              "rise",
              "alarm",
              "none",
              null
            ]
          },
          "critical_sound": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "default",
              "bell",
              "chime",
              "ping",
              "pulse",
              "rise",
              "alarm",
              "none",
              null
            ],
            "deprecated": true,
            "description": "Ignored: every Critical notification plays the Critical sound."
          },
          "title_template": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2000
          },
          "message_template": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 2000
          },
          "priority_field": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200,
            "description": "Webhook only: the field, as a dot path (heartbeat.status), whose value sets the priority. Empty or null: off."
          },
          "priority_values": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriorityValue"
            },
            "maxItems": 10,
            "description": "Webhook only: the priority for each value, compared as text, trimmed and ignoring case. The first match wins."
          },
          "replace_field": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200,
            "description": "Webhook only: the field whose value is the replace key. Empty or null: off."
          },
          "device_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "maxItems": 50,
            "description": "The devices it sends to. Empty (or null): every device of the account, including new ones."
          }
        },
        "additionalProperties": false
      },
      "CallbackSecret": {
        "type": "object",
        "properties": {
          "secret": {
            "type": "string",
            "description": "whsec_…: verify callbacks with it, per the Standard Webhooks spec."
          }
        },
        "required": [
          "secret"
        ]
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "event_json": {
            "type": [
              "string",
              "null"
            ],
            "description": "The latest event, pretty-printed in the order it arrived; null before the first."
          },
          "summary": {
            "type": [
              "string",
              "null"
            ],
            "description": "What the message reads with no message template."
          },
          "received_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The event's field paths, for {{placeholders}}."
          },
          "recognized": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "tool": {
                "type": "string",
                "example": "Uptime Kuma"
              },
              "title": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "priority": {
                "type": "string",
                "enum": [
                  "silent",
                  "quiet",
                  "normal",
                  "important",
                  "critical"
                ]
              },
              "replace": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Always null: a known tool's events no longer replace each other; see event."
              },
              "event": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The event key: a later event about the same thing ends this one's waiting (a Critical stops repeating), and both stay in the inbox, in order."
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "tool",
              "title",
              "message",
              "priority",
              "replace",
              "url"
            ],
            "description": "The event is from a tool Pocketbell knows: what it becomes with no template, and, with no rules, its priority and event key."
          }
        },
        "required": [
          "event_json",
          "summary",
          "received_at",
          "fields"
        ]
      },
      "SendTest": {
        "type": "object",
        "properties": {
          "priority": {
            "type": "string",
            "enum": [
              "silent",
              "quiet",
              "normal",
              "important",
              "critical"
            ],
            "description": "The test's priority, to see how each level arrives. Without it, the Source's default priority."
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 250,
            "description": "The test's title in the reader's language, as the app writes it. Without it, \"Test notification\"."
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4096,
            "description": "The test's message in the reader's language. Without it, English that names the Source."
          }
        }
      },
      "Account": {
        "type": "object",
        "properties": {
          "app_account_token": {
            "type": "string",
            "format": "uuid",
            "description": "Set as the appAccountToken of every App Store purchase, so the purchase is tied to this account."
          },
          "plan": {
            "type": "string",
            "enum": [
              "free",
              "pro"
            ]
          },
          "limits": {
            "type": "object",
            "properties": {
              "sources": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Null: no limit."
              },
              "monthly_messages": {
                "type": "integer"
              },
              "history_days": {
                "type": "integer"
              }
            },
            "required": [
              "sources",
              "monthly_messages",
              "history_days"
            ]
          },
          "usage": {
            "type": "object",
            "properties": {
              "sources": {
                "type": "integer"
              },
              "messages_this_month": {
                "type": "integer"
              }
            },
            "required": [
              "sources",
              "messages_this_month"
            ]
          },
          "quiet_hours": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "start": {
                "type": "integer"
              },
              "end": {
                "type": "integer"
              },
              "time_zone": {
                "type": "string"
              }
            },
            "required": [
              "start",
              "end",
              "time_zone"
            ],
            "description": "Minutes after midnight in time_zone; Normal notifications arrive silently between. Null: off."
          }
        },
        "required": [
          "app_account_token",
          "plan",
          "limits",
          "usage",
          "quiet_hours"
        ]
      },
      "QuietHours": {
        "type": "object",
        "properties": {
          "start": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1439,
            "example": 1320
          },
          "end": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1439,
            "example": 420
          },
          "time_zone": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "America/Los_Angeles"
          }
        },
        "required": [
          "start",
          "end",
          "time_zone"
        ],
        "additionalProperties": false
      },
      "RecordPurchase": {
        "type": "object",
        "properties": {
          "signed_transaction": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16384,
            "description": "The transaction's JWS, as StoreKit gives it."
          }
        },
        "required": [
          "signed_transaction"
        ],
        "additionalProperties": false
      },
      "AppStoreNotification": {
        "type": "object",
        "properties": {
          "signedPayload": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "signedPayload"
        ]
      }
    },
    "parameters": {}
  },
  "paths": {
    "/v1/messages/{id}": {
      "get": {
        "operationId": "getMessageStatus",
        "summary": "Check a notification",
        "description": "Where a notification this Source sent has got to: delivered, and for a Critical one, acknowledged (and when), canceled or expired.",
        "security": [
          {
            "sourceKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "msg_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Its status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageStatus"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such notification from this Source.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: too many requests with this key, or too many unrecognized keys from this address; retry after the Retry-After header's seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "markRead",
        "summary": "Mark read or unread",
        "description": "On every device of the account.",
        "tags": [
          "Inbox"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "msg_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkRead"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Done."
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such message on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteMessage",
        "summary": "Delete from the inbox",
        "description": "From every device of the account, with its earlier updates. Their text is erased; a Critical one stops repeating.",
        "tags": [
          "Inbox"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "msg_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such message on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/messages/{id}/cancel": {
      "post": {
        "operationId": "cancelMessage",
        "summary": "Cancel a Critical notification",
        "description": "Stops its repeats, for example when the problem has recovered. It no longer waits for acknowledgment.",
        "security": [
          {
            "sourceKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "msg_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Its status after canceling.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageStatus"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such notification from this Source.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: too many requests with this key, or too many unrecognized keys from this address; retry after the Retry-After header's seconds.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/messages": {
      "post": {
        "operationId": "sendMessage",
        "summary": "Send a notification",
        "description": "Queues a notification for every device the Source delivers to. Send an `Idempotency-Key` header to make retries safe: a repeat with the same key returns the first message instead of sending another.",
        "security": [
          {
            "sourceKey": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255,
              "description": "Any unique string, such as a UUID.",
              "example": "backup-03-2026-09-27"
            },
            "required": false,
            "description": "Any unique string, such as a UUID.",
            "name": "idempotency-key",
            "in": "header"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessage"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted and queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageAccepted"
                }
              }
            }
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing, malformed or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A Pro feature on a Free account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: too many at once, or too many unrecognized keys from this address, retry after the Retry-After header's seconds; monthly_limit_reached: the account's notifications for the month are used up (Critical ones still go out: every one on Pro, 100 more on Free); or question_limit: the Free plan's questions for the month are used up.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listMessages",
        "summary": "Sync the inbox",
        "description": "Every message that changed since the cursor: new ones, and ones read, acknowledged or deleted on another device. Start with no cursor; keep next_cursor for next time.",
        "tags": [
          "Inbox"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,18}$",
              "description": "The next_cursor from the last page."
            },
            "required": false,
            "description": "The next_cursor from the last page.",
            "name": "since",
            "in": "query"
          },
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "required": false,
            "name": "limit",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of changes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InboxPage"
                }
              }
            }
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/nonce": {
      "post": {
        "operationId": "createAuthNonce",
        "summary": "Start Sign in with Apple",
        "description": "Issues a single-use nonce. Put its SHA-256 hash, in lowercase hex, in the Apple sign-in request, then send the nonce itself with the identity token.",
        "tags": [
          "Account"
        ],
        "responses": {
          "201": {
            "description": "A new nonce.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthNonce"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/apple": {
      "post": {
        "operationId": "signInWithApple",
        "summary": "Sign in with Apple",
        "description": "Exchanges an Apple identity token for a session, creating the account on first sign-in.",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignInWithApple"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Signed in.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Session"
                }
              }
            }
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The identity token or nonce was not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/session": {
      "delete": {
        "operationId": "signOut",
        "summary": "Sign out",
        "description": "Ends this session. Devices it registered stop receiving notifications.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "204": {
            "description": "Signed out."
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account": {
      "delete": {
        "operationId": "deleteAccount",
        "summary": "Delete the account",
        "description": "Deletes the account and everything in it: Sources, devices, notifications. The app signs in with Apple again first; its authorization code lets the server revoke the app's access to the Apple ID.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccount"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "The session, or the Apple sign-in confirming the deletion, was not valid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Apple could not be reached; try again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "getAccount",
        "summary": "The account's plan and usage",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "The account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/devices": {
      "get": {
        "operationId": "listDevices",
        "summary": "List the account's devices",
        "description": "Every device receiving this account's notifications, most recently seen first.",
        "tags": [
          "Devices"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "The devices.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "registerDevice",
        "summary": "Register this device",
        "description": "Registers the device's APNs token for the signed-in account, or updates it. The apps call this on every launch, since APNs can change a token.",
        "tags": [
          "Devices"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterDevice"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Registered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Device"
                }
              }
            }
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/devices/{id}": {
      "patch": {
        "operationId": "updateDevice",
        "summary": "Rename a device, or change its settings",
        "tags": [
          "Devices"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "dev_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDevice"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Changed."
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such device on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "removeDevice",
        "summary": "Remove a device",
        "description": "Stops delivery to the device and signs it out.",
        "tags": [
          "Devices"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "dev_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Removed."
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such device on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/messages/{id}/deliveries": {
      "get": {
        "operationId": "listDeliveries",
        "summary": "Where a notification went",
        "description": "Each device it was sent to: sent, delivered (as the device reported) or failed, and when. Only recorded states.",
        "tags": [
          "Inbox"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "msg_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The deliveries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such message on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/messages/{id}/acknowledge": {
      "post": {
        "operationId": "acknowledgeMessage",
        "summary": "Acknowledge a Critical notification",
        "description": "Stops its repeats on every device, and marks it read. Acknowledging again keeps the first time. A question isn't closed this way: it's only marked read, and keeps waiting (and repeating, if Critical) until it's answered.",
        "tags": [
          "Inbox"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "msg_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Acknowledged."
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such message on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/messages/{id}/answer": {
      "post": {
        "operationId": "answerMessage",
        "summary": "Answer a question",
        "description": "The first answer, from any device, is kept: it acknowledges the message, clears it from the other devices, and tells the sender. A later one is refused with already_answered; one after the question expired or the sender canceled it, with question_closed.",
        "tags": [
          "Inbox"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "msg_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Answer"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Answered."
          },
          "400": {
            "description": "Not one of the question's options.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such question on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "already_answered, on this or another device; or question_closed: it expired, or the sender canceled it.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/messages/{id}/delivered": {
      "post": {
        "operationId": "reportDelivered",
        "summary": "Report a delivery",
        "description": "Records that the push for this message reached this session's device.",
        "tags": [
          "Inbox"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "msg_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryReceipt"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Recorded."
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No delivery of this message to this session's devices.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/live-activities": {
      "put": {
        "operationId": "registerLiveActivity",
        "summary": "Register a Live Activity's token",
        "description": "Sent by the app when a Live Activity on this session's device gets its push token, and whenever the token changes.",
        "tags": [
          "Devices"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterLiveActivity"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Registered."
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such Source, or no device for this session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sources": {
      "get": {
        "operationId": "listSources",
        "summary": "List Sources",
        "tags": [
          "Sources"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "The account's Sources, in its own order: as arranged, then the rest by name.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createSource",
        "summary": "Create a Source",
        "description": "Returns the new Source's API key. It is shown only this once.",
        "tags": [
          "Sources"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSource"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceWithKey"
                }
              }
            }
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "The plan's Source limit is reached.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sources/order": {
      "put": {
        "operationId": "orderSources",
        "summary": "Arrange Sources",
        "description": "Sets the account's order for its Sources, the same on every device. Sources left out keep their order after these; IDs not this account's are skipped.",
        "tags": [
          "Sources"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceOrder"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The Sources, in the new order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceList"
                }
              }
            }
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sources/{id}": {
      "patch": {
        "operationId": "updateSource",
        "summary": "Change a Source",
        "tags": [
          "Sources"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "src_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSource"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Changed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Source"
                }
              }
            }
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such Source on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "deleteSource",
        "summary": "Delete a Source",
        "description": "Its key stops working. The notifications it already sent stay in the inbox; a Critical one still repeating stops, an open question closes, and a scheduled one never goes out.",
        "tags": [
          "Sources"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "src_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such Source on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sources/{id}/key": {
      "post": {
        "operationId": "rotateSourceKey",
        "summary": "Replace a Source's API key",
        "description": "The old key stops working at once. The new one is shown only this once.",
        "tags": [
          "Sources"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "src_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The new key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceWithKey"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such Source on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sources/{id}/messages": {
      "post": {
        "operationId": "sendFromSource",
        "summary": "Send a notification as one of your Sources",
        "description": "For the apps (Shortcuts, Siri): the same as sending with the Source's API key, with the signed-in session.",
        "tags": [
          "Sources"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "src_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessage"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageAccepted"
                }
              }
            }
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "A Pro feature on a Free account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such Source on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: too many at once (see Retry-After); monthly_limit_reached: this month's notifications are used up (Critical ones still go out: every one on Pro, 100 more on Free); or question_limit: the Free plan's questions for the month are used up.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sources/{id}/callback-secret": {
      "get": {
        "operationId": "getCallbackSecret",
        "summary": "The Source's callback signing secret",
        "description": "Made on first request. Verify callbacks with it, per the Standard Webhooks spec.",
        "tags": [
          "Sources"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "src_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackSecret"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such Source on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "rotateCallbackSecret",
        "summary": "Replace the callback signing secret",
        "description": "Callbacks are signed with the new one from now on.",
        "tags": [
          "Sources"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "src_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The new secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackSecret"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such Source on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sources/{id}/event": {
      "get": {
        "operationId": "latestWebhookEvent",
        "summary": "The latest webhook event",
        "description": "For setting up a webhook Source: the event as it arrived, and its field paths.",
        "tags": [
          "Sources"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "src_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "The latest event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEvent"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such Source on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/sources/{id}/test": {
      "post": {
        "operationId": "sendTestNotification",
        "summary": "Send a test notification",
        "tags": [
          "Sources"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "src_01jz9k6q8r3tfv0x2m4n5p7s8a"
            },
            "required": true,
            "name": "id",
            "in": "path"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageAccepted"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such Source on this account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: too many at once (see Retry-After); or monthly_limit_reached: this month's notifications are used up.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/quiet-hours": {
      "put": {
        "operationId": "setQuietHours",
        "summary": "Set quiet hours",
        "description": "Normal notifications arrive silently between start and end, in time_zone. Important and Critical are unchanged.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuietHours"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The account as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "400": {
            "description": "The request was invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "clearQuietHours",
        "summary": "Turn off quiet hours",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "responses": {
          "200": {
            "description": "The account as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/purchases": {
      "post": {
        "operationId": "recordPurchase",
        "summary": "Record an App Store purchase",
        "description": "After a purchase or a restore. The server checks Apple's signature and that the purchase is this account's.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "session": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecordPurchase"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Recorded; the account as it is now.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "400": {
            "description": "Not a valid Pocketbell purchase.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or ended session.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "The purchase belongs to another account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/app-store/notifications": {
      "post": {
        "operationId": "appStoreNotification",
        "summary": "App Store Server Notifications v2",
        "description": "For Apple only. Signed by the App Store; anything else is refused.",
        "tags": [
          "Account"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AppStoreNotification"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed."
          },
          "400": {
            "description": "Not a valid notification.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/hooks/{token}": {
      "post": {
        "operationId": "receiveWebhookEvent",
        "summary": "Send an event to a webhook Source",
        "description": "Post any JSON, form or text (up to 64 KB). The Source's templates turn it into a notification; with none, it reads as a summary of the event's fields.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "pbw_…"
            },
            "required": true,
            "name": "token",
            "in": "path"
          }
        ],
        "responses": {
          "202": {
            "description": "Received and queued.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageAccepted"
                }
              }
            }
          },
          "404": {
            "description": "No webhook Source has this URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "rate_limited: too many at once, or too many webhook URLs that match nothing from this address, retry after the Retry-After header's seconds; or monthly_limit_reached: the account's notifications for the month are used up (Critical ones still go out: every one on Pro, 100 more on Free).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}