{
  "openapi": "3.1.0",
  "info": {
    "title": "Parasend API",
    "version": "1.0.0",
    "summary": "Registered electronic delivery: documents that prove they arrived.",
    "description": "Send documents that prove they arrived. Each delivery goes to one recipient, who is told by e-mail, SMS or both and\nconfirms receipt at the level you ask for: eID, an ID document check, an SMS code or the link alone. Every step is\nwritten into a sealed evidence record, and every delivery has a Delivery Certificate (PDF) and an evidence record (XML).\n\n**Conventions.** JSON over HTTPS. Timestamps are RFC 3339 in UTC. IDs carry a prefix that names their type (`dlv_`,\n`fil_`, `bat_`, `evt_` …). Lists are paged with a cursor: `{data, has_more, next_cursor}`.\n\n**Keys and modes.** Authenticate with an API key as a Bearer token. A `ps_test_` key works in test mode, which sends\nno e-mail or SMS and accepts the code `000000`; a `ps_live_` key works in live mode. The modes never see each other's data.\n\n**Idempotency.** Send an `Idempotency-Key` header with every POST. A retry with the same key and body returns the\nfirst response, with `Idempotent-Replayed: true`, and never acts twice.\n\n**Errors.** Every error has one shape, `{\"error\": {type, code, message, param, request_id}}`. Each `code`\nhas its own page at `https://parasend.com/docs/errors/{code}`. Quote the `request_id` (also the `Request-Id` header)\nwhen you contact us.",
    "contact": {
      "name": "Parasend support",
      "url": "https://parasend.com/developers"
    }
  },
  "servers": [
    {
      "url": "https://api.parasend.com/v1",
      "description": "Production, for test keys (ps_test_) and live keys (ps_live_)."
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Deliveries",
      "description": "One evidenced transfer of a content payload (files or a secret) to exactly one recipient."
    },
    {
      "name": "Batches",
      "description": "First-class container of deliveries sharing files and policies, with an aggregated monotonic funnel. Lifecycle draft → send out (/finalize) → sending → completed."
    },
    {
      "name": "Files",
      "description": "Document containers — multiple files and folder structures per delivery via the manifest. Content is never scanned or inspected (N4, 23 Sep 2026) — integrity under Art. 44(1)(c) is served by not touching the bytes; the AUP places content at the customer's own risk."
    },
    {
      "name": "Evidence",
      "description": "One evidence record per delivery, built item by item as events occur and complete at terminal state. Immutable and read-only by definition — no permission can grant create or delete. The recipient of a confirmed or consignment_failed delivery can obtain the same artefacts on both tiers (N7, SL-14b) — through the delivery session that confirmed, at parasend.is/me, or by the documented interested-party procedure."
    },
    {
      "name": "Events",
      "description": "Global audit event log (polling fallback for webhooks)."
    },
    {
      "name": "Webhooks",
      "description": "Parasend tells your system about events by sending a small JSON payload to your HTTPS endpoint; fetch the resource for its full state. Every request is signed with HMAC-SHA256 over `timestamp.body` in the `Parasend-Signature` header; refuse a timestamp more than 5 minutes old. Failed attempts are retried with exponential backoff for up to 3 days. An endpoint may also require Parasend to authenticate (`auth.mode`): `none` (the signature only, the default), `static_bearer`, or `oauth2_client_credentials` against your own identity provider. The signature is sent whatever the mode. Parasend connects from fixed IP addresses, so you can allow-list them."
    },
    {
      "name": "Policies",
      "description": "Reminder/escalation and notification policies. Escalation steps `{after_days, channel, conditions[], min_score?, requires_approval?}` with channels email | sms | alternate_email | paper."
    },
    {
      "name": "Brand profiles",
      "description": "Eight plan-gated theme knobs, WCAG contrast validated at save. Trust chrome and \"Powered by Parasend · by Justikal\" are outside customer control on every tier."
    },
    {
      "name": "Verify",
      "description": "Checking a Delivery Certificate."
    }
  ],
  "paths": {
    "/deliveries": {
      "get": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "listDeliveries",
        "summary": "List deliveries",
        "description": "Lists your deliveries a page at a time (`limit`, `cursor`). Each row carries its `kind`. `status` is where a delivery is in its life; activity such as reminders and opens is in `last_activity`, never in `status`.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Free text, 2–200 characters, matched case-insensitively as part of the delivery title, the recipient's name or the recipient's e-mail, or exactly against a delivery id. Never matches personal codes or phone numbers — use `pin` for a personal code. `%` and `_` are ordinary characters.",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 200
            }
          },
          {
            "name": "pin",
            "in": "query",
            "required": false,
            "description": "The recipient's personal code (e.g. kennitala), exact match only; spaces and hyphens are ignored (120389-4569 = 1203894569). A part of a code matches nothing.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-Za-z \\-]{6,24}$"
            }
          },
          {
            "name": "recipient_email",
            "in": "query",
            "required": false,
            "description": "The recipient's e-mail address, exact match, case-insensitive.",
            "schema": {
              "type": "string",
              "format": "email",
              "maxLength": 254
            }
          },
          {
            "name": "created_before",
            "in": "query",
            "required": false,
            "description": "Only deliveries created strictly before this time. With `created_after`, a date range.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "`created_desc` (default) newest first; `created_asc` oldest first; `title_asc` / `title_desc` by title, case-insensitive; `recipient_asc` / `recipient_desc` by the recipient's name, else e-mail, else phone, case-insensitive; `status_asc` / `status_desc` by status in lifecycle order — on its way (created, paper_pending_approval, notified, paper_dispatched, opened, authenticated, auth_failed), then received (confirmed, delivered, evidence_sealed), then ended without delivery (expired, revoked, bounced, consignment_failed). Within one title, recipient or status the newest comes first. A cursor is only valid with the sort it was issued under (otherwise invalid_request / cursor_invalid).",
            "schema": {
              "type": "string",
              "enum": [
                "created_desc",
                "created_asc",
                "title_asc",
                "title_desc",
                "status_asc",
                "status_desc",
                "recipient_asc",
                "recipient_desc"
              ],
              "default": "created_desc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryList"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "id": "dlv_01M6R27T1MRPH7P4ZSR0WKTBQD",
                          "object": "delivery",
                          "kind": "documents",
                          "direction": "outbound",
                          "content_type": "files",
                          "status": "notified",
                          "last_activity": {
                            "at": "2026-11-06T09:15:05.675Z",
                            "type": "notified"
                          },
                          "title": "Terms of your loan are changing",
                          "message": null,
                          "language": "en",
                          "certificate_language": "is",
                          "recipient": {
                            "name": "Anna Björk Jónsdóttir",
                            "verified_name": null,
                            "verified_method": null,
                            "verification_photos": [],
                            "email": "anna.bjork@example.com",
                            "phone": "+3540000000",
                            "address": null,
                            "verification_level": "medium",
                            "conditional_authentication": false,
                            "personal_code": null,
                            "id_document_number": null
                          },
                          "files": [
                            {
                              "file_id": "fil_01M6R27SZK99V6N6WG4GK15T6R",
                              "path": "test-notice.pdf",
                              "primary": true
                            }
                          ],
                          "batch_id": null,
                          "delivery_url": null,
                          "short_url": null,
                          "evidence_policy": "urn:parasend:policy:evidence:standard:1",
                          "sender_display": "legal_person",
                          "operator_reference": "OP-7K3Q-M2",
                          "recipient_ref": "rcp_01M6R27T1MZJTGQZYDP9MF2ZGT",
                          "private": false,
                          "options": {
                            "auth_methods": [
                              "sms_otp",
                              "audkenni",
                              "smart_id",
                              "passkey",
                              "videoid"
                            ],
                            "reminder_policy": null,
                            "brand_profile_id": null,
                            "expires_in_days": 14,
                            "sender_display": "legal_person",
                            "notify_channels": [
                              "email",
                              "sms"
                            ]
                          },
                          "legal_hold": false,
                          "deletion_scheduled_at": null,
                          "livemode": false,
                          "created": "2026-11-06T09:15:05.651Z",
                          "expires_at": "2026-11-20T09:15:05.651Z",
                          "metadata": {},
                          "origin_request": null,
                          "reminder_waiting": null,
                          "email_waiting": null,
                          "follow_up": {
                            "policy_id": null,
                            "policy_name": null,
                            "policy_source": "none",
                            "state": "done",
                            "reminders_sent": 0,
                            "last_step": null,
                            "next_step": null,
                            "paused": false
                          }
                        },
                        {
                          "id": "dlv_01M6R27T13NKWVJRJBTHZDP6Y1",
                          "object": "delivery",
                          "kind": "documents",
                          "direction": "outbound",
                          "content_type": "files",
                          "status": "notified",
                          "last_activity": {
                            "at": "2026-11-06T09:15:05.671Z",
                            "type": "notified"
                          },
                          "title": "Court summons",
                          "message": null,
                          "language": "en",
                          "certificate_language": "is",
                          "recipient": {
                            "name": "Gervimaður Eyjaálfa",
                            "verified_name": null,
                            "verified_method": null,
                            "verification_photos": [],
                            "email": "gervimadur@example.com",
                            "phone": null,
                            "address": null,
                            "verification_level": "high",
                            "conditional_authentication": true,
                            "personal_code": "0101304339",
                            "id_document_number": null
                          },
                          "files": [
                            {
                              "file_id": "fil_01M6R27SZK99V6N6WG4GK15T6R",
                              "path": "test-notice.pdf",
                              "primary": true
                            }
                          ],
                          "batch_id": null,
                          "delivery_url": null,
                          "short_url": null,
                          "evidence_policy": "urn:parasend:policy:evidence:standard:1",
                          "sender_display": "legal_person",
                          "operator_reference": "OP-7K3Q-M2",
                          "recipient_ref": "rcp_01M6R27T1389NCD4SG4VXJKZAJ",
                          "private": false,
                          "options": {
                            "auth_methods": [
                              "audkenni",
                              "smart_id",
                              "passkey"
                            ],
                            "reminder_policy": null,
                            "brand_profile_id": null,
                            "expires_in_days": 30,
                            "sender_display": "legal_person",
                            "notify_channels": [
                              "email"
                            ]
                          },
                          "legal_hold": false,
                          "deletion_scheduled_at": null,
                          "livemode": false,
                          "created": "2026-11-06T09:15:05.634Z",
                          "expires_at": "2026-12-06T09:15:05.634Z",
                          "metadata": {},
                          "origin_request": null,
                          "reminder_waiting": null,
                          "email_waiting": null,
                          "follow_up": {
                            "policy_id": null,
                            "policy_name": null,
                            "policy_source": "none",
                            "state": "done",
                            "reminders_sent": 0,
                            "last_step": null,
                            "next_step": null,
                            "paused": false
                          }
                        },
                        {
                          "id": "dlv_01M6R27T05512SCV3852TPM2XY",
                          "object": "delivery",
                          "kind": "documents",
                          "direction": "outbound",
                          "content_type": "files",
                          "status": "notified",
                          "last_activity": {
                            "at": "2026-11-06T09:15:05.667Z",
                            "type": "notified"
                          },
                          "title": "Final notice: invoice 2026-114",
                          "message": null,
                          "language": "en",
                          "certificate_language": "is",
                          "recipient": {
                            "name": "Anna Björk Jónsdóttir",
                            "verified_name": null,
                            "verified_method": null,
                            "verification_photos": [],
                            "email": "anna.bjork@example.com",
                            "phone": null,
                            "address": null,
                            "verification_level": "high",
                            "conditional_authentication": false,
                            "personal_code": null,
                            "id_document_number": null
                          },
                          "files": [
                            {
                              "file_id": "fil_01M6R27SZK99V6N6WG4GK15T6R",
                              "path": "test-notice.pdf",
                              "primary": true
                            }
                          ],
                          "batch_id": null,
                          "delivery_url": null,
                          "short_url": null,
                          "evidence_policy": "urn:parasend:policy:evidence:standard:1",
                          "sender_display": "legal_person",
                          "operator_reference": "OP-7K3Q-M2",
                          "recipient_ref": "rcp_01M6R27T05ZNSRNMAW2CA8MTF6",
                          "private": false,
                          "options": {
                            "auth_methods": [
                              "audkenni",
                              "smart_id",
                              "passkey"
                            ],
                            "reminder_policy": null,
                            "brand_profile_id": null,
                            "expires_in_days": 30,
                            "sender_display": "legal_person",
                            "notify_channels": [
                              "email"
                            ]
                          },
                          "legal_hold": false,
                          "deletion_scheduled_at": null,
                          "livemode": false,
                          "created": "2026-11-06T09:15:05.604Z",
                          "expires_at": "2026-12-06T09:15:05.603Z",
                          "metadata": {
                            "case_ref": "IN-2026-114"
                          },
                          "origin_request": null,
                          "reminder_waiting": null,
                          "email_waiting": null,
                          "follow_up": {
                            "policy_id": null,
                            "policy_name": null,
                            "policy_source": "none",
                            "state": "done",
                            "reminders_sent": 0,
                            "last_step": null,
                            "next_step": null,
                            "paused": false
                          }
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "createDelivery",
        "summary": "Create a delivery",
        "description": "Creates a delivery and sends its notice. The recipient needs at least an `email` or a `phone`; the address actually used is printed on the Delivery Certificate. Upload the files first with POST /files and pass their `fil_` IDs in `files`. To let only one person open it, set `recipient.conditional_authentication` with their `personal_code` (eID, `verification_level: high`) or `id_document_number` (ID document check, `substantial`). Send an `Idempotency-Key`: a retry with the same key returns the first response and never sends twice.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeliveryCreate"
              },
              "examples": {
                "Send a PDF by e-mail": {
                  "summary": "Send a PDF by e-mail",
                  "value": {
                    "recipient": {
                      "name": "Anna Björk Jónsdóttir",
                      "email": "anna.bjork@example.com",
                      "verification_level": "high"
                    },
                    "files": [
                      "{{files}}"
                    ],
                    "title": "Final notice: invoice 2026-114",
                    "language": "en",
                    "metadata": {
                      "case_ref": "IN-2026-114"
                    }
                  }
                },
                "Only this kennitala may open it": {
                  "summary": "Only this kennitala may open it",
                  "value": {
                    "recipient": {
                      "name": "Gervimaður Eyjaálfa",
                      "email": "gervimadur@example.com",
                      "verification_level": "high",
                      "conditional_authentication": true,
                      "personal_code": "0101304339"
                    },
                    "files": [
                      "{{files}}"
                    ],
                    "title": "Court summons",
                    "language": "en"
                  }
                },
                "E-mail and SMS code": {
                  "summary": "E-mail and SMS code",
                  "value": {
                    "recipient": {
                      "name": "Anna Björk Jónsdóttir",
                      "email": "anna.bjork@example.com",
                      "phone": "+3540000000",
                      "verification_level": "medium"
                    },
                    "files": [
                      "{{files}}"
                    ],
                    "title": "Terms of your loan are changing",
                    "language": "en",
                    "options": {
                      "notify_channels": [
                        "email",
                        "sms"
                      ],
                      "expires_in_days": 14
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Includes the signed `delivery_url` for the recipient.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Delivery"
                },
                "examples": {
                  "Send a PDF by e-mail": {
                    "summary": "Send a PDF by e-mail",
                    "value": {
                      "id": "dlv_01M6R27T05512SCV3852TPM2XY",
                      "object": "delivery",
                      "kind": "documents",
                      "direction": "outbound",
                      "content_type": "files",
                      "status": "created",
                      "last_activity": null,
                      "title": "Final notice: invoice 2026-114",
                      "message": null,
                      "language": "en",
                      "certificate_language": "is",
                      "recipient": {
                        "name": "Anna Björk Jónsdóttir",
                        "verified_name": null,
                        "verified_method": null,
                        "verification_photos": [],
                        "email": "anna.bjork@example.com",
                        "phone": null,
                        "address": null,
                        "verification_level": "high",
                        "conditional_authentication": false,
                        "personal_code": null,
                        "id_document_number": null
                      },
                      "files": [
                        {
                          "file_id": "fil_01M6R27SZK99V6N6WG4GK15T6R",
                          "path": "test-notice.pdf",
                          "primary": true
                        }
                      ],
                      "batch_id": null,
                      "delivery_url": "https://parasend.com/d/dlv_01M6R27T05512SCV3852TPM2XY.5HUZcfzvQDAcjpVG.pUZ-uQ3Zeu8y3UB-1O0rXywI30QlFNxQ",
                      "short_url": "https://parasend.com/d/RM1RyXl0",
                      "evidence_policy": "urn:parasend:policy:evidence:standard:1",
                      "sender_display": "legal_person",
                      "operator_reference": "OP-7K3Q-M2",
                      "recipient_ref": "rcp_01M6R27T05ZNSRNMAW2CA8MTF6",
                      "private": false,
                      "options": {
                        "auth_methods": [
                          "audkenni",
                          "smart_id",
                          "passkey"
                        ],
                        "reminder_policy": null,
                        "brand_profile_id": null,
                        "expires_in_days": 30,
                        "sender_display": "legal_person",
                        "notify_channels": [
                          "email"
                        ]
                      },
                      "legal_hold": false,
                      "deletion_scheduled_at": null,
                      "livemode": false,
                      "created": "2026-11-06T09:15:05.604Z",
                      "expires_at": "2026-12-06T09:15:05.603Z",
                      "metadata": {
                        "case_ref": "IN-2026-114"
                      },
                      "origin_request": null,
                      "reminder_waiting": null,
                      "email_waiting": null,
                      "follow_up": {
                        "policy_id": null,
                        "policy_name": null,
                        "policy_source": "none",
                        "state": "done",
                        "reminders_sent": 0,
                        "last_step": null,
                        "next_step": null,
                        "paused": false
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deliveries/contact_check": {
      "post": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "checkDeliveryContact",
        "summary": "Check a contact before sending",
        "description": "Whether the last message from this organisation (in this mode) to the e-mail address or phone number failed — an e-mail that bounced, an SMS that never reported delivery to the phone (after 15 minutes) or failed, or a contact on the block list. Null warning for a contact never tried, or whose last attempt succeeded. A POST so the contact stays out of URLs and logs; the answer names no delivery or recipient.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "phone": {
                    "type": "string",
                    "description": "E.164"
                  }
                }
              },
              "examples": {
                "Check an e-mail address": {
                  "summary": "Check an e-mail address",
                  "value": {
                    "email": "anna.bjork@example.com"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One answer per contact given; null for a contact not given (or a phone not in E.164).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "contact_check"
                      ]
                    },
                    "email": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "warning": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "bounced",
                            null
                          ]
                        },
                        "last_attempt_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "phone": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "warning": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "not_delivered",
                            null
                          ]
                        },
                        "last_attempt_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Check an e-mail address": {
                    "summary": "Check an e-mail address",
                    "value": {
                      "object": "contact_check",
                      "email": {
                        "warning": null
                      },
                      "phone": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deliveries/summary": {
      "get": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "getDeliverySummary",
        "summary": "Get delivery counts",
        "description": "The caller's organisation and mode, deliveries created in the last `days` days (default 30) — how many, how they ended, and the median time from sending to confirmation. Counts only; no personal data.",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 365,
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The summary.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "delivery_summary"
                      ]
                    },
                    "livemode": {
                      "type": "boolean"
                    },
                    "days": {
                      "type": "integer"
                    },
                    "since": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "in_progress": {
                      "type": "integer"
                    },
                    "delivered": {
                      "type": "integer"
                    },
                    "not_delivered": {
                      "type": "integer"
                    },
                    "success_rate": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "description": "delivered / (delivered + not_delivered); null before any has ended"
                    },
                    "median_confirm_seconds": {
                      "type": [
                        "integer",
                        "null"
                      ]
                    },
                    "any": {
                      "type": "boolean",
                      "description": "Whether the organisation has any delivery in this mode at all"
                    }
                  }
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "object": "delivery_summary",
                      "livemode": false,
                      "days": 30,
                      "since": "2026-10-07T09:15:05.960Z",
                      "total": 5,
                      "in_progress": 5,
                      "delivered": 0,
                      "not_delivered": 0,
                      "success_rate": null,
                      "median_confirm_seconds": null,
                      "any": true
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deliveries/{id}": {
      "get": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "getDelivery",
        "summary": "Retrieve a delivery",
        "description": "Retrieves a delivery. A delivery scheduled for deletion still reads normally, with `deletion_scheduled_at` set, until it is removed; after that it is 404 `delivery_not_found`.",
        "responses": {
          "200": {
            "description": "The delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Delivery"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "dlv_01M6R27T05512SCV3852TPM2XY",
                      "object": "delivery",
                      "kind": "documents",
                      "direction": "outbound",
                      "content_type": "files",
                      "status": "notified",
                      "last_activity": {
                        "at": "2026-11-06T09:15:05.667Z",
                        "type": "notified"
                      },
                      "title": "Final notice: invoice 2026-114",
                      "message": null,
                      "language": "en",
                      "certificate_language": "is",
                      "recipient": {
                        "name": "Anna Björk Jónsdóttir",
                        "verified_name": null,
                        "verified_method": null,
                        "verification_photos": [],
                        "email": "anna.bjork@example.com",
                        "phone": null,
                        "address": null,
                        "verification_level": "high",
                        "conditional_authentication": false,
                        "personal_code": null,
                        "id_document_number": null
                      },
                      "files": [
                        {
                          "file_id": "fil_01M6R27SZK99V6N6WG4GK15T6R",
                          "path": "test-notice.pdf",
                          "primary": true
                        }
                      ],
                      "batch_id": null,
                      "delivery_url": null,
                      "short_url": "https://parasend.com/d/RM1RyXl0",
                      "evidence_policy": "urn:parasend:policy:evidence:standard:1",
                      "sender_display": "legal_person",
                      "operator_reference": "OP-7K3Q-M2",
                      "recipient_ref": "rcp_01M6R27T05ZNSRNMAW2CA8MTF6",
                      "private": false,
                      "options": {
                        "auth_methods": [
                          "audkenni",
                          "smart_id",
                          "passkey"
                        ],
                        "reminder_policy": null,
                        "brand_profile_id": null,
                        "expires_in_days": 30,
                        "sender_display": "legal_person",
                        "notify_channels": [
                          "email"
                        ]
                      },
                      "legal_hold": false,
                      "deletion_scheduled_at": null,
                      "livemode": false,
                      "created": "2026-11-06T09:15:05.604Z",
                      "expires_at": "2026-12-06T09:15:05.603Z",
                      "metadata": {
                        "case_ref": "IN-2026-114"
                      },
                      "origin_request": null,
                      "reminder_waiting": null,
                      "email_waiting": null,
                      "follow_up": {
                        "policy_id": null,
                        "policy_name": null,
                        "policy_source": "none",
                        "state": "done",
                        "reminders_sent": 0,
                        "last_step": null,
                        "next_step": null,
                        "paused": false
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "deleteDelivery",
        "summary": "Delete a delivery",
        "description": "Schedules permanent removal of the delivery's documents, the recipient's contact details and the other data you can change, backups included. The sealed evidence record is not deleted: Parasend keeps it for the retention period from the delivery's last event, and the parties entitled to it can still obtain it. A delivery under legal hold (`legal_hold: true`) answers 409 `delete_blocked_legal_hold`, with the case reference in `error.detail`.",
        "responses": {
          "202": {
            "description": "Deletion scheduled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletionSchedule"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "delivery_id": "dlv_01M6R27T05512SCV3852TPM2XY",
                      "delete_by": "2026-12-06T09:15:05.999Z",
                      "evidence_retained_until": "2033-11-06T09:15:05.969Z"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/deliveryId"
        }
      ]
    },
    "/deliveries/{id}/revoke": {
      "post": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "revokeDelivery",
        "summary": "Revoke a delivery",
        "description": "Blocked after `confirmed` (409 `delivery_already_confirmed`). The sender remedy post-confirmation is download-access expiry, not retraction.",
        "parameters": [
          {
            "$ref": "#/components/parameters/deliveryId"
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Delivery"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "dlv_01M6R27T05512SCV3852TPM2XY",
                      "object": "delivery",
                      "kind": "documents",
                      "direction": "outbound",
                      "content_type": "files",
                      "status": "revoked",
                      "last_activity": {
                        "at": "2026-11-06T09:15:05.969Z",
                        "type": "revoked"
                      },
                      "title": "Final notice: invoice 2026-114",
                      "message": null,
                      "language": "en",
                      "certificate_language": "is",
                      "recipient": {
                        "name": "Anna Björk Jónsdóttir",
                        "verified_name": null,
                        "verified_method": null,
                        "verification_photos": [],
                        "email": "anna.bjork@example.com",
                        "phone": null,
                        "address": {
                          "city": "Kópavogur",
                          "line1": "Akralind 3",
                          "line2": null,
                          "source": "manual",
                          "country": "IS",
                          "postal_code": "201"
                        },
                        "verification_level": "high",
                        "conditional_authentication": false,
                        "personal_code": null,
                        "id_document_number": null
                      },
                      "files": [
                        {
                          "file_id": "fil_01M6R27SZK99V6N6WG4GK15T6R",
                          "path": "test-notice.pdf",
                          "primary": true
                        }
                      ],
                      "batch_id": null,
                      "delivery_url": null,
                      "short_url": null,
                      "evidence_policy": "urn:parasend:policy:evidence:standard:1",
                      "sender_display": "legal_person",
                      "operator_reference": "OP-7K3Q-M2",
                      "recipient_ref": "rcp_01M6R27T05ZNSRNMAW2CA8MTF6",
                      "private": false,
                      "options": {
                        "auth_methods": [
                          "audkenni",
                          "smart_id",
                          "passkey"
                        ],
                        "reminder_policy": null,
                        "brand_profile_id": null,
                        "expires_in_days": 30,
                        "sender_display": "legal_person",
                        "notify_channels": [
                          "email"
                        ]
                      },
                      "legal_hold": false,
                      "deletion_scheduled_at": null,
                      "livemode": false,
                      "created": "2026-11-06T09:15:05.604Z",
                      "expires_at": "2026-12-06T09:15:05.603Z",
                      "metadata": {
                        "case_ref": "IN-2026-114"
                      },
                      "origin_request": null,
                      "reminder_waiting": null,
                      "email_waiting": null,
                      "follow_up": {
                        "policy_id": null,
                        "policy_name": null,
                        "policy_source": "none",
                        "state": "done",
                        "reminders_sent": 0,
                        "last_step": null,
                        "next_step": null,
                        "paused": false
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deliveries/{id}/remind": {
      "post": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "remindDelivery",
        "summary": "Send a reminder",
        "description": "Capped at 10 per recipient per day. The response includes the remaining quota so clients can show \"1 of 10 used today\".",
        "parameters": [
          {
            "$ref": "#/components/parameters/deliveryId"
          }
        ],
        "responses": {
          "200": {
            "description": "Reminder dispatched.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "delivery_id": {
                      "type": "string"
                    },
                    "reminded_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "reminders_used_today": {
                      "type": "integer"
                    },
                    "reminders_remaining_today": {
                      "type": "integer"
                    }
                  }
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "delivery_id": "dlv_01M6R27T05512SCV3852TPM2XY",
                      "reminded_at": "2026-11-06T09:15:05.736Z",
                      "reminders_used_today": 1,
                      "reminders_remaining_today": 9
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deliveries/{id}/events": {
      "get": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "listDeliveryEvents",
        "summary": "List a delivery's events",
        "parameters": [
          {
            "$ref": "#/components/parameters/deliveryId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "id": "evt_01M6R27T08JTMBJ4B6GQP90838",
                          "object": "event",
                          "type": "delivery.created",
                          "created": "2026-11-06T09:15:05.604Z",
                          "resource": {
                            "type": "delivery",
                            "id": "dlv_01M6R27T05512SCV3852TPM2XY"
                          },
                          "batch_id": null,
                          "reason": null,
                          "data": null
                        },
                        {
                          "id": "evt_01M6R27T23ZMZPJHEANJAPNSZ7",
                          "object": "event",
                          "type": "delivery.notified",
                          "created": "2026-11-06T09:15:05.666Z",
                          "resource": {
                            "type": "delivery",
                            "id": "dlv_01M6R27T05512SCV3852TPM2XY"
                          },
                          "batch_id": null,
                          "reason": null,
                          "data": {
                            "channel": "email"
                          }
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Every event of the delivery: the same events your webhooks get."
      }
    },
    "/deliveries/{id}/address": {
      "patch": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "patchDeliveryAddress",
        "summary": "Set the recipient's postal address",
        "description": "For the paper escalation channel. Rejected after paper dispatch or in terminal states (409 `address_patch_state_invalid`).",
        "parameters": [
          {
            "$ref": "#/components/parameters/deliveryId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PostalAddress"
              },
              "examples": {
                "Set the postal address": {
                  "summary": "Set the postal address",
                  "value": {
                    "line1": "Akralind 3",
                    "postal_code": "201",
                    "city": "Kópavogur",
                    "country": "IS"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Delivery"
                },
                "examples": {
                  "Set the postal address": {
                    "summary": "Set the postal address",
                    "value": {
                      "id": "dlv_01M6R27T05512SCV3852TPM2XY",
                      "object": "delivery",
                      "kind": "documents",
                      "direction": "outbound",
                      "content_type": "files",
                      "status": "notified",
                      "last_activity": {
                        "at": "2026-11-06T09:15:05.667Z",
                        "type": "notified"
                      },
                      "title": "Final notice: invoice 2026-114",
                      "message": null,
                      "language": "en",
                      "certificate_language": "is",
                      "recipient": {
                        "name": "Anna Björk Jónsdóttir",
                        "verified_name": null,
                        "verified_method": null,
                        "verification_photos": [],
                        "email": "anna.bjork@example.com",
                        "phone": null,
                        "address": {
                          "city": "Kópavogur",
                          "line1": "Akralind 3",
                          "line2": null,
                          "source": "manual",
                          "country": "IS",
                          "postal_code": "201"
                        },
                        "verification_level": "high",
                        "conditional_authentication": false,
                        "personal_code": null,
                        "id_document_number": null
                      },
                      "files": [
                        {
                          "file_id": "fil_01M6R27SZK99V6N6WG4GK15T6R",
                          "path": "test-notice.pdf",
                          "primary": true
                        }
                      ],
                      "batch_id": null,
                      "delivery_url": null,
                      "short_url": null,
                      "evidence_policy": "urn:parasend:policy:evidence:standard:1",
                      "sender_display": "legal_person",
                      "operator_reference": "OP-7K3Q-M2",
                      "recipient_ref": "rcp_01M6R27T05ZNSRNMAW2CA8MTF6",
                      "private": false,
                      "options": {
                        "auth_methods": [
                          "audkenni",
                          "smart_id",
                          "passkey"
                        ],
                        "reminder_policy": null,
                        "brand_profile_id": null,
                        "expires_in_days": 30,
                        "sender_display": "legal_person",
                        "notify_channels": [
                          "email"
                        ]
                      },
                      "legal_hold": false,
                      "deletion_scheduled_at": null,
                      "livemode": false,
                      "created": "2026-11-06T09:15:05.604Z",
                      "expires_at": "2026-12-06T09:15:05.603Z",
                      "metadata": {
                        "case_ref": "IN-2026-114"
                      },
                      "origin_request": null,
                      "reminder_waiting": null,
                      "email_waiting": null,
                      "follow_up": {
                        "policy_id": null,
                        "policy_name": null,
                        "policy_source": "none",
                        "state": "done",
                        "reminders_sent": 0,
                        "last_step": null,
                        "next_step": null,
                        "paused": false
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deliveries/{id}/files": {
      "get": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "listDeliveryFiles",
        "summary": "List a delivery's files",
        "description": "Name, path, bytes, sha256, primary flag per manifest entry. Available to any key with `deliveries.read`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/deliveryId"
          }
        ],
        "responses": {
          "200": {
            "description": "The delivery's files.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ManifestEntry"
                      }
                    }
                  }
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "file_id": "fil_01M6R27SZK99V6N6WG4GK15T6R",
                          "name": "test-notice.pdf",
                          "path": "test-notice.pdf",
                          "bytes": 691,
                          "sha256": "1b0cff41d97c8dcf92b7de986d66d12fb94e68f6db19821aa4b263dcfb0b6225",
                          "primary": true
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deliveries/{id}/files/{fileId}/content": {
      "get": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "getDeliveryFileContent",
        "summary": "Download a delivered file",
        "description": "Requires the `documents.read` permission. **Every call emits\n`document.previewed` into the delivery's audit trail, attributed to the acting\nkey/user. No exceptions, no quiet mode.** This is the privacy-gated document\npreview behind the portal's reveal step.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/deliveryId"
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File bytes.",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deliveries/{id}/evidence/record": {
      "get": {
        "tags": [
          "Evidence"
        ],
        "operationId": "getEvidenceRecord",
        "summary": "Get the evidence record (XML)",
        "description": "The evidence record in XML: the authoritative, machine-readable form of the evidence (ETSI EN 319 522-3). The Delivery Certificate at `/evidence/document` is a rendering of it. One document per delivery: the root `ps:EvidenceRecord` in the namespace `urn:parasend:evidence:1` holds the delivery's metadata and one ETSI evidence item for every evidentiary event, in order. Each item is sealed when it is made. Parasend's own data is in non-critical `erds:Extensions`, so a reader that knows only the ETSI schema still reads complete, valid items. The envelope around the items is sealed on request: `sealed=true` seals it (billable, once, then kept); the default `sealed=false` returns the record marked `sealStatus=\"unsealed\"`, at no cost.",
        "parameters": [
          {
            "$ref": "#/components/parameters/deliveryId"
          },
          {
            "name": "sealed",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "true returns the envelope-sealed record, sealing it on the first such request (billable, once). false, the default, returns the record marked unsealed."
          }
        ],
        "responses": {
          "200": {
            "description": "Evidence record XML (`ps:EvidenceRecord`; sealed or marked unsealed).",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "Validates against parasend-evidence-envelope-v1.xsd + ETSI EN 319 522-3 Annex A; Table 13 cardinality per parasend-evidence-table13.sch."
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deliveries/{id}/evidence/document": {
      "get": {
        "tags": [
          "Evidence"
        ],
        "operationId": "getEvidenceDocument",
        "summary": "Get the Delivery Certificate (PDF)",
        "description": "The Delivery Certificate (PDF): a readable rendering of the evidence record at `/evidence/record`, with the full event log and the QR code that leads to the record check at parasend.com/verify. When the recipient verified with an ID document check, it holds the document's photo page: handle it as sensitive personal data (it needs `evidence.read`). `sealed=false`, the default, is free and carries an *unsealed* banner: each evidence item is sealed, but the record as a whole was not sealed at your request. The first `sealed=true` request seals it (billable, once) and later ones return the same file. The address the notice went to is shown in full.",
        "parameters": [
          {
            "$ref": "#/components/parameters/deliveryId"
          },
          {
            "name": "sealed",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "true returns the sealed PDF, sealing it on the first such request (billable, once). false, the default, returns the rendering marked unsealed."
          }
        ],
        "responses": {
          "200": {
            "description": "Evidence PDF (unsealed, or eSealed when sealed=true).",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/batches": {
      "get": {
        "tags": [
          "Batches"
        ],
        "operationId": "listBatches",
        "summary": "List batches",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "One or more of draft, scheduled, sending, following_up, completed, cancelled, comma-separated."
          },
          {
            "name": "follow_up_policy_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "created_by",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The member (usr_…) who made the batch."
          },
          {
            "name": "created_after",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "created_before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 200
            },
            "description": "Part of the name, or the exact bat_ id."
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "created_desc",
                "created_asc",
                "name_asc",
                "name_desc",
                "status_asc",
                "status_desc"
              ],
              "default": "created_desc"
            },
            "description": "Sort by `name` or by `status` (in the order a batch moves through), newest first within each."
          },
          {
            "name": "accepting_deliveries",
            "in": "query",
            "schema": {
              "type": "boolean"
            },
            "description": "true: only drafts and open rolling batches, the ones a delivery can join now. false: the others."
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchList"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "id": "bat_01M6R27T8SXWNM911FS53W4S9F",
                          "object": "batch",
                          "name": "November notices",
                          "status": "draft",
                          "sending_mode": "on_finalize",
                          "follow_up_policy_id": null,
                          "allow_policy_override": true,
                          "follow_ups_paused": false,
                          "scheduled_at": null,
                          "send_window": {
                            "tz": "Atlantic/Reykjavik",
                            "end": "21:00",
                            "start": "09:00"
                          },
                          "defaults": {},
                          "files": [],
                          "accepting_deliveries": true,
                          "counts": {
                            "total": 0,
                            "delivered": 0,
                            "in_progress": 0,
                            "ended": 0
                          },
                          "created_by": {
                            "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                            "via": "api_key"
                          },
                          "livemode": false,
                          "created": "2026-11-06T09:15:05.881Z",
                          "sent_out_at": null,
                          "following_up_at": null,
                          "completed_at": null,
                          "cancelled_at": null
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Lists your batches, a page at a time."
      },
      "post": {
        "tags": [
          "Batches"
        ],
        "operationId": "createBatch",
        "summary": "Create a batch",
        "description": "Shared files, policies and delivery defaults (including `additional_security_source: csv_personal_code` for the portal CSV flow). `sending_mode: on_finalize` (default) holds sending until send-out; `rolling` dispatches each delivery as added.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchCreate"
              },
              "examples": {
                "A batch of notices": {
                  "summary": "A batch of notices",
                  "value": {
                    "name": "November notices"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (status `draft`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Batch"
                },
                "examples": {
                  "A batch of notices": {
                    "summary": "A batch of notices",
                    "value": {
                      "id": "bat_01M6R27T8SXWNM911FS53W4S9F",
                      "object": "batch",
                      "name": "November notices",
                      "status": "draft",
                      "sending_mode": "on_finalize",
                      "follow_up_policy_id": null,
                      "allow_policy_override": true,
                      "follow_ups_paused": false,
                      "scheduled_at": null,
                      "send_window": {
                        "tz": "Atlantic/Reykjavik",
                        "end": "21:00",
                        "start": "09:00"
                      },
                      "defaults": {},
                      "files": [],
                      "accepting_deliveries": true,
                      "counts": {
                        "total": 0,
                        "delivered": 0,
                        "in_progress": 0,
                        "ended": 0
                      },
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "via": "api_key"
                      },
                      "livemode": false,
                      "created": "2026-11-06T09:15:05.881Z",
                      "sent_out_at": null,
                      "following_up_at": null,
                      "completed_at": null,
                      "cancelled_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/batches/{id}": {
      "get": {
        "tags": [
          "Batches"
        ],
        "operationId": "getBatch",
        "summary": "Retrieve a batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          },
          {
            "name": "policy_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The deliveries following this policy now; rpol_none for none."
          }
        ],
        "responses": {
          "200": {
            "description": "The batch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Batch"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "bat_01M6R27T8SXWNM911FS53W4S9F",
                      "object": "batch",
                      "name": "November notices",
                      "status": "draft",
                      "sending_mode": "on_finalize",
                      "follow_up_policy_id": null,
                      "allow_policy_override": true,
                      "follow_ups_paused": false,
                      "scheduled_at": null,
                      "send_window": {
                        "tz": "Atlantic/Reykjavik",
                        "end": "21:00",
                        "start": "09:00"
                      },
                      "defaults": {},
                      "files": [],
                      "accepting_deliveries": true,
                      "counts": {
                        "total": 0,
                        "delivered": 0,
                        "in_progress": 0,
                        "ended": 0
                      },
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "via": "api_key"
                      },
                      "livemode": false,
                      "created": "2026-11-06T09:15:05.881Z",
                      "sent_out_at": null,
                      "following_up_at": null,
                      "completed_at": null,
                      "cancelled_at": null,
                      "follow_up_funnel": {
                        "as_of": "2026-11-06T09:15:05.894Z",
                        "policy_id": null,
                        "total": 0,
                        "not_yet_notified": 0,
                        "notice": {
                          "delivered": 0,
                          "in_progress": 0,
                          "unreachable": 0,
                          "expired": 0,
                          "revoked": 0,
                          "not_matched": 0,
                          "sent": 0,
                          "bounced": 0,
                          "renotified_via_lookup": 0,
                          "renotified_delivered": 0,
                          "email_opened": 0
                        },
                        "reminders": [],
                        "outcome": {
                          "delivered": 0,
                          "in_progress": 0,
                          "unreachable": 0,
                          "expired": 0,
                          "revoked": 0,
                          "not_matched": 0
                        },
                        "confirmed_direct": 0,
                        "rescued_by_followups": 0,
                        "delivered_total": 0
                      },
                      "funnel": {
                        "total": 0,
                        "notified": 0,
                        "opened": 0,
                        "authenticated": 0,
                        "confirmed_direct": 0,
                        "rescued_by_followups": 0,
                        "delivered_total": 0,
                        "expired": 0,
                        "revoked": 0,
                        "auth_failed": 0,
                        "bounced": 0,
                        "paper_pending": 0,
                        "needs_address": 0,
                        "bounce_rate": 0,
                        "median_time_to_confirm": null
                      },
                      "kpis": {
                        "delivered": 0,
                        "delivered_pct": 0,
                        "in_progress": 0,
                        "median_time_to_delivery": null,
                        "bounce_rate": 0,
                        "rescued_by_followups": 0,
                        "spend": {
                          "sms_messages": 0,
                          "lookups": 0,
                          "amount": 0,
                          "currency": "ISK",
                          "estimated": true
                        },
                        "vs_previous": null
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Retrieves a batch, with its funnel: how many of its deliveries were notified, opened, verified and confirmed. The counts only go up."
      },
      "patch": {
        "tags": [
          "Batches"
        ],
        "operationId": "updateBatch",
        "summary": "Update a batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 200
                  },
                  "defaults": {
                    "$ref": "#/components/schemas/BatchDefaults"
                  },
                  "follow_up_policy_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "allow_policy_override": {
                    "type": "boolean"
                  },
                  "own_policy_deliveries": {
                    "type": "string",
                    "enum": [
                      "keep",
                      "switch"
                    ]
                  },
                  "scheduled_at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  },
                  "send_window": {
                    "$ref": "#/components/schemas/SendWindow"
                  }
                }
              },
              "examples": {
                "Rename a batch": {
                  "summary": "Rename a batch",
                  "value": {
                    "name": "November notices, first run"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The batch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Batch"
                },
                "examples": {
                  "Rename a batch": {
                    "summary": "Rename a batch",
                    "value": {
                      "id": "bat_01M6R27T8SXWNM911FS53W4S9F",
                      "object": "batch",
                      "name": "November notices, first run",
                      "status": "draft",
                      "sending_mode": "on_finalize",
                      "follow_up_policy_id": null,
                      "allow_policy_override": true,
                      "follow_ups_paused": false,
                      "scheduled_at": null,
                      "send_window": {
                        "tz": "Atlantic/Reykjavik",
                        "end": "21:00",
                        "start": "09:00"
                      },
                      "defaults": {},
                      "files": [],
                      "accepting_deliveries": true,
                      "counts": {
                        "total": 0,
                        "delivered": 0,
                        "in_progress": 0,
                        "ended": 0
                      },
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "via": "api_key"
                      },
                      "livemode": false,
                      "created": "2026-11-06T09:15:05.881Z",
                      "sent_out_at": null,
                      "following_up_at": null,
                      "completed_at": null,
                      "cancelled_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Changes a batch. A draft can be changed in full; after Send out, only its name and its lock."
      }
    },
    "/batches/{id}/deliveries": {
      "get": {
        "tags": [
          "Batches"
        ],
        "operationId": "listBatchDeliveries",
        "summary": "List a batch's deliveries",
        "description": "Lists the batch's deliveries. `q` matches the title, the recipient's name or e-mail in part, or a delivery ID exactly; never a personal code or a phone number. `pin`, `recipient_email` and `phone` match exactly. With `Accept: text/csv`, every match is streamed as CSV.",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/RecipientStatus"
            }
          },
          {
            "name": "needs_attention",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "pin",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recipient_email",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "email"
            }
          },
          {
            "name": "phone",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The whole number, E.164 or 7 Icelandic digits."
          },
          {
            "name": "outcome",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "delivered",
                "in_progress",
                "unreachable",
                "expired",
                "revoked",
                "not_matched"
              ]
            }
          },
          {
            "name": "reminders",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "policy_source",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "batch",
                "own",
                "none"
              ]
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "email",
                "sms"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated member deliveries.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryList"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "id": "dlv_01M6R27T9M7Z1HH1FADRGGMEZK",
                          "object": "delivery",
                          "kind": "documents",
                          "direction": "outbound",
                          "content_type": "files",
                          "status": "created",
                          "last_activity": null,
                          "title": "Final notice: invoice 2026-115",
                          "message": null,
                          "language": "is",
                          "certificate_language": "is",
                          "recipient": {
                            "name": "Jón Jónsson",
                            "verified_name": null,
                            "verified_method": null,
                            "verification_photos": [],
                            "email": "jon.jonsson@example.com",
                            "phone": null,
                            "address": null,
                            "verification_level": "high",
                            "conditional_authentication": false,
                            "personal_code": null,
                            "id_document_number": null
                          },
                          "files": [
                            {
                              "file_id": "fil_01M6R27SZK99V6N6WG4GK15T6R",
                              "path": "test-notice.pdf",
                              "primary": true
                            }
                          ],
                          "batch_id": "bat_01M6R27T8SXWNM911FS53W4S9F",
                          "delivery_url": null,
                          "short_url": null,
                          "evidence_policy": "urn:parasend:policy:evidence:standard:1",
                          "sender_display": "legal_person",
                          "operator_reference": "OP-7K3Q-M2",
                          "recipient_ref": "rcp_01M6R27T9M3F3MJ7NMBYGW3V30",
                          "private": false,
                          "options": {
                            "auth_methods": [
                              "audkenni",
                              "smart_id",
                              "passkey"
                            ],
                            "reminder_policy": null,
                            "brand_profile_id": null,
                            "expires_in_days": 30,
                            "sender_display": "legal_person",
                            "notify_channels": [
                              "email"
                            ]
                          },
                          "legal_hold": false,
                          "deletion_scheduled_at": null,
                          "livemode": false,
                          "created": "2026-11-06T09:15:05.908Z",
                          "expires_at": null,
                          "metadata": {},
                          "origin_request": null,
                          "reminder_waiting": null,
                          "email_waiting": null,
                          "follow_up": {
                            "policy_id": null,
                            "policy_name": null,
                            "policy_source": "batch",
                            "state": "done",
                            "reminders_sent": 0,
                            "last_step": null,
                            "next_step": null,
                            "paused": false
                          }
                        },
                        {
                          "id": "dlv_01M6R27T9GD2VVC1DVVE1DD6RB",
                          "object": "delivery",
                          "kind": "documents",
                          "direction": "outbound",
                          "content_type": "files",
                          "status": "created",
                          "last_activity": null,
                          "title": "Final notice: invoice 2026-114",
                          "message": null,
                          "language": "is",
                          "certificate_language": "is",
                          "recipient": {
                            "name": "Anna Björk Jónsdóttir",
                            "verified_name": null,
                            "verified_method": null,
                            "verification_photos": [],
                            "email": "anna.bjork@example.com",
                            "phone": null,
                            "address": null,
                            "verification_level": "high",
                            "conditional_authentication": false,
                            "personal_code": null,
                            "id_document_number": null
                          },
                          "files": [
                            {
                              "file_id": "fil_01M6R27SZK99V6N6WG4GK15T6R",
                              "path": "test-notice.pdf",
                              "primary": true
                            }
                          ],
                          "batch_id": "bat_01M6R27T8SXWNM911FS53W4S9F",
                          "delivery_url": null,
                          "short_url": null,
                          "evidence_policy": "urn:parasend:policy:evidence:standard:1",
                          "sender_display": "legal_person",
                          "operator_reference": "OP-7K3Q-M2",
                          "recipient_ref": "rcp_01M6R27T9GVJW7HXAWJ0T5H4EM",
                          "private": false,
                          "options": {
                            "auth_methods": [
                              "audkenni",
                              "smart_id",
                              "passkey"
                            ],
                            "reminder_policy": null,
                            "brand_profile_id": null,
                            "expires_in_days": 30,
                            "sender_display": "legal_person",
                            "notify_channels": [
                              "email"
                            ]
                          },
                          "legal_hold": false,
                          "deletion_scheduled_at": null,
                          "livemode": false,
                          "created": "2026-11-06T09:15:05.904Z",
                          "expires_at": null,
                          "metadata": {},
                          "origin_request": null,
                          "reminder_waiting": null,
                          "email_waiting": null,
                          "follow_up": {
                            "policy_id": null,
                            "policy_name": null,
                            "policy_source": "batch",
                            "state": "done",
                            "reminders_sent": 0,
                            "last_step": null,
                            "next_step": null,
                            "paused": false
                          }
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Batches"
        ],
        "operationId": "addBatchDeliveries",
        "summary": "Add deliveries to a batch",
        "description": "**Partial-failure pattern (normative):** returns 200 with per-item results\n`{index, status: created | failed, delivery_id?, error?}` — the inline `error`\nobject is byte-identical in shape to top-level errors. A call where every item\nfails still returns 200; only request-level faults (auth, malformed JSON,\n> 1,000 items) use top-level errors. Unresolved paper addresses are per-item\n`needs_address` results, not errors.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "deliveries"
                ],
                "properties": {
                  "deliveries": {
                    "type": "array",
                    "maxItems": 1000,
                    "items": {
                      "$ref": "#/components/schemas/DeliveryCreate"
                    }
                  }
                }
              },
              "examples": {
                "Add two deliveries": {
                  "summary": "Add two deliveries",
                  "value": {
                    "deliveries": [
                      {
                        "recipient": {
                          "name": "Anna Björk Jónsdóttir",
                          "email": "anna.bjork@example.com",
                          "verification_level": "high"
                        },
                        "files": [
                          "{{files}}"
                        ],
                        "title": "Final notice: invoice 2026-114"
                      },
                      {
                        "recipient": {
                          "name": "Jón Jónsson",
                          "email": "jon.jonsson@example.com",
                          "verification_level": "high"
                        },
                        "files": [
                          "{{files}}"
                        ],
                        "title": "Final notice: invoice 2026-115"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-item results.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BulkItemResult"
                      }
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "created": {
                      "type": "integer",
                      "description": "How many deliveries were added."
                    },
                    "failed": {
                      "type": "integer",
                      "description": "How many were refused; each has its `error`."
                    }
                  }
                },
                "examples": {
                  "Add two deliveries": {
                    "summary": "Add two deliveries",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "index": 0,
                          "status": "created",
                          "delivery_id": "dlv_01M6R27T9GD2VVC1DVVE1DD6RB"
                        },
                        {
                          "index": 1,
                          "status": "created",
                          "delivery_id": "dlv_01M6R27T9M7Z1HH1FADRGGMEZK"
                        }
                      ],
                      "created": 2,
                      "failed": 0
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/batches/{id}/finalize": {
      "post": {
        "tags": [
          "Batches"
        ],
        "operationId": "finalizeBatch",
        "summary": "Send out a batch",
        "description": "Portal verb \"Send out\". Moves `draft → sending` (`on_finalize` mode). Empty batches are rejected (400 `batch_empty_finalize`); already-finalized batches return 409 `batch_finalized`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          }
        ],
        "responses": {
          "200": {
            "description": "Batch now `sending`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Batch"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "bat_01M6R27T8SXWNM911FS53W4S9F",
                      "object": "batch",
                      "name": "November notices, first run",
                      "status": "sending",
                      "sending_mode": "on_finalize",
                      "follow_up_policy_id": null,
                      "allow_policy_override": true,
                      "follow_ups_paused": false,
                      "scheduled_at": null,
                      "send_window": {
                        "tz": "Atlantic/Reykjavik",
                        "end": "21:00",
                        "start": "09:00"
                      },
                      "defaults": {},
                      "files": [],
                      "accepting_deliveries": false,
                      "counts": {
                        "total": 2,
                        "delivered": 0,
                        "ended": 0,
                        "in_progress": 2
                      },
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "via": "api_key"
                      },
                      "livemode": false,
                      "created": "2026-11-06T09:15:05.881Z",
                      "sent_out_at": "2026-11-06T09:15:05.922Z",
                      "following_up_at": null,
                      "completed_at": null,
                      "cancelled_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/batches/{id}/report": {
      "get": {
        "tags": [
          "Batches"
        ],
        "operationId": "getBatchReport",
        "summary": "Get a batch report",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          }
        ],
        "responses": {
          "200": {
            "description": "The report.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchReport"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "object": "batch_report",
                      "batch": {
                        "id": "bat_01M6R27T8SXWNM911FS53W4S9F",
                        "object": "batch",
                        "name": "November notices, first run",
                        "status": "sending",
                        "sending_mode": "on_finalize",
                        "follow_up_policy_id": null,
                        "allow_policy_override": true,
                        "follow_ups_paused": false,
                        "scheduled_at": null,
                        "send_window": {
                          "tz": "Atlantic/Reykjavik",
                          "end": "21:00",
                          "start": "09:00"
                        },
                        "defaults": {},
                        "files": [],
                        "accepting_deliveries": false,
                        "counts": {
                          "total": 2,
                          "delivered": 0,
                          "ended": 0,
                          "in_progress": 2
                        },
                        "created_by": {
                          "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                          "via": "api_key"
                        },
                        "livemode": false,
                        "created": "2026-11-06T09:15:05.881Z",
                        "sent_out_at": "2026-11-06T09:15:05.922Z",
                        "following_up_at": null,
                        "completed_at": null,
                        "cancelled_at": null
                      },
                      "follow_up_funnel": {
                        "as_of": "2026-11-06T09:15:05.930Z",
                        "policy_id": null,
                        "total": 2,
                        "not_yet_notified": 2,
                        "notice": {
                          "delivered": 0,
                          "in_progress": 0,
                          "unreachable": 0,
                          "expired": 0,
                          "revoked": 0,
                          "not_matched": 0,
                          "sent": 0,
                          "bounced": 0,
                          "renotified_via_lookup": 0,
                          "renotified_delivered": 0,
                          "email_opened": 0
                        },
                        "reminders": [],
                        "outcome": {
                          "delivered": 0,
                          "in_progress": 2,
                          "unreachable": 0,
                          "expired": 0,
                          "revoked": 0,
                          "not_matched": 0
                        },
                        "confirmed_direct": 0,
                        "rescued_by_followups": 0,
                        "delivered_total": 0
                      },
                      "funnel": {
                        "total": 2,
                        "notified": 0,
                        "opened": 0,
                        "authenticated": 0,
                        "confirmed_direct": 0,
                        "rescued_by_followups": 0,
                        "delivered_total": 0,
                        "expired": 0,
                        "revoked": 0,
                        "auth_failed": 0,
                        "bounced": 0,
                        "paper_pending": 0,
                        "needs_address": 0,
                        "bounce_rate": 0,
                        "median_time_to_confirm": null
                      },
                      "kpis": {
                        "delivered": 0,
                        "delivered_pct": 0,
                        "in_progress": 2,
                        "median_time_to_delivery": null,
                        "bounce_rate": 0,
                        "rescued_by_followups": 0,
                        "spend": {
                          "sms_messages": 0,
                          "lookups": 0,
                          "amount": 0,
                          "currency": "ISK",
                          "estimated": true
                        },
                        "vs_previous": null
                      }
                    }
                  }
                }
              },
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "The batch's funnel report, as JSON, or as CSV with `Accept: text/csv`."
      }
    },
    "/files": {
      "post": {
        "tags": [
          "Files"
        ],
        "operationId": "uploadFile",
        "summary": "Upload a file",
        "description": "Uploads a file to send, as `multipart/form-data` with one `file` part, up to 32 MB. The file can be used in a delivery as soon as the upload completes and its SHA-256 is recorded.",
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Uploaded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                },
                "examples": {
                  "Upload a PDF": {
                    "summary": "Upload a PDF",
                    "value": {
                      "id": "fil_01M6R27SZK99V6N6WG4GK15T6R",
                      "object": "file",
                      "name": "test-notice.pdf",
                      "bytes": 691,
                      "sha256": "1b0cff41d97c8dcf92b7de986d66d12fb94e68f6db19821aa4b263dcfb0b6225",
                      "created": "2026-11-06T09:15:05.587Z"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/files/{id}": {
      "get": {
        "tags": [
          "Files"
        ],
        "operationId": "getFile",
        "summary": "Retrieve a file",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The file's ID, starting `fil_`."
          }
        ],
        "responses": {
          "200": {
            "description": "Metadata (name, size, sha256).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/File"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "fil_01M6R27SZK99V6N6WG4GK15T6R",
                      "object": "file",
                      "name": "test-notice.pdf",
                      "bytes": 691,
                      "sha256": "1b0cff41d97c8dcf92b7de986d66d12fb94e68f6db19821aa4b263dcfb0b6225",
                      "created": "2026-11-06T09:15:05.587Z"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Retrieves a file's details: its name, size and SHA-256."
      }
    },
    "/events": {
      "get": {
        "tags": [
          "Events"
        ],
        "operationId": "listEvents",
        "summary": "List events",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/EventType"
            }
          },
          {
            "name": "created_after",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "created_before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Only events created strictly before this time. With created_after, a date range (as GET /deliveries)."
          },
          {
            "name": "resource_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Only events about this resource (dlv_…, bat_…, req_…, …). Exact match."
          },
          {
            "name": "order",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "asc"
            },
            "description": "`asc`, the default, is the order for polling: oldest first, walking forward with the cursor. `desc` lists the newest first. A cursor works only with the order it came from."
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated events.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                },
                "examples": {
                  "Poll for new events": {
                    "summary": "Poll for new events",
                    "value": {
                      "data": [
                        {
                          "id": "evt_01M6R27T08JTMBJ4B6GQP90838",
                          "object": "event",
                          "type": "delivery.created",
                          "created": "2026-11-06T09:15:05.604Z",
                          "resource": {
                            "type": "delivery",
                            "id": "dlv_01M6R27T05512SCV3852TPM2XY"
                          },
                          "batch_id": null,
                          "reason": null,
                          "data": null
                        },
                        {
                          "id": "evt_01M6R27T153J4657RB03NQNXW2",
                          "object": "event",
                          "type": "delivery.created",
                          "created": "2026-11-06T09:15:05.634Z",
                          "resource": {
                            "type": "delivery",
                            "id": "dlv_01M6R27T13NKWVJRJBTHZDP6Y1"
                          },
                          "batch_id": null,
                          "reason": null,
                          "data": null
                        },
                        {
                          "id": "evt_01M6R27T1NHEY707SDDNNJTAZK",
                          "object": "event",
                          "type": "delivery.created",
                          "created": "2026-11-06T09:15:05.651Z",
                          "resource": {
                            "type": "delivery",
                            "id": "dlv_01M6R27T1MRPH7P4ZSR0WKTBQD"
                          },
                          "batch_id": null,
                          "reason": null,
                          "data": null
                        }
                      ],
                      "has_more": true,
                      "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0xMS0wNlQwOToxNTowNS42NTE1NDVaIiwiaWQiOiJldnRfMDFNNlIyN1QxTkhFWTcwN1NERE5OSlRBWksifQ"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Every event in your account, a page at a time: the same events your webhooks get. Use it to poll when you can't receive webhooks, or to catch up after an outage."
      }
    },
    "/events/{id}": {
      "get": {
        "tags": [
          "Events"
        ],
        "operationId": "getEvent",
        "summary": "Retrieve an event",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The event's ID, starting `evt_`."
          }
        ],
        "responses": {
          "200": {
            "description": "The event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "evt_01M6R27T08JTMBJ4B6GQP90838",
                      "object": "event",
                      "type": "delivery.created",
                      "created": "2026-11-06T09:15:05.604Z",
                      "resource": {
                        "type": "delivery",
                        "id": "dlv_01M6R27T05512SCV3852TPM2XY"
                      },
                      "batch_id": null,
                      "reason": null,
                      "data": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Retrieves one event."
      }
    },
    "/webhook_endpoints": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "listWebhookEndpoints",
        "summary": "List webhook endpoints",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Page"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/WebhookEndpoint"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "id": "whk_01M6R27T4KCSN7M0CHFGVH7JRA",
                          "object": "webhook_endpoint",
                          "url": "https://hooks.fyrirtaeki.example/parasend",
                          "event_types": [
                            "delivery.notified",
                            "delivery.confirmed",
                            "delivery.evidence_sealed"
                          ],
                          "description": "Case system",
                          "secret": null,
                          "auth": {
                            "mode": "none",
                            "static_bearer": null,
                            "oauth2": null
                          },
                          "delivery_sources": null,
                          "status": "enabled",
                          "livemode": false,
                          "exhausted_events": 0,
                          "last_exhausted_at": null,
                          "retrying_events": 0,
                          "last_attempt": null,
                          "created_by": {
                            "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                            "name": "Jóna Jónsdóttir",
                            "via": "api_key"
                          },
                          "previous_secret_expires_at": null,
                          "created": "2026-11-06T09:15:05.746Z"
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Lists your webhook endpoints in the key's mode."
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "createWebhookEndpoint",
        "summary": "Add a webhook endpoint",
        "description": "Adds an endpoint in the key's mode (test or live). The `url` must be HTTPS on port 443, without a user name or password, and its host a DNS name (not an IP address) whose every A and AAAA record is a public address. A host that does not resolve is refused, so a typo shows now rather than after three days of retries. `auth.oauth2.token_url` follows the same rules. The signing `secret` is in this response only: store it. The endpoint records who created it (`created_by`). Errors: `webhook_url_invalid`, `webhook_url_port_not_allowed`, `webhook_url_not_public`, `webhook_url_unresolvable`, `webhook_event_type_unknown`, `webhook_auth_config_invalid`, `webhook_delivery_sources_invalid`, `webhook_endpoint_limit_reached`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointCreate"
              },
              "examples": {
                "Add an endpoint for delivery events": {
                  "summary": "Add an endpoint for delivery events",
                  "value": {
                    "url": "https://hooks.fyrirtaeki.example/parasend",
                    "description": "Case system",
                    "event_types": [
                      "delivery.notified",
                      "delivery.confirmed",
                      "delivery.evidence_sealed"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created (includes `secret`, shown only now).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                },
                "examples": {
                  "Add an endpoint for delivery events": {
                    "summary": "Add an endpoint for delivery events",
                    "value": {
                      "id": "whk_01M6R27T4KCSN7M0CHFGVH7JRA",
                      "object": "webhook_endpoint",
                      "url": "https://hooks.fyrirtaeki.example/parasend",
                      "event_types": [
                        "delivery.notified",
                        "delivery.confirmed",
                        "delivery.evidence_sealed"
                      ],
                      "description": "Case system",
                      "secret": "whsec_ORQVKTHUQmNP3FrN6SNpPik8rEBsOLrSX63VnJQeaPM",
                      "auth": {
                        "mode": "none",
                        "static_bearer": null,
                        "oauth2": null
                      },
                      "delivery_sources": null,
                      "status": "enabled",
                      "livemode": false,
                      "exhausted_events": 0,
                      "last_exhausted_at": null,
                      "retrying_events": 0,
                      "last_attempt": null,
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "name": "Jóna Jónsdóttir",
                        "via": "api_key"
                      },
                      "previous_secret_expires_at": null,
                      "created": "2026-11-06T09:15:05.746Z"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/webhook_endpoints/{id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "getWebhookEndpoint",
        "summary": "Retrieve a webhook endpoint",
        "responses": {
          "200": {
            "description": "The endpoint (secret never included after creation).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "whk_01M6R27T4KCSN7M0CHFGVH7JRA",
                      "object": "webhook_endpoint",
                      "url": "https://hooks.fyrirtaeki.example/parasend",
                      "event_types": [
                        "delivery.notified",
                        "delivery.confirmed",
                        "delivery.evidence_sealed"
                      ],
                      "description": "Case system",
                      "secret": null,
                      "auth": {
                        "mode": "none",
                        "static_bearer": null,
                        "oauth2": null
                      },
                      "delivery_sources": null,
                      "status": "enabled",
                      "livemode": false,
                      "exhausted_events": 0,
                      "last_exhausted_at": null,
                      "retrying_events": 0,
                      "last_attempt": null,
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "name": "Jóna Jónsdóttir",
                        "via": "api_key"
                      },
                      "previous_secret_expires_at": null,
                      "created": "2026-11-06T09:15:05.746Z"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Retrieves a webhook endpoint. The signing secret is never shown again after the endpoint is created or its secret rolled."
      },
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "updateWebhookEndpoint",
        "summary": "Update a webhook endpoint",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEndpointUpdate"
              },
              "examples": {
                "Change the event types": {
                  "summary": "Change the event types",
                  "value": {
                    "event_types": [
                      "delivery.confirmed",
                      "delivery.bounced",
                      "delivery.expired"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                },
                "examples": {
                  "Change the event types": {
                    "summary": "Change the event types",
                    "value": {
                      "id": "whk_01M6R27T4KCSN7M0CHFGVH7JRA",
                      "object": "webhook_endpoint",
                      "url": "https://hooks.fyrirtaeki.example/parasend",
                      "event_types": [
                        "delivery.confirmed",
                        "delivery.bounced",
                        "delivery.expired"
                      ],
                      "description": "Case system",
                      "secret": null,
                      "auth": {
                        "mode": "none",
                        "static_bearer": null,
                        "oauth2": null
                      },
                      "delivery_sources": null,
                      "status": "enabled",
                      "livemode": false,
                      "exhausted_events": 0,
                      "last_exhausted_at": null,
                      "retrying_events": 0,
                      "last_attempt": null,
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "name": "Jóna Jónsdóttir",
                        "via": "api_key"
                      },
                      "previous_secret_expires_at": null,
                      "created": "2026-11-06T09:15:05.746Z"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Changes a webhook endpoint: its URL, the event types it gets, its authentication or its senders."
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "deleteWebhookEndpoint",
        "summary": "Delete a webhook endpoint",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Deletes a webhook endpoint. Events queued for it are cancelled."
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/webhookEndpointId"
        }
      ]
    },
    "/webhook_endpoints/{id}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "testWebhookEndpoint",
        "summary": "Send a test event",
        "parameters": [
          {
            "$ref": "#/components/parameters/webhookEndpointId"
          }
        ],
        "responses": {
          "200": {
            "description": "The test attempt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestResult"
                },
                "examples": {
                  "Send a test delivery.confirmed": {
                    "summary": "Send a test delivery.confirmed",
                    "value": {
                      "id": "wha_01M6R27T5AHW8DQ6B11PRVD7NA",
                      "event_id": "evt_01M6R27T58P38M9BDCG5V1STPB",
                      "event_type": "delivery.confirmed",
                      "attempt_number": 1,
                      "ok": true,
                      "status_code": 200,
                      "latency_ms": 1,
                      "replay": false,
                      "test": true,
                      "failure_stage": null,
                      "error": null,
                      "created": "2026-11-06T09:15:05.771Z",
                      "next_retry_at": null,
                      "exhausted": false,
                      "event": {
                        "id": "evt_01M6R27T58P38M9BDCG5V1STPB",
                        "object": "event",
                        "type": "delivery.confirmed",
                        "created": "2026-11-06T09:15:05.768Z",
                        "resource": {
                          "type": "delivery",
                          "id": "dlv_00000000000000000000000000"
                        },
                        "batch_id": null,
                        "reason": null,
                        "data": null
                      },
                      "response_excerpt": "ok"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Sends one signed sample event of `event_type` (any type; `delivery.created` by default), marked with the header `Parasend-Test: true`, and waits up to 10 seconds for the answer. Returns the attempt, the event sent, and the first 512 bytes of your endpoint's response as text (`response_excerpt`), which is not stored. The sample event is not kept: it cannot be replayed and never appears in GET /events. The attempt is listed in the endpoint's attempts with `test: true`.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "event_type": {
                    "$ref": "#/components/schemas/EventType"
                  }
                }
              },
              "examples": {
                "Send a test delivery.confirmed": {
                  "summary": "Send a test delivery.confirmed",
                  "value": {
                    "event_type": "delivery.confirmed"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/webhook_endpoints/{id}/replay": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "replayWebhookEvent",
        "summary": "Replay events",
        "description": "Sends events to the endpoint again, signed with a fresh timestamp. An unknown `event_id` is 404 `event_not_found`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/webhookEndpointId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "event_id"
                ],
                "properties": {
                  "event_id": {
                    "type": "string",
                    "description": "The event's ID, starting `evt_`."
                  }
                }
              },
              "examples": {
                "Replay one event": {
                  "summary": "Replay one event",
                  "value": {
                    "event_id": "{{events}}"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Replay attempt result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookAttempt"
                },
                "examples": {
                  "Replay one event": {
                    "summary": "Replay one event",
                    "value": {
                      "id": "wha_01M6R27T5FDNZNP8H9PR7YDM94",
                      "event_id": "evt_01M6R27T08JTMBJ4B6GQP90838",
                      "event_type": "delivery.created",
                      "attempt_number": 1,
                      "ok": true,
                      "status_code": 200,
                      "latency_ms": 0,
                      "replay": true,
                      "test": false,
                      "failure_stage": null,
                      "error": null,
                      "created": "2026-11-06T09:15:05.775Z",
                      "next_retry_at": null,
                      "exhausted": false
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/webhook_endpoints/{id}/attempts": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "listWebhookAttempts",
        "summary": "List an endpoint's attempts",
        "description": "Lists every attempt to send events to the endpoint. Your endpoint should de-duplicate by event ID and accept events out of order.",
        "parameters": [
          {
            "$ref": "#/components/parameters/webhookEndpointId"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          },
          {
            "name": "event_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "evt_… — only this event's attempts (all tries and replays)."
          },
          {
            "name": "outcome",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "succeeded",
                "failed",
                "exhausted"
              ]
            },
            "description": "succeeded = a 2xx answer; failed = anything else; exhausted = the last attempt of an event that ran out of retries and has not been replayed successfully since."
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated attempts.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Page"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/WebhookAttempt"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "id": "wha_01M6R27T5FDNZNP8H9PR7YDM94",
                          "event_id": "evt_01M6R27T08JTMBJ4B6GQP90838",
                          "event_type": "delivery.created",
                          "attempt_number": 1,
                          "ok": true,
                          "status_code": 200,
                          "latency_ms": 0,
                          "replay": true,
                          "test": false,
                          "failure_stage": null,
                          "error": null,
                          "created": "2026-11-06T09:15:05.775Z",
                          "next_retry_at": null,
                          "exhausted": false
                        },
                        {
                          "id": "wha_01M6R27T5AHW8DQ6B11PRVD7NA",
                          "event_id": "evt_01M6R27T58P38M9BDCG5V1STPB",
                          "event_type": "delivery.confirmed",
                          "attempt_number": 1,
                          "ok": true,
                          "status_code": 200,
                          "latency_ms": 1,
                          "replay": false,
                          "test": true,
                          "failure_stage": null,
                          "error": null,
                          "created": "2026-11-06T09:15:05.771Z",
                          "next_retry_at": null,
                          "exhausted": false
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/reminder_policies": {
      "get": {
        "tags": [
          "Policies"
        ],
        "operationId": "listReminderPolicies",
        "summary": "List follow-up policies",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "The account's follow-up policies, Parasend's own included.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Page"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ReminderPolicy"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "id": "rpol_01M6R27T5NK3830GCN9QPS9M95",
                          "object": "reminder_policy",
                          "name": "Payment reminders",
                          "system": false,
                          "version": 1,
                          "version_id": "rpv_01M6R27T5NB7JTSEZ0XV7BWETG",
                          "steps": [
                            {
                              "channel": "email",
                              "after_days": 3,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            },
                            {
                              "channel": "email",
                              "message": {
                                "preset": "firmer"
                              },
                              "after_days": 7,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            },
                            {
                              "channel": "sms",
                              "after_days": 10,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            }
                          ],
                          "stop_on": "confirmed",
                          "customized": false,
                          "is_account_default": false,
                          "in_use_by_batches": 0,
                          "in_use_by_deliveries": 0,
                          "created_at": "2026-11-06T09:15:05.781Z",
                          "updated_at": "2026-11-06T09:15:05.781Z",
                          "archived_at": null
                        },
                        {
                          "id": "rpol_none",
                          "object": "reminder_policy",
                          "name": "No policy",
                          "system": true,
                          "version": 1,
                          "version_id": "rpv_none_v1",
                          "steps": [],
                          "stop_on": "confirmed",
                          "customized": false,
                          "is_account_default": false,
                          "in_use_by_batches": 0,
                          "in_use_by_deliveries": 0,
                          "created_at": "2026-11-06T09:15:05.549Z",
                          "updated_at": "2026-11-06T09:15:05.549Z",
                          "archived_at": null
                        },
                        {
                          "id": "rpol_debt_collection",
                          "object": "reminder_policy",
                          "name": "Debt collection",
                          "system": true,
                          "version": 1,
                          "version_id": "rpv_debt_collection_v1",
                          "steps": [
                            {
                              "channel": "email",
                              "after_days": 2,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            },
                            {
                              "channel": "sms",
                              "after_days": 5,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            },
                            {
                              "channel": "paper",
                              "after_days": 10,
                              "conditions": [
                                "not_delivered"
                              ],
                              "requires_approval": true,
                              "available": false
                            }
                          ],
                          "stop_on": "confirmed",
                          "customized": false,
                          "is_account_default": false,
                          "in_use_by_batches": 0,
                          "in_use_by_deliveries": 0,
                          "created_at": "2026-11-06T09:15:05.547Z",
                          "updated_at": "2026-11-06T09:15:05.548Z",
                          "archived_at": null
                        },
                        {
                          "id": "rpol_default",
                          "object": "reminder_policy",
                          "name": "Default",
                          "system": true,
                          "version": 1,
                          "version_id": "rpv_default_v1",
                          "steps": [
                            {
                              "channel": "email",
                              "after_days": 3,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            },
                            {
                              "channel": "email",
                              "after_days": 7,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            }
                          ],
                          "stop_on": "confirmed",
                          "customized": false,
                          "is_account_default": false,
                          "in_use_by_batches": 0,
                          "in_use_by_deliveries": 0,
                          "created_at": "2026-11-06T09:15:05.537Z",
                          "updated_at": "2026-11-06T09:15:05.540Z",
                          "archived_at": null
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Lists your follow-up policies and Parasend's own (`rpol_default`, `rpol_debt_collection`, `rpol_none`)."
      },
      "post": {
        "tags": [
          "Policies"
        ],
        "operationId": "createReminderPolicy",
        "summary": "Create a follow-up policy",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReminderPolicyCreate"
              },
              "examples": {
                "Two e-mail reminders, then SMS": {
                  "summary": "Two e-mail reminders, then SMS",
                  "value": {
                    "name": "Payment reminders",
                    "steps": [
                      {
                        "after_days": 3,
                        "channel": "email",
                        "conditions": [
                          "not_delivered"
                        ]
                      },
                      {
                        "after_days": 7,
                        "channel": "email",
                        "conditions": [
                          "not_delivered"
                        ],
                        "message": {
                          "preset": "firmer"
                        }
                      },
                      {
                        "after_days": 10,
                        "channel": "sms",
                        "conditions": [
                          "not_delivered"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReminderPolicy"
                },
                "examples": {
                  "Two e-mail reminders, then SMS": {
                    "summary": "Two e-mail reminders, then SMS",
                    "value": {
                      "id": "rpol_01M6R27T5NK3830GCN9QPS9M95",
                      "object": "reminder_policy",
                      "name": "Payment reminders",
                      "system": false,
                      "version": 1,
                      "version_id": "rpv_01M6R27T5NB7JTSEZ0XV7BWETG",
                      "steps": [
                        {
                          "channel": "email",
                          "after_days": 3,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        },
                        {
                          "channel": "email",
                          "message": {
                            "preset": "firmer"
                          },
                          "after_days": 7,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        },
                        {
                          "channel": "sms",
                          "after_days": 10,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        }
                      ],
                      "stop_on": "confirmed",
                      "customized": false,
                      "is_account_default": false,
                      "in_use_by_batches": 0,
                      "in_use_by_deliveries": 0,
                      "created_at": "2026-11-06T09:15:05.781Z",
                      "updated_at": "2026-11-06T09:15:05.781Z",
                      "archived_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Creates a follow-up policy: the reminders a delivery sends while the recipient has not confirmed receipt, step by step."
      }
    },
    "/reminder_policies/{id}": {
      "get": {
        "tags": [
          "Policies"
        ],
        "operationId": "getReminderPolicy",
        "summary": "Retrieve a follow-up policy",
        "responses": {
          "200": {
            "description": "The policy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReminderPolicy"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "rpol_01M6R27T5NK3830GCN9QPS9M95",
                      "object": "reminder_policy",
                      "name": "Payment reminders",
                      "system": false,
                      "version": 1,
                      "version_id": "rpv_01M6R27T5NB7JTSEZ0XV7BWETG",
                      "steps": [
                        {
                          "channel": "email",
                          "after_days": 3,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        },
                        {
                          "channel": "email",
                          "message": {
                            "preset": "firmer"
                          },
                          "after_days": 7,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        },
                        {
                          "channel": "sms",
                          "after_days": 10,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        }
                      ],
                      "stop_on": "confirmed",
                      "customized": false,
                      "is_account_default": false,
                      "in_use_by_batches": 0,
                      "in_use_by_deliveries": 0,
                      "created_at": "2026-11-06T09:15:05.781Z",
                      "updated_at": "2026-11-06T09:15:05.781Z",
                      "archived_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Retrieves a follow-up policy and its steps."
      },
      "patch": {
        "tags": [
          "Policies"
        ],
        "operationId": "updateReminderPolicy",
        "summary": "Update a follow-up policy",
        "description": "Changes a follow-up policy. An archived policy answers 409 `policy_archived`. Changing the steps of `rpol_default` or `rpol_debt_collection` makes your organisation's own version of it, under the same ID, and `customized` becomes true; their names stay Parasend's. `rpol_none` takes no steps (403 `system_policy_immutable`). Any of Parasend's policies can be made your account default.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReminderPolicyCreate"
              },
              "examples": {
                "Wait longer before the SMS": {
                  "summary": "Wait longer before the SMS",
                  "value": {
                    "name": "Payment reminders",
                    "steps": [
                      {
                        "after_days": 3,
                        "channel": "email",
                        "conditions": [
                          "not_delivered"
                        ]
                      },
                      {
                        "after_days": 7,
                        "channel": "email",
                        "conditions": [
                          "not_delivered"
                        ],
                        "message": {
                          "preset": "firmer"
                        }
                      },
                      {
                        "after_days": 14,
                        "channel": "sms",
                        "conditions": [
                          "not_delivered"
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReminderPolicy"
                },
                "examples": {
                  "Wait longer before the SMS": {
                    "summary": "Wait longer before the SMS",
                    "value": {
                      "id": "rpol_01M6R27T5NK3830GCN9QPS9M95",
                      "object": "reminder_policy",
                      "name": "Payment reminders",
                      "system": false,
                      "version": 2,
                      "version_id": "rpv_01M6R27T60DW1D6WAYM11GBDER",
                      "steps": [
                        {
                          "channel": "email",
                          "after_days": 3,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        },
                        {
                          "channel": "email",
                          "message": {
                            "preset": "firmer"
                          },
                          "after_days": 7,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        },
                        {
                          "channel": "sms",
                          "after_days": 14,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        }
                      ],
                      "stop_on": "confirmed",
                      "customized": false,
                      "is_account_default": false,
                      "in_use_by_batches": 0,
                      "in_use_by_deliveries": 0,
                      "created_at": "2026-11-06T09:15:05.781Z",
                      "updated_at": "2026-11-06T09:15:05.792Z",
                      "archived_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Policies"
        ],
        "operationId": "deleteReminderPolicy",
        "summary": "Delete a follow-up policy",
        "description": "While referenced by batches → 409 `policy_in_use` with `in_use_by_batches` count (portal shows the in-use lock).",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/policyId"
        }
      ]
    },
    "/brand_profiles": {
      "get": {
        "tags": [
          "Brand profiles"
        ],
        "operationId": "listBrandProfiles",
        "summary": "List brand profiles",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Page"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BrandProfileV1"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "id": "bp_01M6R27T817SW9MENZEV3KSZZX",
                          "object": "brand_profile",
                          "name": "Fyrirtæki ehf.",
                          "is_default": false,
                          "version": 1,
                          "version_id": "bpv_01M6R27T82QZMJ98K4RGVQBRF0",
                          "sender_display_name": "Fyrirtæki ehf.",
                          "sender_display_name_dative": null,
                          "logo": {
                            "asset_id": "bas_01M6R27T7R9RDBHE6X72ZRW3YC",
                            "url": "/v1/brand_assets/bas_01M6R27T7R9RDBHE6X72ZRW3YC/content",
                            "sha256": "f72bdd36e6ce104c53c8f21bd9e618e113a66f4d6729d43a4cb07b3f1373addb",
                            "width": 200,
                            "height": 48
                          },
                          "monogram": "F",
                          "sms_sender_name": null,
                          "icon": null,
                          "primary_color": "#1E5BB8",
                          "contrast_ratio": 6.47,
                          "header_style": "band",
                          "support": {
                            "email": null,
                            "phone": null,
                            "url": null
                          },
                          "expired_message": {
                            "is": null,
                            "en": null
                          },
                          "reply_to": null,
                          "recipient_domain_id": null,
                          "email_sender_id": null,
                          "theme": {
                            "colors": {
                              "page_background": null,
                              "card_background": null,
                              "text": null,
                              "secondary_text": null,
                              "button_background": null,
                              "button_text": null,
                              "header_background": null,
                              "header_text": null,
                              "divider": null
                            },
                            "button_radius": null,
                            "card_radius": null,
                            "card_shadow": null,
                            "font": null,
                            "logo_height": null,
                            "header_align": null,
                            "show_safety_note": null,
                            "show_support_line": null,
                            "show_sender_line": null,
                            "card_footer": null,
                            "card_footer_text": {
                              "is": null,
                              "en": null
                            },
                            "layout": null,
                            "page_image_asset_id": null,
                            "logo_background": "tile",
                            "show_name_with_logo": null,
                            "show_service_label": null
                          },
                          "contrasts": {
                            "text_on_card": 18.19,
                            "links_on_card": 6.47,
                            "header_text_on_header": 6.47,
                            "button_text_on_primary": 6.47,
                            "secondary_text_on_card": 5.98
                          },
                          "used_by": {
                            "deliveries": 0
                          },
                          "created_at": "2026-11-06T09:15:05.856Z",
                          "updated_at": "2026-11-06T09:15:05.856Z",
                          "archived_at": null
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Lists your brand profiles: the look of your notices and recipient pages."
      },
      "post": {
        "tags": [
          "Brand profiles"
        ],
        "operationId": "createBrandProfile",
        "summary": "Create a brand profile",
        "description": "Creates the profile and its version 1. WCAG contrast is checked at save (400 contrast_validation_failed, param primary_color, with the ratio in the message). An unknown logo (another organisation's, or none) is 400 brand_asset_reference_invalid. is_default true takes the default from the organisation's previous one.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandProfileV1Create"
              },
              "examples": {
                "Your company's look": {
                  "summary": "Your company's look",
                  "value": {
                    "name": "Fyrirtæki ehf.",
                    "sender_display_name": "Fyrirtæki ehf.",
                    "primary_color": "#1E5BB8",
                    "logo_asset_id": "{{brand_assets}}"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandProfileV1"
                },
                "examples": {
                  "Your company's look": {
                    "summary": "Your company's look",
                    "value": {
                      "id": "bp_01M6R27T817SW9MENZEV3KSZZX",
                      "object": "brand_profile",
                      "name": "Fyrirtæki ehf.",
                      "is_default": false,
                      "version": 1,
                      "version_id": "bpv_01M6R27T82QZMJ98K4RGVQBRF0",
                      "sender_display_name": "Fyrirtæki ehf.",
                      "sender_display_name_dative": null,
                      "logo": {
                        "asset_id": "bas_01M6R27T7R9RDBHE6X72ZRW3YC",
                        "url": "/v1/brand_assets/bas_01M6R27T7R9RDBHE6X72ZRW3YC/content",
                        "sha256": "f72bdd36e6ce104c53c8f21bd9e618e113a66f4d6729d43a4cb07b3f1373addb",
                        "width": 200,
                        "height": 48
                      },
                      "monogram": "F",
                      "sms_sender_name": null,
                      "icon": null,
                      "primary_color": "#1E5BB8",
                      "contrast_ratio": 6.47,
                      "header_style": "band",
                      "support": {
                        "email": null,
                        "phone": null,
                        "url": null
                      },
                      "expired_message": {
                        "is": null,
                        "en": null
                      },
                      "reply_to": null,
                      "recipient_domain_id": null,
                      "email_sender_id": null,
                      "theme": {
                        "colors": {
                          "page_background": null,
                          "card_background": null,
                          "text": null,
                          "secondary_text": null,
                          "button_background": null,
                          "button_text": null,
                          "header_background": null,
                          "header_text": null,
                          "divider": null
                        },
                        "button_radius": null,
                        "card_radius": null,
                        "card_shadow": null,
                        "font": null,
                        "logo_height": null,
                        "header_align": null,
                        "show_safety_note": null,
                        "show_support_line": null,
                        "show_sender_line": null,
                        "card_footer": null,
                        "card_footer_text": {
                          "is": null,
                          "en": null
                        },
                        "layout": null,
                        "page_image_asset_id": null,
                        "logo_background": "tile",
                        "show_name_with_logo": null,
                        "show_service_label": null
                      },
                      "contrasts": {
                        "text_on_card": 18.19,
                        "links_on_card": 6.47,
                        "header_text_on_header": 6.47,
                        "button_text_on_primary": 6.47,
                        "secondary_text_on_card": 5.98
                      },
                      "used_by": {
                        "deliveries": 0
                      },
                      "created_at": "2026-11-06T09:15:05.856Z",
                      "updated_at": "2026-11-06T09:15:05.856Z",
                      "archived_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/brand_profiles/{id}": {
      "get": {
        "tags": [
          "Brand profiles"
        ],
        "operationId": "getBrandProfile",
        "summary": "Retrieve a brand profile",
        "responses": {
          "200": {
            "description": "The profile with its current version.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandProfileV1"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "bp_01M6R27T817SW9MENZEV3KSZZX",
                      "object": "brand_profile",
                      "name": "Fyrirtæki ehf.",
                      "is_default": false,
                      "version": 1,
                      "version_id": "bpv_01M6R27T82QZMJ98K4RGVQBRF0",
                      "sender_display_name": "Fyrirtæki ehf.",
                      "sender_display_name_dative": null,
                      "logo": {
                        "asset_id": "bas_01M6R27T7R9RDBHE6X72ZRW3YC",
                        "url": "/v1/brand_assets/bas_01M6R27T7R9RDBHE6X72ZRW3YC/content",
                        "sha256": "f72bdd36e6ce104c53c8f21bd9e618e113a66f4d6729d43a4cb07b3f1373addb",
                        "width": 200,
                        "height": 48
                      },
                      "monogram": "F",
                      "sms_sender_name": null,
                      "icon": null,
                      "primary_color": "#1E5BB8",
                      "contrast_ratio": 6.47,
                      "header_style": "band",
                      "support": {
                        "email": null,
                        "phone": null,
                        "url": null
                      },
                      "expired_message": {
                        "is": null,
                        "en": null
                      },
                      "reply_to": null,
                      "recipient_domain_id": null,
                      "email_sender_id": null,
                      "theme": {
                        "colors": {
                          "page_background": null,
                          "card_background": null,
                          "text": null,
                          "secondary_text": null,
                          "button_background": null,
                          "button_text": null,
                          "header_background": null,
                          "header_text": null,
                          "divider": null
                        },
                        "button_radius": null,
                        "card_radius": null,
                        "card_shadow": null,
                        "font": null,
                        "logo_height": null,
                        "header_align": null,
                        "show_safety_note": null,
                        "show_support_line": null,
                        "show_sender_line": null,
                        "card_footer": null,
                        "card_footer_text": {
                          "is": null,
                          "en": null
                        },
                        "layout": null,
                        "page_image_asset_id": null,
                        "logo_background": "tile",
                        "show_name_with_logo": null,
                        "show_service_label": null
                      },
                      "contrasts": {
                        "text_on_card": 18.19,
                        "links_on_card": 6.47,
                        "header_text_on_header": 6.47,
                        "button_text_on_primary": 6.47,
                        "secondary_text_on_card": 5.98
                      },
                      "used_by": {
                        "deliveries": 0
                      },
                      "created_at": "2026-11-06T09:15:05.856Z",
                      "updated_at": "2026-11-06T09:15:05.856Z",
                      "archived_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Retrieves a brand profile and its current version."
      },
      "patch": {
        "tags": [
          "Brand profiles"
        ],
        "operationId": "updateBrandProfile",
        "summary": "Update a brand profile",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandProfileV1Patch"
              },
              "examples": {
                "Change the colour": {
                  "summary": "Change the colour",
                  "value": {
                    "name": "Fyrirtæki ehf.",
                    "sender_display_name": "Fyrirtæki ehf.",
                    "primary_color": "#0E5A8A",
                    "logo_asset_id": "{{brand_assets}}"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandProfileV1"
                },
                "examples": {
                  "Change the colour": {
                    "summary": "Change the colour",
                    "value": {
                      "id": "bp_01M6R27T817SW9MENZEV3KSZZX",
                      "object": "brand_profile",
                      "name": "Fyrirtæki ehf.",
                      "is_default": false,
                      "version": 2,
                      "version_id": "bpv_01M6R27T8GSQN2QTAEXT32YPMY",
                      "sender_display_name": "Fyrirtæki ehf.",
                      "sender_display_name_dative": null,
                      "logo": {
                        "asset_id": "bas_01M6R27T7R9RDBHE6X72ZRW3YC",
                        "url": "/v1/brand_assets/bas_01M6R27T7R9RDBHE6X72ZRW3YC/content",
                        "sha256": "f72bdd36e6ce104c53c8f21bd9e618e113a66f4d6729d43a4cb07b3f1373addb",
                        "width": 200,
                        "height": 48
                      },
                      "monogram": "F",
                      "sms_sender_name": null,
                      "icon": null,
                      "primary_color": "#0E5A8A",
                      "contrast_ratio": 7.37,
                      "header_style": "band",
                      "support": {
                        "email": null,
                        "phone": null,
                        "url": null
                      },
                      "expired_message": {
                        "is": null,
                        "en": null
                      },
                      "reply_to": null,
                      "recipient_domain_id": null,
                      "email_sender_id": null,
                      "theme": {
                        "colors": {
                          "page_background": null,
                          "card_background": null,
                          "text": null,
                          "secondary_text": null,
                          "button_background": null,
                          "button_text": null,
                          "header_background": null,
                          "header_text": null,
                          "divider": null
                        },
                        "button_radius": null,
                        "card_radius": null,
                        "card_shadow": null,
                        "font": null,
                        "logo_height": null,
                        "header_align": null,
                        "show_safety_note": null,
                        "show_support_line": null,
                        "show_sender_line": null,
                        "card_footer": null,
                        "card_footer_text": {
                          "is": null,
                          "en": null
                        },
                        "layout": null,
                        "page_image_asset_id": null,
                        "logo_background": "tile",
                        "show_name_with_logo": null,
                        "show_service_label": null
                      },
                      "contrasts": {
                        "text_on_card": 18.19,
                        "links_on_card": 7.37,
                        "header_text_on_header": 7.37,
                        "button_text_on_primary": 7.37,
                        "secondary_text_on_card": 5.98
                      },
                      "used_by": {
                        "deliveries": 0
                      },
                      "created_at": "2026-11-06T09:15:05.856Z",
                      "updated_at": "2026-11-06T09:15:05.871Z",
                      "archived_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Changes a brand profile. A change to its look makes a new version; a delivery keeps the version it was sent with."
      },
      "delete": {
        "tags": [
          "Brand profiles"
        ],
        "operationId": "deleteBrandProfile",
        "summary": "Delete a brand profile",
        "description": "Archives the profile: it leaves the list, new deliveries cannot name it, and it is no longer the default. Deliveries created with it keep showing the version they froze.",
        "responses": {
          "204": {
            "description": "Deleted."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The brand profile's ID, starting `bp_`."
        }
      ]
    },
    "/reminder_policies/preview": {
      "post": {
        "tags": [
          "Policies"
        ],
        "operationId": "previewReminderPolicyStep",
        "summary": "Preview a follow-up step",
        "description": "The reminder the worker would send for this step, for a sample delivery, in the brand named (null for Parasend's own look, left out for the organisation's default). Checked as a saved step would be (param under step.). For an SMS step, also whether its own text keeps the reminder one SMS (3.5). Nothing is stored.",
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "is",
                "en"
              ],
              "default": "is"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "step"
                ],
                "additionalProperties": false,
                "properties": {
                  "step": {
                    "$ref": "#/components/schemas/PolicyStep"
                  },
                  "brand_profile_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "examples": {
                "Preview a firmer e-mail reminder": {
                  "summary": "Preview a firmer e-mail reminder",
                  "value": {
                    "step": {
                      "after_days": 7,
                      "channel": "email",
                      "message": {
                        "preset": "firmer"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The rendered step.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReminderStepPreview"
                },
                "examples": {
                  "Preview a firmer e-mail reminder": {
                    "summary": "Preview a firmer e-mail reminder",
                    "value": {
                      "object": "reminder_step_preview",
                      "channel": "email",
                      "locale": "is",
                      "preset": "firmer",
                      "template": {
                        "id": "reminder.email",
                        "version": 33
                      },
                      "email": {
                        "from_name": "Sending frá: Fyrirtæki ehf.",
                        "subject": "Áminning: Sýnishorn af sendingu bíður enn",
                        "text": "Fyrirtæki ehf. bíður enn eftir staðfestingu þinni\n\nVið sendum þér skjal 2026-10-30 og höfum ekki enn fengið staðfestingu á að þú hafir móttekið það. Vinsamlegast staðfestu móttöku sem fyrst.\n\nSýnishorn af sendingu\n1 skjal · aðgengilegt til 13. nóvember 2026\n\nSkilaboð frá sendanda:\nÞetta er sýnishorn. Svona birtist sendingin viðtakanda.\n\nOpna sendinguna: https://parasend.com/d/synishorn\nÞú staðfestir móttöku með rafrænum skilríkjum. Það tekur innan við mínútu.\n\nEr þetta öruggt? Parasend biður þig aldrei um lykilorð eða kortaupplýsingar. Móttaka sendingarinnar er skráð.\n\nIn English: Fyrirtæki ehf. has sent you 1 document through Parasend, an electronic registered delivery service. Open the delivery with the button above and confirm receipt.\n\n—\nÞessi tilkynning er frá Parasend. Sendandi: Fyrirtæki ehf.\nParasend er rekjanleg rafræn afhendingarþjónusta sem Justikal ehf. rekur, Akralind 3, 201 Kópavogi.\n",
                        "html": "<!doctype html><html lang=\"is\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><meta name=\"color-scheme\" content=\"light\"><title>Sýnishorn af sendingu</title></head><body style=\"margin:0;padding:0;background:#F5F6FA;\"><div style=\"display:none;max-height:0;overflow:hidden;\">Opnaðu sendinguna og staðfestu móttöku. Aðgengileg til 13. nóvember 2026.</div><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#F5F6FA;\"><tr><td align=\"center\" style=\"padding:20px 12px;\"><table role=\"presentation\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%;max-width:600px;\"><tr><td style=\"background:#FFFFFF;border:1px solid #E6E9F2;border-radius:12px;\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"background:#0E1526;border-radius:12px 12px 0 0;padding:18px 28px;\"><table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"padding-right:9px;vertical-align:middle;\"><img src=\"cid:parasend-logo-v1\" width=\"22\" height=\"24\" alt=\"\" style=\"display:block;border:0;width:22px;height:24px;max-width:22px;\"></td><td style=\"vertical-align:middle;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;\"><div style=\"font-size:18px;font-weight:700;letter-spacing:-0.02em;line-height:1.1;color:#FFFFFF;\">Parasend</div><table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-top:4px;\"><tr><td style=\"vertical-align:middle;\"><table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"12\" height=\"3\" bgcolor=\"#EA553B\" style=\"width:12px;height:3px;background:#EA553B;border-radius:2px;font-size:3px;line-height:3px;\">&nbsp;</td></tr></table></td><td style=\"padding-left:6px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:11.5px;font-weight:500;line-height:1.2;color:#9AA3BA;\">by Justikal</td></tr></table></td></tr></table></td></tr><tr><td style=\"padding:32px 36px 28px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;color:#0E1526;\"><p style=\"margin:0;font-size:13px;font-weight:600;color:#147A52;\">Rekjanleg rafræn afhendingarþjónusta</p><h1 style=\"margin:8px 0 20px;font-size:24px;line-height:1.3;font-weight:700;color:#0E1526;\">Fyrirtæki ehf. bíður enn eftir staðfestingu þinni</h1><p style=\"margin:0 0 20px;font-size:15px;line-height:1.55;color:#202C49;\">Við sendum þér skjal 2026-10-30 og höfum ekki enn fengið staðfestingu á að þú hafir móttekið það. Vinsamlegast staðfestu móttöku sem fyrst.</p><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"border:1px solid #E6E9F2;border-radius:12px;\"><tr><td style=\"padding:14px 16px;\"><p style=\"margin:0;font-size:16px;font-weight:600;\">Sýnishorn af sendingu</p><p style=\"margin:0;font-size:14px;color:#5B6472;padding-top:4px;\">1 skjal · aðgengilegt til 13. nóvember 2026</p></td></tr></table><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-top:16px;background:#EEF0F7;border-radius:12px;\"><tr><td style=\"padding:14px 16px;\"><p style=\"margin:0;font-size:12px;font-weight:600;color:#5B6472;\">Skilaboð frá sendanda</p><p style=\"margin:0;font-size:15px;line-height:1.55;color:#202C49;padding-top:4px;\">Þetta er sýnishorn. Svona birtist sendingin viðtakanda.</p></td></tr></table><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-top:22px;\"><tr><td align=\"center\" style=\"background:#C2452D;border-radius:12px;\"><a href=\"https://parasend.com/d/synishorn\" style=\"display:block;padding:15px 20px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:16px;font-weight:600;color:#FFFFFF;text-decoration:none;\">Opna sendinguna</a></td></tr></table><p style=\"margin:0;font-size:14px;color:#5B6472;text-align:center;padding-top:10px;\">Þú staðfestir móttöku með rafrænum skilríkjum. Það tekur innan við mínútu.</p><p style=\"margin:0;font-size:13px;line-height:1.6;color:#5B6472;padding-top:20px;\">Virkar hnappurinn ekki? Opnaðu þennan hlekk í vafra:<br><a href=\"https://parasend.com/d/synishorn\" style=\"color:#C2452D;word-break:break-all;\">https://parasend.com/d/synishorn</a></p></td></tr></table></td></tr><tr><td style=\"height:16px;line-height:16px;font-size:0;\">&nbsp;</td></tr><tr><td style=\"background:#ECEEF4;border-radius:12px;padding:18px 24px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:13px;line-height:1.6;color:#5B6472;\"><table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"padding:1px 12px 0 0;vertical-align:top;\"><img src=\"cid:safety-shield-v1\" width=\"20\" height=\"20\" alt=\"\" style=\"display:block;border:0;width:20px;height:20px;max-width:20px;\"></td><td style=\"vertical-align:top;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:13px;line-height:1.6;color:#5B6472;\"><b style=\"color:#202C49;\">Er þetta öruggt?</b> Parasend biður þig aldrei um lykilorð eða kortaupplýsingar. Móttaka sendingarinnar er skráð.</td></tr></table><p lang=\"en\" style=\"margin:0;padding:12px 0 0 32px;\">In English: Fyrirtæki ehf. has sent you 1 document through Parasend, an electronic registered delivery service. Open the delivery with the button above and confirm receipt.</p></td></tr><tr><td style=\"padding:16px 12px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:12px;line-height:1.6;color:#5B6472;text-align:center;\">Þessi tilkynning er frá Parasend. Sendandi: Fyrirtæki ehf.<br>Parasend er rekjanleg rafræn afhendingarþjónusta sem Justikal ehf. rekur, Akralind 3, 201 Kópavogi.<br><a href=\"https://parasend.com/legal/privacy\" style=\"color:#C2452D;text-decoration:none;\">Persónuvernd</a></td></tr></table></td></tr></table></body></html>",
                        "images": {
                          "parasend-logo-v1": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABICAYAAABCzyOOAAAFiElEQVR4nOybXWzbVBTHz7UTUQECtibpeABVQCcxxAZUo02FilAR6gQbG0tG1T3xgqbxBNsjDyABQiAKT+wFaWi8pE2abUh8C9QCTVOV0mnAQHxtaIP1cx39WLs2vofj1IgJSneuY8fO5N+DbcXHvvbf9+Pcc25CEFAkBAFFAiEsAiEsAiEsPBdiPNHUZu6jmVwKPERAmcH6+vBEbbhVanobFb6NfrrWOjWLAO9q0khFTi19KIaGlqCMlEUITII+JuMPCiEepyJ3UKk3rH4BnKfNYRImFRO5T0UaDHAZ14SglxATicb7JehtVMpOKigCNqD7TNAmo4HRGcnke0XxJ+dxXIjRRLxJQPHLJ+nuN4KTIJylTVoXkKpO5/rBQRwRYjzZUC8xZH75XXTDm6EMIOJvmhBdYBipaDb/NZSIbSHOJeN3FopfHsyvfxt4Cv5MtSUVMqBz7eHct2ADJSFGtzfdqoXFbkkvTxduAB+CCN9pAJ2hgvHOmiP5U9zrWEJMJpviBogDdLgJKgnEYV2KvdXZvvzlTDVgIBE3QqWJYCLE3VKXGzmmgYttEQhhEQhhEQhhEQhhEQhhwRNC2J/okCv8vIo9OTY6DXubqMBGOo5CmeAJIQXyPI7/UpPJPQc2GXnsvluEJvfS9H0f2MV8dga81xNoU4bSWJf98lcScj/Vx2aqW7+DHTRkec+8F0QhwUNimb4v9FljA7WzH0CVK6FGXEr1BwPTiAbNdFHtozhaI3xCTffAcWomL4ELVJQQJvqc8Sq4QMUJYTYR2v0IDlNxQhRBuGx8QRVmZ+lO5NguCPIbcBjm8Fn+RNDqaI7HSJlNQ3M9waKCEHgP2xg11nDLC9WBXASfgMtx1ru49gJxgWPHEoJKngefMJZs2kNPFObaG0Jc4NjxhGDezG0mH918E2XRXlG6COUcx4wnhAFj4AMK4fBB+Cd7zkPqIxwz1jQc4eIZgCrwiumt9ZGFq6oOURttAUWqQsZpjh2rRkSzQ2dJjQJ4wFgy3jpfVXWCRNgCiiDg/PXp/nMcW36oTuBPtLkdHGI8GW+XKNavUJBGZdXSvo5ehc6LtXadGOpPTnBt2UKQTzVMD+SYEHS/duqEH175rPjX3mYZiOwsOXuuoSnc1C9ogEN8WyYUo/ocKgyKTfVybdlCRLK5QfLqxqFCoGc9GenuZ4f2lKbhNAl9DyoEqg1HVezV4hEouqBC0NBQWrepJEQ00/cR9cS+8DJXY7lZ5AdUrlFsGjQRBXEI/M8BRXv1UJ0mFzq88jKZzOKfM2+CIspCFN1twLfBryC+se7j46wZ56XYct2mtjfWLoX1kxzb/0sCU8HtNL+vA2eZ0mcLtVakWwnbPuxoIt4hhPY0+Aga3vdF07kOsIHtcH6VgBdoNwW+AX+xK4KJbSGK01sJe8APUPsThtwFJVBSgifW3ddFI0gaPEe8XOp67JIzXXJ65glyYNjzfufBXnL0noUSKVkIc6gKLS62ejMhw+/1WWPbsqNXGo7kPquPDp6mHvshEkN5/C6BP4RxscXOULkSjiWBY+ncMdrtgDJAfeOkJmXLsnPnDI5mw2vSfZ8INB6gDnQG3ALxDErtXpVYAwfHlwVEM/keCgY0mw8MToPwFYilzeYiM3AYV9ZHmM1EnzPuAKcCOdQWKDTfEZ0Ix2PpQVbCRhXX0/0Utn+SwvavU8T6arDHCAVhd0fSuc/ARcqy7mFsZ0MdaPpbVFyz0oWIB8OFC8+sOXLsPLhMWReAUCY7QUW+SIfrVzVE6BGisD+aHmCH40vFk5Uw44n4Iyi0p+iw9e/fzPQcxUSzAuVrse7+YSgzni4JmtzScJ28JrSV3ML52ET4fdHTw1rU4QY+WxvlHcH/NSwCISwCISwCISz+AgAA//8/kCtoAAAABklEQVQDAIko0UD+kjBJAAAAAElFTkSuQmCC",
                          "safety-shield-v1": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGtUlEQVR4nOyaa2wUVRTHz5nZbWlBaXeLH9SofNGCkIghwUBbSsQHBsEulgRIBGLkER4GY4C2aBpDu1RD0FZFwAh8ICoru1SJxoTE2hYwKlEjLxsQX0SM+0Ab2C3dudczC8Wd2e32zuzMQkp/X2b3zn2c/9xzz8x9OOAmwwE3GUOCBztDgu2muGZ2uQzyQvW3AsruiLe1A3IIQi5YNSPfNWLYfAlwFbU4QXOPw3ccoTnUHX0fWj7rAZuxVXDJ2lm3c1leQT+XI2Jxpryc8whdtsbijpaLr/nOg03YIri4rqpM5rCaA1QhoKFhw4HHySi/gtASaQh0gsVYKthVU7UYEV4gkePAAkj8MTJxc6jRvwssImvBfW5LQpdQdSWZc/Mg57BdddsC7JHMlMvW3U0LNuS2mQJTpoCWUk327m5MsHHjAmRcs6hxlj3EDAgLdq2bc78k80/o5+jMOcn9AHcAXn4r1HDgHJjAXTfzDuB5KxD4cwO7O5wFKT4juPHjn0AAYcHuWs9Oyryo3wx2vE9FPYrzHUFvYAkIIPzKQM5HA6Z7PnyvwrE54vUfAquhBxcG2Em/dhbVeSocnK8kS6rT5LwXBDH9aUlR8xRIl6ebdVujXGjwt9OlPeHuLO8gPftSMIEEJqHx9VeuxCajtqm2DSYZmi0NdoYED3ZuOMHF62beJaFjFpd5a7ih9XewGNNR2g6Ka6vGyVLetyhJLRKTj7rWeu4Ei7lhBJdsmHWfDPAFve9GJRLoKslQDxZzQ7i0KhaY3Cnw3Zw1172H1UkJV+RDerG05BNiynXsYZqyKbov6X4flmjgcdXMHovAvqT1Lreusb85k6aFX933Rz9FJdDZBoKI9zDiP7pGitJlU8VqAg/1YLp8ajqC1K4Xm+hZhtPCTfuOQz/QrEy/IHgBBBEWjBzC2gR0pa1Qcr6iDTysLTFGk1D/q+kpPUtzaZSVKZnEXqkW3Lr/IRBEWDBDrhFMD8AlVpLGJgWkPtH9BygeBEkpE5nI0wKD1itQ1xkZEO9hwIguoUCdoOvzcYm9RO6uM4DEKY4OV43nafWaIpbGLONsqojYUfXVI6hH87Sm2NDDHFmXPq3olvwx+jQ1SHEFK64urCdbNUpC8F1z9/9rDoIcLw97W0+AACymjEm1DbpAEGHBvQzbUgpzqTJdXnUMMsam0kJexmBy5dUjVYquR6mgxCv1ab1Oh/D+lLDgbm8gRK76q6ZxTG28j0hT649MYRWp7n0V9dUDrGKgAJVaDit1CWf+rfdZP4ZVaF3rsPY/PA71Txb2l18Vnda9DbpxH7TofwuVfVhTE8fDRuowJJgjHtEkIOa7Y85Fmcok3Buhgizrumphl1E3vta+LC9W29SmsiNgAGOC4xAgF2WaROTLBioXaQwcC+Y7xgNj89WrYTfua0pdrk22hyzq6cV9YADDWy20Pv0RFZqjaRjZpFDD/q/BRoprPFNkBN0OBv8g2BiYBwYwPHlAxt5MTcMmsBkS26hPYxyawSCGBQc37W+jIKQNNoiVJeurFoBNkFctokuFNpV/H/YGDI1fFXPTQ47PpybBG8XrqkeCxdxaX+2iwfq6Pp12O1aCCUwJDm3yH6Re3p2cpk4EJDnuoxmsdXNsqsvZo3xIuwzaB0l7SWa3dkwbx/Njq0G3A0BR9BF3T9W7YBFU13skdrqmXYBzwd6La8AkMpgk2na6J7+89Djt7GnGLvX0hIKyMdFo58msNtfcNZ4NVFeKMJopzY02HTgJJjEtWCXWcer0sLLSbjLsMe0dPn14xVi81HGyDYyDFKQaqWdf1t+gqLwm7PXvgSyw5FAL9cbbZOByfTp9GLSGoo55sMUXFaroxUeHlzhH7CWrnkhzd3uw0b8UssSqUzzUK1Wfq2M45Q6H0zRHXjDQh4mrbvZkZNIe8pZ70tTxadDrn5n4lSVZuXQy0QdG7y3Md9CqBmrXsFBdGcFnh5eXFl2aOL4dvjoR19xfU13gnla6BTm+k/7wGvcFQ7/NhaN/Ci/UZcLyg2nU03XU0xvT3uRwngHfehkcW6E3jsOcoJ7SW0aR7raUrARdakPewCawEFtO4pWsf6qSS9IuqvxuMMdZhSsL7Th4aplLJ3Op89Qv0YnjthU6WSG9Riah4IOlPlUo+G0Jdkc9sc0HfgYbsP00ravO85DE6KsMMePBk8SZEQ7P0FfcN2AjuTk+XF/pcMVcc1CC1dTgZO1N3skYNIfPOPzg81kSmDKRG8FJjKz1POgEWKq6r8L4tgtNgR8gh+Rc8PVm6MjDYGdI8GDnPwAAAP//Q/PBygAAAAZJREFUAwBNHsTsz47Z7QAAAABJRU5ErkJggg=="
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/reminder_policies/{id}/versions": {
      "get": {
        "tags": [
          "Policies"
        ],
        "operationId": "listReminderPolicyVersions",
        "summary": "List a follow-up policy's versions",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated versions.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Page"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ReminderPolicyVersion"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "id": "rpv_01M6R27T60DW1D6WAYM11GBDER",
                          "object": "reminder_policy_version",
                          "policy_id": "rpol_01M6R27T5NK3830GCN9QPS9M95",
                          "version": 2,
                          "steps": [
                            {
                              "channel": "email",
                              "after_days": 3,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            },
                            {
                              "channel": "email",
                              "message": {
                                "preset": "firmer"
                              },
                              "after_days": 7,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            },
                            {
                              "channel": "sms",
                              "after_days": 14,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            }
                          ],
                          "stop_on": "confirmed",
                          "created_at": "2026-11-06T09:15:05.792Z",
                          "created_by": {
                            "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                            "via": "api_key"
                          }
                        },
                        {
                          "id": "rpv_01M6R27T5NB7JTSEZ0XV7BWETG",
                          "object": "reminder_policy_version",
                          "policy_id": "rpol_01M6R27T5NK3830GCN9QPS9M95",
                          "version": 1,
                          "steps": [
                            {
                              "channel": "email",
                              "after_days": 3,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            },
                            {
                              "channel": "email",
                              "message": {
                                "preset": "firmer"
                              },
                              "after_days": 7,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            },
                            {
                              "channel": "sms",
                              "after_days": 10,
                              "conditions": [
                                "not_delivered"
                              ],
                              "available": true
                            }
                          ],
                          "stop_on": "confirmed",
                          "created_at": "2026-11-06T09:15:05.781Z",
                          "created_by": {
                            "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                            "via": "api_key"
                          }
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Every version of a policy, newest first."
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/policyId"
        }
      ]
    },
    "/reminder_policies/{id}/reset": {
      "post": {
        "tags": [
          "Policies"
        ],
        "operationId": "resetReminderPolicy",
        "summary": "Reset one of Parasend's policies",
        "description": "Ends the organisation's own version of rpol_default or rpol_debt_collection. Its versions stay in the history; deliveries waiting take Parasend's version from their next step. With nothing to reset it answers the policy unchanged. One of the organisation's own policies: 400 policy_not_resettable. Needs policies.update.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false
              },
              "examples": {
                "Reset Parasend's default policy": {
                  "summary": "Reset Parasend's default policy",
                  "value": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The policy, Parasend's version again.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReminderPolicy"
                },
                "examples": {
                  "Reset Parasend's default policy": {
                    "summary": "Reset Parasend's default policy",
                    "value": {
                      "id": "rpol_default",
                      "object": "reminder_policy",
                      "name": "Default",
                      "system": true,
                      "version": 1,
                      "version_id": "rpv_default_v1",
                      "steps": [
                        {
                          "channel": "email",
                          "after_days": 3,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        },
                        {
                          "channel": "email",
                          "after_days": 7,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        }
                      ],
                      "stop_on": "confirmed",
                      "customized": false,
                      "is_account_default": false,
                      "in_use_by_batches": 0,
                      "in_use_by_deliveries": 0,
                      "created_at": "2026-11-06T09:15:05.537Z",
                      "updated_at": "2026-11-06T09:15:05.540Z",
                      "archived_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/policyId"
        }
      ]
    },
    "/reminder_policies/{id}/duplicate": {
      "post": {
        "tags": [
          "Policies"
        ],
        "operationId": "duplicateReminderPolicy",
        "summary": "Duplicate a follow-up policy",
        "description": "Copies the current version into a new policy of the organisation, named \"<name> (copy)\" unless name is given. A step v1 cannot run (paper) is left out of the copy.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                }
              },
              "examples": {
                "Copy a policy": {
                  "summary": "Copy a policy",
                  "value": {
                    "name": "Payment reminders (copy)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The copy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReminderPolicy"
                },
                "examples": {
                  "Copy a policy": {
                    "summary": "Copy a policy",
                    "value": {
                      "id": "rpol_01M6R27T6BE940MSE8J194NJCE",
                      "object": "reminder_policy",
                      "name": "Payment reminders (copy)",
                      "system": false,
                      "version": 1,
                      "version_id": "rpv_01M6R27T6BDH6TZ8MQ7GP501C8",
                      "steps": [
                        {
                          "channel": "email",
                          "after_days": 3,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        },
                        {
                          "channel": "email",
                          "message": {
                            "preset": "firmer"
                          },
                          "after_days": 7,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        },
                        {
                          "channel": "sms",
                          "after_days": 14,
                          "conditions": [
                            "not_delivered"
                          ],
                          "available": true
                        }
                      ],
                      "stop_on": "confirmed",
                      "customized": false,
                      "is_account_default": false,
                      "in_use_by_batches": 0,
                      "in_use_by_deliveries": 0,
                      "created_at": "2026-11-06T09:15:05.802Z",
                      "updated_at": "2026-11-06T09:15:05.802Z",
                      "archived_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/components/parameters/policyId"
        }
      ]
    },
    "/batches/{id}/preflight": {
      "get": {
        "tags": [
          "Batches"
        ],
        "operationId": "getBatchPreflight",
        "summary": "Check a batch before sending",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          }
        ],
        "responses": {
          "200": {
            "description": "The checks and the estimate.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "batch_preflight"
                    },
                    "ready": {
                      "type": "boolean"
                    },
                    "checks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "ok": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "total": {
                            "type": "integer",
                            "description": "recipients: the rows in the batch."
                          },
                          "to_send": {
                            "type": "integer",
                            "description": "recipients: the deliveries that will go."
                          },
                          "row_errors": {
                            "type": "integer",
                            "description": "recipients: rows that cannot be sent."
                          },
                          "without_documents": {
                            "type": "integer",
                            "description": "documents: deliveries with no file."
                          },
                          "brand_profile_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "brand: the profile the batch uses."
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "brand or policy: its name."
                          },
                          "follow_up_policy_id": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "policy: the batch's follow-up policy."
                          },
                          "steps": {
                            "type": "array",
                            "items": {
                              "type": "object"
                            },
                            "description": "policy: its steps."
                          },
                          "own_policy": {
                            "type": "integer",
                            "description": "policy: deliveries that follow their own policy."
                          },
                          "steps_after_expiry": {
                            "type": "integer",
                            "description": "expiry: follow-up steps that would come after the deliveries expire."
                          },
                          "available": {
                            "type": "boolean",
                            "description": "test_send: whether a test e-mail can be sent."
                          },
                          "last_sent_at": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date-time",
                            "description": "test_send: when the last one was sent."
                          }
                        },
                        "description": "One check, by `id`: recipients, documents, brand, policy, expiry or test_send. `ok` is true, false, or null where it does not apply; the other fields belong to the check named."
                      }
                    },
                    "estimate": {
                      "type": "object",
                      "properties": {
                        "currency": {
                          "type": "string"
                        },
                        "amount": {
                          "type": "integer",
                          "description": "Excluding VAT."
                        },
                        "vat": {
                          "type": "integer"
                        },
                        "total_amount": {
                          "type": "integer",
                          "description": "`amount` plus `vat`."
                        },
                        "items": {
                          "type": "array",
                          "description": "The estimated cost line by line, in the same form as a delivery's cost lines.",
                          "items": {
                            "type": "object"
                          }
                        },
                        "maximum": {
                          "type": "boolean",
                          "const": true
                        },
                        "lookups": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "object": "batch_preflight",
                      "ready": true,
                      "checks": [
                        {
                          "id": "recipients",
                          "ok": true,
                          "total": 2,
                          "to_send": 2,
                          "row_errors": 0
                        },
                        {
                          "id": "documents",
                          "ok": true,
                          "without_documents": 0
                        },
                        {
                          "id": "brand",
                          "ok": true,
                          "brand_profile_id": null,
                          "name": null
                        },
                        {
                          "id": "policy",
                          "ok": true,
                          "follow_up_policy_id": null,
                          "name": null,
                          "steps": [],
                          "own_policy": 0
                        },
                        {
                          "id": "expiry",
                          "ok": true,
                          "steps_after_expiry": 0
                        },
                        {
                          "id": "test_send",
                          "ok": null,
                          "available": true,
                          "last_sent_at": null
                        }
                      ],
                      "estimate": {
                        "currency": "ISK",
                        "amount": 622,
                        "vat": 149,
                        "total_amount": 771,
                        "items": [
                          {
                            "kind": "delivery",
                            "description": {
                              "is": "Sending",
                              "en": "Delivery"
                            },
                            "country": null,
                            "quantity": 2,
                            "unit_amount": 311,
                            "amount": 622,
                            "vat": 149,
                            "total_amount": 771
                          }
                        ],
                        "maximum": true,
                        "lookups": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "The checklist before Send out, and the most the batch can cost."
      }
    },
    "/batches/{id}/policy_change": {
      "post": {
        "tags": [
          "Batches"
        ],
        "operationId": "changeBatchPolicy",
        "summary": "Change a batch's follow-up policy",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyChangeRequest"
              },
              "examples": {
                "Preview a policy change for the batch": {
                  "summary": "Preview a policy change for the batch",
                  "value": {
                    "policy_id": "{{reminder_policies}}",
                    "dry_run": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What changed — or, with dry_run, what would.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyChange"
                },
                "examples": {
                  "Preview a policy change for the batch": {
                    "summary": "Preview a policy change for the batch",
                    "value": {
                      "object": "policy_change",
                      "dry_run": true,
                      "policy_id": "rpol_01M6R27T5NK3830GCN9QPS9M95",
                      "start_step": "first",
                      "affected": 2,
                      "unchanged": {
                        "ended": 0,
                        "own_policy": 0
                      },
                      "not_yet_notified": 2,
                      "messages": {
                        "email": 0,
                        "sms": 0
                      },
                      "first_send_at": null,
                      "estimate": {
                        "currency": "ISK",
                        "amount": 0,
                        "vat": 0,
                        "total_amount": 0
                      },
                      "after_expiry": 0,
                      "held_by_gap": 0,
                      "in_flight": 0,
                      "schedule": [],
                      "expires_at": null,
                      "expiry_capped": 0
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Changes the follow-up policy of the batch's deliveries that have not yet confirmed. With `dry_run: true`, shows what would change and what it would cost, and changes nothing."
      }
    },
    "/batches/{id}/pause": {
      "post": {
        "tags": [
          "Batches"
        ],
        "operationId": "pauseBatchFollowUps",
        "summary": "Pause a batch's follow-ups",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          }
        ],
        "responses": {
          "200": {
            "description": "The batch, follow_ups_paused true.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Batch"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "bat_01M6R27T8SXWNM911FS53W4S9F",
                      "object": "batch",
                      "name": "November notices, first run",
                      "status": "sending",
                      "sending_mode": "on_finalize",
                      "follow_up_policy_id": null,
                      "allow_policy_override": true,
                      "follow_ups_paused": true,
                      "scheduled_at": null,
                      "send_window": {
                        "tz": "Atlantic/Reykjavik",
                        "end": "21:00",
                        "start": "09:00"
                      },
                      "defaults": {},
                      "files": [],
                      "accepting_deliveries": false,
                      "counts": {
                        "total": 2,
                        "delivered": 0,
                        "ended": 0,
                        "in_progress": 2
                      },
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "via": "api_key"
                      },
                      "livemode": false,
                      "created": "2026-11-06T09:15:05.881Z",
                      "sent_out_at": "2026-11-06T09:15:05.922Z",
                      "following_up_at": null,
                      "completed_at": null,
                      "cancelled_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Pauses the batch's follow-ups. Pausing is a flag, not a status: the batch keeps its status."
      }
    },
    "/batches/{id}/resume": {
      "post": {
        "tags": [
          "Batches"
        ],
        "operationId": "resumeBatchFollowUps",
        "summary": "Resume a batch's follow-ups",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          }
        ],
        "responses": {
          "200": {
            "description": "The batch, follow_ups_paused false.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Batch"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "bat_01M6R27T8SXWNM911FS53W4S9F",
                      "object": "batch",
                      "name": "November notices, first run",
                      "status": "sending",
                      "sending_mode": "on_finalize",
                      "follow_up_policy_id": null,
                      "allow_policy_override": true,
                      "follow_ups_paused": false,
                      "scheduled_at": null,
                      "send_window": {
                        "tz": "Atlantic/Reykjavik",
                        "end": "21:00",
                        "start": "09:00"
                      },
                      "defaults": {},
                      "files": [],
                      "accepting_deliveries": false,
                      "counts": {
                        "total": 2,
                        "delivered": 0,
                        "ended": 0,
                        "in_progress": 2
                      },
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "via": "api_key"
                      },
                      "livemode": false,
                      "created": "2026-11-06T09:15:05.881Z",
                      "sent_out_at": "2026-11-06T09:15:05.922Z",
                      "following_up_at": null,
                      "completed_at": null,
                      "cancelled_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Resumes the batch's follow-ups. What waited goes out in the next sending window."
      }
    },
    "/batches/{id}/extend_expiry": {
      "post": {
        "tags": [
          "Batches"
        ],
        "operationId": "extendBatchExpiry",
        "summary": "Extend a batch's deliveries",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "expires_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "add_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365
                  },
                  "dry_run": {
                    "type": "boolean"
                  }
                }
              },
              "examples": {
                "Give everyone 7 more days, as a preview": {
                  "summary": "Give everyone 7 more days, as a preview",
                  "value": {
                    "add_days": 7,
                    "dry_run": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "How many were extended, and how many stopped short at their limit.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "expiry_extension"
                    },
                    "dry_run": {
                      "type": "boolean"
                    },
                    "pending": {
                      "type": "integer"
                    },
                    "extended": {
                      "type": "integer"
                    },
                    "capped": {
                      "type": "integer"
                    },
                    "latest_allowed": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "documents_retention_days": {
                      "type": "integer"
                    }
                  }
                },
                "examples": {
                  "Give everyone 7 more days, as a preview": {
                    "summary": "Give everyone 7 more days, as a preview",
                    "value": {
                      "object": "expiry_extension",
                      "dry_run": true,
                      "pending": 2,
                      "extended": 0,
                      "capped": 2,
                      "latest_allowed": "2026-12-06T09:15:05.587Z",
                      "documents_retention_days": 30
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Gives the batch's pending deliveries longer to be confirmed: never past a year, nor past their documents' deletion."
      }
    },
    "/deliveries/{id}/policy_change": {
      "post": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "changeDeliveryPolicy",
        "summary": "Change a delivery's follow-up policy",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyChangeRequest"
              },
              "examples": {
                "Preview a policy change": {
                  "summary": "Preview a policy change",
                  "value": {
                    "policy_id": "{{reminder_policies}}",
                    "dry_run": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What changed — or, with dry_run, what would.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PolicyChange"
                },
                "examples": {
                  "Preview a policy change": {
                    "summary": "Preview a policy change",
                    "value": {
                      "object": "policy_change",
                      "dry_run": true,
                      "policy_id": "rpol_01M6R27T5NK3830GCN9QPS9M95",
                      "start_step": "first",
                      "affected": 1,
                      "unchanged": {
                        "ended": 0,
                        "own_policy": 0
                      },
                      "not_yet_notified": 0,
                      "messages": {
                        "email": 2,
                        "sms": 0
                      },
                      "first_send_at": "2026-11-07T09:15:05.667Z",
                      "estimate": {
                        "currency": "ISK",
                        "amount": 0,
                        "vat": 0,
                        "total_amount": 0
                      },
                      "after_expiry": 0,
                      "held_by_gap": 1,
                      "in_flight": 0,
                      "schedule": [
                        {
                          "step": 1,
                          "channel": "email",
                          "day_offset": 0,
                          "due_at": "2026-11-07T09:15:05.667Z"
                        },
                        {
                          "step": 2,
                          "channel": "email",
                          "day_offset": 4,
                          "due_at": "2026-11-11T09:15:05.667Z"
                        },
                        {
                          "step": 3,
                          "channel": "sms",
                          "day_offset": 11,
                          "due_at": "2026-11-18T09:15:05.667Z"
                        }
                      ],
                      "expires_at": null,
                      "expiry_capped": 0
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Changes one delivery's follow-up policy. With `dry_run: true`, shows what would change and changes nothing."
      }
    },
    "/batches/{id}/cancel": {
      "post": {
        "tags": [
          "Batches"
        ],
        "operationId": "cancelBatch",
        "summary": "Cancel a batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          }
        ],
        "responses": {
          "200": {
            "description": "The cancelled batch, with how many deliveries were revoked and how many kept.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Batch"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "cancelled": {
                          "type": "object",
                          "properties": {
                            "revoked": {
                              "type": "integer"
                            },
                            "kept": {
                              "type": "integer"
                            }
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "bat_01M6R27T8SXWNM911FS53W4S9F",
                      "object": "batch",
                      "name": "November notices, first run",
                      "status": "cancelled",
                      "sending_mode": "on_finalize",
                      "follow_up_policy_id": null,
                      "allow_policy_override": true,
                      "follow_ups_paused": false,
                      "scheduled_at": null,
                      "send_window": {
                        "tz": "Atlantic/Reykjavik",
                        "end": "21:00",
                        "start": "09:00"
                      },
                      "defaults": {},
                      "files": [],
                      "accepting_deliveries": false,
                      "counts": {
                        "total": 2,
                        "delivered": 0,
                        "ended": 2,
                        "in_progress": 0
                      },
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "via": "api_key"
                      },
                      "livemode": false,
                      "created": "2026-11-06T09:15:05.881Z",
                      "sent_out_at": "2026-11-06T09:15:05.922Z",
                      "following_up_at": null,
                      "completed_at": null,
                      "cancelled_at": "2026-11-06T09:15:05.982Z",
                      "cancelled": {
                        "revoked": 2,
                        "kept": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Cancels a batch: revokes every delivery not yet confirmed, and closes the batch. Confirmed deliveries keep their evidence."
      }
    },
    "/wordings": {
      "get": {
        "tags": [
          "Policies"
        ],
        "operationId": "listWordings",
        "summary": "List saved wordings",
        "parameters": [
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "email",
                "sms"
              ]
            }
          },
          {
            "name": "use",
            "in": "query",
            "description": "`notice` (the first notice) or `reminder` (follow-up steps).",
            "schema": {
              "type": "string",
              "enum": [
                "reminder",
                "notice"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Wordings.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Wording"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "id": "wrd_01M6R27T6WN5ZPHV4DA9SGQ3G6",
                          "object": "wording",
                          "name": "Second reminder",
                          "use": "reminder",
                          "channel": "email",
                          "is_default": false,
                          "version": 1,
                          "version_id": "wrv_01M6R27T6WR1V5QFE0E3SKRHNW",
                          "message": {
                            "preset": "firmer"
                          },
                          "created_at": "2026-11-06T09:15:05.820Z",
                          "updated_at": "2026-11-06T09:15:05.820Z",
                          "archived_at": null,
                          "used_by": {
                            "policies": 0,
                            "policies_on_older_version": 0
                          }
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Your organisation's saved wordings in use, newest first."
      },
      "post": {
        "tags": [
          "Policies"
        ],
        "operationId": "createWording",
        "summary": "Save a wording",
        "description": "Version 1 of a named wording for one channel. message follows a step's rules (StepMessage, without source); its custom needs Plan 1–3 or Enterprise (403 theme_knob_plan_gated, param message.custom); an SMS wording must keep the reminder one SMS (policy_sms_too_long).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WordingCreate"
              },
              "examples": {
                "Save a firmer e-mail wording": {
                  "summary": "Save a firmer e-mail wording",
                  "value": {
                    "name": "Second reminder",
                    "channel": "email",
                    "message": {
                      "preset": "firmer"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Saved.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wording"
                },
                "examples": {
                  "Save a firmer e-mail wording": {
                    "summary": "Save a firmer e-mail wording",
                    "value": {
                      "id": "wrd_01M6R27T6WN5ZPHV4DA9SGQ3G6",
                      "object": "wording",
                      "name": "Second reminder",
                      "use": "reminder",
                      "channel": "email",
                      "is_default": false,
                      "version": 1,
                      "version_id": "wrv_01M6R27T6WR1V5QFE0E3SKRHNW",
                      "message": {
                        "preset": "firmer"
                      },
                      "created_at": "2026-11-06T09:15:05.820Z",
                      "updated_at": "2026-11-06T09:15:05.820Z",
                      "archived_at": null,
                      "used_by": {
                        "policies": 0,
                        "policies_on_older_version": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/wordings/{id}": {
      "get": {
        "tags": [
          "Policies"
        ],
        "operationId": "getWording",
        "summary": "Retrieve a saved wording",
        "responses": {
          "200": {
            "description": "The wording.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wording"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "wrd_01M6R27T6WN5ZPHV4DA9SGQ3G6",
                      "object": "wording",
                      "name": "Second reminder",
                      "use": "reminder",
                      "channel": "email",
                      "is_default": false,
                      "version": 1,
                      "version_id": "wrv_01M6R27T6WR1V5QFE0E3SKRHNW",
                      "message": {
                        "preset": "firmer"
                      },
                      "created_at": "2026-11-06T09:15:05.820Z",
                      "updated_at": "2026-11-06T09:15:05.820Z",
                      "archived_at": null,
                      "used_by": {
                        "policies": 0,
                        "policies_on_older_version": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Retrieves one saved wording, archived ones included."
      },
      "patch": {
        "tags": [
          "Policies"
        ],
        "operationId": "updateWording",
        "summary": "Update a saved wording",
        "description": "The channel stays as it was made (invalid_parameter_value, param channel). An archived wording is not changed (409 wording_archived).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "message": {
                    "$ref": "#/components/schemas/StepMessage"
                  },
                  "is_default": {
                    "type": "boolean",
                    "description": "Notice wordings only: make this the first-notice wording for its channel."
                  }
                }
              },
              "examples": {
                "Rename a wording": {
                  "summary": "Rename a wording",
                  "value": {
                    "name": "Second reminder (firm)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The wording as it now is.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Wording"
                },
                "examples": {
                  "Rename a wording": {
                    "summary": "Rename a wording",
                    "value": {
                      "id": "wrd_01M6R27T6WN5ZPHV4DA9SGQ3G6",
                      "object": "wording",
                      "name": "Second reminder (firm)",
                      "use": "reminder",
                      "channel": "email",
                      "is_default": false,
                      "version": 1,
                      "version_id": "wrv_01M6R27T6WR1V5QFE0E3SKRHNW",
                      "message": {
                        "preset": "firmer"
                      },
                      "created_at": "2026-11-06T09:15:05.820Z",
                      "updated_at": "2026-11-06T09:15:05.829Z",
                      "archived_at": null,
                      "used_by": {
                        "policies": 0,
                        "policies_on_older_version": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "Policies"
        ],
        "operationId": "archiveWording",
        "summary": "Archive a saved wording",
        "responses": {
          "204": {
            "description": "Archived (or already)."
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Archives a saved wording. Policies that loaded it keep their own copy."
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^wrd_"
          }
        }
      ]
    },
    "/wordings/{id}/versions": {
      "get": {
        "tags": [
          "Policies"
        ],
        "operationId": "listWordingVersions",
        "summary": "List a wording's versions",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^wrd_"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Versions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WordingVersion"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  }
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "id": "wrv_01M6R27T6WR1V5QFE0E3SKRHNW",
                          "object": "wording_version",
                          "wording_id": "wrd_01M6R27T6WN5ZPHV4DA9SGQ3G6",
                          "version": 1,
                          "message": {
                            "preset": "firmer"
                          },
                          "created_at": "2026-11-06T09:15:05.820Z",
                          "created_by": {
                            "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                            "via": "api_key"
                          }
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Every version of a saved wording, newest first."
      }
    },
    "/wordings/{id}/versions/{version}": {
      "get": {
        "tags": [
          "Policies"
        ],
        "operationId": "getWordingVersion",
        "summary": "Retrieve a wording version",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^wrd_"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The version.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WordingVersion"
                },
                "examples": {
                  "The first version": {
                    "summary": "The first version",
                    "value": {
                      "id": "wrv_01M6R27T6WR1V5QFE0E3SKRHNW",
                      "object": "wording_version",
                      "wording_id": "wrd_01M6R27T6WN5ZPHV4DA9SGQ3G6",
                      "version": 1,
                      "message": {
                        "preset": "firmer"
                      },
                      "created_at": "2026-11-06T09:15:05.820Z",
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "via": "api_key"
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "One version of a saved wording: what a step that names it was loaded from."
      }
    },
    "/wordings/capabilities": {
      "get": {
        "tags": [
          "Policies"
        ],
        "operationId": "getWordingCapabilities",
        "summary": "Check what wordings may contain",
        "responses": {
          "200": {
            "description": "The answer.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "wording_capabilities"
                    },
                    "gender_wording": {
                      "type": "boolean"
                    },
                    "gender_wording_reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "enum": [
                        "switched_off",
                        "plan",
                        "not_icelandic",
                        null
                      ]
                    }
                  }
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "object": "wording_capabilities",
                      "gender_wording": false,
                      "gender_wording_reason": "switched_off"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Whether your organisation may write a gender word into its wordings, and if not, why not."
      }
    },
    "/wordings/preview": {
      "post": {
        "tags": [
          "Policies"
        ],
        "operationId": "previewWording",
        "summary": "Preview a wording",
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "is",
                "en"
              ],
              "default": "is"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WordingPreviewRequest"
              },
              "examples": {
                "Preview a notice wording": {
                  "summary": "Preview a notice wording",
                  "value": {
                    "use": "notice",
                    "channel": "email",
                    "message": {
                      "preset": "standard"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The message, drawn by the code that sends it (object notice_preview or reminder_step_preview).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "examples": {
                  "Preview a notice wording": {
                    "summary": "Preview a notice wording",
                    "value": {
                      "object": "notice_preview",
                      "channel": "email",
                      "locale": "is",
                      "preset": "standard",
                      "template": {
                        "id": "invitation.email",
                        "version": 13
                      },
                      "email": {
                        "from_name": "Sending frá: Fyrirtæki ehf.",
                        "subject": "Sýnishorn af sendingu",
                        "text": "Fyrirtæki ehf. hefur sent þér 1 skjal með Parasend.\n\nSýnishorn af sendingu\n1 skjal · aðgengilegt til 13. nóvember 2026\n\nSkilaboð frá sendanda:\nÞetta er sýnishorn. Svona birtist sendingin viðtakanda.\n\nOpna sendinguna: https://parasend.com/d/synishorn\nÞú staðfestir móttöku með rafrænum skilríkjum. Það tekur innan við mínútu.\n\nEr þetta öruggt? Parasend biður þig aldrei um lykilorð eða kortaupplýsingar. Móttaka sendingarinnar er skráð.\n\nIn English: Fyrirtæki ehf. has sent you 1 document through Parasend, an electronic registered delivery service. Open the delivery with the button above and confirm receipt.\n\n—\nÞessi tilkynning er frá Parasend. Sendandi: Fyrirtæki ehf.\nParasend er rekjanleg rafræn afhendingarþjónusta sem Justikal ehf. rekur, Akralind 3, 201 Kópavogi.\n",
                        "html": "<!doctype html><html lang=\"is\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><meta name=\"color-scheme\" content=\"light\"><title>Sýnishorn af sendingu</title></head><body style=\"margin:0;padding:0;background:#F5F6FA;\"><div style=\"display:none;max-height:0;overflow:hidden;\">Opnaðu sendinguna og staðfestu móttöku. Aðgengileg til 13. nóvember 2026.</div><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#F5F6FA;\"><tr><td align=\"center\" style=\"padding:20px 12px;\"><table role=\"presentation\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%;max-width:600px;\"><tr><td style=\"background:#FFFFFF;border:1px solid #E6E9F2;border-radius:12px;\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"background:#0E1526;border-radius:12px 12px 0 0;padding:18px 28px;\"><table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"padding-right:9px;vertical-align:middle;\"><img src=\"cid:parasend-logo-v1\" width=\"22\" height=\"24\" alt=\"\" style=\"display:block;border:0;width:22px;height:24px;max-width:22px;\"></td><td style=\"vertical-align:middle;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;\"><div style=\"font-size:18px;font-weight:700;letter-spacing:-0.02em;line-height:1.1;color:#FFFFFF;\">Parasend</div><table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-top:4px;\"><tr><td style=\"vertical-align:middle;\"><table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"12\" height=\"3\" bgcolor=\"#EA553B\" style=\"width:12px;height:3px;background:#EA553B;border-radius:2px;font-size:3px;line-height:3px;\">&nbsp;</td></tr></table></td><td style=\"padding-left:6px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:11.5px;font-weight:500;line-height:1.2;color:#9AA3BA;\">by Justikal</td></tr></table></td></tr></table></td></tr><tr><td style=\"padding:32px 36px 28px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;color:#0E1526;\"><p style=\"margin:0;font-size:13px;font-weight:600;color:#147A52;\">Rekjanleg rafræn afhendingarþjónusta</p><h1 style=\"margin:8px 0 20px;font-size:24px;line-height:1.3;font-weight:700;color:#0E1526;\">Fyrirtæki ehf. hefur sent þér 1 skjal með Parasend</h1><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"border:1px solid #E6E9F2;border-radius:12px;\"><tr><td style=\"padding:14px 16px;\"><p style=\"margin:0;font-size:16px;font-weight:600;\">Sýnishorn af sendingu</p><p style=\"margin:0;font-size:14px;color:#5B6472;padding-top:4px;\">1 skjal · aðgengilegt til 13. nóvember 2026</p></td></tr></table><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-top:16px;background:#EEF0F7;border-radius:12px;\"><tr><td style=\"padding:14px 16px;\"><p style=\"margin:0;font-size:12px;font-weight:600;color:#5B6472;\">Skilaboð frá sendanda</p><p style=\"margin:0;font-size:15px;line-height:1.55;color:#202C49;padding-top:4px;\">Þetta er sýnishorn. Svona birtist sendingin viðtakanda.</p></td></tr></table><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-top:22px;\"><tr><td align=\"center\" style=\"background:#C2452D;border-radius:12px;\"><a href=\"https://parasend.com/d/synishorn\" style=\"display:block;padding:15px 20px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:16px;font-weight:600;color:#FFFFFF;text-decoration:none;\">Opna sendinguna</a></td></tr></table><p style=\"margin:0;font-size:14px;color:#5B6472;text-align:center;padding-top:10px;\">Þú staðfestir móttöku með rafrænum skilríkjum. Það tekur innan við mínútu.</p><p style=\"margin:0;font-size:13px;line-height:1.6;color:#5B6472;padding-top:20px;\">Virkar hnappurinn ekki? Opnaðu þennan hlekk í vafra:<br><a href=\"https://parasend.com/d/synishorn\" style=\"color:#C2452D;word-break:break-all;\">https://parasend.com/d/synishorn</a></p></td></tr></table></td></tr><tr><td style=\"height:16px;line-height:16px;font-size:0;\">&nbsp;</td></tr><tr><td style=\"background:#ECEEF4;border-radius:12px;padding:18px 24px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:13px;line-height:1.6;color:#5B6472;\"><table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"padding:1px 12px 0 0;vertical-align:top;\"><img src=\"cid:safety-shield-v1\" width=\"20\" height=\"20\" alt=\"\" style=\"display:block;border:0;width:20px;height:20px;max-width:20px;\"></td><td style=\"vertical-align:top;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:13px;line-height:1.6;color:#5B6472;\"><b style=\"color:#202C49;\">Er þetta öruggt?</b> Parasend biður þig aldrei um lykilorð eða kortaupplýsingar. Móttaka sendingarinnar er skráð.</td></tr></table><p lang=\"en\" style=\"margin:0;padding:12px 0 0 32px;\">In English: Fyrirtæki ehf. has sent you 1 document through Parasend, an electronic registered delivery service. Open the delivery with the button above and confirm receipt.</p></td></tr><tr><td style=\"padding:16px 12px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:12px;line-height:1.6;color:#5B6472;text-align:center;\">Þessi tilkynning er frá Parasend. Sendandi: Fyrirtæki ehf.<br>Parasend er rekjanleg rafræn afhendingarþjónusta sem Justikal ehf. rekur, Akralind 3, 201 Kópavogi.<br><a href=\"https://parasend.com/legal/privacy\" style=\"color:#C2452D;text-decoration:none;\">Persónuvernd</a></td></tr></table></td></tr></table></body></html>",
                        "images": {
                          "parasend-logo-v1": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABICAYAAABCzyOOAAAFiElEQVR4nOybXWzbVBTHz7UTUQECtibpeABVQCcxxAZUo02FilAR6gQbG0tG1T3xgqbxBNsjDyABQiAKT+wFaWi8pE2abUh8C9QCTVOV0mnAQHxtaIP1cx39WLs2vofj1IgJSneuY8fO5N+DbcXHvvbf9+Pcc25CEFAkBAFFAiEsAiEsAiEsPBdiPNHUZu6jmVwKPERAmcH6+vBEbbhVanobFb6NfrrWOjWLAO9q0khFTi19KIaGlqCMlEUITII+JuMPCiEepyJ3UKk3rH4BnKfNYRImFRO5T0UaDHAZ14SglxATicb7JehtVMpOKigCNqD7TNAmo4HRGcnke0XxJ+dxXIjRRLxJQPHLJ+nuN4KTIJylTVoXkKpO5/rBQRwRYjzZUC8xZH75XXTDm6EMIOJvmhBdYBipaDb/NZSIbSHOJeN3FopfHsyvfxt4Cv5MtSUVMqBz7eHct2ADJSFGtzfdqoXFbkkvTxduAB+CCN9pAJ2hgvHOmiP5U9zrWEJMJpviBogDdLgJKgnEYV2KvdXZvvzlTDVgIBE3QqWJYCLE3VKXGzmmgYttEQhhEQhhEQhhEQhhEQhhwRNC2J/okCv8vIo9OTY6DXubqMBGOo5CmeAJIQXyPI7/UpPJPQc2GXnsvluEJvfS9H0f2MV8dga81xNoU4bSWJf98lcScj/Vx2aqW7+DHTRkec+8F0QhwUNimb4v9FljA7WzH0CVK6FGXEr1BwPTiAbNdFHtozhaI3xCTffAcWomL4ELVJQQJvqc8Sq4QMUJYTYR2v0IDlNxQhRBuGx8QRVmZ+lO5NguCPIbcBjm8Fn+RNDqaI7HSJlNQ3M9waKCEHgP2xg11nDLC9WBXASfgMtx1ru49gJxgWPHEoJKngefMJZs2kNPFObaG0Jc4NjxhGDezG0mH918E2XRXlG6COUcx4wnhAFj4AMK4fBB+Cd7zkPqIxwz1jQc4eIZgCrwiumt9ZGFq6oOURttAUWqQsZpjh2rRkSzQ2dJjQJ4wFgy3jpfVXWCRNgCiiDg/PXp/nMcW36oTuBPtLkdHGI8GW+XKNavUJBGZdXSvo5ehc6LtXadGOpPTnBt2UKQTzVMD+SYEHS/duqEH175rPjX3mYZiOwsOXuuoSnc1C9ogEN8WyYUo/ocKgyKTfVybdlCRLK5QfLqxqFCoGc9GenuZ4f2lKbhNAl9DyoEqg1HVezV4hEouqBC0NBQWrepJEQ00/cR9cS+8DJXY7lZ5AdUrlFsGjQRBXEI/M8BRXv1UJ0mFzq88jKZzOKfM2+CIspCFN1twLfBryC+se7j46wZ56XYct2mtjfWLoX1kxzb/0sCU8HtNL+vA2eZ0mcLtVakWwnbPuxoIt4hhPY0+Aga3vdF07kOsIHtcH6VgBdoNwW+AX+xK4KJbSGK01sJe8APUPsThtwFJVBSgifW3ddFI0gaPEe8XOp67JIzXXJ65glyYNjzfufBXnL0noUSKVkIc6gKLS62ejMhw+/1WWPbsqNXGo7kPquPDp6mHvshEkN5/C6BP4RxscXOULkSjiWBY+ncMdrtgDJAfeOkJmXLsnPnDI5mw2vSfZ8INB6gDnQG3ALxDErtXpVYAwfHlwVEM/keCgY0mw8MToPwFYilzeYiM3AYV9ZHmM1EnzPuAKcCOdQWKDTfEZ0Ix2PpQVbCRhXX0/0Utn+SwvavU8T6arDHCAVhd0fSuc/ARcqy7mFsZ0MdaPpbVFyz0oWIB8OFC8+sOXLsPLhMWReAUCY7QUW+SIfrVzVE6BGisD+aHmCH40vFk5Uw44n4Iyi0p+iw9e/fzPQcxUSzAuVrse7+YSgzni4JmtzScJ28JrSV3ML52ET4fdHTw1rU4QY+WxvlHcH/NSwCISwCISwCISz+AgAA//8/kCtoAAAABklEQVQDAIko0UD+kjBJAAAAAElFTkSuQmCC",
                          "safety-shield-v1": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGtUlEQVR4nOyaa2wUVRTHz5nZbWlBaXeLH9SofNGCkIghwUBbSsQHBsEulgRIBGLkER4GY4C2aBpDu1RD0FZFwAh8ICoru1SJxoTE2hYwKlEjLxsQX0SM+0Ab2C3dudczC8Wd2e32zuzMQkp/X2b3zn2c/9xzz8x9OOAmwwE3GUOCBztDgu2muGZ2uQzyQvW3AsruiLe1A3IIQi5YNSPfNWLYfAlwFbU4QXOPw3ccoTnUHX0fWj7rAZuxVXDJ2lm3c1leQT+XI2Jxpryc8whdtsbijpaLr/nOg03YIri4rqpM5rCaA1QhoKFhw4HHySi/gtASaQh0gsVYKthVU7UYEV4gkePAAkj8MTJxc6jRvwssImvBfW5LQpdQdSWZc/Mg57BdddsC7JHMlMvW3U0LNuS2mQJTpoCWUk327m5MsHHjAmRcs6hxlj3EDAgLdq2bc78k80/o5+jMOcn9AHcAXn4r1HDgHJjAXTfzDuB5KxD4cwO7O5wFKT4juPHjn0AAYcHuWs9Oyryo3wx2vE9FPYrzHUFvYAkIIPzKQM5HA6Z7PnyvwrE54vUfAquhBxcG2Em/dhbVeSocnK8kS6rT5LwXBDH9aUlR8xRIl6ebdVujXGjwt9OlPeHuLO8gPftSMIEEJqHx9VeuxCajtqm2DSYZmi0NdoYED3ZuOMHF62beJaFjFpd5a7ih9XewGNNR2g6Ka6vGyVLetyhJLRKTj7rWeu4Ei7lhBJdsmHWfDPAFve9GJRLoKslQDxZzQ7i0KhaY3Cnw3Zw1172H1UkJV+RDerG05BNiynXsYZqyKbov6X4flmjgcdXMHovAvqT1Lreusb85k6aFX933Rz9FJdDZBoKI9zDiP7pGitJlU8VqAg/1YLp8ajqC1K4Xm+hZhtPCTfuOQz/QrEy/IHgBBBEWjBzC2gR0pa1Qcr6iDTysLTFGk1D/q+kpPUtzaZSVKZnEXqkW3Lr/IRBEWDBDrhFMD8AlVpLGJgWkPtH9BygeBEkpE5nI0wKD1itQ1xkZEO9hwIguoUCdoOvzcYm9RO6uM4DEKY4OV43nafWaIpbGLONsqojYUfXVI6hH87Sm2NDDHFmXPq3olvwx+jQ1SHEFK64urCdbNUpC8F1z9/9rDoIcLw97W0+AACymjEm1DbpAEGHBvQzbUgpzqTJdXnUMMsam0kJexmBy5dUjVYquR6mgxCv1ab1Oh/D+lLDgbm8gRK76q6ZxTG28j0hT649MYRWp7n0V9dUDrGKgAJVaDit1CWf+rfdZP4ZVaF3rsPY/PA71Txb2l18Vnda9DbpxH7TofwuVfVhTE8fDRuowJJgjHtEkIOa7Y85Fmcok3Buhgizrumphl1E3vta+LC9W29SmsiNgAGOC4xAgF2WaROTLBioXaQwcC+Y7xgNj89WrYTfua0pdrk22hyzq6cV9YADDWy20Pv0RFZqjaRjZpFDD/q/BRoprPFNkBN0OBv8g2BiYBwYwPHlAxt5MTcMmsBkS26hPYxyawSCGBQc37W+jIKQNNoiVJeurFoBNkFctokuFNpV/H/YGDI1fFXPTQ47PpybBG8XrqkeCxdxaX+2iwfq6Pp12O1aCCUwJDm3yH6Re3p2cpk4EJDnuoxmsdXNsqsvZo3xIuwzaB0l7SWa3dkwbx/Njq0G3A0BR9BF3T9W7YBFU13skdrqmXYBzwd6La8AkMpgk2na6J7+89Djt7GnGLvX0hIKyMdFo58msNtfcNZ4NVFeKMJopzY02HTgJJjEtWCXWcer0sLLSbjLsMe0dPn14xVi81HGyDYyDFKQaqWdf1t+gqLwm7PXvgSyw5FAL9cbbZOByfTp9GLSGoo55sMUXFaroxUeHlzhH7CWrnkhzd3uw0b8UssSqUzzUK1Wfq2M45Q6H0zRHXjDQh4mrbvZkZNIe8pZ70tTxadDrn5n4lSVZuXQy0QdG7y3Md9CqBmrXsFBdGcFnh5eXFl2aOL4dvjoR19xfU13gnla6BTm+k/7wGvcFQ7/NhaN/Ci/UZcLyg2nU03XU0xvT3uRwngHfehkcW6E3jsOcoJ7SW0aR7raUrARdakPewCawEFtO4pWsf6qSS9IuqvxuMMdZhSsL7Th4aplLJ3Op89Qv0YnjthU6WSG9Riah4IOlPlUo+G0Jdkc9sc0HfgYbsP00ravO85DE6KsMMePBk8SZEQ7P0FfcN2AjuTk+XF/pcMVcc1CC1dTgZO1N3skYNIfPOPzg81kSmDKRG8FJjKz1POgEWKq6r8L4tgtNgR8gh+Rc8PVm6MjDYGdI8GDnPwAAAP//Q/PBygAAAAZJREFUAwBNHsTsz47Z7QAAAABJRU5ErkJggg=="
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Shows a wording, saved or not, as its recipient gets it."
      }
    },
    "/batches/{id}/duplicate": {
      "post": {
        "tags": [
          "Batches"
        ],
        "operationId": "duplicateBatch",
        "summary": "Duplicate a batch",
        "parameters": [
          {
            "$ref": "#/components/parameters/batchId"
          }
        ],
        "responses": {
          "201": {
            "description": "The new draft.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Batch"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "bat_01M6R27TAZJQCTVN3NPC630T21",
                      "object": "batch",
                      "name": "November notices, first run (copy)",
                      "status": "draft",
                      "sending_mode": "on_finalize",
                      "follow_up_policy_id": null,
                      "allow_policy_override": true,
                      "follow_ups_paused": false,
                      "scheduled_at": null,
                      "send_window": {
                        "tz": "Atlantic/Reykjavik",
                        "end": "21:00",
                        "start": "09:00"
                      },
                      "defaults": {},
                      "files": [],
                      "accepting_deliveries": true,
                      "counts": {
                        "total": 0,
                        "delivered": 0,
                        "in_progress": 0,
                        "ended": 0
                      },
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "via": "api_key"
                      },
                      "livemode": false,
                      "created": "2026-11-06T09:15:05.951Z",
                      "sent_out_at": null,
                      "following_up_at": null,
                      "completed_at": null,
                      "cancelled_at": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Makes a new draft batch with the same settings and no deliveries."
      }
    },
    "/billing/prices": {
      "get": {
        "summary": "Get the price list",
        "operationId": "getPriceList",
        "tags": [
          "Billing"
        ],
        "description": "The public self-serve prices on a date (default today), excluding VAT: the three self-serve doors (pay as you go, plans 500 / 1,000 / 5,000) and the per-use prices that are the same on every plan. Enterprise levels are contract data and never listed. Any signed-in member or API key may read it. `price_list_not_found` (404) when no list is in effect for the currency on that date (there is no EUR list yet).",
        "parameters": [
          {
            "name": "currency",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ISK",
                "EUR"
              ],
              "default": "ISK"
            }
          },
          {
            "name": "on",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            },
            "description": "YYYY-MM-DD; default today (UTC = Iceland)."
          }
        ],
        "responses": {
          "200": {
            "description": "The price list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PriceList"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "object": "price_list",
                      "currency": "ISK",
                      "on": "2026-11-06",
                      "prices_exclude_vat": true,
                      "vat_percent": 24,
                      "plans": [
                        {
                          "plan": "payg",
                          "door": 1,
                          "rails": [
                            "card"
                          ],
                          "monthly_fee": null,
                          "included_deliveries": null,
                          "delivery_price": 311,
                          "request_price": 311
                        },
                        {
                          "plan": "p500",
                          "door": 2,
                          "rails": [
                            "card",
                            "bank_claim"
                          ],
                          "monthly_fee": 143500,
                          "included_deliveries": 500,
                          "delivery_price": 287,
                          "request_price": 287
                        },
                        {
                          "plan": "p1000",
                          "door": 2,
                          "rails": [
                            "card",
                            "bank_claim"
                          ],
                          "monthly_fee": 263000,
                          "included_deliveries": 1000,
                          "delivery_price": 263,
                          "request_price": 263
                        },
                        {
                          "plan": "p5000",
                          "door": 2,
                          "rails": [
                            "card",
                            "bank_claim"
                          ],
                          "monthly_fee": 1200000,
                          "included_deliveries": 5000,
                          "delivery_price": 240,
                          "request_price": 240
                        }
                      ],
                      "per_use": [
                        {
                          "product": "PS-SECRET",
                          "unit_amount": 39
                        },
                        {
                          "product": "PS-QUAL",
                          "unit_amount": 340
                        },
                        {
                          "product": "PS-EID",
                          "unit_amount": 29
                        },
                        {
                          "product": "PS-SMS-IS",
                          "unit_amount": 25
                        },
                        {
                          "product": "PS-VIDEO",
                          "unit_amount": 215
                        }
                      ],
                      "sms_international": [
                        {
                          "country": "AD",
                          "unit_amount": 50
                        },
                        {
                          "country": "AG",
                          "unit_amount": 50
                        },
                        {
                          "country": "AI",
                          "unit_amount": 25
                        },
                        {
                          "country": "AL",
                          "unit_amount": 50
                        },
                        {
                          "country": "AO",
                          "unit_amount": 25
                        },
                        {
                          "country": "AT",
                          "unit_amount": 50
                        },
                        {
                          "country": "BG",
                          "unit_amount": 50
                        },
                        {
                          "country": "BH",
                          "unit_amount": 25
                        },
                        {
                          "country": "BN",
                          "unit_amount": 25
                        },
                        {
                          "country": "BO",
                          "unit_amount": 50
                        },
                        {
                          "country": "BW",
                          "unit_amount": 50
                        },
                        {
                          "country": "CH",
                          "unit_amount": 25
                        },
                        {
                          "country": "CK",
                          "unit_amount": 50
                        },
                        {
                          "country": "CV",
                          "unit_amount": 50
                        },
                        {
                          "country": "CY",
                          "unit_amount": 25
                        },
                        {
                          "country": "CZ",
                          "unit_amount": 25
                        },
                        {
                          "country": "DE",
                          "unit_amount": 50
                        },
                        {
                          "country": "DJ",
                          "unit_amount": 50
                        },
                        {
                          "country": "DK",
                          "unit_amount": 25
                        },
                        {
                          "country": "EE",
                          "unit_amount": 25
                        },
                        {
                          "country": "ER",
                          "unit_amount": 50
                        },
                        {
                          "country": "FI",
                          "unit_amount": 50
                        },
                        {
                          "country": "FO",
                          "unit_amount": 25
                        },
                        {
                          "country": "FR",
                          "unit_amount": 25
                        },
                        {
                          "country": "GE",
                          "unit_amount": 50
                        },
                        {
                          "country": "GF",
                          "unit_amount": 50
                        },
                        {
                          "country": "GG",
                          "unit_amount": 25
                        },
                        {
                          "country": "GI",
                          "unit_amount": 25
                        },
                        {
                          "country": "GL",
                          "unit_amount": 25
                        },
                        {
                          "country": "GP",
                          "unit_amount": 50
                        },
                        {
                          "country": "GR",
                          "unit_amount": 25
                        },
                        {
                          "country": "GY",
                          "unit_amount": 50
                        },
                        {
                          "country": "HK",
                          "unit_amount": 25
                        },
                        {
                          "country": "HR",
                          "unit_amount": 50
                        },
                        {
                          "country": "IM",
                          "unit_amount": 25
                        },
                        {
                          "country": "IT",
                          "unit_amount": 25
                        },
                        {
                          "country": "JE",
                          "unit_amount": 25
                        },
                        {
                          "country": "JM",
                          "unit_amount": 50
                        },
                        {
                          "country": "JP",
                          "unit_amount": 25
                        },
                        {
                          "country": "LI",
                          "unit_amount": 25
                        },
                        {
                          "country": "LT",
                          "unit_amount": 25
                        },
                        {
                          "country": "LU",
                          "unit_amount": 25
                        },
                        {
                          "country": "LV",
                          "unit_amount": 25
                        },
                        {
                          "country": "MD",
                          "unit_amount": 50
                        },
                        {
                          "country": "ME",
                          "unit_amount": 50
                        },
                        {
                          "country": "MK",
                          "unit_amount": 25
                        },
                        {
                          "country": "MO",
                          "unit_amount": 25
                        },
                        {
                          "country": "MQ",
                          "unit_amount": 50
                        },
                        {
                          "country": "MS",
                          "unit_amount": 25
                        },
                        {
                          "country": "MT",
                          "unit_amount": 25
                        },
                        {
                          "country": "MU",
                          "unit_amount": 50
                        },
                        {
                          "country": "MX",
                          "unit_amount": 25
                        },
                        {
                          "country": "NA",
                          "unit_amount": 25
                        },
                        {
                          "country": "NC",
                          "unit_amount": 50
                        },
                        {
                          "country": "NF",
                          "unit_amount": 25
                        },
                        {
                          "country": "NL",
                          "unit_amount": 50
                        },
                        {
                          "country": "NO",
                          "unit_amount": 25
                        },
                        {
                          "country": "NU",
                          "unit_amount": 50
                        },
                        {
                          "country": "PA",
                          "unit_amount": 50
                        },
                        {
                          "country": "PF",
                          "unit_amount": 50
                        },
                        {
                          "country": "PL",
                          "unit_amount": 25
                        },
                        {
                          "country": "PT",
                          "unit_amount": 25
                        },
                        {
                          "country": "PW",
                          "unit_amount": 25
                        },
                        {
                          "country": "RE",
                          "unit_amount": 50
                        },
                        {
                          "country": "RO",
                          "unit_amount": 25
                        },
                        {
                          "country": "SB",
                          "unit_amount": 25
                        },
                        {
                          "country": "SE",
                          "unit_amount": 25
                        },
                        {
                          "country": "SI",
                          "unit_amount": 50
                        },
                        {
                          "country": "SK",
                          "unit_amount": 25
                        },
                        {
                          "country": "SM",
                          "unit_amount": 50
                        },
                        {
                          "country": "SR",
                          "unit_amount": 50
                        },
                        {
                          "country": "ST",
                          "unit_amount": 50
                        },
                        {
                          "country": "TL",
                          "unit_amount": 50
                        },
                        {
                          "country": "TO",
                          "unit_amount": 50
                        },
                        {
                          "country": "TV",
                          "unit_amount": 25
                        },
                        {
                          "country": "UA",
                          "unit_amount": 50
                        },
                        {
                          "country": "VU",
                          "unit_amount": 50
                        },
                        {
                          "country": "WS",
                          "unit_amount": 50
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/brand_profiles/preview": {
      "post": {
        "operationId": "previewBrandProfile",
        "summary": "Preview a brand profile",
        "description": "Shows a draft brand profile as it would be sent and seen, with a sample delivery that says it is one: the notice e-mail and the recipient page's content. Every field is checked as POST /brand_profiles checks it, with the same errors, except that colours that fail the contrast check are drawn anyway and the refusal a save would give is in `contrast_error`. Logos and photos must be your organisation's and of the right kind (400 `brand_asset_reference_invalid`). No `Idempotency-Key` is needed.",
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "description": "The sample delivery's language, which sets the language of the e-mail and the page.",
            "schema": {
              "type": "string",
              "enum": [
                "is",
                "en"
              ],
              "default": "is"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BrandProfilePreviewRequest"
              },
              "examples": {
                "Preview a profile before saving it": {
                  "summary": "Preview a profile before saving it",
                  "value": {
                    "sender_display_name": "Fyrirtæki ehf.",
                    "primary_color": "#1E5BB8"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The draft, drawn.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandProfilePreview"
                },
                "examples": {
                  "Preview a profile before saving it": {
                    "summary": "Preview a profile before saving it",
                    "value": {
                      "object": "brand_profile_preview",
                      "locale": "is",
                      "contrasts": {
                        "button_text_on_primary": 6.47,
                        "links_on_card": 6.47,
                        "text_on_card": 18.19,
                        "secondary_text_on_card": 5.98,
                        "header_text_on_header": 6.47
                      },
                      "contrast_error": null,
                      "email": {
                        "template": "invitation.email",
                        "version": 29,
                        "from_name": "Sending frá: Fyrirtæki ehf.",
                        "subject": "Sýnishorn af sendingu",
                        "html": "<!doctype html><html lang=\"is\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><meta name=\"color-scheme\" content=\"light\"><title>Sýnishorn af sendingu</title></head><body style=\"margin:0;padding:0;background:#F5F6FA;\"><div style=\"display:none;max-height:0;overflow:hidden;\">Opnaðu sendinguna og staðfestu móttöku. Aðgengileg til 20. nóvember 2026.</div><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#F5F6FA;\"><tr><td align=\"center\" style=\"padding:20px 12px;\"><table role=\"presentation\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%;max-width:600px;\"><tr><td style=\"background:#FFFFFF;border:1px solid #E6E9F2;border-radius:12px;\"><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td bgcolor=\"#1E5BB8\" style=\"background:#1E5BB8;border-radius:12px 12px 0 0;padding:16px 28px;\"><table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"34\" height=\"34\" align=\"center\" valign=\"middle\" bgcolor=\"#FFFFFF\" style=\"width:34px;height:34px;background:#FFFFFF;border-radius:8px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:13px;font-weight:700;letter-spacing:0.02em;color:#1E5BB8;text-align:center;vertical-align:middle;\">F</td><td style=\"padding-left:10px;vertical-align:middle;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:17px;font-weight:600;letter-spacing:-0.01em;line-height:1.25;color:#FFFFFF;\">Fyrirtæki ehf.</td></tr></table></td></tr><tr><td style=\"padding:32px 36px 28px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;color:#0E1526;\"><p style=\"margin:0;font-size:13px;font-weight:600;color:#147A52;\">Rekjanleg rafræn afhendingarþjónusta</p><h1 style=\"margin:8px 0 20px;font-size:24px;line-height:1.3;font-weight:700;color:#0E1526;\">Fyrirtæki ehf. hefur sent þér 1 skjal með Parasend</h1><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"border:1px solid #E6E9F2;border-radius:12px;\"><tr><td style=\"padding:14px 16px;\"><p style=\"margin:0;font-size:16px;font-weight:600;\">Sýnishorn af sendingu</p><p style=\"margin:0;font-size:14px;color:#5B6472;padding-top:4px;\">1 skjal · aðgengilegt til 20. nóvember 2026</p></td></tr></table><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-top:16px;background:#EEF0F7;border-radius:12px;\"><tr><td style=\"padding:14px 16px;\"><p style=\"margin:0;font-size:12px;font-weight:600;color:#5B6472;\">Skilaboð frá sendanda</p><p style=\"margin:0;font-size:15px;line-height:1.55;color:#202C49;padding-top:4px;\">Þetta er sýnishorn. Svona birtist sendingin viðtakanda.</p></td></tr></table><table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-top:22px;\"><tr><td align=\"center\" bgcolor=\"#1E5BB8\" style=\"background:#1E5BB8;border-radius:12px;\"><a href=\"https://parasend.com/d/synishorn\" style=\"display:block;padding:15px 20px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:16px;font-weight:600;color:#FFFFFF;text-decoration:none;\">Opna sendinguna</a></td></tr></table><p style=\"margin:0;font-size:14px;color:#5B6472;text-align:center;padding-top:10px;\">Þú staðfestir móttöku með rafrænum skilríkjum. Það tekur innan við mínútu.</p><p style=\"margin:0;font-size:13px;line-height:1.6;color:#5B6472;padding-top:20px;\">Virkar hnappurinn ekki? Opnaðu þennan hlekk í vafra:<br><a href=\"https://parasend.com/d/synishorn\" style=\"color:#1E5BB8;word-break:break-all;\">https://parasend.com/d/synishorn</a></p></td></tr></table></td></tr><tr><td style=\"height:16px;line-height:16px;font-size:0;\">&nbsp;</td></tr><tr><td style=\"background:#ECEEF4;border-radius:12px;padding:18px 24px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:13px;line-height:1.6;color:#5B6472;\"><table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\"><tr><td style=\"padding:1px 12px 0 0;vertical-align:top;\"><img src=\"cid:safety-shield-v1\" width=\"20\" height=\"20\" alt=\"\" style=\"display:block;border:0;width:20px;height:20px;max-width:20px;\"></td><td style=\"vertical-align:top;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:13px;line-height:1.6;color:#5B6472;\"><b style=\"color:#202C49;\">Er þetta öruggt?</b> Parasend biður þig aldrei um lykilorð eða kortaupplýsingar. Móttaka sendingarinnar er skráð.</td></tr></table><p lang=\"en\" style=\"margin:0;padding:12px 0 0 32px;\">In English: Fyrirtæki ehf. has sent you 1 document through Parasend, an electronic registered delivery service. Open the delivery with the button above and confirm receipt.</p></td></tr><tr><td style=\"padding:16px 12px;font-family:-apple-system,'Segoe UI',Helvetica,Arial,sans-serif;font-size:12px;line-height:1.6;color:#5B6472;text-align:center;\">Þessi tilkynning er frá Parasend. Sendandi: Fyrirtæki ehf.<br>Parasend er rekjanleg rafræn afhendingarþjónusta sem Justikal ehf. rekur, Akralind 3, 201 Kópavogi.<br><a href=\"https://parasend.com/legal/privacy\" style=\"color:#5B6472;text-decoration:underline;\">Persónuvernd</a></td></tr></table></td></tr></table></body></html>",
                        "text": "Fyrirtæki ehf. hefur sent þér 1 skjal með Parasend.\n\nSýnishorn af sendingu\n1 skjal · aðgengilegt til 20. nóvember 2026\n\nSkilaboð frá sendanda:\nÞetta er sýnishorn. Svona birtist sendingin viðtakanda.\n\nOpna sendinguna: https://parasend.com/d/synishorn\nÞú staðfestir móttöku með rafrænum skilríkjum. Það tekur innan við mínútu.\n\nEr þetta öruggt? Parasend biður þig aldrei um lykilorð eða kortaupplýsingar. Móttaka sendingarinnar er skráð.\n\nIn English: Fyrirtæki ehf. has sent you 1 document through Parasend, an electronic registered delivery service. Open the delivery with the button above and confirm receipt.\n\n—\nÞessi tilkynning er frá Parasend. Sendandi: Fyrirtæki ehf.\nParasend er rekjanleg rafræn afhendingarþjónusta sem Justikal ehf. rekur, Akralind 3, 201 Kópavogi.\n",
                        "images": {
                          "safety-shield-v1": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAGtUlEQVR4nOyaa2wUVRTHz5nZbWlBaXeLH9SofNGCkIghwUBbSsQHBsEulgRIBGLkER4GY4C2aBpDu1RD0FZFwAh8ICoru1SJxoTE2hYwKlEjLxsQX0SM+0Ab2C3dudczC8Wd2e32zuzMQkp/X2b3zn2c/9xzz8x9OOAmwwE3GUOCBztDgu2muGZ2uQzyQvW3AsruiLe1A3IIQi5YNSPfNWLYfAlwFbU4QXOPw3ccoTnUHX0fWj7rAZuxVXDJ2lm3c1leQT+XI2Jxpryc8whdtsbijpaLr/nOg03YIri4rqpM5rCaA1QhoKFhw4HHySi/gtASaQh0gsVYKthVU7UYEV4gkePAAkj8MTJxc6jRvwssImvBfW5LQpdQdSWZc/Mg57BdddsC7JHMlMvW3U0LNuS2mQJTpoCWUk327m5MsHHjAmRcs6hxlj3EDAgLdq2bc78k80/o5+jMOcn9AHcAXn4r1HDgHJjAXTfzDuB5KxD4cwO7O5wFKT4juPHjn0AAYcHuWs9Oyryo3wx2vE9FPYrzHUFvYAkIIPzKQM5HA6Z7PnyvwrE54vUfAquhBxcG2Em/dhbVeSocnK8kS6rT5LwXBDH9aUlR8xRIl6ebdVujXGjwt9OlPeHuLO8gPftSMIEEJqHx9VeuxCajtqm2DSYZmi0NdoYED3ZuOMHF62beJaFjFpd5a7ih9XewGNNR2g6Ka6vGyVLetyhJLRKTj7rWeu4Ei7lhBJdsmHWfDPAFve9GJRLoKslQDxZzQ7i0KhaY3Cnw3Zw1172H1UkJV+RDerG05BNiynXsYZqyKbov6X4flmjgcdXMHovAvqT1Lreusb85k6aFX933Rz9FJdDZBoKI9zDiP7pGitJlU8VqAg/1YLp8ajqC1K4Xm+hZhtPCTfuOQz/QrEy/IHgBBBEWjBzC2gR0pa1Qcr6iDTysLTFGk1D/q+kpPUtzaZSVKZnEXqkW3Lr/IRBEWDBDrhFMD8AlVpLGJgWkPtH9BygeBEkpE5nI0wKD1itQ1xkZEO9hwIguoUCdoOvzcYm9RO6uM4DEKY4OV43nafWaIpbGLONsqojYUfXVI6hH87Sm2NDDHFmXPq3olvwx+jQ1SHEFK64urCdbNUpC8F1z9/9rDoIcLw97W0+AACymjEm1DbpAEGHBvQzbUgpzqTJdXnUMMsam0kJexmBy5dUjVYquR6mgxCv1ab1Oh/D+lLDgbm8gRK76q6ZxTG28j0hT649MYRWp7n0V9dUDrGKgAJVaDit1CWf+rfdZP4ZVaF3rsPY/PA71Txb2l18Vnda9DbpxH7TofwuVfVhTE8fDRuowJJgjHtEkIOa7Y85Fmcok3Buhgizrumphl1E3vta+LC9W29SmsiNgAGOC4xAgF2WaROTLBioXaQwcC+Y7xgNj89WrYTfua0pdrk22hyzq6cV9YADDWy20Pv0RFZqjaRjZpFDD/q/BRoprPFNkBN0OBv8g2BiYBwYwPHlAxt5MTcMmsBkS26hPYxyawSCGBQc37W+jIKQNNoiVJeurFoBNkFctokuFNpV/H/YGDI1fFXPTQ47PpybBG8XrqkeCxdxaX+2iwfq6Pp12O1aCCUwJDm3yH6Re3p2cpk4EJDnuoxmsdXNsqsvZo3xIuwzaB0l7SWa3dkwbx/Njq0G3A0BR9BF3T9W7YBFU13skdrqmXYBzwd6La8AkMpgk2na6J7+89Djt7GnGLvX0hIKyMdFo58msNtfcNZ4NVFeKMJopzY02HTgJJjEtWCXWcer0sLLSbjLsMe0dPn14xVi81HGyDYyDFKQaqWdf1t+gqLwm7PXvgSyw5FAL9cbbZOByfTp9GLSGoo55sMUXFaroxUeHlzhH7CWrnkhzd3uw0b8UssSqUzzUK1Wfq2M45Q6H0zRHXjDQh4mrbvZkZNIe8pZ70tTxadDrn5n4lSVZuXQy0QdG7y3Md9CqBmrXsFBdGcFnh5eXFl2aOL4dvjoR19xfU13gnla6BTm+k/7wGvcFQ7/NhaN/Ci/UZcLyg2nU03XU0xvT3uRwngHfehkcW6E3jsOcoJ7SW0aR7raUrARdakPewCawEFtO4pWsf6qSS9IuqvxuMMdZhSsL7Th4aplLJ3Op89Qv0YnjthU6WSG9Riah4IOlPlUo+G0Jdkc9sc0HfgYbsP00ravO85DE6KsMMePBk8SZEQ7P0FfcN2AjuTk+XF/pcMVcc1CC1dTgZO1N3skYNIfPOPzg81kSmDKRG8FJjKz1POgEWKq6r8L4tgtNgR8gh+Rc8PVm6MjDYGdI8GDnPwAAAP//Q/PBygAAAAZJREFUAwBNHsTsz47Z7QAAAABJRU5ErkJggg=="
                        }
                      },
                      "recipient": {
                        "landing": {
                          "delivery_session": null,
                          "state": "link_opened",
                          "attempts_remaining": 5,
                          "certificate_url": null,
                          "passkey_offer": false,
                          "identified_as": null,
                          "delivery": {
                            "title": "Sýnishorn af sendingu",
                            "message": "Þetta er sýnishorn. Svona birtist sendingin viðtakanda.",
                            "language": "is",
                            "sender_display_name": "Fyrirtæki ehf.",
                            "sender_unverified": false,
                            "file_count": 1,
                            "total_bytes": 245760,
                            "files": [
                              {
                                "name": "Synishorn.pdf",
                                "path": "Synishorn.pdf",
                                "bytes": 245760,
                                "download_url": null
                              }
                            ],
                            "zip_download_url": null,
                            "content_type": "files",
                            "expires_at": "2026-11-20T09:15:05.878Z",
                            "auth_methods_offered": [
                              "audkenni",
                              "smart_id",
                              "passkey"
                            ],
                            "brand": {
                              "name": "Parasend",
                              "powered_by": "Parasend · by Justikal",
                              "profile": {
                                "version_id": null,
                                "sender_display_name": "Fyrirtæki ehf.",
                                "header_style": "band",
                                "primary_color": "#1E5BB8",
                                "monogram": "F",
                                "logo": null,
                                "icon": null,
                                "support": null,
                                "expired_message": {
                                  "is": null,
                                  "en": null
                                },
                                "theme": {
                                  "colors": {
                                    "page_background": "#F5F6FA",
                                    "card_background": "#FFFFFF",
                                    "text": "#0E1526",
                                    "secondary_text": "#5B6472",
                                    "primary": "#1E5BB8",
                                    "button_background": "#1E5BB8",
                                    "button_text": "#FFFFFF",
                                    "header_background": "#1E5BB8",
                                    "header_text": "#FFFFFF",
                                    "divider": "#E6E9F2"
                                  },
                                  "button_radius": 12,
                                  "card_radius": 14,
                                  "card_shadow": true,
                                  "font": "inter",
                                  "logo_height": null,
                                  "header_align": "left",
                                  "logo_background": "tile",
                                  "show_name_with_logo": false,
                                  "show_safety_note": true,
                                  "show_support_line": true,
                                  "show_sender_line": true,
                                  "card_footer": "default",
                                  "card_footer_text": {
                                    "is": null,
                                    "en": null
                                  },
                                  "layout": "card",
                                  "page_image": null
                                }
                              }
                            },
                            "consent_prompt_eligible": false
                          }
                        },
                        "unlocked": {
                          "delivery_session": null,
                          "state": "unlocked",
                          "attempts_remaining": null,
                          "certificate_url": "/v1/recipient/evidence/document",
                          "passkey_offer": false,
                          "identified_as": null,
                          "delivery": {
                            "title": "Sýnishorn af sendingu",
                            "message": "Þetta er sýnishorn. Svona birtist sendingin viðtakanda.",
                            "language": "is",
                            "sender_display_name": "Fyrirtæki ehf.",
                            "sender_unverified": false,
                            "file_count": 1,
                            "total_bytes": 245760,
                            "files": [
                              {
                                "name": "Synishorn.pdf",
                                "path": "Synishorn.pdf",
                                "bytes": 245760,
                                "download_url": "/v1/recipient/files/sample/content"
                              }
                            ],
                            "zip_download_url": null,
                            "content_type": "files",
                            "expires_at": "2026-11-20T09:15:05.878Z",
                            "auth_methods_offered": [
                              "audkenni",
                              "smart_id",
                              "passkey"
                            ],
                            "brand": {
                              "name": "Parasend",
                              "powered_by": "Parasend · by Justikal",
                              "profile": {
                                "version_id": null,
                                "sender_display_name": "Fyrirtæki ehf.",
                                "header_style": "band",
                                "primary_color": "#1E5BB8",
                                "monogram": "F",
                                "logo": null,
                                "icon": null,
                                "support": null,
                                "expired_message": {
                                  "is": null,
                                  "en": null
                                },
                                "theme": {
                                  "colors": {
                                    "page_background": "#F5F6FA",
                                    "card_background": "#FFFFFF",
                                    "text": "#0E1526",
                                    "secondary_text": "#5B6472",
                                    "primary": "#1E5BB8",
                                    "button_background": "#1E5BB8",
                                    "button_text": "#FFFFFF",
                                    "header_background": "#1E5BB8",
                                    "header_text": "#FFFFFF",
                                    "divider": "#E6E9F2"
                                  },
                                  "button_radius": 12,
                                  "card_radius": 14,
                                  "card_shadow": true,
                                  "font": "inter",
                                  "logo_height": null,
                                  "header_align": "left",
                                  "logo_background": "tile",
                                  "show_name_with_logo": false,
                                  "show_safety_note": true,
                                  "show_support_line": true,
                                  "show_sender_line": true,
                                  "card_footer": "default",
                                  "card_footer_text": {
                                    "is": null,
                                    "en": null
                                  },
                                  "layout": "card",
                                  "page_image": null
                                }
                              }
                            },
                            "consent_prompt_eligible": false
                          }
                        },
                        "expired": {
                          "error": {
                            "type": "authentication_error",
                            "code": "delivery_link_expired",
                            "message": "This delivery link has expired.",
                            "request_id": "req_848634cb0db0007a19364368",
                            "brand": {
                              "name": "Parasend",
                              "powered_by": "Parasend · by Justikal",
                              "profile": {
                                "version_id": null,
                                "sender_display_name": "Fyrirtæki ehf.",
                                "header_style": "band",
                                "primary_color": "#1E5BB8",
                                "monogram": "F",
                                "logo": null,
                                "icon": null,
                                "support": null,
                                "expired_message": {
                                  "is": null,
                                  "en": null
                                },
                                "theme": {
                                  "colors": {
                                    "page_background": "#F5F6FA",
                                    "card_background": "#FFFFFF",
                                    "text": "#0E1526",
                                    "secondary_text": "#5B6472",
                                    "primary": "#1E5BB8",
                                    "button_background": "#1E5BB8",
                                    "button_text": "#FFFFFF",
                                    "header_background": "#1E5BB8",
                                    "header_text": "#FFFFFF",
                                    "divider": "#E6E9F2"
                                  },
                                  "button_radius": 12,
                                  "card_radius": 14,
                                  "card_shadow": true,
                                  "font": "inter",
                                  "logo_height": null,
                                  "header_align": "left",
                                  "logo_background": "tile",
                                  "show_name_with_logo": false,
                                  "show_safety_note": true,
                                  "show_support_line": true,
                                  "show_sender_line": true,
                                  "card_footer": "default",
                                  "card_footer_text": {
                                    "is": null,
                                    "en": null
                                  },
                                  "layout": "card",
                                  "page_image": null
                                }
                              }
                            }
                          }
                        },
                        "assets": {}
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/brand_profiles/{id}/versions": {
      "get": {
        "tags": [
          "Brand profiles"
        ],
        "operationId": "listBrandProfileVersions",
        "summary": "List a brand profile's versions",
        "description": "Every version, newest first. Versions never change once written.",
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Page"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BrandProfileVersion"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "data": [
                        {
                          "id": "bpv_01M6R27T8GSQN2QTAEXT32YPMY",
                          "object": "brand_profile_version",
                          "profile_id": "bp_01M6R27T817SW9MENZEV3KSZZX",
                          "version": 2,
                          "sender_display_name": "Fyrirtæki ehf.",
                          "sender_display_name_dative": null,
                          "logo": {
                            "asset_id": "bas_01M6R27T7R9RDBHE6X72ZRW3YC",
                            "url": "/v1/brand_assets/bas_01M6R27T7R9RDBHE6X72ZRW3YC/content",
                            "sha256": "f72bdd36e6ce104c53c8f21bd9e618e113a66f4d6729d43a4cb07b3f1373addb",
                            "width": 200,
                            "height": 48
                          },
                          "monogram": "F",
                          "sms_sender_name": null,
                          "icon": null,
                          "primary_color": "#0E5A8A",
                          "contrast_ratio": 7.37,
                          "header_style": "band",
                          "support": {
                            "email": null,
                            "phone": null,
                            "url": null
                          },
                          "expired_message": {
                            "is": null,
                            "en": null
                          },
                          "reply_to": null,
                          "recipient_domain_id": null,
                          "email_sender_id": null,
                          "theme": {
                            "colors": {
                              "page_background": null,
                              "card_background": null,
                              "text": null,
                              "secondary_text": null,
                              "button_background": null,
                              "button_text": null,
                              "header_background": null,
                              "header_text": null,
                              "divider": null
                            },
                            "button_radius": null,
                            "card_radius": null,
                            "card_shadow": null,
                            "font": null,
                            "logo_height": null,
                            "header_align": null,
                            "show_safety_note": null,
                            "show_support_line": null,
                            "show_sender_line": null,
                            "card_footer": null,
                            "card_footer_text": {
                              "is": null,
                              "en": null
                            },
                            "layout": null,
                            "page_image_asset_id": null,
                            "logo_background": "tile",
                            "show_name_with_logo": null,
                            "show_service_label": null
                          },
                          "contrasts": {
                            "text_on_card": 18.19,
                            "links_on_card": 7.37,
                            "header_text_on_header": 7.37,
                            "button_text_on_primary": 7.37,
                            "secondary_text_on_card": 5.98
                          },
                          "created_at": "2026-11-06T09:15:05.871Z",
                          "created_by": {
                            "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                            "via": "api_key"
                          }
                        },
                        {
                          "id": "bpv_01M6R27T82QZMJ98K4RGVQBRF0",
                          "object": "brand_profile_version",
                          "profile_id": "bp_01M6R27T817SW9MENZEV3KSZZX",
                          "version": 1,
                          "sender_display_name": "Fyrirtæki ehf.",
                          "sender_display_name_dative": null,
                          "logo": {
                            "asset_id": "bas_01M6R27T7R9RDBHE6X72ZRW3YC",
                            "url": "/v1/brand_assets/bas_01M6R27T7R9RDBHE6X72ZRW3YC/content",
                            "sha256": "f72bdd36e6ce104c53c8f21bd9e618e113a66f4d6729d43a4cb07b3f1373addb",
                            "width": 200,
                            "height": 48
                          },
                          "monogram": "F",
                          "sms_sender_name": null,
                          "icon": null,
                          "primary_color": "#1E5BB8",
                          "contrast_ratio": 6.47,
                          "header_style": "band",
                          "support": {
                            "email": null,
                            "phone": null,
                            "url": null
                          },
                          "expired_message": {
                            "is": null,
                            "en": null
                          },
                          "reply_to": null,
                          "recipient_domain_id": null,
                          "email_sender_id": null,
                          "theme": {
                            "colors": {
                              "page_background": null,
                              "card_background": null,
                              "text": null,
                              "secondary_text": null,
                              "button_background": null,
                              "button_text": null,
                              "header_background": null,
                              "header_text": null,
                              "divider": null
                            },
                            "button_radius": null,
                            "card_radius": null,
                            "card_shadow": null,
                            "font": null,
                            "logo_height": null,
                            "header_align": null,
                            "show_safety_note": null,
                            "show_support_line": null,
                            "show_sender_line": null,
                            "card_footer": null,
                            "card_footer_text": {
                              "is": null,
                              "en": null
                            },
                            "layout": null,
                            "page_image_asset_id": null,
                            "logo_background": "tile",
                            "show_name_with_logo": null,
                            "show_service_label": null
                          },
                          "contrasts": {
                            "text_on_card": 18.19,
                            "links_on_card": 6.47,
                            "header_text_on_header": 6.47,
                            "button_text_on_primary": 6.47,
                            "secondary_text_on_card": 5.98
                          },
                          "created_at": "2026-11-06T09:15:05.856Z",
                          "created_by": {
                            "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                            "via": "api_key"
                          }
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The brand profile's ID, starting `bp_`."
        }
      ]
    },
    "/brand_assets": {
      "post": {
        "tags": [
          "Brand profiles"
        ],
        "operationId": "uploadBrandAsset",
        "summary": "Upload a brand asset",
        "description": "Uploads a logo, a page photo or a tab icon; the image is the request body. Needs `brand_profiles.create`.\n\n**Logo** (the default): PNG or SVG, at most 1 MB (413 `logo_too_large`), drawn into a PNG that fits 200 × 48 CSS pixels at 3×, with no metadata. A file that is not what its type says is 415 `logo_type_unsupported`; an unsafe SVG is 400 `logo_svg_unsafe`. The same picture again answers 200 with the logo you already have.\n\n**Photo** (`kind=image`): JPEG, PNG or WebP, at most 5 MB (413 `image_too_large`) and at least 640 × 320 pixels (400 `image_too_small`). It is turned the right way up and drawn into two WebP renditions, at most 1600 and 800 pixels wide, with no metadata; the upload itself is not kept.\n\n**Icon** (`kind=icon`): a square PNG of at least 180 × 180 pixels (400 `icon_too_small`) or a square SVG, at most 1 MB (413 `icon_too_large`), drawn into 180 and 32 pixel PNGs.",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "logo",
                "image",
                "icon"
              ],
              "default": "logo"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "image/png": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "image/svg+xml": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "image/jpeg": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "image/webp": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The organisation already had this logo.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandAsset"
                }
              }
            }
          },
          "201": {
            "description": "Uploaded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandAsset"
                },
                "examples": {
                  "Upload a PNG logo": {
                    "summary": "Upload a PNG logo",
                    "value": {
                      "id": "bas_01M6R27T7R9RDBHE6X72ZRW3YC",
                      "object": "brand_asset",
                      "kind": "logo",
                      "content_type": "image/png",
                      "source_type": "image/png",
                      "sha256": "f72bdd36e6ce104c53c8f21bd9e618e113a66f4d6729d43a4cb07b3f1373addb",
                      "width": 200,
                      "height": 48,
                      "url": "/v1/brand_assets/bas_01M6R27T7R9RDBHE6X72ZRW3YC/content",
                      "transparent_background": false,
                      "created_at": "2026-11-06T09:15:05.848Z"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/brand_assets/{id}": {
      "get": {
        "tags": [
          "Brand profiles"
        ],
        "operationId": "getBrandAsset",
        "summary": "Retrieve a brand asset",
        "responses": {
          "200": {
            "description": "The logo.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BrandAsset"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "bas_01M6R27T7R9RDBHE6X72ZRW3YC",
                      "object": "brand_asset",
                      "kind": "logo",
                      "content_type": "image/png",
                      "source_type": "image/png",
                      "sha256": "f72bdd36e6ce104c53c8f21bd9e618e113a66f4d6729d43a4cb07b3f1373addb",
                      "width": 200,
                      "height": 48,
                      "url": "/v1/brand_assets/bas_01M6R27T7R9RDBHE6X72ZRW3YC/content",
                      "transparent_background": false,
                      "created_at": "2026-11-06T09:15:05.848Z"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Retrieves a brand asset's details."
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The brand asset's ID, starting `bas_`."
        }
      ]
    },
    "/brand_assets/{id}/content": {
      "get": {
        "tags": [
          "Brand profiles"
        ],
        "operationId": "getBrandAssetContent",
        "summary": "Download a brand asset",
        "description": "Downloads an asset. A logo: its PNG rendition, the only form Parasend serves. A photo: its large WebP, or with `size=small` the small one. An icon: its 180 pixel PNG, or with `size=small` the 32 pixel one. Cached privately for a day.",
        "parameters": [
          {
            "name": "size",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "large",
                "small"
              ],
              "default": "large"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The PNG, or the WebP.",
            "content": {
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "The brand asset's ID, starting `bas_`."
        }
      ]
    },
    "/recipient_domains": {
      "get": {
        "operationId": "listRecipientDomains",
        "summary": "List link domains",
        "responses": {
          "200": {
            "description": "The list (never paginated; an organisation has a handful).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "object",
                    "data",
                    "has_more"
                  ],
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RecipientDomain"
                      }
                    },
                    "has_more": {
                      "type": "boolean",
                      "const": false
                    }
                  }
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "object": "list",
                      "data": [],
                      "has_more": false
                    }
                  }
                }
              }
            }
          }
        },
        "description": "Lists your organisation's link domains: your own host names for the links in Parasend's messages."
      }
    },
    "/recipient_domains/{id}": {
      "get": {
        "operationId": "getRecipientDomain",
        "summary": "Retrieve a link domain",
        "responses": {
          "200": {
            "description": "The domain, removed ones included.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecipientDomain"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          }
        },
        "description": "Retrieves a link domain, with the DNS records it needs and where each one stands."
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/recipient_domains/{id}/check": {
      "post": {
        "operationId": "checkRecipientDomain",
        "summary": "Check a link domain",
        "description": "Checks the domain's DNS records now: at most once every 30 seconds per domain, and 30 times an hour per organisation (429 `too_many_checks`). A failed domain whose records are right again goes back to verifying. A removed domain is 409 `recipient_domain_removed`.",
        "responses": {
          "200": {
            "description": "The domain as it now stands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecipientDomain"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          }
        }
      ]
    },
    "/deliveries/{id}/cost": {
      "get": {
        "summary": "Get a delivery's cost",
        "operationId": "getDeliveryCost",
        "tags": [
          "Deliveries"
        ],
        "description": "Every billable item the delivery has caused so far (the delivery itself, each SMS, each eID verification, each passport or ID-card check) with the unit price, the amount, VAT and `total_amount`, in your billing currency. Needs `deliveries.read`; a member or key that sees only its own deliveries gets 404 for anyone else's.\n\n**Prices.** Once a month is invoiced, an item has the price it was invoiced at (`invoice_id`). Before that, the price of the plan in effect now; for a month that has ended but is not yet invoiced, the plan on that month's last day, since a month is invoiced at the prices of its last day. A delivery that a plan's monthly fee covers is priced at the plan's price per included delivery, not at 0. Enterprise: the contract's price per committed delivery less its discount, and above the commitment the overage price less the discount. A discount comes off each unit price, so an item can differ by one króna from the invoice. Extras (eID, SMS, passport checks) are at the price list and never discounted, and monthly fees are never spread over deliveries. With no plan, Pay-as-you-go. See GET /billing/prices and parasend.com/pricing.\n\n**Free and taken back.** A delivery on a free transaction costs 0, every item included (`free: true`). A bounce after sending takes the delivery charge back; SMS already sent stay.\n\n**`final`** is false while the cost can still change: the delivery is still under way, its month is not invoiced, or a plan change this month would reprice it. It is true once the delivery has ended and every item is on an issued invoice. A recipient who opens a delivery confirmed by SMS code again gets a new code, a new item, and `final` is false again until that is invoiced.\n\n**Test mode** is never billed. A test delivery's cost is worked out from what it did, priced as if live at the plan in effect now, so you can build against real-looking numbers. `final` is true once a test delivery has ended.",
        "parameters": [
          {
            "$ref": "#/components/parameters/deliveryId"
          }
        ],
        "responses": {
          "200": {
            "description": "The cost so far.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryCost"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "object": "delivery_cost",
                      "delivery_id": "dlv_01M6R27T05512SCV3852TPM2XY",
                      "livemode": false,
                      "currency": "ISK",
                      "as_of": "2026-11-06T09:15:05.721Z",
                      "final": false,
                      "free": false,
                      "plan": null,
                      "items": [
                        {
                          "kind": "delivery",
                          "description": {
                            "is": "Sending",
                            "en": "Delivery"
                          },
                          "country": null,
                          "quantity": 1,
                          "unit_amount": 311,
                          "amount": 311,
                          "vat": 75,
                          "total_amount": 386,
                          "invoice_id": null
                        }
                      ],
                      "amount": 311,
                      "vat": 75,
                      "total_amount": 386,
                      "invoices": []
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error (`delivery_not_found` 404; 403 without `deliveries.read`).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/deliveries/costs": {
      "get": {
        "summary": "Get the cost of several deliveries",
        "operationId": "getDeliveryCosts",
        "tags": [
          "Deliveries"
        ],
        "description": "The same pricing as GET /deliveries/{id}/cost, for a group of deliveries: the items added up, the totals, and one subtotal per delivery. Give exactly one of `delivery_ids`, `batch_id` or `pin`. Needs `deliveries.read`.\n\nTypical use, a debt collector's invoice to a debtor: list the debtor's deliveries with GET /deliveries?pin=…, pick the ones for this claim, then ask for their cost here with `delivery_ids`. Or pass `pin` to cost everything sent to that person.\n\nOnly deliveries you may see count: `pin` and `batch_id` leave the others out, and a `delivery_ids` entry you may not see is `delivery_not_found`. The totals cover the whole group; `limit` and `cursor` page the per-delivery subtotals, newest first. Query strings never reach Parasend's logs, so `pin` is safe here.\n\n**A period.** `from` and `to` keep the items that arose in it (when the notice, reminder or eID happened, not when the delivery was created), so a monthly run counts each cost once. Both dates are inclusive, whole days in UTC; either may be left out. A bounce in the period of a delivery charged earlier is a credit line with a negative quantity, so a past period never changes and the periods add up to the whole. Only deliveries with something in the period are listed. `final` is true once nothing more can arise in the period and every item in it is invoiced. Example: `?pin=0101304339&from=2026-10-01&to=2026-10-31`.",
        "parameters": [
          {
            "name": "delivery_ids",
            "in": "query",
            "required": false,
            "description": "Up to 100 delivery ids (dlv_…), comma-separated. A repeated id counts once.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "batch_id",
            "in": "query",
            "required": false,
            "description": "Every delivery in the batch (bat_…).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pin",
            "in": "query",
            "required": false,
            "description": "Every delivery to the recipient with this personal code (e.g. kennitala), exact match only; spaces and hyphens are ignored — as `pin` on GET /deliveries.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9A-Za-z \\-]{6,24}$"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "The first day of the period, inclusive, in UTC (Iceland's time). Items that arose before it are left out.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "The last day of the period, inclusive, in UTC (Iceland's time). Items that arose after it are left out.",
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "The group's cost so far.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryCostSummary"
                },
                "examples": {
                  "The cost of chosen deliveries": {
                    "summary": "The cost of chosen deliveries",
                    "value": {
                      "object": "delivery_cost_summary",
                      "livemode": false,
                      "currency": "ISK",
                      "as_of": "2026-11-06T09:15:05.729Z",
                      "from": null,
                      "to": null,
                      "final": false,
                      "delivery_count": 1,
                      "items": [
                        {
                          "kind": "delivery",
                          "description": {
                            "is": "Sending",
                            "en": "Delivery"
                          },
                          "country": null,
                          "quantity": 1,
                          "unit_amount": 311,
                          "amount": 311,
                          "vat": 75,
                          "total_amount": 386
                        }
                      ],
                      "amount": 311,
                      "vat": 75,
                      "total_amount": 386,
                      "invoices": [],
                      "deliveries": [
                        {
                          "delivery_id": "dlv_01M6R27T05512SCV3852TPM2XY",
                          "status": "notified",
                          "final": false,
                          "free": false,
                          "amount": 311,
                          "vat": 75,
                          "total_amount": 386
                        }
                      ],
                      "has_more": false,
                      "next_cursor": null
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/webhook_endpoints/{id}/roll_secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "rollWebhookSecret",
        "summary": "Roll an endpoint's signing secret",
        "description": "Creates a new signing secret and returns the endpoint with it in `secret` — the only time it is shown. The previous secret stays valid for 24 hours (`previous_secret_expires_at`): during that window every request carries two v1 values in Parasend-Signature, `t=<t>,v1=<hmac with new>,v1=<hmac with previous>`, so the receiver can switch without a gap. Rolling again inside the window drops the older previous secret at once (only one previous secret is kept). Audit webhook_endpoint.secret_rolled.",
        "security": [
          {
            "apiKey": []
          },
          {
            "portalSession": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/webhookEndpointId"
          }
        ],
        "responses": {
          "200": {
            "description": "The endpoint, with the new secret in `secret`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "id": "whk_01M6R27T4KCSN7M0CHFGVH7JRA",
                      "object": "webhook_endpoint",
                      "url": "https://hooks.fyrirtaeki.example/parasend",
                      "event_types": [
                        "delivery.confirmed",
                        "delivery.bounced",
                        "delivery.expired"
                      ],
                      "description": "Case system",
                      "secret": "whsec_rRFB9XFIxFTnLDYnjK9XUyGO61WwvXXRNq9Nfw5cBuQ",
                      "auth": {
                        "mode": "none",
                        "static_bearer": null,
                        "oauth2": null
                      },
                      "delivery_sources": null,
                      "status": "enabled",
                      "livemode": false,
                      "exhausted_events": 0,
                      "last_exhausted_at": null,
                      "retrying_events": 0,
                      "last_attempt": {
                        "created": "2026-11-06T09:15:05.775Z",
                        "ok": true,
                        "status_code": 200,
                        "latency_ms": 0,
                        "failure_stage": null,
                        "error": null,
                        "replay": true,
                        "test": false
                      },
                      "created_by": {
                        "user_id": "usr_01M6R27SYD4B50414S0BZ4KBKR",
                        "name": "Jóna Jónsdóttir",
                        "via": "api_key"
                      },
                      "previous_secret_expires_at": "2026-11-07T09:15:05.963Z",
                      "created": "2026-11-06T09:15:05.746Z"
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error: webhook_endpoint_not_found, permission_denied, delivery_visibility_insufficient",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/events/{id}/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "listEventWebhookOutcomes",
        "summary": "See where an event was sent",
        "description": "One row per endpoint in the event's mode that had this event queued or replayed to it — including disabled and deleted endpoints, flagged as such. Not paged (at most 20 endpoints per mode, plus deleted ones that had the event). Needs events.read for the event (visibility-scoped like GET /events/{id}) and webhooks.read with delivery visibility all. Never \"delivered\": status says whether the endpoint answered 2xx.",
        "security": [
          {
            "apiKey": []
          },
          {
            "portalSession": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The event's ID, starting `evt_`."
          }
        ],
        "responses": {
          "200": {
            "description": "Outcomes per endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEventOutcome"
                      }
                    },
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    }
                  }
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "endpoint_id": "whk_01M6R27T4KCSN7M0CHFGVH7JRA",
                          "url": "https://hooks.fyrirtaeki.example/parasend",
                          "endpoint_status": "deleted",
                          "status": "succeeded",
                          "attempts": 1,
                          "last_attempt": {
                            "created": "2026-11-06T09:15:05.775Z",
                            "ok": true,
                            "status_code": 200,
                            "latency_ms": 0,
                            "failure_stage": null,
                            "error": null,
                            "replay": true,
                            "test": false
                          },
                          "next_retry_at": null
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "description": "Error: event_not_found, permission_denied, delivery_visibility_insufficient",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/public/verify": {
      "post": {
        "tags": [
          "Verify"
        ],
        "operationId": "verifyRecord",
        "security": [],
        "summary": "Check a delivery record by its evidence code",
        "description": "The check behind `parasend.com/verify`: anyone holding a Delivery Certificate can confirm that Parasend issued the record, that its seals are intact by Parasend's own check, and what it records. No key is needed; the code is the only input and is sent in the body, never in the URL. An unknown code and a malformed one get the same answer. Limited per caller to 120 lookups an hour and 20 misses in 10 minutes.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "The evidence code printed under the QR on the certificate.",
                    "example": "evd_01M6P3V5B7D9F1H3K5M7P9R1T3"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The record, \"not ready\" while its latest event is being sealed, or \"not found\".",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicVerification"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deliveries/{id}/notifications": {
      "get": {
        "tags": [
          "Deliveries"
        ],
        "operationId": "listDeliveryNotifications",
        "summary": "List a delivery's e-mails and SMS",
        "description": "Every invitation and reminder sent to the recipient, oldest first, with what the provider reported back. A send that was refused, or could not be sent after retries, is listed with `refused: true`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/DeliveryId"
          }
        ],
        "responses": {
          "200": {
            "description": "The notifications.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "object",
                    "data"
                  ],
                  "properties": {
                    "object": {
                      "type": "string",
                      "enum": [
                        "list"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Notification"
                      }
                    }
                  }
                },
                "examples": {
                  "Default": {
                    "summary": "Default",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "notification",
                          "id": "nts_01M6R27T238K4DF2KXZ9KS7F7X",
                          "kind": "invitation",
                          "channel": "email",
                          "sent_to": "anna.bjork@example.com",
                          "sent_at": "2026-11-06T09:15:05.666Z",
                          "event_id": "evt_01M6R27T23ZMZPJHEANJAPNSZ7",
                          "refused": false,
                          "report": null,
                          "sent_from": "parasend"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/deliveries/{id}/recipient_photos/{kind}": {
      "get": {
        "tags": [
          "Evidence"
        ],
        "operationId": "getRecipientPhoto",
        "summary": "Get a recipient's verification photo",
        "description": "The passport photo page or the selfie from the ID document check the recipient's verified name came from, kept with the recipient's consent. Needs the `evidence.read` permission. The `X-Parasend-Sha256` header carries the file's SHA-256.",
        "parameters": [
          {
            "$ref": "#/components/parameters/DeliveryId"
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "document",
                "selfie"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The JPEG.",
            "content": {
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AuthMethod": {
        "type": "string",
        "description": "How a recipient proves who they are. `audkenni` and `smart_id`: eID (level high). `passkey`: a passkey the recipient set up after verifying with eID (high). `videoid`: an ID document check with a selfie (substantial). `sms_otp`: a one-time code sent by SMS when the link is opened (medium). `password`: a password you give the recipient yourself (low). `link_only`: the link alone (low). New methods may be added: treat an unknown value like any other.",
        "enum": [
          "audkenni",
          "smart_id",
          "sms_otp",
          "passkey",
          "videoid",
          "password",
          "link_only"
        ]
      },
      "Batch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The batch's ID, starting `bat_`."
          },
          "object": {
            "type": "string",
            "const": "batch",
            "description": "Always `batch`."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The batch's name, for your own reference. A batch created without one is named `Batch` and the creation date (UTC), e.g. `Batch 2026-11-06`; null if it was set to null."
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "scheduled",
              "sending",
              "following_up",
              "completed",
              "cancelled"
            ],
            "description": "`draft`, then `scheduled` (optional), `sending`, `following_up` and `completed`; or `cancelled`. Paused follow-ups are a flag, not a status."
          },
          "sending_mode": {
            "type": "string",
            "enum": [
              "on_finalize",
              "rolling"
            ],
            "description": "`on_finalize`: deliveries added to the draft wait and go out together when you send the batch out (`POST /batches/{id}/finalize`), or at `scheduled_at`. `rolling`: the batch is sending from the start and each delivery goes out as soon as it is added, until you close the batch with `POST /batches/{id}/finalize`."
          },
          "funnel": {
            "$ref": "#/components/schemas/Funnel"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created, in ISO 8601 (UTC)."
          },
          "follow_up_policy_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The follow-up policy (`rpol_…`) the batch's deliveries follow, unless a delivery follows its own. null: no follow-up policy (never your organisation's default policy)."
          },
          "allow_policy_override": {
            "type": "boolean",
            "description": "Whether a delivery in the batch may follow a different follow-up policy, named in its `options.reminder_policy`. When false, such a delivery is refused with `policy_override_not_allowed`."
          },
          "follow_ups_paused": {
            "type": "boolean",
            "description": "Whether the batch's follow-ups are paused (`POST /batches/{id}/pause`). Reminders that come due while paused wait, and go in the next send window after `POST /batches/{id}/resume`."
          },
          "scheduled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the batch is to be sent out, in ISO 8601 (UTC), if you gave it a send time; null otherwise. Sending out a batch with a future `scheduled_at` makes it `scheduled` until that time."
          },
          "send_window": {
            "$ref": "#/components/schemas/SendWindow"
          },
          "defaults": {
            "$ref": "#/components/schemas/BatchDefaults"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the files (`fil_…`) shared by every delivery in the batch. Each delivery added gets these first, then its own files."
          },
          "accepting_deliveries": {
            "type": "boolean",
            "description": "Whether you can add deliveries to the batch now: true for a `draft`, and for a `rolling` batch that is sending and has not been closed."
          },
          "counts": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer"
              },
              "delivered": {
                "type": "integer"
              },
              "in_progress": {
                "type": "integer"
              },
              "ended": {
                "type": "integer",
                "description": "Expired, revoked, bounced or failed — not delivered."
              }
            },
            "description": "The batch's deliveries by where they stand now. Each delivery is in exactly one of `delivered`, `in_progress` and `ended`, so the three add up to `total`."
          },
          "created_by": {
            "type": "object",
            "properties": {
              "user_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "via": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "portal",
                  "api_key",
                  null
                ]
              }
            },
            "description": "Who created the batch: `user_id`, the member or the API key's holder (null for a key with no holder), and `via`, `portal` or `api_key`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` in live mode, `false` in test mode."
          },
          "sent_out_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the batch was sent out, in ISO 8601 (UTC); for a `rolling` batch, when it was closed to new deliveries. null until then; a batch cancelled first gets the time it was cancelled."
          },
          "following_up_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the batch moved to `following_up`, in ISO 8601 (UTC): it had been sent out and every delivery in it had had its first notice. null until then."
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the batch became `completed`, in ISO 8601 (UTC): every delivery in it had reached an end state. null until then."
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the batch was cancelled with `POST /batches/{id}/cancel`, in ISO 8601 (UTC); null if it has not been."
          },
          "follow_up_funnel": {
            "$ref": "#/components/schemas/FollowUpFunnel",
            "description": "Only on GET /batches/{id}."
          },
          "kpis": {
            "$ref": "#/components/schemas/BatchKpis",
            "description": "Only on GET /batches/{id}."
          }
        }
      },
      "BatchCreate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 200,
            "description": "A name for the batch, for your own reference: 1–200 characters, without control characters; leading and trailing spaces are trimmed. Default: `Batch` and today's date (UTC), e.g. `Batch 2026-11-06`."
          },
          "files": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Files (`fil_…`) to share with every delivery in the batch, at most 20. Each must be one of your organisation's files in the same mode (test or live), or the request fails with `file_reference_invalid`."
          },
          "sending_mode": {
            "type": "string",
            "enum": [
              "on_finalize",
              "rolling"
            ],
            "default": "on_finalize",
            "description": "`on_finalize` (the default): the batch starts as a `draft`, and its deliveries wait until you send it out with `POST /batches/{id}/finalize` or until `scheduled_at`. `rolling`: the batch starts `sending` and each delivery goes out as soon as it is added; it cannot have a `scheduled_at`."
          },
          "defaults": {
            "type": "object",
            "description": "Delivery settings for every delivery in the batch. A delivery may set its own.",
            "properties": {
              "options": {
                "$ref": "#/components/schemas/DeliveryOptions"
              },
              "additional_security_source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "csv_personal_code",
                  null
                ],
                "description": "Portal CSV flow — bind pin from the CSV personal_code column."
              }
            },
            "$ref": "#/components/schemas/BatchDefaults"
          },
          "follow_up_policy_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "`rpol_…`, or null (the default) for no policy; never the account default. `rpol_none` is the same as null."
          },
          "allow_policy_override": {
            "type": "boolean",
            "default": true,
            "description": "Whether a single delivery may follow another policy than the batch's."
          },
          "scheduled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Send out at this time instead of at once (on_finalize only)."
          },
          "send_window": {
            "$ref": "#/components/schemas/SendWindow"
          }
        }
      },
      "BatchDefaults": {
        "type": "object",
        "properties": {
          "options": {
            "$ref": "#/components/schemas/DeliveryOptions"
          },
          "additional_security_source": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "csv_personal_code",
              null
            ],
            "description": "`csv_personal_code`: a delivery added with a `recipient.personal_code`, and no `recipient.conditional_authentication` of its own, gets `conditional_authentication: true`, so only that person can open it. null or left out: no such rule."
          },
          "language": {
            "type": "string",
            "description": "The `language` (`is` or `en`) for deliveries added to the batch that do not set their own."
          },
          "message": {
            "type": "string",
            "description": "The `message` for deliveries added to the batch that do not set their own: the plain-text note the recipient sees before signing in."
          },
          "title": {
            "type": "string",
            "description": "The `title` for deliveries added to the batch that do not set their own: the subject the recipient sees in the notice and on their page."
          },
          "verification_level": {
            "type": "string",
            "description": "The `recipient.verification_level` (`high`, `substantial`, `medium` or `low`) for deliveries added to the batch that do not set their own."
          }
        }
      },
      "BatchKpis": {
        "type": "object",
        "properties": {
          "delivered": {
            "type": "integer",
            "description": "Deliveries in the batch that were delivered, on the first notice or after follow-ups."
          },
          "delivered_pct": {
            "type": "number",
            "description": "`delivered` as a percentage of the batch's deliveries, rounded to one decimal (e.g. `87.5`); 0 for an empty batch."
          },
          "in_progress": {
            "type": "integer",
            "description": "Deliveries still under way: not yet delivered and not ended."
          },
          "median_time_to_delivery": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 8601 duration."
          },
          "bounce_rate": {
            "type": "number",
            "description": "The share of notified deliveries that could not be reached (bounced), as a fraction from 0 to 1 rounded to four decimals; 0 when none have been notified."
          },
          "rescued_by_followups": {
            "type": "integer",
            "description": "Delivered deliveries whose recipient confirmed only after a follow-up, not on the first notice."
          },
          "spend": {
            "type": "object",
            "properties": {
              "sms_messages": {
                "type": "integer"
              },
              "lookups": {
                "type": "integer"
              },
              "amount": {
                "type": "integer"
              },
              "currency": {
                "type": "string"
              },
              "estimated": {
                "type": "boolean",
                "const": true
              }
            },
            "description": "An estimate of the batch's spend so far: the SMS messages sent for it (`sms_messages`), priced at today's prices, excluding VAT (`amount`, in the minor unit of `currency`). `lookups` is 0, and `estimated` is always true: your invoice is what counts."
          },
          "vs_previous": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "batch_id": {
                "type": "string"
              },
              "delivered_pct_delta": {
                "type": "number",
                "description": "Percentage points."
              }
            },
            "description": "How this batch compares with the previous batch your organisation sent out in the same mode (cancelled batches left out): that batch's ID and the difference in delivered percentage, in percentage points. null until this batch is sent out, or when there is no earlier batch."
          }
        }
      },
      "BatchList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Page"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Batch"
                }
              }
            }
          }
        ]
      },
      "BatchReport": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "batch_report",
            "description": "Always `batch_report`."
          },
          "batch": {
            "$ref": "#/components/schemas/Batch"
          },
          "follow_up_funnel": {
            "$ref": "#/components/schemas/FollowUpFunnel"
          },
          "funnel": {
            "$ref": "#/components/schemas/Funnel"
          },
          "kpis": {
            "$ref": "#/components/schemas/BatchKpis"
          }
        }
      },
      "BrandAsset": {
        "type": "object",
        "required": [
          "id",
          "object",
          "kind",
          "content_type",
          "source_type",
          "sha256",
          "width",
          "height",
          "url",
          "created_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The brand asset's ID, starting `bas_`."
          },
          "object": {
            "type": "string",
            "const": "brand_asset",
            "description": "Always `brand_asset`."
          },
          "kind": {
            "type": "string",
            "enum": [
              "logo",
              "image",
              "icon"
            ],
            "description": "`logo`, `image` (a page photo) or `icon` (the browser tab's icon)."
          },
          "content_type": {
            "type": "string",
            "enum": [
              "image/png",
              "image/webp"
            ],
            "description": "What is served — a logo's or an icon's PNG, a photo's WebP."
          },
          "source_type": {
            "type": "string",
            "enum": [
              "image/png",
              "image/svg+xml",
              "image/jpeg",
              "image/webp"
            ],
            "description": "What was uploaded (a logo's is kept, never served; a photo's is not kept)."
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "Of the PNG (a photo's large WebP)."
          },
          "width": {
            "type": "integer",
            "description": "A logo: CSS pixels (the PNG is 3× this). A photo: pixels of the large rendition. An icon: 180."
          },
          "height": {
            "type": "integer",
            "description": "A logo: CSS pixels. A photo: pixels of the large rendition. An icon: 180."
          },
          "url": {
            "type": "string",
            "description": "The path of the image itself, `/v1/brand_assets/{id}/content`: a logo's or an icon's PNG, or a photo's large WebP. Fetch it with your API key, like any other request."
          },
          "small": {
            "type": "object",
            "description": "A photo: the small rendition, about 800 pixels wide. An icon: the 32 pixel PNG.",
            "properties": {
              "url": {
                "type": "string"
              },
              "width": {
                "type": "integer"
              },
              "height": {
                "type": "integer"
              }
            }
          },
          "transparent_background": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "A logo only: whether most of its outer edge is transparent. null for a photo or an icon."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the asset was uploaded, in ISO 8601 (UTC)."
          }
        }
      },
      "BrandLogo": {
        "type": "object",
        "required": [
          "asset_id",
          "url",
          "sha256",
          "width",
          "height"
        ],
        "properties": {
          "asset_id": {
            "type": "string",
            "description": "The brand asset's ID, starting `bas_`."
          },
          "url": {
            "type": "string",
            "description": "/v1/brand_assets/{id}/content"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$",
            "description": "Of the PNG."
          },
          "width": {
            "type": "integer",
            "description": "CSS pixels (the PNG is 3× this)."
          },
          "height": {
            "type": "integer",
            "description": "CSS pixels (the PNG is 3× this)."
          }
        }
      },
      "BrandProfilePreview": {
        "type": "object",
        "required": [
          "object",
          "locale",
          "contrasts",
          "contrast_error",
          "email",
          "recipient"
        ],
        "properties": {
          "object": {
            "const": "brand_profile_preview",
            "description": "Always `brand_profile_preview`."
          },
          "locale": {
            "type": "string",
            "enum": [
              "is",
              "en"
            ],
            "description": "The language of the preview, from the `locale` query parameter: `is` (the default) or `en`."
          },
          "contrasts": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "description": "Every pair of B4 and its ratio, as a save would keep them (two decimals, rounded down)."
          },
          "contrast_error": {
            "type": [
              "object",
              "null"
            ],
            "description": "The refusal a save would give (contrast_validation_failed), or null when every pair passes.",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "param": {
                "type": "string"
              }
            }
          },
          "email": {
            "type": "object",
            "required": [
              "template",
              "version",
              "from_name",
              "subject",
              "html",
              "text",
              "images"
            ],
            "properties": {
              "template": {
                "type": "string",
                "description": "invitation.email"
              },
              "version": {
                "type": "integer",
                "description": "The version of Parasend's e-mail template the preview used."
              },
              "from_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "subject": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "html": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "As the worker sends it, cid: pictures and all; only the link is the sample's."
              },
              "text": {
                "type": "string"
              },
              "images": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Each cid picture of the HTML as a data URI — the bytes the worker attaches."
              }
            },
            "description": "The notice e-mail a delivery with this brand would get, for a sample delivery: the template and its version, the sender name, subject, HTML and plain text, and each inline image of the HTML as a data URI."
          },
          "recipient": {
            "type": "object",
            "required": [
              "landing",
              "unlocked",
              "expired",
              "assets"
            ],
            "properties": {
              "landing": {
                "type": "object",
                "description": "POST /recipient/sessions for the sample (state link_opened); its delivery is a RecipientDeliveryView."
              },
              "unlocked": {
                "type": "object",
                "description": "The same once receipt is confirmed (state unlocked)."
              },
              "expired": {
                "type": "object",
                "description": "The body a recipient gets for an expired link: the error envelope, with `error.brand`."
              },
              "assets": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Each public brand picture address in the views (/v1/recipient/brand/logo/… and /image/…) mapped to the organisation's own address for the same asset (/v1/brand_assets/{id}/content, ?size=small). The public routes serve only what a saved version uses."
              }
            },
            "description": "What the recipient page would show for a sample delivery with this brand: before receipt is confirmed (`landing`), after it (`unlocked`), the answer for an expired link (`expired`), and the brand images they use (`assets`)."
          }
        }
      },
      "BrandProfilePreviewRequest": {
        "type": "object",
        "required": [
          "sender_display_name",
          "primary_color"
        ],
        "description": "The same body as POST /brand_profiles, checked by the same rules. `name` and `is_default` may be left out and are ignored: a preview shows a version, not a profile."
      },
      "BrandProfileV1": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BrandVersionFields"
          },
          {
            "type": "object",
            "required": [
              "id",
              "object",
              "name",
              "is_default",
              "version",
              "version_id",
              "used_by",
              "created_at",
              "updated_at",
              "archived_at"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The brand profile's ID, starting `bp_`."
              },
              "object": {
                "type": "string",
                "const": "brand_profile",
                "description": "Always `brand_profile`."
              },
              "name": {
                "type": "string",
                "description": "Your name for the profile, 1–100 characters. Recipients never see it."
              },
              "is_default": {
                "type": "boolean",
                "description": "Whether this is your organisation's default profile, used for any delivery that names none (directly or through its batch). Only one profile is the default."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "The current version's number."
              },
              "version_id": {
                "type": "string",
                "description": "`bpv_…`: the version a delivery created now would use."
              },
              "used_by": {
                "type": "object",
                "required": [
                  "deliveries"
                ],
                "properties": {
                  "deliveries": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Deliveries that froze one of its versions (a count; names none)."
                  }
                },
                "description": "How much the profile is used: `deliveries`, the number of deliveries sent with one of its versions."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the profile was created, in ISO 8601 (UTC)."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the profile last changed (renamed, made or no longer the default, given a new version, or archived), in ISO 8601 (UTC)."
              },
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the profile was archived with `DELETE /brand_profiles/{id}`, in ISO 8601 (UTC); null while it is in use. Deliveries already sent with it keep its look."
              }
            }
          }
        ]
      },
      "BrandProfileV1Create": {
        "type": "object",
        "required": [
          "name",
          "sender_display_name",
          "primary_color"
        ],
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "What the sender calls the profile (the portal list). Not shown to recipients."
          },
          "is_default": {
            "type": "boolean",
            "default": false,
            "description": "The organisation's default: used when a delivery names no profile. Takes it from the previous default."
          },
          "sender_display_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "\"Delivery from …\" and the recipient page."
          },
          "sender_display_name_dative": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 100,
            "description": "The sender's name in the Icelandic dative, for “Sending frá …”. Without it the notice says “Sending frá: {name}”."
          },
          "logo_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "bas_… from POST /brand_assets. Null or absent: the monogram is shown."
          },
          "icon_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "`bas_…` of an icon uploaded with POST /brand_assets?kind=icon. Null or left out: the tab shows a monogram on `primary_color`."
          },
          "sms_sender_name": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^(?=[A-Za-z0-9]*[A-Za-z])[A-Za-z0-9]{3,11}$",
            "description": "What an SMS to an Icelandic number shows as its sender, once Parasend has approved the name for your company. Verified companies only. Null: PARASEND."
          },
          "monogram": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 3,
            "description": "1–3 letters or digits, upper-cased. Null or absent derives it from sender_display_name (first letters of its first two words, company forms such as hf./ehf. left out)."
          },
          "primary_color": {
            "type": "string",
            "pattern": "^#[0-9A-Fa-f]{6}$",
            "description": "Upper-cased on save. White text on it must reach 4.5:1 (rule B4)."
          },
          "header_style": {
            "type": "string",
            "enum": [
              "band",
              "letterhead",
              "minimal"
            ],
            "default": "band",
            "description": "The header of the recipient page and the notice e-mail: `band` (the default), your `primary_color` across the top with the logo on it; `letterhead`, a plain header with a rule in your colour along its top; `minimal`, a plain header with your logo or name."
          },
          "support": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": false,
            "description": "The sender's own contact, shown to the recipient on the delivery's pages.",
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "email"
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A telephone number, e.g. +354 440 4000."
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uri",
                "description": "https:// only."
              }
            }
          },
          "expired_message": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": false,
            "description": "Your own words on the page a recipient sees when the link has expired, per language. Plain text.",
            "properties": {
              "is": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500
              },
              "en": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 500
              }
            }
          },
          "reply_to": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "The notice e-mail's Reply-To address."
          },
          "recipient_domain_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "`cdm_…` of your organisation's link domain, or null for Parasend's own. Changing it needs the portal and a fresh sign-in. Links use it only while it is active."
          },
          "email_sender_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "`es_…` of your organisation's e-mail sender, or null for Parasend's address. Changing it needs the portal and a fresh sign-in. It is used only while the sender is active; otherwise the e-mail comes from Parasend's address under your brand's name."
          },
          "theme": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BrandTheme"
              },
              {
                "type": "null"
              }
            ],
            "description": "The finer look of the recipient page and the e-mail: colours, corners, font, layout, and what is shown. Left out or null: Parasend's own look. In an update, a field left out stays as it is and `theme: null` resets every field."
          }
        }
      },
      "BrandProfileV1Patch": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BrandProfileV1Create"
          }
        ],
        "description": "Every field optional. Absent leaves it as it is; null clears an optional field (support and expired_message per member).",
        "required": []
      },
      "BrandProfileVersion": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BrandVersionFields"
          },
          {
            "type": "object",
            "required": [
              "id",
              "object",
              "profile_id",
              "version",
              "created_at",
              "created_by"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "The brand profile version's ID, starting `bpv_`."
              },
              "object": {
                "type": "string",
                "const": "brand_profile_version",
                "description": "Always `brand_profile_version`."
              },
              "profile_id": {
                "type": "string",
                "description": "The brand profile (`bp_…`) this is a version of."
              },
              "version": {
                "type": "integer",
                "minimum": 1,
                "description": "The version's number within its profile: 1 for the first, one more for each change."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the version was made, in ISO 8601 (UTC)."
              },
              "created_by": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The member, or the API key holder; null for a key with none."
                  },
                  "via": {
                    "type": "string",
                    "enum": [
                      "portal",
                      "api_key"
                    ]
                  }
                },
                "description": "Who made the version: `user_id`, the member or the API key's holder (null for a key with no holder), and `via`, `portal` or `api_key`."
              }
            }
          }
        ]
      },
      "BrandTheme": {
        "type": "object",
        "additionalProperties": false,
        "description": "The look a version sets. Every field may be null (Parasend's own) and, in a PATCH, left out (unchanged); `theme: null` resets every field. Checked when saved: every text and background pair must reach a contrast of 4.5:1. No CSS.",
        "properties": {
          "colors": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": false,
            "properties": {
              "page_background": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^#[0-9A-Fa-f]{6}$",
                "description": "Default #F5F6FA."
              },
              "card_background": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^#[0-9A-Fa-f]{6}$",
                "description": "Default #FFFFFF."
              },
              "text": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^#[0-9A-Fa-f]{6}$",
                "description": "Default #0E1526."
              },
              "secondary_text": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^#[0-9A-Fa-f]{6}$",
                "description": "Default #5B6472."
              },
              "button_background": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^#[0-9A-Fa-f]{6}$",
                "description": "The buttons' colour, on the page and in the e-mail. Default `primary_color`."
              },
              "button_text": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^#[0-9A-Fa-f]{6}$",
                "description": "Default #FFFFFF."
              },
              "header_background": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              "header_text": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^#[0-9A-Fa-f]{6}$"
              },
              "divider": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^#[0-9A-Fa-f]{6}$",
                "description": "Default #E6E9F2."
              }
            },
            "description": "Colours of the recipient page, each `#RRGGBB` or null for Parasend's default; `button_background` and `button_text` colour the e-mail's button too. In an update, `colors: null` resets them all."
          },
          "button_radius": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 24,
            "description": "Default 12."
          },
          "card_radius": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 24,
            "description": "Default 14."
          },
          "card_shadow": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Default true."
          },
          "font": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "inter",
              "system",
              "source_sans",
              "source_serif",
              null
            ],
            "description": "The font, served by the recipient page. Default `inter`."
          },
          "logo_height": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 20,
            "maximum": 48,
            "description": "CSS px. Default the header style's own."
          },
          "header_align": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "left",
              "center",
              null
            ],
            "description": "Default left."
          },
          "show_safety_note": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "The note “Er þetta öruggt?” (Is this safe?) on the page and in the e-mail. Default true."
          },
          "show_support_line": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Default true."
          },
          "show_sender_line": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "The “Sendandi:” (Sender:) line. The page leaves it out only where the header names the sender in words; false always leaves it out of the e-mail's footer. Default true."
          },
          "card_footer": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "default",
              "custom",
              "hidden",
              null
            ],
            "description": "default: the date; custom: the sender's words and the date; hidden: none. custom needs card_footer_text."
          },
          "card_footer_text": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": false,
            "properties": {
              "is": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 200
              },
              "en": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 200
              }
            },
            "description": "Your own words for the card's footer when `card_footer` is `custom`, in Icelandic (`is`) and English (`en`): plain text, up to 200 characters each. `custom` needs at least one of them."
          },
          "layout": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "card",
              "split",
              "banner",
              "backdrop",
              null
            ],
            "description": "The page layout. Default `card`; every other layout needs `page_image_asset_id`."
          },
          "page_image_asset_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "`bas_…` of a photo uploaded with POST /brand_assets?kind=image."
          },
          "logo_background": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "tile",
              "none",
              null
            ],
            "description": "The header's logo on a white tile (`tile`, or null) or straight on the colour (`none`). Not set with a new logo: `none` for a transparent logo, `tile` otherwise."
          },
          "show_service_label": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "The label above the e-mail's headline that names the service (“Electronic registered delivery” in English). null is on. The e-mail only."
          },
          "show_name_with_logo": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "The sender's name beside the logo in the header, in every header style. null is off."
          }
        }
      },
      "BrandVersionFields": {
        "type": "object",
        "required": [
          "sender_display_name",
          "sender_display_name_dative",
          "logo",
          "monogram",
          "primary_color",
          "contrast_ratio",
          "header_style",
          "support",
          "expired_message",
          "reply_to"
        ],
        "properties": {
          "sender_display_name": {
            "type": "string",
            "description": "Your name as recipients see it, in the notice (\"Delivery from …\") and on the recipient page."
          },
          "sender_display_name_dative": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your name in the Icelandic dative case, for Icelandic notices (\"Sending frá …\"). null when not set; the notice then says \"Sending frá:\" followed by `sender_display_name`."
          },
          "logo": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BrandLogo"
              },
              {
                "type": "null"
              }
            ],
            "description": "The logo: its asset ID (`bas_…`), the path of its PNG, the PNG's SHA-256, and its size in CSS pixels. null when there is no logo; the monogram is shown instead."
          },
          "monogram": {
            "type": "string",
            "description": "1–3 upper-case letters or digits shown where there is no logo. Unless you set it, the first letters of the first two words of `sender_display_name`, leaving out company forms such as hf. and ehf."
          },
          "sms_sender_name": {
            "type": [
              "object",
              "null"
            ],
            "description": "The SMS sender name and Parasend's answer to it, or null (PARASEND).",
            "required": [
              "name",
              "state",
              "ready",
              "reason"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "enum": [
                  "pending",
                  "approved",
                  "rejected"
                ]
              },
              "ready": {
                "type": "boolean",
                "description": "Approved and set up: SMS to Icelandic numbers show it."
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Why Parasend did not approve it."
              }
            }
          },
          "icon": {
            "type": [
              "object",
              "null"
            ],
            "description": "The tab icon, or null.",
            "properties": {
              "asset_id": {
                "type": "string",
                "description": "The brand asset's ID, starting `bas_`."
              },
              "url": {
                "type": "string",
                "description": "The 180 px PNG (/brand_assets/{id}/content)."
              },
              "small_url": {
                "type": "string",
                "description": "The 32 px PNG (?size=small)."
              },
              "sha256": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$",
                "description": "Of the 180 px PNG."
              }
            }
          },
          "primary_color": {
            "type": "string",
            "pattern": "^#[0-9A-F]{6}$",
            "description": "Your brand colour, `#RRGGBB` in upper case: the header band, links, and the buttons unless `theme.colors.button_background` sets their own."
          },
          "contrast_ratio": {
            "type": "number",
            "minimum": 4.5,
            "maximum": 21,
            "description": "The button text (white unless theme.colors.button_text) on primary_color, two decimals, rounded down."
          },
          "header_style": {
            "type": "string",
            "enum": [
              "band",
              "letterhead",
              "minimal"
            ],
            "description": "The header of the recipient page and the notice e-mail: `band`, your `primary_color` across the top with the logo on it; `letterhead`, a plain header with a rule in your colour along its top; `minimal`, a plain header with your logo or name."
          },
          "support": {
            "type": "object",
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "description": "Your own contact for recipients, in the support line of the recipient page: `email`, `phone` and `url`, each null when not set."
          },
          "expired_message": {
            "type": "object",
            "properties": {
              "is": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "en": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "description": "Your own words on the page a recipient sees when their link has expired, in Icelandic (`is`) and English (`en`). Plain text; each null when not set."
          },
          "reply_to": {
            "type": [
              "string",
              "null"
            ],
            "description": "The Reply-To address of the e-mails sent to recipients (the notice and reminders), so replies come to you. null: no Reply-To."
          },
          "recipient_domain_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The link domain (`cdm_…`), or null."
          },
          "email_sender_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The e-mail sender (`es_…`), or null."
          },
          "theme": {
            "$ref": "#/components/schemas/BrandTheme"
          },
          "contrasts": {
            "type": "object",
            "description": "The contrast ratio of every colour pair when saved, rounded down to two decimals: `button_text_on_primary` (the button text on the button's colour), `links_on_card`, `text_on_card`, `secondary_text_on_card`, `header_text_on_header`, and `logo_on_header` for a logo straight on the band (a warning below 3, never a refusal).",
            "additionalProperties": {
              "type": "number"
            }
          }
        }
      },
      "BulkItemResult": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "description": "The item's position in the request's `deliveries` list, counting from 0."
          },
          "status": {
            "type": "string",
            "enum": [
              "created",
              "failed"
            ],
            "description": "`created`: the delivery was added, with `delivery_id`. `failed`: it was not, and `error` says why; the other items are not affected."
          },
          "delivery_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The new delivery's ID (`dlv_…`) when `status` is `created`; null when the item failed."
          },
          "error": {
            "$ref": "#/components/schemas/Error"
          },
          "client_row": {
            "type": "integer",
            "description": "The item's client_row, when it had one (the portal's CSV row number)."
          }
        }
      },
      "CostItem": {
        "type": "object",
        "required": [
          "kind",
          "description",
          "quantity",
          "unit_amount",
          "amount",
          "vat",
          "total_amount"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "description": "`delivery`; `eid` (once per verified party per delivery); `sms` (each one sent: notice, reminder or one-time code); `videoid` (a passport or ID-card check, once per verified party per delivery). New kinds may be added: treat an unknown kind as a line like any other.",
            "enum": [
              "delivery",
              "eid",
              "sms",
              "videoid"
            ]
          },
          "description": {
            "type": "object",
            "description": "The invoice line's name.",
            "properties": {
              "is": {
                "type": "string"
              },
              "en": {
                "type": "string"
              }
            }
          },
          "country": {
            "type": [
              "string",
              "null"
            ],
            "description": "SMS: the destination country (ISO 3166-1 alpha-2)."
          },
          "quantity": {
            "type": "integer",
            "description": "Net of take-backs: a delivery that bounced after sending is not listed. Negative on a credit line: a take-back in the period of a charge made in an earlier one."
          },
          "unit_amount": {
            "type": "integer",
            "description": "Minor units, excluding VAT."
          },
          "amount": {
            "type": "integer",
            "description": "quantity × unit_amount."
          },
          "vat": {
            "type": "integer",
            "description": "VAT on the amount, rounded."
          },
          "total_amount": {
            "type": "integer",
            "description": "`amount` plus `vat`."
          },
          "invoice_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The invoice it was charged on; null until its month is closed. Not on a summary's items."
          }
        }
      },
      "DeletionSchedule": {
        "type": "object",
        "description": "When the delivery's data will be removed, after DELETE /deliveries/{id}.",
        "properties": {
          "delivery_id": {
            "type": "string",
            "description": "The ID of the delivery (`dlv_…`) whose deletion was scheduled."
          },
          "delete_by": {
            "type": "string",
            "format": "date-time",
            "description": "Latest completion of permanent removal (deletion.completion_days after the request)."
          },
          "evidence_retained_until": {
            "type": "string",
            "format": "date-time",
            "description": "End of the evidence retention period; the sealed record survives the deletion."
          }
        }
      },
      "Delivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The delivery's ID, starting `dlv_`."
          },
          "object": {
            "type": "string",
            "const": "delivery",
            "description": "Always `delivery`."
          },
          "content_type": {
            "type": "string",
            "enum": [
              "files"
            ],
            "description": "What the delivery carries: `files`, documents."
          },
          "status": {
            "$ref": "#/components/schemas/RecipientStatus"
          },
          "last_activity": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LastActivity"
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest activity on the delivery, such as a reminder or an open; null until there is any."
          },
          "recipient": {
            "$ref": "#/components/schemas/Recipient"
          },
          "batch_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The batch it belongs to (`bat_…`), or null when it is not part of a batch."
          },
          "delivery_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Signed recipient URL (headless/embed integration)."
          },
          "evidence_policy": {
            "type": "string",
            "format": "uri",
            "readOnly": true,
            "example": "urn:parasend:policy:evidence:standard:1",
            "description": "The evidence policy this delivery's evidence is produced under, as a URN. It is on the delivery and on every evidence record."
          },
          "certificate_language": {
            "type": "string",
            "enum": [
              "is",
              "en"
            ],
            "readOnly": true,
            "description": "The language of every Delivery Certificate of this delivery, the sender's and the recipient's: your organisation's certificate language when the delivery was created, never changed after. `?language=` on the certificate routes may name it; the other language is 409 `certificate_language_fixed`."
          },
          "warnings": {
            "type": "array",
            "readOnly": true,
            "description": "Notices on the create response that do not stop the delivery. Show them to whoever sent it.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "fail_closed_delivery",
                    "sms_otp_unavailable",
                    "link_domain_unavailable"
                  ],
                  "description": "`sms_otp_unavailable`: SMS one-time codes that came only with the default methods were dropped, because Parasend does not send SMS to that number's country on your account. `link_domain_unavailable`: sent with Parasend's own links because your link domain is not working."
                },
                "message": {
                  "type": "string"
                }
              }
            }
          },
          "sender_display": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SenderDisplay"
              }
            ],
            "readOnly": true,
            "description": "Resolved value (delivery → template → organisation default)."
          },
          "operator_reference": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "example": "OP-7K3Q-M2",
            "description": "For a company sender: an opaque reference to the person who sent it, shown under the company name instead of their name. null for a personal account."
          },
          "recipient_ref": {
            "type": "string",
            "readOnly": true,
            "example": "rcp_01JB9WK5B6D8F0H2J4L6",
            "description": "An opaque reference to the recipient, repeated on the evidence."
          },
          "options": {
            "$ref": "#/components/schemas/DeliveryOptions"
          },
          "legal_hold": {
            "type": "boolean",
            "description": "Whether the delivery is under legal hold. While it is, `DELETE /deliveries/{id}` is refused with `delete_blocked_legal_hold`."
          },
          "deletion_scheduled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "readOnly": true,
            "description": "Set when DELETE /deliveries/{id} has scheduled the delivery's removal; null otherwise."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` in live mode, `false` in test mode."
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created, in ISO 8601 (UTC)."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the delivery expires if the recipient has not confirmed receipt, in ISO 8601 (UTC): `options.expires_in_days` after it was created, or for a delivery in a batch, after the batch was sent out. null while its batch has not been sent out."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Your own key–value pairs, kept with the object and returned as you sent them. Never put personal data here."
          },
          "kind": {
            "type": "string",
            "enum": [
              "documents",
              "secret",
              "request"
            ],
            "description": "Unified-list discriminator. GET /deliveries returns all kinds."
          },
          "direction": {
            "type": "string",
            "enum": [
              "outbound",
              "inbound"
            ],
            "default": "outbound",
            "description": "inbound = a fulfillment of a document request (sender = the verified uploader)."
          },
          "origin_request": {
            "type": [
              "string",
              "null"
            ],
            "description": "req_… linkage when this delivery fulfils a document request."
          },
          "follow_up": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DeliveryFollowUp"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "Where the delivery is in its follow-up policy; null for a delivery created before follow-up policies existed."
          },
          "reminder_waiting": {
            "type": [
              "object",
              "null"
            ],
            "description": "A reminder that waits because the delivery's link domain is not working: it goes on that domain once it works again, or with Parasend's link once the domain has failed (after 72 hours). null when none waits.",
            "required": [
              "since",
              "reason",
              "link_host"
            ],
            "properties": {
              "since": {
                "type": "string",
                "format": "date-time",
                "description": "When the first waiting reminder was put off."
              },
              "reason": {
                "type": "string",
                "enum": [
                  "link_domain_degraded"
                ]
              },
              "link_host": {
                "type": "string",
                "description": "The delivery's link domain."
              }
            }
          },
          "email_waiting": {
            "type": [
              "object",
              "null"
            ],
            "description": "An e-mail that waits for your own sending address (its sender is set to hold on failure): it goes from that address once it works again, or from Parasend's at `until` at the latest. null when none waits.",
            "required": [
              "since",
              "reason",
              "from_address",
              "until"
            ],
            "properties": {
              "since": {
                "type": "string",
                "format": "date-time"
              },
              "reason": {
                "type": "string",
                "enum": [
                  "email_sender"
                ]
              },
              "from_address": {
                "type": "string",
                "format": "email"
              },
              "until": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "private": {
            "type": "boolean",
            "description": "Sent with a private key; written once at creation."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "The subject the recipient sees in the notice and on their page."
          },
          "message": {
            "type": [
              "string",
              "null"
            ],
            "description": "The plain-text note shown before sign-in, or null."
          },
          "language": {
            "type": "string",
            "enum": [
              "is",
              "en"
            ],
            "description": "The language of the notice and of the recipient page."
          },
          "short_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "A short link to the recipient page, the form an SMS carries."
          },
          "files": {
            "type": "array",
            "description": "The delivery's files: each one's ID, its name in the delivery, and whether it is the main document.",
            "items": {
              "type": "object",
              "properties": {
                "file_id": {
                  "type": "string"
                },
                "path": {
                  "type": "string"
                },
                "primary": {
                  "type": "boolean"
                }
              }
            }
          }
        }
      },
      "DeliveryCost": {
        "type": "object",
        "required": [
          "object",
          "delivery_id",
          "livemode",
          "currency",
          "as_of",
          "final",
          "free",
          "items",
          "amount",
          "vat",
          "total_amount",
          "invoices"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "delivery_cost",
            "description": "Always `delivery_cost`."
          },
          "delivery_id": {
            "type": "string",
            "description": "The delivery's ID, starting `dlv_`."
          },
          "livemode": {
            "type": "boolean",
            "description": "false: a test delivery, priced as if live; nothing was billed."
          },
          "currency": {
            "type": "string",
            "enum": [
              "ISK",
              "EUR"
            ],
            "description": "The organisation's billing currency, fixed at sign-up."
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "When this was worked out."
          },
          "final": {
            "type": "boolean",
            "description": "True once the delivery has ended and every item is on an issued invoice; it then never changes."
          },
          "free": {
            "type": "boolean",
            "description": "Sent on a free transaction: every item at 0."
          },
          "plan": {
            "description": "The plan in effect now, which items not yet invoiced are priced at; null when the organisation has none (free transactions, or test mode).",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PlanCode"
              },
              {
                "type": "null"
              }
            ]
          },
          "items": {
            "type": "array",
            "description": "One line per kind, country and unit price, in the invoice's order. Empty before anything billable has happened.",
            "items": {
              "$ref": "#/components/schemas/CostItem"
            }
          },
          "amount": {
            "type": "integer",
            "description": "In minor units, excluding VAT: the items' amounts added up."
          },
          "vat": {
            "type": "integer",
            "description": "The items' VAT added up (rounded per line)."
          },
          "total_amount": {
            "type": "integer",
            "description": "`amount` plus `vat`; also the sum of the items' `total_amount`."
          },
          "invoices": {
            "type": "array",
            "description": "The issued invoices the items were charged on — the collector's voucher for the cost.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The invoice's ID, starting `bil_`."
                },
                "number": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Payday's invoice number."
                }
              }
            }
          }
        }
      },
      "DeliveryCostSummary": {
        "type": "object",
        "required": [
          "object",
          "livemode",
          "currency",
          "as_of",
          "from",
          "to",
          "final",
          "delivery_count",
          "items",
          "amount",
          "vat",
          "total_amount",
          "invoices",
          "deliveries",
          "has_more",
          "next_cursor"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "delivery_cost_summary",
            "description": "Always `delivery_cost_summary`."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` in live mode, `false` in test mode."
          },
          "currency": {
            "type": "string",
            "enum": [
              "ISK",
              "EUR"
            ],
            "description": "The currency of every amount: your organisation's billing currency, `ISK` or `EUR`. Amounts are integers in its minor unit (whole krónur for ISK, cents for EUR)."
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "When the costs were worked out, in ISO 8601 (UTC). Until `final` is true, the figures may still change."
          },
          "from": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The period asked for; null when not given."
          },
          "to": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "The period asked for; null when not given."
          },
          "final": {
            "type": "boolean",
            "description": "True when every delivery in the group is final — with a period, when nothing more can arise in it and all of it is invoiced."
          },
          "delivery_count": {
            "type": "integer",
            "description": "With a period, the deliveries that have something in it."
          },
          "items": {
            "type": "array",
            "description": "The group's items added up by kind, country and unit price; each item's VAT is its deliveries' own, summed.",
            "items": {
              "$ref": "#/components/schemas/CostItem"
            }
          },
          "amount": {
            "type": "integer",
            "description": "Excluding VAT."
          },
          "vat": {
            "type": "integer",
            "description": "The VAT on `amount`, in the minor unit of `currency`: the sum of each item's own VAT. 0 for an organisation outside Iceland."
          },
          "total_amount": {
            "type": "integer",
            "description": "`amount` plus `vat`; the sum of the deliveries' `total_amount`, and of the items'."
          },
          "invoices": {
            "type": "array",
            "description": "The issued invoices any of the group's items were charged on.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The invoice's ID, starting `bil_`."
                },
                "number": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "deliveries": {
            "type": "array",
            "description": "One subtotal per delivery, newest first; paged by limit and cursor.",
            "items": {
              "type": "object",
              "properties": {
                "delivery_id": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "final": {
                  "type": "boolean"
                },
                "free": {
                  "type": "boolean"
                },
                "amount": {
                  "type": "integer",
                  "description": "Excluding VAT."
                },
                "vat": {
                  "type": "integer"
                },
                "total_amount": {
                  "type": "integer",
                  "description": "`amount` plus `vat`."
                }
              }
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether more delivery subtotals follow this page of `deliveries`. The totals always cover the whole group."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` to get the next page of `deliveries`; null on the last page."
          }
        }
      },
      "DeliveryCreate": {
        "type": "object",
        "required": [
          "recipient",
          "files"
        ],
        "properties": {
          "recipient": {
            "$ref": "#/components/schemas/Recipient"
          },
          "files": {
            "type": "array",
            "description": "The files to send: the `fil_` IDs that Upload a file returned.",
            "items": {
              "type": "string"
            }
          },
          "options": {
            "$ref": "#/components/schemas/DeliveryOptions"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Your own key–value pairs, kept with the object and returned as you sent them. Never put personal data here."
          },
          "title": {
            "type": "string",
            "maxLength": 200,
            "description": "The subject the recipient sees in the notice and on their page.",
            "example": "Final notice: invoice 2026-114"
          },
          "message": {
            "type": "string",
            "maxLength": 1000,
            "description": "A plain-text note shown before sign-in. Line breaks are kept. It is not sealed into the evidence."
          },
          "language": {
            "type": "string",
            "enum": [
              "is",
              "en"
            ],
            "default": "is",
            "description": "The language of the notice and of the recipient page."
          }
        }
      },
      "DeliveryFollowUp": {
        "type": "object",
        "properties": {
          "policy_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The ID of the follow-up policy in effect (`rpol_…`), or null when the delivery named none."
          },
          "policy_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The name of the follow-up policy in effect; null when there is none."
          },
          "policy_source": {
            "type": "string",
            "enum": [
              "batch",
              "own",
              "none"
            ],
            "description": "`own`: the delivery named its policy. `batch`: it follows its batch's policy. `none`: no policy."
          },
          "state": {
            "type": "string",
            "enum": [
              "waiting",
              "active",
              "done"
            ],
            "description": "waiting = the first notice has not gone out; active = a step is ahead; done = nothing more will go."
          },
          "reminders_sent": {
            "type": "integer",
            "description": "How many reminders the follow-up policy has sent for this delivery so far. Reminders sent with `POST /deliveries/{id}/remind` are not counted."
          },
          "last_step": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "step": {
                "type": "integer",
                "description": "1-based position in the policy."
              },
              "reminder_no": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Which reminder of the delivery it was (1, 2, 3…)."
              },
              "channel": {
                "type": "string"
              },
              "at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            },
            "description": "The last follow-up step that went out: its position in the policy (`step`, from 1), which reminder of the delivery it was (`reminder_no`), its `channel`, and when it was sent (`at`, ISO 8601 UTC). null until a step has gone."
          },
          "next_step": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "step": {
                "type": "integer"
              },
              "channel": {
                "type": "string"
              },
              "due_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When it goes, held to the send window and the 24 h gap; null until the first notice has gone."
              },
              "after_expiry": {
                "type": "boolean",
                "description": "It would fall at or after the delivery's expiry, so it will not go."
              }
            },
            "description": "The next follow-up step: its position in the policy (`step`), its `channel`, when it is due (`due_at`), and `after_expiry`, true when it would fall at or after the delivery's expiry and so will not go. null when no step is ahead."
          },
          "paused": {
            "type": "boolean",
            "description": "Whether follow-ups are paused."
          }
        }
      },
      "DeliveryList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Page"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Delivery"
                }
              }
            }
          }
        ]
      },
      "DeliveryOptions": {
        "type": "object",
        "properties": {
          "notify_channels": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "enum": [
                "email",
                "sms"
              ]
            },
            "description": "How the recipient is told — the invitation and every reminder go to each channel listed; each needs its contact (recipient.email, recipient.phone). Default — e-mail when there is an address, else SMS. Told on both, a failure on one channel bounces the delivery only once the other cannot arrive either."
          },
          "auth_methods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuthMethod"
            },
            "description": "Which ways of identifying the recipient to offer within `recipient.verification_level`, in your order of preference. The recipient may always use a way at least as strong as the weakest one you list. Left out: every way the level allows (an SMS code only when the recipient has a phone)."
          },
          "reminder_policy": {
            "type": [
              "string",
              "null"
            ],
            "description": "The follow-up policy's ID (`rpol_…`): the reminders this delivery sends while it waits."
          },
          "brand_profile_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The brand profile's ID (`bp_…`). One set on the delivery wins over the batch's, and the batch's over the account's default."
          },
          "expires_in_days": {
            "type": "integer",
            "description": "How many days the recipient has to confirm receipt before the delivery expires: a whole number from 1 to 365. Default 30. For a delivery in a batch, the days count from when the batch is sent out."
          },
          "sender_display": {
            "$ref": "#/components/schemas/SenderDisplay"
          },
          "allow_parasend_links": {
            "type": "boolean",
            "default": false,
            "description": "Send even though your brand profile's link domain is not working, with Parasend's own links (warning `link_domain_unavailable`). Without it such a delivery is refused with 409 `link_domain_unavailable`."
          },
          "notice_wording": {
            "type": "object",
            "additionalProperties": false,
            "description": "Which saved wording the first notice uses, per channel: a wording ID, null for Parasend's own, or left out for your organisation's default.",
            "properties": {
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sms": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "type",
          "code",
          "message",
          "request_id"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "invalid_request",
              "authentication_error",
              "permission_error",
              "not_found",
              "conflict",
              "payload_too_large",
              "rate_limited",
              "api_error"
            ],
            "description": "The broad kind of error, which sets the usual HTTP status: `invalid_request` 400, `authentication_error` 401, `permission_error` 403, `not_found` 404, `conflict` 409, `payload_too_large` 413, `rate_limited` 429, `api_error` 500. A few codes have their own status, such as 415 for an unsupported content type and 503 when a service is briefly unavailable."
          },
          "code": {
            "type": "string",
            "description": "Registry-governed snake_case code (x-parasend-error-codes)."
          },
          "message": {
            "type": "string",
            "description": "A readable explanation of the error, for developers. The wording may change; base your logic on `code`."
          },
          "param": {
            "type": [
              "string",
              "null"
            ],
            "description": "The request parameter the error is about, such as `recipient.email` or `files[0]`. Left out when the error is not about one parameter."
          },
          "detail": {
            "type": [
              "object",
              "null"
            ],
            "description": "Structured context where the code defines it (e.g. delete_blocked_legal_hold carries the case reference; policy_in_use carries in_use_by_batches)."
          },
          "doc_url": {
            "type": "string",
            "description": "The page that explains this code, https://parasend.com/docs/errors/{code}. Sent with every code the docs describe."
          },
          "request_id": {
            "type": "string",
            "description": "The request's ID (`req_…`), also sent in the `Request-Id` header. Quote it when you contact Parasend about the error."
          },
          "link_domain": {
            "type": "object",
            "description": "On `link_domain_unavailable` only: the link domain that is not working.",
            "properties": {
              "id": {
                "type": "string"
              },
              "hostname": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "enum": [
                  "pending_dns",
                  "verifying",
                  "issuing_cert",
                  "active",
                  "degraded",
                  "failed",
                  "removed"
                ]
              }
            }
          },
          "redirect_to": {
            "type": "string",
            "format": "uri",
            "description": "On `delivery_link_wrong_host` only: the same link on the delivery's own address."
          }
        },
        "description": "The body of every error: `type` (the broad kind, which sets the HTTP status), `code` (the exact cause, with its own page at `doc_url`), a readable `message`, the `param` it is about where there is one, and the `request_id` to quote to us. Some codes add fields of their own."
      },
      "ErrorEnvelope": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Error"
          }
        }
      },
      "Event": {
        "type": "object",
        "description": "Thin payload + fetch — no recipient PII or document names; consumers fetch the resource, re-authorized through the key matrix.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The event's ID, starting `evt_`."
          },
          "object": {
            "type": "string",
            "const": "event",
            "description": "Always `event`."
          },
          "type": {
            "$ref": "#/components/schemas/EventType"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created, in ISO 8601 (UTC)."
          },
          "resource": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string"
              },
              "id": {
                "type": "string"
              }
            },
            "description": "What the event is about: its `type` (such as `delivery`, `batch` or `recipient_domain`) and `id`. The event carries no personal data; fetch the resource for its details."
          },
          "batch_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The batch it belongs to (`bat_…`), or null when it is not part of a batch."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reason code where the type defines one (delivery.auth_failed → pin_mismatch, provider_failure, timeout, cancelled; delivery.consignment_failed → assurance_not_met; delivery.rejected → the catalogue code of the refusing rule)."
          },
          "data": {
            "type": [
              "object",
              "null"
            ],
            "description": "Details for some event types; never personal data, never file names. Absent for most types.",
            "additionalProperties": true
          }
        }
      },
      "EventList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Page"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          }
        ]
      },
      "EventType": {
        "type": "string",
        "enum": [
          "delivery.created",
          "delivery.rejected",
          "delivery.notified",
          "delivery.opened",
          "delivery.email_opened",
          "delivery.auth_failed",
          "delivery.confirmed",
          "delivery.downloaded",
          "delivery.delivered",
          "delivery.reminded",
          "delivery.bounced",
          "delivery.expired",
          "delivery.revoked",
          "delivery.consignment_failed",
          "delivery.evidence_sealed",
          "delivery.evidence_timestamp_deferred",
          "delivery.evidence_timestamp_recovered",
          "delivery.paper_pending_approval",
          "delivery.paper_dispatched",
          "delivery.paper_failed",
          "document.previewed",
          "batch.finalized",
          "batch.completed",
          "lookup.completed",
          "consent.granted",
          "consent.withdrawn",
          "invitation.sent",
          "link.opened",
          "otp.sent",
          "otp.verified",
          "otp.locked",
          "secret.attached",
          "secret.available",
          "secret.revealed",
          "secret.copied",
          "secret.expired",
          "secret.exhausted",
          "secret.revoked",
          "request.sent",
          "request.opened",
          "request.fulfilled",
          "request.expired",
          "request.closed",
          "request.reopened",
          "deletion.scheduled",
          "recipient_domain.verified",
          "recipient_domain.degraded",
          "recipient_domain.failed",
          "member.suspended",
          "member.restored",
          "member.removed",
          "batch.cancelled",
          "batch.policy_changed",
          "delivery.policy_changed",
          "email_sender.verified",
          "email_sender.degraded",
          "email_sender.failed",
          "email_sender.restored"
        ],
        "description": "Every event type. `delivery.*` events follow a delivery from creation to its end, `batch.*` a batch, and `member.*`, `email_sender.*` and `recipient_domain.*` your account. `delivery.email_opened` is a hint (the e-mail client loaded an image), never proof of receipt; `delivery.confirmed` is the recipient confirming receipt. `delivery.auth_failed` carries a `reason`, such as `personal_code_mismatch` or `id_document_mismatch`. The `secret.*`, `request.*` and `lookup.*` events belong to features that are not available yet. New types may be added: ignore types you do not know."
      },
      "File": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The file's ID, starting `fil_`."
          },
          "object": {
            "type": "string",
            "const": "file",
            "description": "Always `file`."
          },
          "name": {
            "type": "string",
            "description": "The file's name as uploaded, in Unicode NFC, with any path separator replaced by `_`; at most 255 characters. It is part of the sealed evidence record."
          },
          "bytes": {
            "type": "integer",
            "description": "The file's size in bytes."
          },
          "sha256": {
            "type": "string",
            "description": "The SHA-256 digest of the file's content, as 64 lower-case hexadecimal characters."
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created, in ISO 8601 (UTC)."
          }
        }
      },
      "FollowUpFunnel": {
        "type": "object",
        "description": "How a batch's deliveries move through its follow-up. Every number is a count of deliveries.",
        "properties": {
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "When the counts were taken, in ISO 8601 (UTC)."
          },
          "policy_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The follow-up policy the counts are limited to, from the `policy_id` query parameter (`rpol_none` for deliveries with no policy); null when they cover the whole batch."
          },
          "total": {
            "type": "integer",
            "description": "Deliveries counted."
          },
          "not_yet_notified": {
            "type": "integer",
            "description": "Deliveries whose first notice has not gone out yet, such as those in a batch not yet sent out."
          },
          "notice": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FollowUpStage"
              },
              {
                "type": "object",
                "properties": {
                  "renotified_via_lookup": {
                    "type": "integer"
                  },
                  "email_opened": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Notices whose e-mail was opened (a hint, not proof)."
                  },
                  "renotified_delivered": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Deliveries confirmed after a notice to a channel found by the lookup."
                  }
                }
              }
            ],
            "description": "The first notice: `sent` is every notified delivery and `bounced` those whose notice bounced; the outcome counts are the deliveries that had no reminder. `email_opened` counts notices whose e-mail was opened before any reminder went (a hint, not proof)."
          },
          "reminders": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/FollowUpStage"
                },
                {
                  "type": "object",
                  "properties": {
                    "number": {
                      "type": "integer"
                    },
                    "channels": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "integer"
                        },
                        "sms": {
                          "type": "integer"
                        },
                        "alternate_contact": {
                          "type": "integer"
                        }
                      }
                    }
                  }
                }
              ]
            },
            "description": "One entry per reminder, in order (`number` 1, 2, 3…): `sent` is the deliveries that got at least that many reminders, `bounced` those for which it bounced, and the outcome counts the deliveries whose last reminder it was. `channels` counts that reminder by channel."
          },
          "outcome": {
            "type": "object",
            "properties": {
              "delivered": {
                "type": "integer"
              },
              "in_progress": {
                "type": "integer"
              },
              "unreachable": {
                "type": "integer"
              },
              "expired": {
                "type": "integer"
              },
              "revoked": {
                "type": "integer"
              },
              "not_matched": {
                "type": "integer"
              }
            },
            "description": "Where every counted delivery stands now, each in exactly one: `delivered`, `in_progress`, `unreachable` (bounced), `expired`, `revoked`, or `not_matched` (ended `consignment_failed`: the recipient's identification did not meet what the delivery required)."
          },
          "confirmed_direct": {
            "type": "integer",
            "description": "Deliveries whose recipient confirmed receipt after the first notice, with no follow-up."
          },
          "rescued_by_followups": {
            "type": "integer",
            "description": "Deliveries whose recipient confirmed receipt only after a follow-up."
          },
          "delivered_total": {
            "type": "integer",
            "description": "All delivered deliveries: `confirmed_direct` plus `rescued_by_followups`."
          }
        }
      },
      "FollowUpStage": {
        "type": "object",
        "properties": {
          "sent": {
            "type": "integer",
            "description": "Deliveries that reached this stage: for the notice, every notified delivery; for a reminder, the deliveries that got at least this many reminders."
          },
          "bounced": {
            "type": "integer",
            "description": "Deliveries whose message at this stage bounced."
          },
          "delivered": {
            "type": "integer",
            "description": "Of the deliveries for which this was the last stage, those delivered."
          },
          "in_progress": {
            "type": "integer",
            "description": "Of the deliveries for which this was the last stage, those still under way."
          },
          "unreachable": {
            "type": "integer",
            "description": "Of the deliveries for which this was the last stage, those that could not be reached (bounced)."
          },
          "expired": {
            "type": "integer",
            "description": "Of the deliveries for which this was the last stage, those that expired."
          },
          "revoked": {
            "type": "integer",
            "description": "Of the deliveries for which this was the last stage, those revoked."
          },
          "not_matched": {
            "type": "integer",
            "description": "Of the deliveries for which this was the last stage, those that ended `consignment_failed`: the recipient's identification did not meet what the delivery required."
          }
        }
      },
      "Funnel": {
        "type": "object",
        "description": "Counts that only go up: `notified` ≥ `opened` ≥ `authenticated` ≥ `confirmed_direct`, and `delivered_total` = `confirmed_direct` + `rescued_by_followups`.",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Deliveries counted."
          },
          "notified": {
            "type": "integer",
            "description": "Deliveries whose first notice has gone out."
          },
          "opened": {
            "type": "integer",
            "description": "Notified deliveries whose recipient opened the link, or got further."
          },
          "authenticated": {
            "type": "integer",
            "description": "Notified deliveries whose recipient identified themselves, or got further (every delivered one included)."
          },
          "confirmed_direct": {
            "type": "integer",
            "description": "Deliveries whose recipient confirmed receipt after the first notice, with no follow-up."
          },
          "rescued_by_followups": {
            "type": "integer",
            "description": "Deliveries whose recipient confirmed receipt only after a follow-up."
          },
          "delivered_total": {
            "type": "integer",
            "description": "All delivered deliveries: `confirmed_direct` plus `rescued_by_followups`."
          },
          "expired": {
            "type": "integer",
            "description": "Deliveries that expired before the recipient confirmed receipt."
          },
          "revoked": {
            "type": "integer",
            "description": "Deliveries that were revoked."
          },
          "auth_failed": {
            "type": "integer",
            "description": "Deliveries whose status is now `auth_failed`: the recipient's last attempt to identify themselves failed."
          },
          "bounced": {
            "type": "integer",
            "description": "Deliveries that ended `bounced`: the recipient could not be reached."
          },
          "paper_pending": {
            "type": "integer",
            "description": "Deliveries in a paper-mail step (`paper_pending_approval` or `paper_dispatched`)."
          },
          "needs_address": {
            "type": "integer",
            "description": "Deliveries waiting for a postal address. Currently always 0."
          },
          "bounce_rate": {
            "type": "number",
            "description": "`bounced` as a fraction of `notified`, from 0 to 1, rounded to four decimals; 0 when none have been notified."
          },
          "median_time_to_confirm": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO 8601 duration."
          }
        }
      },
      "LastActivity": {
        "type": "object",
        "description": "The latest activity on the delivery, such as a reminder or an open. Kept apart from `status`.",
        "properties": {
          "type": {
            "type": "string",
            "example": "reminded",
            "description": "What happened, such as `notified`, `reminded`, `opened`, `authenticated`, `auth_failed`, `confirmed`, `downloaded`, `bounced`, `expired` or `revoked`. More types may be added."
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "description": "When it happened, in ISO 8601 (UTC)."
          },
          "count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "e.g. reminder count for \"reminded ×N\"."
          }
        }
      },
      "ManifestEntry": {
        "type": "object",
        "properties": {
          "file_id": {
            "type": "string",
            "description": "The file's ID, starting `fil_`."
          },
          "name": {
            "type": "string",
            "description": "The file's name as it was uploaded."
          },
          "path": {
            "type": "string",
            "description": "Container path — set at delivery time, unique per delivery."
          },
          "bytes": {
            "type": "integer",
            "description": "The file's size in bytes."
          },
          "sha256": {
            "type": "string",
            "description": "The SHA-256 digest of the file's content, as 64 lower-case hexadecimal characters."
          },
          "primary": {
            "type": "boolean",
            "description": "Whether this is the delivery's main document: the first file listed when the delivery was created."
          }
        }
      },
      "Notification": {
        "type": "object",
        "required": [
          "object",
          "id",
          "kind",
          "channel",
          "sent_to",
          "sent_at",
          "refused"
        ],
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "notification"
            ],
            "description": "Always `notification`."
          },
          "id": {
            "type": "string",
            "description": "Unique identifier for the object."
          },
          "kind": {
            "type": "string",
            "enum": [
              "invitation",
              "reminder"
            ],
            "description": "`invitation`: the first notice of the delivery. `reminder`: a reminder, from the follow-up policy or sent with `POST /deliveries/{id}/remind`."
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "sms"
            ],
            "description": "How it was sent: `email` or `sms`."
          },
          "sent_to": {
            "type": "string",
            "description": "The address or number it went to."
          },
          "sent_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the message was handed over for sending or, for a refused one, when it was refused; ISO 8601 (UTC)."
          },
          "event_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The event (`evt_…`) recorded for the message: `delivery.notified` for the notice, `delivery.reminded` for a reminder. null when the message has no event of its own, such as the notice's second channel or a refused message."
          },
          "refused": {
            "type": "boolean",
            "description": "True when the message was never sent: the provider refused it, or it could not be sent after retries."
          },
          "report": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "outcome": {
                "type": "string"
              },
              "at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "reason": {
                "type": "string"
              }
            },
            "description": "The latest delivery report for the message: `outcome` (`delivered`, `bounced`, `complained`, `rejected` or `failed`) and when it came (`at`). A refused message has `failed`, with a `reason` code. null until a report arrives."
          },
          "sent_from": {
            "type": "string",
            "enum": [
              "own_address",
              "parasend",
              "parasend_fallback"
            ],
            "description": "E-mail only: your own sending address, Parasend's, or Parasend's because yours could not send."
          },
          "from_address": {
            "type": "string",
            "description": "E-mail from your own address only."
          }
        }
      },
      "Page": {
        "type": "object",
        "properties": {
          "has_more": {
            "type": "boolean",
            "description": "Whether there are more items after this page."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pass as `cursor` to get the next page; null on the last page."
          }
        }
      },
      "PlanCode": {
        "type": "string",
        "enum": [
          "payg",
          "p500",
          "p1000",
          "p5000",
          "enterprise"
        ],
        "description": "Door 1: payg. Door 2: p500, p1000, p5000. Door 3: enterprise (by contract). Replaces free / plan_1–3."
      },
      "PolicyChange": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "policy_change",
            "description": "Always `policy_change`."
          },
          "dry_run": {
            "type": "boolean",
            "description": "True when the request was a preview (`dry_run: true`): nothing was changed, and the figures say what the change would do."
          },
          "policy_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The new follow-up policy (`rpol_…`); null for no policy (`rpol_none` is returned as null)."
          },
          "start_step": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "string",
                "const": "first"
              }
            ],
            "description": "Where notified deliveries start in the new policy: `first`, its first reminder, or the step number given in `start.step`. Deliveries not yet notified follow it from the start."
          },
          "affected": {
            "type": "integer",
            "description": "Deliveries the change applies to: those not yet confirmed and not ended."
          },
          "unchanged": {
            "type": "object",
            "properties": {
              "ended": {
                "type": "integer"
              },
              "own_policy": {
                "type": "integer"
              }
            },
            "description": "Deliveries in the batch the change leaves as they are: `ended`, already confirmed or ended; `own_policy`, following their own policy (with the `batch_followers` scope). Both 0 for a single delivery."
          },
          "not_yet_notified": {
            "type": "integer",
            "description": "Affected deliveries whose first notice has not gone out; they follow the new policy from its start."
          },
          "messages": {
            "type": "object",
            "properties": {
              "email": {
                "type": "integer"
              },
              "sms": {
                "type": "integer"
              }
            },
            "description": "How many reminders the new policy would send to the affected deliveries before they expire, by channel (`email`, `sms`), if no recipient confirms first."
          },
          "first_send_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the first reminder under the new policy would go, in ISO 8601 (UTC); null when none would."
          },
          "estimate": {
            "type": "object",
            "description": "The estimated cost: `amount`, `vat` and `total_amount`.",
            "properties": {
              "currency": {
                "type": "string"
              },
              "amount": {
                "type": "integer"
              },
              "vat": {
                "type": "integer"
              },
              "total_amount": {
                "type": "integer"
              }
            }
          },
          "after_expiry": {
            "type": "integer",
            "description": "Deliveries with a step that would fall at or after their expiry."
          },
          "held_by_gap": {
            "type": "integer",
            "description": "Deliveries whose first step waits for the 24 h gap."
          },
          "in_flight": {
            "type": "integer",
            "description": "Deliveries with a step with the provider at the moment of the change."
          },
          "schedule": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "step": {
                  "type": "integer"
                },
                "channel": {
                  "type": "string"
                },
                "day_offset": {
                  "type": "integer"
                },
                "due_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "description": "The new policy's steps from the starting step, as the earliest affected delivery would get them: each step's number (`step`), `channel`, days after the first of them (`day_offset`) and `due_at` (ISO 8601, UTC). Empty when no notified delivery is affected."
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The new expiry asked for in `extend_expiry_to`, in ISO 8601 (UTC); null when none was asked for."
          },
          "expiry_capped": {
            "type": "integer",
            "description": "Deliveries whose expiry could not move all the way to `extend_expiry_to`: an expiry never goes past a year from the delivery's creation, nor past the deletion of its documents."
          }
        }
      },
      "PolicyChangeRequest": {
        "type": "object",
        "required": [
          "policy_id"
        ],
        "additionalProperties": false,
        "properties": {
          "policy_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The new follow-up policy's ID (`rpol_…`), or null (or `rpol_none`) for none."
          },
          "scope": {
            "type": "string",
            "enum": [
              "batch_followers",
              "all_pending"
            ],
            "default": "batch_followers",
            "description": "For a batch only."
          },
          "start": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "enum": [
                  "first",
                  "step"
                ]
              },
              "step": {
                "type": "integer",
                "minimum": 1
              }
            },
            "description": "Where notified deliveries start in the new policy: `{\"from\": \"first\"}` (the default), its first reminder, or `{\"from\": \"step\", \"step\": n}`, step n counting from 1. The first notice is never sent again; deliveries not yet notified follow the new policy from its start."
          },
          "extend_expiry_to": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Move the affected deliveries' expiry to this time (ISO 8601), which must be in the future. An expiry is only ever moved later, never past a year from the delivery's creation, and never past the deletion of its documents."
          },
          "dry_run": {
            "type": "boolean",
            "default": false,
            "description": "When true, nothing changes: the response says what the change would do. Default false."
          }
        }
      },
      "PolicyStep": {
        "type": "object",
        "required": [
          "after_days",
          "channel"
        ],
        "properties": {
          "after_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 365,
            "description": "Days after the first notice when the step is due: a whole number from 1 to 365, never smaller than the step before it. The reminder goes within the send window and at least 24 hours after the delivery's last message."
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "sms",
              "alternate_email",
              "paper"
            ],
            "description": "How the step's reminder goes: `email` or `sms`. A step whose channel the recipient has no contact for is skipped. `alternate_email` and `paper` are refused with `policy_step_invalid` until they are available."
          },
          "conditions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "not_delivered",
                "email_not_opened",
                "email_bounced"
              ]
            },
            "description": "What must all hold for the step to go, else it is skipped: `not_delivered` (always included, listed or not); `email_not_opened`, no e-mail to the recipient has been opened (a hint, not proof); `email_bounced`, an e-mail to the recipient bounced or failed."
          },
          "requires_approval": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Paper defaults to approval-required."
          },
          "available": {
            "type": "boolean",
            "readOnly": true,
            "description": "Responses only. False for a step that cannot run yet and is skipped (only the paper step of `rpol_debt_collection`); true otherwise."
          },
          "message": {
            "$ref": "#/components/schemas/StepMessage"
          }
        },
        "description": "One step of a follow-up policy: after `after_days` (a whole number of days, 1–365, never earlier than the step above), send a reminder by `email` or `sms`, with the wording in `message`. `alternate_email` and `paper` steps are refused (`policy_step_invalid`) until the contact lookup and paper mail are available. Responses add `available`: false for a step that cannot run yet (only `rpol_debt_collection`'s paper step)."
      },
      "PostalAddress": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "line1": {
            "type": "string",
            "description": "The first address line, such as the street and number. Required."
          },
          "line2": {
            "type": [
              "string",
              "null"
            ],
            "description": "A second address line, or null."
          },
          "postal_code": {
            "type": "string",
            "description": "The postal code. Required."
          },
          "city": {
            "type": "string",
            "description": "The town or city. Required."
          },
          "country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2"
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "thjodskra",
              "customer_csv",
              "manual",
              null
            ],
            "description": "Where the address came from, as you state it: `thjodskra`, Iceland's national registry (Þjóðskrá); `customer_csv`, your own records, imported from a file; `manual`, entered by hand. Default `manual`."
          }
        }
      },
      "PriceList": {
        "type": "object",
        "required": [
          "object",
          "currency",
          "on",
          "prices_exclude_vat",
          "vat_percent",
          "plans",
          "per_use",
          "sms_international"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "price_list",
            "description": "Always `price_list`."
          },
          "currency": {
            "type": "string",
            "enum": [
              "ISK",
              "EUR"
            ],
            "description": "The currency of the prices, from the `currency` query parameter: `ISK` (the default) or `EUR`. Amounts are integers in its minor unit (whole krónur for ISK, cents for EUR)."
          },
          "on": {
            "type": "string",
            "format": "date",
            "description": "The date the prices apply on, `YYYY-MM-DD`, from the `on` query parameter; by default today (UTC)."
          },
          "prices_exclude_vat": {
            "type": "boolean",
            "const": true,
            "description": "Always true: every price excludes VAT."
          },
          "vat_percent": {
            "type": "number",
            "description": "VAT added on Icelandic invoices (24)."
          },
          "plans": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "plan",
                "door",
                "rails",
                "monthly_fee",
                "included_deliveries",
                "delivery_price",
                "request_price"
              ],
              "properties": {
                "plan": {
                  "$ref": "#/components/schemas/PlanCode"
                },
                "door": {
                  "type": "integer",
                  "enum": [
                    1,
                    2
                  ]
                },
                "rails": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Rail"
                  }
                },
                "monthly_fee": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Minor units; null for pay as you go."
                },
                "included_deliveries": {
                  "type": [
                    "integer",
                    "null"
                  ]
                },
                "delivery_price": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "Pay as you go: each delivery; plans: each delivery over the included volume."
                },
                "request_price": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "A document request is priced as a delivery and counts towards plan volume."
                }
              }
            },
            "description": "The self-serve plans, pay as you go and the monthly plans: each one's monthly fee, the deliveries the fee includes, and the price of a delivery and of a document request."
          },
          "per_use": {
            "type": "array",
            "description": "Prices per use, the same on every plan: an eID verification (per verified party, once per delivery), an SMS in Iceland (each notice, reminder or code), and a passport or ID-card check (per verified recipient, once per delivery).",
            "items": {
              "type": "object",
              "required": [
                "product",
                "unit_amount"
              ],
              "properties": {
                "product": {
                  "type": "string",
                  "description": "The Payday product code."
                },
                "unit_amount": {
                  "type": "integer"
                }
              }
            }
          },
          "sms_international": {
            "type": "array",
            "description": "SMS abroad, per destination country, in two price zones. A country that is not listed cannot receive SMS from Parasend.",
            "items": {
              "type": "object",
              "required": [
                "country",
                "unit_amount"
              ],
              "properties": {
                "country": {
                  "type": "string",
                  "description": "ISO 3166-1 alpha-2."
                },
                "unit_amount": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "PublicVerification": {
        "type": "object",
        "required": [
          "object",
          "found"
        ],
        "description": "One of three answers: `found: false`; `found: true, ready: false` (ask again in a few seconds); or the record.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "public_verification"
            ],
            "description": "Always `public_verification`."
          },
          "found": {
            "type": "boolean",
            "description": "Whether a delivery record has this evidence ID. A mistyped, malformed or unknown code all get the same answer: `found: false` and nothing more."
          },
          "ready": {
            "type": "boolean",
            "description": "False while the record's latest event is still being sealed: ask again in a few seconds. Present only when `found` is true."
          },
          "evidence_id": {
            "type": "string",
            "description": "The evidence record's ID (`evd_…`), as printed on the Delivery Certificate."
          },
          "delivery_id": {
            "type": "string",
            "description": "The ID of the delivery (`dlv_…`) the record belongs to."
          },
          "test": {
            "type": "boolean",
            "description": "A test-mode delivery: nothing was sent."
          },
          "issuer": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "identifier": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "description": "Who issued the evidence, as sealed in the record: the provider's legal `name` and its `identifier`. null when the record does not say."
          },
          "sender": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "organisation",
                  "individual"
                ]
              },
              "basis": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "registry",
                  "declared",
                  "note-only",
                  null
                ],
                "description": "`registry`: confirmed in the company registry. `declared`: as the sender gave it. `note-only`: an older record that names the company only in free text, which is not shown. Null for an individual."
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A company's name. A person is never named."
              },
              "kennitala": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Registry-confirmed companies only."
              }
            },
            "description": "The sender: `kind` (`organisation` or `individual`); for a company its `name`, with `basis` saying how the name was established, and its `kennitala` (Icelandic company number) when confirmed in the company registry. A person is never named. null when the record names no sender."
          },
          "recipient": {
            "type": "object",
            "properties": {
              "kind": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "individual",
                  null
                ]
              },
              "identified": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "method": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "level": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "High",
                      "Substantial",
                      "Low",
                      "None",
                      null
                    ]
                  },
                  "verified": {
                    "type": "boolean"
                  },
                  "at": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date-time"
                  }
                }
              }
            },
            "description": "The recipient, never by name: `kind` is `individual` when a person identified themselves (else null), and `identified` gives the method, the eIDAS assurance level (`High`, `Substantial`, `Low` or `None`), whether the identity itself was verified, and when."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the delivery's first sealed event happened, in ISO 8601 (UTC); null when the record has none."
          },
          "record_sealed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the record as a whole was sealed, in ISO 8601 (UTC); null while it is not."
          },
          "seals": {
            "type": "object",
            "properties": {
              "intact": {
                "type": "boolean"
              },
              "items": {
                "type": "integer"
              },
              "envelope_sealed": {
                "type": "boolean"
              }
            },
            "description": "Parasend's check of the stored record: `intact`, every seal checks out and the record is the one asked for; `items`, the number of sealed events; `envelope_sealed`, whether the record as a whole is sealed."
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "event": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "etsi_event": {
                  "type": "string"
                },
                "time": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "reasons": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            },
            "description": "Every sealed event, in order: Parasend's event type (`event`, such as `delivery.created`), the ETSI evidence event (`etsi_event`, such as `SubmissionAcceptance`), its `time` and its reason codes (`reasons`). Never free text or addresses."
          },
          "documents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "sha256": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            },
            "description": "The delivered documents, each by its SHA-256 digest only (64 hexadecimal characters), never by file name."
          }
        }
      },
      "Rail": {
        "type": "string",
        "enum": [
          "card",
          "bank_claim"
        ],
        "description": "How the plan is paid: `card`, a card on file; `bank_claim`, an invoice with a claim in the payer's online bank."
      },
      "Recipient": {
        "type": "object",
        "description": "Who receives a delivery. At least one of `email` and `phone`; `phone` is required at `verification_level: medium`, where the SMS code goes. With `conditional_authentication` true, only the named person can open it: `personal_code` is required at `high` (only an eID with that kennitala passes) and `id_document_number` at `substantial` (only that identity document passes). Without it, the recipient still verifies at the level you set, and their verified identity is recorded and returned to you. A mismatch is the event `delivery.auth_failed`, with the reason `personal_code_mismatch` or `id_document_mismatch`.",
        "required": [
          "verification_level"
        ],
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The recipient's name as you gave it, trimmed: up to 255 characters, no control characters. It is sealed into the evidence as given and never checked; null when none was given. `verified_name` holds the name from their eID or passport."
          },
          "verified_name": {
            "type": [
              "string",
              "null"
            ],
            "readOnly": true,
            "description": "The recipient's name as their eID or passport states it, once they have signed in with one; null before that, or for a confirmation without an eID or a passport check. `name` stays as the sender declared it (sealed into the evidence as such)."
          },
          "verified_method": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AuthMethod"
              },
              {
                "type": "null"
              }
            ],
            "readOnly": true,
            "description": "How `verified_name` was established — the method of the sign-in it was read from (an eID, a passkey, or videoid for a passport check); null with it."
          },
          "verification_photos": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "document",
                "selfie"
              ]
            },
            "readOnly": true,
            "description": "The photos kept, with the recipient's consent, from the passport or ID-card check their verified name came from: the document's photo page and the selfie. Each is at GET /deliveries/{id}/recipient_photos/{kind} (JPEG; needs `evidence.read`). Empty for any other method."
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "The recipient's e-mail address, where e-mail notices and reminders go; null when not given. At least one of `email` and `phone` is required."
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "E.164"
          },
          "address": {
            "$ref": "#/components/schemas/PostalAddress"
          },
          "verification_level": {
            "type": "string",
            "enum": [
              "high",
              "substantial",
              "medium",
              "low"
            ],
            "description": "How the recipient must identify themselves before they see the documents: `high`, eID; `substantial`, a passport or ID-card check with a selfie; `medium`, a one-time code sent by SMS when they open the link; `low`, the link alone. A stronger way is always accepted."
          },
          "conditional_authentication": {
            "type": "boolean",
            "default": false,
            "description": "When true, only the person you name can open the delivery: at `high` their eID must carry `personal_code`, and at `substantial` their passport or ID card must carry `id_document_number`. Default false: the recipient still identifies themselves at the level, and you get back the identity they used."
          },
          "personal_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "The recipient's Icelandic personal code (kennitala). Required when `conditional_authentication` is true at `high`."
          },
          "id_document_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The number of the recipient's passport or ID card. Required when `conditional_authentication` is true at `substantial`."
          }
        }
      },
      "RecipientDomain": {
        "type": "object",
        "required": [
          "id",
          "object",
          "hostname",
          "state",
          "reason",
          "records",
          "caa_hint",
          "certificate",
          "used_by",
          "verified_at",
          "active_since",
          "degraded_since",
          "failed_at",
          "last_checked_at",
          "created_at",
          "removed_at"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The link domain's ID, starting `cdm_`."
          },
          "object": {
            "type": "string",
            "const": "recipient_domain",
            "description": "Always `recipient_domain`."
          },
          "hostname": {
            "type": "string",
            "description": "The hostname your delivery links use, such as `afhending.fyrirtaeki.example`: lower case, an internationalised name in its ASCII (`xn--`) form. At least three labels, so not a bare domain, and never under parasend.com."
          },
          "state": {
            "type": "string",
            "enum": [
              "pending_dns",
              "verifying",
              "issuing_cert",
              "active",
              "degraded",
              "failed",
              "removed"
            ],
            "description": "`pending_dns`: the ownership TXT or the CNAME is not seen yet. `verifying`: both are seen and the domain is being set up. `issuing_cert`: its certificate is being issued. `active`: links use it. `degraded`: it was active and a check now fails. `failed`: it could not be set up, or stayed degraded for 72 hours. `removed`: taken off your list."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it waits, is degraded or failed: ownership_not_found, cname_not_found, lookup_failed, tenants_off, certificate_pending, deploying, dns_not_pointing, claimed_elsewhere, hostname_in_use_elsewhere (the hostname is still on another CloudFront distribution: remove it there, then Check now), certificate_<status>, tenant_missing, tenant_disabled, degraded_72h, organization_erased."
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecipientDomainRecord"
            },
            "description": "The ownership TXT and the CNAME, expected and seen; a caa record only when CAA is published."
          },
          "caa_hint": {
            "type": "boolean",
            "description": "CAA is published and names no Amazon issuer, so no certificate can be issued."
          },
          "certificate": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "status": {
                "type": "string",
                "description": "pending-validation, issued, failed, validation-timed-out, revoked, expired or inactive."
              }
            },
            "description": "The hostname's TLS certificate, by its `status`; null until one has been requested."
          },
          "used_by": {
            "type": "object",
            "required": [
              "brand_profiles"
            ],
            "properties": {
              "brand_profiles": {
                "type": "integer",
                "minimum": 0,
                "description": "Profiles in use whose current version names it (a count)."
              }
            },
            "description": "How many brand profiles in use name this domain in their current version (`brand_profiles`)."
          },
          "verified_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When both DNS records were first seen together; the hostname is your organisation's from then on."
          },
          "active_since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the domain last became `active`, in ISO 8601 (UTC); null if it never has."
          },
          "degraded_since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the domain, while active, began failing its checks, in ISO 8601 (UTC); null when it is not degraded. After 72 hours degraded it becomes `failed`."
          },
          "failed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the domain became `failed`, in ISO 8601 (UTC); null otherwise."
          },
          "last_checked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When its DNS was last checked, in ISO 8601 (UTC); null before the first check. Parasend checks every 15 minutes, and when you call `POST /recipient_domains/{id}/check`."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the domain was added, in ISO 8601 (UTC)."
          },
          "removed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the domain was removed with `DELETE /recipient_domains/{id}`, in ISO 8601 (UTC); null while it is on your list."
          }
        }
      },
      "RecipientDomainRecord": {
        "type": "object",
        "required": [
          "record",
          "type",
          "name",
          "value",
          "seen",
          "ok"
        ],
        "properties": {
          "record": {
            "type": "string",
            "enum": [
              "ownership",
              "cname",
              "caa"
            ],
            "description": "Which record this is: `ownership`, the TXT record that proves the hostname is yours; `cname`, the CNAME that points it at Parasend; `caa`, your CAA record, listed only when you publish one."
          },
          "type": {
            "type": "string",
            "enum": [
              "TXT",
              "CNAME",
              "CAA"
            ],
            "description": "The DNS record type: `TXT` for `ownership`, `CNAME` for `cname`, `CAA` for `caa`."
          },
          "name": {
            "type": "string",
            "description": "The DNS name to publish at (for caa, the name whose CAA governs the hostname)."
          },
          "value": {
            "type": "string",
            "description": "What it should hold."
          },
          "seen": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "What the last check found there."
          },
          "ok": {
            "type": "boolean",
            "description": "Whether the last check found the record as it should be."
          },
          "via": {
            "type": "string",
            "enum": [
              "parent_domain"
            ],
            "description": "Ownership proved by the parent domain, which your organisation alone has verified for e-mail."
          }
        }
      },
      "RecipientStatus": {
        "type": "string",
        "description": "Where a delivery is in its life. Activity such as reminders and opens is in `last_activity`, never a status. `authenticated`: the recipient has verified but not yet confirmed receipt. The end states are `delivered`, `expired`, `revoked`, `bounced` and `consignment_failed`.",
        "enum": [
          "created",
          "notified",
          "opened",
          "authenticated",
          "auth_failed",
          "confirmed",
          "delivered",
          "evidence_sealed",
          "expired",
          "revoked",
          "bounced",
          "consignment_failed",
          "paper_pending_approval",
          "paper_dispatched"
        ]
      },
      "ReminderPolicy": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ReminderPolicyCreate"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The policy's ID. Parasend's own policies are `rpol_default`, `rpol_debt_collection` and `rpol_none`."
              },
              "object": {
                "type": "string",
                "const": "reminder_policy",
                "description": "Always `reminder_policy`."
              },
              "system": {
                "type": "boolean",
                "description": "One of Parasend's own policies (`rpol_default`, `rpol_debt_collection`, `rpol_none`). The steps of the first two can be made your organisation's own version (`customized`); none can be renamed or deleted."
              },
              "customized": {
                "type": "boolean",
                "description": "Your organisation's own version of one of Parasend's policies is in use."
              },
              "version": {
                "type": "integer",
                "description": "The version in use in this organisation — for one of Parasend's, its own while customized."
              },
              "version_id": {
                "type": "string",
                "description": "The follow-up policy version's ID, starting `rpv_`."
              },
              "in_use_by_batches": {
                "type": "integer",
                "description": "Open batches (draft or sending) that name the policy."
              },
              "in_use_by_deliveries": {
                "type": "integer",
                "description": "Deliveries that cite the policy and are not yet confirmed or ended."
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the policy was created, in ISO 8601 (UTC)."
              },
              "updated_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the policy last changed (renamed, given a new version, or archived), in ISO 8601 (UTC). For one of Parasend's policies with your own version, when your version last changed."
              },
              "archived_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When the policy was archived with `DELETE /reminder_policies/{id}`, in ISO 8601 (UTC); null while it is in use. Parasend's own policies are never archived."
              }
            }
          }
        ]
      },
      "ReminderPolicyCreate": {
        "type": "object",
        "required": [
          "name",
          "steps"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100,
            "description": "Your name for the policy: 1–100 characters, without control characters; leading and trailing spaces are trimmed."
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyStep"
            },
            "maxItems": 12
          },
          "stop_on": {
            "type": "string",
            "const": "confirmed",
            "description": "When the follow-ups stop: `confirmed`, the only value, once the recipient confirms receipt."
          },
          "is_account_default": {
            "type": "boolean",
            "default": false,
            "description": "The organisation's pre-fill for new batches and deliveries; never applied by itself. Needs organization.update."
          }
        }
      },
      "ReminderPolicyVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The follow-up policy version's ID, starting `rpv_`."
          },
          "object": {
            "type": "string",
            "const": "reminder_policy_version",
            "description": "Always `reminder_policy_version`."
          },
          "policy_id": {
            "type": "string",
            "description": "The follow-up policy (`rpol_…`) this is a version of. Your own versions of one of Parasend's policies are listed under that policy's ID."
          },
          "version": {
            "type": "integer",
            "description": "The version's number within its policy: 1 for the first, one more for each change to the steps or settings."
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyStep"
            }
          },
          "stop_on": {
            "type": "string",
            "const": "confirmed",
            "description": "When the follow-ups stop: always `confirmed`, once the recipient confirms receipt."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the version was made, in ISO 8601 (UTC)."
          },
          "created_by": {
            "type": "object",
            "properties": {
              "user_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "via": {
                "type": "string",
                "enum": [
                  "portal",
                  "api_key",
                  "system"
                ]
              }
            },
            "description": "Who made the version: `user_id`, the member or the API key's holder (null when there is none), and `via`: `portal`, `api_key`, or `system` for a version made by Parasend."
          }
        }
      },
      "ReminderStepPreview": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "reminder_step_preview",
            "description": "Always `reminder_step_preview`."
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "sms"
            ],
            "description": "The step's channel: `email`, previewed in `email`, or `sms`, previewed in `sms`."
          },
          "locale": {
            "type": "string",
            "enum": [
              "is",
              "en"
            ],
            "description": "The language of the preview, from the `locale` query parameter: `is` (the default) or `en`."
          },
          "preset": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "standard",
              "firmer",
              "final",
              null
            ],
            "description": "The step's `message.preset`: `standard`, `firmer` or `final`. null when the step has no `message`, which sends Parasend's standard reminder."
          },
          "template": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "enum": [
                  "reminder.email",
                  "reminder.sms"
                ]
              },
              "version": {
                "type": "integer"
              }
            },
            "description": "Parasend's template the reminder is drawn with: its `id` (`reminder.email` or `reminder.sms`) and `version`."
          },
          "email": {
            "type": "object",
            "description": "An e-mail step only.",
            "properties": {
              "from_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "subject": {
                "type": "string"
              },
              "text": {
                "type": "string"
              },
              "html": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "images": {
                "type": "object",
                "additionalProperties": {
                  "type": "string"
                },
                "description": "cid → data: URI"
              }
            }
          },
          "sms": {
            "type": "object",
            "description": "An SMS step only.",
            "properties": {
              "text": {
                "type": "string"
              },
              "length": {
                "type": "integer"
              },
              "limit": {
                "type": "integer",
                "description": "160, or 70 when the message is UCS-2."
              },
              "text_length": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The step's own text with each date at 10 characters; null for today's reminder SMS."
              },
              "text_room": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "fits": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "SenderDisplay": {
        "type": "string",
        "enum": [
          "legal_person",
          "individual"
        ],
        "description": "What the recipient and the evidence show as the sender. `legal_person` (your organisation's default) shows the organisation, with an opaque reference to the person who sent it; that person's name, personal code and e-mail are not shown. `individual` names the person who sent it as well. Your choice per delivery or template; a personal account is always `individual`."
      },
      "SendWindow": {
        "type": "object",
        "required": [
          "start",
          "end"
        ],
        "properties": {
          "start": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
            "description": "Local time HH:MM, inclusive."
          },
          "end": {
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
            "description": "Local time HH:MM, exclusive; after start, same day."
          },
          "tz": {
            "type": "string",
            "const": "Atlantic/Reykjavik",
            "description": "The time zone of `start` and `end`: always `Atlantic/Reykjavik`, which is UTC all year."
          }
        }
      },
      "StepMessage": {
        "type": "object",
        "additionalProperties": false,
        "description": "The wording a follow-up step's reminder sends. Left out: Parasend's standard reminder. `preset` picks Parasend's wording; `custom` holds your own, by language (Plan 1–3 and Enterprise). A field or language left out comes from the preset.",
        "properties": {
          "preset": {
            "type": "string",
            "enum": [
              "standard",
              "firmer",
              "final"
            ],
            "default": "standard",
            "description": "`standard` is the usual reminder; `firmer` and `final` are Parasend's stronger wordings."
          },
          "custom": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "is": {
                "$ref": "#/components/schemas/StepWording"
              },
              "en": {
                "$ref": "#/components/schemas/StepWording"
              }
            },
            "description": "Your own wording, by language (`is`, `en`); a field or a language left out comes from `preset`. Needs Plan 1–3 or Enterprise; otherwise refused with `theme_knob_plan_gated`."
          },
          "source": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "wording",
              "version"
            ],
            "description": "The saved wording and version this step's wording was loaded from. A record only: the step keeps its own copy. Not on a saved wording's own message.",
            "properties": {
              "wording": {
                "type": "string",
                "pattern": "^wrd_"
              },
              "version": {
                "type": "integer",
                "minimum": 1
              }
            }
          }
        }
      },
      "StepWording": {
        "type": "object",
        "additionalProperties": false,
        "description": "Plain text. An e-mail step takes `subject`, `heading` and `text`; an SMS step `text` only. Variables: {{recipient.name}}, {{recipient.first_name}}, {{sender.name}}, {{delivery.title}}, {{delivery.sent_on}}, {{delivery.expires_on}}, {{files.count}}; an SMS only the two dates. No links, e-mail addresses or phone numbers. An e-mail may hold the gender word {{recipient.gender: male | female | other}}.",
        "properties": {
          "subject": {
            "type": "string",
            "maxLength": 150,
            "description": "One line. Empty is the preset's."
          },
          "heading": {
            "type": "string",
            "maxLength": 150,
            "description": "One line, in place of the reminder's heading."
          },
          "text": {
            "type": "string",
            "maxLength": 1500,
            "description": "A paragraph under the heading; for an SMS, between the sender's name and the link (3.5)."
          }
        }
      },
      "WebhookAttempt": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the object."
          },
          "event_id": {
            "type": "string",
            "description": "The event (`evt_…`) this attempt sent. For a test attempt, an event that exists only in this log."
          },
          "attempt_number": {
            "type": "integer",
            "description": "Which try this was for the event on this endpoint, counting from 1. Parasend tries up to 9 times over about three days; a replay or test continues the count."
          },
          "status_code": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The HTTP status your endpoint answered with; for a `token_fetch` failure, your identity provider's status. null when no answer came back, and `error` says why."
          },
          "latency_ms": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How long the request took, in milliseconds, until the response had been read (for a `token_fetch` failure, the token request). null when no request was made. Parasend waits at most 10 seconds."
          },
          "replay": {
            "type": "boolean",
            "description": "True when triggered via /replay (signed with a fresh timestamp)."
          },
          "failure_stage": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "token_fetch",
              "request",
              null
            ],
            "description": "`token_fetch` when your identity provider refused or did not answer the OAuth 2.0 client-credentials request (`status_code` is then the provider's); `request` when the endpoint itself failed; null on success."
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created, in ISO 8601 (UTC)."
          },
          "event_type": {
            "type": "string",
            "description": "The event's type (EventType), so the log reads without a second call."
          },
          "ok": {
            "type": "boolean",
            "description": "True when the endpoint answered 2xx."
          },
          "test": {
            "type": "boolean",
            "description": "An attempt made by POST /webhook_endpoints/{id}/test. Its `event_id` exists nowhere else."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why no status code came back, by class — never a response body: TimeoutError, ECONNREFUSED, ECONNRESET, ENOTFOUND, CERT_HAS_EXPIRED (any TLS error code), destination_not_public (the guard refused to connect), token_response_invalid. null when a status code came back."
          },
          "next_retry_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "On the latest failed attempt of an event still being retried: when the next try is due."
          },
          "exhausted": {
            "type": "boolean",
            "description": "On the attempt after which retries ran out (attempt 9 of 9)."
          }
        }
      },
      "WebhookAttemptSummary": {
        "type": "object",
        "properties": {
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created, in ISO 8601 (UTC)."
          },
          "ok": {
            "type": "boolean",
            "description": "True when the endpoint answered with a 2xx status."
          },
          "status_code": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The HTTP status your endpoint answered with; for a `token_fetch` failure, your identity provider's status. null when no answer came back, and `error` says why."
          },
          "latency_ms": {
            "type": [
              "integer",
              "null"
            ],
            "description": "How long the request took, in milliseconds, until the response had been read (for a `token_fetch` failure, the token request). null when no request was made. Parasend waits at most 10 seconds."
          },
          "failure_stage": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "token_fetch",
              "request",
              null
            ],
            "description": "`token_fetch`: your identity provider refused or did not answer the OAuth 2.0 token request. `request`: the endpoint itself failed. null on success."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why no status code came back, by class, such as `TimeoutError`, `ECONNREFUSED`, `ENOTFOUND`, a TLS error code or `destination_not_public`; never a response body. null when a status code came back."
          },
          "replay": {
            "type": "boolean",
            "description": "True when the attempt was a replay (`POST /webhook_endpoints/{id}/replay`)."
          },
          "test": {
            "type": "boolean",
            "description": "True when the attempt sent a test event (`POST /webhook_endpoints/{id}/test`)."
          }
        }
      },
      "WebhookAuth": {
        "type": "object",
        "description": "How Parasend authenticates to your endpoint, in addition to the HMAC signature, which is always sent. Secrets are write-only: accepted on create and update, never returned. The endpoint shows `mode`, the settings that are not secret, and whether a secret is set.",
        "required": [
          "mode"
        ],
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "none",
              "static_bearer",
              "oauth2_client_credentials"
            ],
            "default": "none",
            "description": "none = HMAC only. static_bearer = an `Authorization` header carrying `Bearer <token>` with a customer-supplied token. oauth2_client_credentials = a token obtained from the customer's IdP by the client-credentials grant, cached until expiry, sent as the bearer."
          },
          "static_bearer": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "token": {
                "type": "string",
                "writeOnly": true,
                "description": "Never returned. Rotate by writing a new value."
              },
              "token_set": {
                "type": "boolean",
                "readOnly": true
              }
            },
            "description": "With `mode: static_bearer`: the `token` Parasend sends as `Authorization: Bearer <token>`, at most 4,096 characters (write-only; responses show `token_set`). null for any other mode."
          },
          "oauth2": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "token_url": {
                "type": "string",
                "format": "uri",
                "description": "HTTPS only."
              },
              "client_id": {
                "type": "string"
              },
              "client_secret": {
                "type": "string",
                "writeOnly": true,
                "description": "Never returned."
              },
              "client_secret_set": {
                "type": "boolean",
                "readOnly": true
              },
              "scope": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "audience": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "auth_style": {
                "type": "string",
                "enum": [
                  "client_secret_basic",
                  "client_secret_post"
                ],
                "default": "client_secret_basic"
              }
            },
            "description": "With `mode: oauth2_client_credentials`: your token endpoint (`token_url`, HTTPS), `client_id`, `client_secret` (write-only; responses show `client_secret_set`), optional `scope` and `audience`, and `auth_style`. null for any other mode."
          }
        }
      },
      "WebhookDeliverySources": {
        "type": "object",
        "additionalProperties": false,
        "description": "Limits the endpoint to deliveries from some senders: those sent with one of `api_keys` (through any secret the key has had, after rolls or a new holder), or, with `portal: true`, by a member signed in to the portal. At least one key, or the portal. Events not tied to a delivery always go through, and test events and replays ignore this. Each key must be your organisation's, in the endpoint's mode and not revoked when chosen (`webhook_delivery_sources_invalid`).",
        "properties": {
          "api_keys": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "string",
              "pattern": "^key_"
            },
            "default": [],
            "description": "API keys (`key_…`) whose deliveries' events go to the endpoint, at most 50; duplicates are dropped. Each must be your organisation's, in the endpoint's mode, and not revoked when you choose it."
          },
          "portal": {
            "type": "boolean",
            "default": false,
            "description": "Whether events of deliveries sent by members signed in to the portal go to the endpoint too. Default false."
          }
        }
      },
      "WebhookDeliverySourcesView": {
        "description": "delivery_sources as the read model returns it.",
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookDeliverySources"
          },
          {
            "type": "object",
            "required": [
              "api_key_details"
            ],
            "properties": {
              "api_key_details": {
                "type": "array",
                "readOnly": true,
                "description": "The chosen keys in the same order, to show them by name. Not accepted on write.",
                "items": {
                  "type": "object",
                  "required": [
                    "id",
                    "name",
                    "key_prefix",
                    "revoked"
                  ],
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "key_prefix": {
                      "type": "string",
                      "description": "The first 12 characters, as the keys page shows them."
                    },
                    "revoked": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The webhook endpoint's ID, starting `whk_`."
          },
          "object": {
            "type": "string",
            "const": "webhook_endpoint",
            "description": "Always `webhook_endpoint`."
          },
          "url": {
            "type": "string",
            "description": "The address Parasend posts events to: HTTPS, on port 443, on a public host."
          },
          "event_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventType"
            }
          },
          "secret": {
            "type": [
              "string",
              "null"
            ],
            "description": "HMAC signing secret. Present only in the creation response."
          },
          "auth": {
            "$ref": "#/components/schemas/WebhookAuth"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "`enabled`: events are sent to it. `disabled`: paused; new events are not queued for it, and pending retries are cancelled when they come due."
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "When it was created, in ISO 8601 (UTC)."
          },
          "livemode": {
            "type": "boolean",
            "description": "`true` in live mode, `false` in test mode."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your own note about the endpoint."
          },
          "created_by": {
            "type": [
              "object",
              "null"
            ],
            "description": "Who created the endpoint: a person, or the holder of the API key used. null for endpoints created before this was recorded.",
            "properties": {
              "user_id": {
                "type": "string"
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "via": {
                "type": "string",
                "enum": [
                  "portal",
                  "api_key"
                ]
              }
            }
          },
          "exhausted_events": {
            "type": "integer",
            "description": "Events that ran out of retries and have not been replayed successfully. More than 0 marks the endpoint in the portal."
          },
          "last_exhausted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When an event last ran out of retries on this endpoint, in ISO 8601 (UTC); null if none ever has."
          },
          "retrying_events": {
            "type": "integer",
            "description": "Events with at least one failed attempt whose retries are still running."
          },
          "last_attempt": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WebhookAttemptSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "The endpoint's latest attempt, in brief; null before the first."
          },
          "previous_secret_expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Set for 24 hours after a roll; null otherwise."
          },
          "delivery_sources": {
            "description": "null: every delivery's events.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/WebhookDeliverySourcesView"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "WebhookEndpointCreate": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "description": "HTTPS only."
          },
          "event_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventType"
            }
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your own note about the endpoint, up to 500 characters; null or left out for none.",
            "maxLength": 500
          },
          "auth": {
            "$ref": "#/components/schemas/WebhookAuth"
          },
          "delivery_sources": {
            "description": "Omitted or null = every delivery (the default; what every endpoint had before).",
            "oneOf": [
              {
                "$ref": "#/components/schemas/WebhookDeliverySources"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "WebhookEndpointUpdate": {
        "type": "object",
        "additionalProperties": false,
        "description": "PATCH body. Every field optional; a field sent replaces the stored one. Write-only auth secrets not resent are kept.",
        "properties": {
          "url": {
            "type": "string",
            "description": "HTTPS on port 443, public host (A)."
          },
          "event_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventType"
            },
            "description": "Empty = every type, including types added later."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 500,
            "description": "Your own note about the endpoint, up to 500 characters; null clears it."
          },
          "auth": {
            "$ref": "#/components/schemas/WebhookAuth"
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled"
            ],
            "description": "disabled pauses the endpoint: new events are not queued for it and pending retries are cancelled when they come due."
          },
          "delivery_sources": {
            "description": "null: every delivery's events. A change applies to events queued from then on; retries already queued go ahead.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/WebhookDeliverySources"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "WebhookEventOutcome": {
        "type": "object",
        "properties": {
          "endpoint_id": {
            "type": "string",
            "description": "The webhook endpoint's ID (`whk_…`)."
          },
          "url": {
            "type": "string",
            "description": "The endpoint's URL."
          },
          "endpoint_status": {
            "type": "string",
            "enum": [
              "enabled",
              "disabled",
              "deleted"
            ],
            "description": "The endpoint's status now: `enabled`, `disabled` (paused) or `deleted`."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "retrying",
              "succeeded",
              "exhausted",
              "cancelled",
              "failed"
            ],
            "description": "`pending`: queued, not tried yet. `retrying`: failed so far, retries running. `succeeded`: the endpoint answered 2xx, on a try or a replay. `exhausted`: 9 tries failed and no replay has succeeded. `cancelled`: the endpoint was paused or deleted before it got through. `failed`: never queued for this endpoint (it was added later), and the replays so far failed."
          },
          "attempts": {
            "type": "integer",
            "description": "Tries and replays so far."
          },
          "last_attempt": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/WebhookAttemptSummary"
              },
              {
                "type": "null"
              }
            ],
            "description": "The latest try to send the event to this endpoint, in brief; null when there has been none."
          },
          "next_retry_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the next try is due, in ISO 8601 (UTC), while retries are running; null otherwise."
          }
        }
      },
      "WebhookTestResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookAttempt"
          },
          {
            "type": "object",
            "properties": {
              "event": {
                "$ref": "#/components/schemas/Event"
              },
              "response_excerpt": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 512,
                "description": "First 512 bytes of the response body, decoded as UTF-8, control characters removed. Never stored."
              }
            }
          }
        ]
      },
      "Wording": {
        "type": "object",
        "description": "A saved wording: your organisation's text for notices or follow-up steps, kept with its versions.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The wording's ID, starting `wrd_`."
          },
          "object": {
            "type": "string",
            "const": "wording",
            "description": "Always `wording`."
          },
          "name": {
            "type": "string",
            "description": "Your name for the wording, 1–100 characters. Recipients never see it."
          },
          "use": {
            "type": "string",
            "enum": [
              "reminder",
              "notice"
            ],
            "description": "`notice` or `reminder`; fixed once the wording is made."
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "sms"
            ],
            "description": "The channel the wording is for, `email` or `sms`; fixed once the wording is made."
          },
          "is_default": {
            "type": "boolean",
            "description": "The first-notice wording for its channel."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "The current version's number: 1 for the first, one more for each change to `message`."
          },
          "version_id": {
            "type": "string",
            "description": "The wording version's ID, starting `wrv_`."
          },
          "message": {
            "$ref": "#/components/schemas/StepMessage"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the wording was saved, in ISO 8601 (UTC)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the wording last changed (renamed, given a new version, made or no longer the default, or archived), in ISO 8601 (UTC)."
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the wording was archived with `DELETE /wordings/{id}`, in ISO 8601 (UTC); null while it is in use. Policies that loaded it keep their copy."
          },
          "used_by": {
            "type": "object",
            "description": "How many follow-up policies use this wording, and how many of them use an older version.",
            "properties": {
              "policies": {
                "type": "integer",
                "minimum": 0
              },
              "policies_on_older_version": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        }
      },
      "WordingCreate": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "channel",
          "message"
        ],
        "properties": {
          "use": {
            "type": "string",
            "enum": [
              "reminder",
              "notice"
            ],
            "default": "reminder",
            "description": "`reminder` (the default) for follow-up steps, or `notice` for the first notice."
          },
          "is_default": {
            "type": "boolean",
            "default": false,
            "description": "Notice wordings only: make this the first-notice wording for its channel. One per channel."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Your name for the wording: 1–100 characters, without control characters; leading and trailing spaces are trimmed."
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "sms"
            ],
            "description": "The channel the wording is for: `email` or `sms`. It cannot be changed later; an SMS wording's text must keep the message to one SMS."
          },
          "message": {
            "$ref": "#/components/schemas/StepMessage"
          }
        }
      },
      "WordingPreviewRequest": {
        "type": "object",
        "description": "A wording to preview, as it would be sent.",
        "required": [
          "channel",
          "message"
        ],
        "properties": {
          "use": {
            "type": "string",
            "enum": [
              "reminder",
              "notice"
            ],
            "description": "What the wording is for: `reminder` (the default), a follow-up step's reminder, or `notice`, the first notice (whose `message.preset` must be `standard`).",
            "default": "reminder"
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "sms"
            ],
            "description": "The channel to preview: `email` or `sms`."
          },
          "message": {
            "$ref": "#/components/schemas/StepMessage"
          },
          "brand_profile_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The brand profile (`bp_…`) to preview with; null for Parasend's own look. Left out: your organisation's default profile."
          },
          "sample_gender": {
            "type": "string",
            "enum": [
              "male",
              "female",
              "other"
            ],
            "description": "The gender to fill in for {{recipient.gender: …}} in the preview."
          }
        }
      },
      "WordingVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The wording version's ID, starting `wrv_`."
          },
          "object": {
            "type": "string",
            "const": "wording_version",
            "description": "Always `wording_version`."
          },
          "wording_id": {
            "type": "string",
            "description": "The saved wording (`wrd_…`) this is a version of."
          },
          "version": {
            "type": "integer",
            "minimum": 1,
            "description": "The version's number within its wording: 1 for the first, one more for each change to `message`."
          },
          "message": {
            "$ref": "#/components/schemas/StepMessage"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the version was made, in ISO 8601 (UTC)."
          },
          "created_by": {
            "type": "object",
            "properties": {
              "user_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "via": {
                "type": "string",
                "enum": [
                  "portal",
                  "api_key"
                ]
              }
            },
            "description": "Who made the version: `user_id`, the member or the API key's holder (null for a key with no holder), and `via`, `portal` or `api_key`."
          }
        }
      }
    },
    "responses": {
      "Error": {
        "description": "Error envelope. `code` values, types and statuses are governed by the x-parasend-error-codes registry.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      }
    },
    "parameters": {
      "batchId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The batch's ID, starting `bat_`."
      },
      "cursor": {
        "name": "cursor",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "deliveryId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The delivery's ID, starting `dlv_`."
      },
      "DeliveryId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "pattern": "^dlv_"
        },
        "description": "The delivery's ID."
      },
      "limit": {
        "name": "limit",
        "in": "query",
        "schema": {
          "type": "integer",
          "default": 25,
          "maximum": 100
        }
      },
      "policyId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The policy's ID."
      },
      "webhookEndpointId": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The webhook endpoint's ID, starting `whk_`."
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "ps_live_… or ps_test_… key. Permissions per the key's matrix."
      }
    }
  },
  "x-parasend-error-codes": [
    {
      "code": "account_deletion_not_scheduled",
      "type": "conflict",
      "status": 409,
      "cause": "No deletion is scheduled."
    },
    {
      "code": "account_deletion_scheduled",
      "type": "permission_error",
      "status": 403,
      "cause": "A deletion is already scheduled."
    },
    {
      "code": "account_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No account with that ID."
    },
    {
      "code": "address_patch_state_invalid",
      "type": "conflict",
      "status": 409,
      "cause": "The delivery has moved on too far for its postal address to be changed."
    },
    {
      "code": "admin_host_only",
      "type": "permission_error",
      "status": 403,
      "cause": "The staff admin answers only on its own address."
    },
    {
      "code": "already_reminded",
      "type": "conflict",
      "status": 409,
      "cause": "This request has been reminded already."
    },
    {
      "code": "api_key_expired",
      "type": "authentication_error",
      "status": 401,
      "cause": "The API key has passed its expiry date. Make a new key in the portal."
    },
    {
      "code": "api_key_invalid",
      "type": "authentication_error",
      "status": 401,
      "cause": "The API key is not one Parasend issued: check for a typo or a missing part."
    },
    {
      "code": "api_key_ip_not_allowed",
      "type": "permission_error",
      "status": 403,
      "cause": "This API key may not be used from this IP address."
    },
    {
      "code": "api_key_missing",
      "type": "authentication_error",
      "status": 401,
      "cause": "Authentication required."
    },
    {
      "code": "api_key_revoked",
      "type": "authentication_error",
      "status": 401,
      "cause": "This API key has been revoked."
    },
    {
      "code": "approval_already_requested",
      "type": "conflict",
      "status": 409,
      "cause": "This person has an open request already. Remind them instead."
    },
    {
      "code": "approval_request_closed",
      "type": "conflict",
      "status": 409,
      "cause": "This request is no longer open."
    },
    {
      "code": "approval_request_expired",
      "type": "conflict",
      "status": 409,
      "cause": "This request has expired."
    },
    {
      "code": "approval_request_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such approval request."
    },
    {
      "code": "auth_assurance_insufficient",
      "type": "permission_error",
      "status": 403,
      "cause": "The recipient's electronic ID does not reach the level this delivery requires. Use another method."
    },
    {
      "code": "auth_attempts_exhausted",
      "type": "permission_error",
      "status": 403,
      "cause": "Too many failed attempts; try again after 24 hours."
    },
    {
      "code": "auth_cancelled_by_user",
      "type": "invalid_request",
      "status": 400,
      "cause": "The authentication was cancelled."
    },
    {
      "code": "auth_method_incompatible",
      "type": "conflict",
      "status": 409,
      "cause": "An authentication method you allowed cannot assert the identity this delivery requires."
    },
    {
      "code": "auth_method_not_offered",
      "type": "invalid_request",
      "status": 400,
      "cause": "The portal signs in with audkenni or smart_id."
    },
    {
      "code": "auth_method_unknown",
      "type": "invalid_request",
      "status": 400,
      "cause": "method is not a known authentication method."
    },
    {
      "code": "auth_not_complete",
      "type": "conflict",
      "status": 409,
      "cause": "The identity provider has not finished the authentication yet; try again in a moment."
    },
    {
      "code": "auth_provider_unavailable",
      "type": "api_error",
      "status": 503,
      "cause": "This person has no personal code on file to confirm with."
    },
    {
      "code": "bank_claim_not_available",
      "type": "invalid_request",
      "status": 400,
      "cause": "Bank claims are for Icelandic organisations; pay by card."
    },
    {
      "code": "batch_add_limit_exceeded",
      "type": "invalid_request",
      "status": 400,
      "cause": "Too many deliveries in one call. Send at most 1,000 per call, as many calls as you need."
    },
    {
      "code": "batch_closed",
      "type": "conflict",
      "status": 409,
      "cause": "The batch is closed and takes no more deliveries."
    },
    {
      "code": "batch_empty_finalize",
      "type": "invalid_request",
      "status": 400,
      "cause": "This batch has no deliveries yet; add some before sending it out."
    },
    {
      "code": "batch_finalized",
      "type": "conflict",
      "status": 409,
      "cause": "This batch has been sent out; it takes no more deliveries. Start a new batch, or duplicate this one."
    },
    {
      "code": "batch_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No batch with that ID, in the mode of your key."
    },
    {
      "code": "billing_country_locked",
      "type": "conflict",
      "status": 409,
      "cause": "This account has been invoiced in another country, so its country cannot change. Contact Parasend Support."
    },
    {
      "code": "billing_setup_required",
      "type": "permission_error",
      "status": 403,
      "cause": "All free deliveries are used. To keep sending, move to Pay-as-you-go and add a card in the portal."
    },
    {
      "code": "body_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "The request body could not be parsed."
    },
    {
      "code": "brand_asset_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No brand asset with that ID."
    },
    {
      "code": "brand_asset_reference_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "A logo, photo or icon the brand profile names is not your organisation's, or not of the right kind."
    },
    {
      "code": "brand_profile_archived",
      "type": "conflict",
      "status": 409,
      "cause": "This brand profile is archived; create a new one instead."
    },
    {
      "code": "brand_profile_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No brand profile with that ID."
    },
    {
      "code": "break_glass_limit",
      "type": "invalid_request",
      "status": 400,
      "cause": "At most two admins besides the owner can sign in with eID while SSO is required."
    },
    {
      "code": "break_glass_not_admin",
      "type": "invalid_request",
      "status": 400,
      "cause": "Only admins can be named (the owner always can sign in with eID)."
    },
    {
      "code": "card_declined",
      "type": "invalid_request",
      "status": 400,
      "cause": "The card was declined. Try another card."
    },
    {
      "code": "card_mandate_changed",
      "type": "conflict",
      "status": 409,
      "cause": "The card authorisation has changed. Read it again before accepting."
    },
    {
      "code": "card_mandate_required",
      "type": "invalid_request",
      "status": 400,
      "cause": "Accept the card authorisation before adding a card."
    },
    {
      "code": "card_not_saved",
      "type": "invalid_request",
      "status": 400,
      "cause": "Teya does not know this card check."
    },
    {
      "code": "card_payment_in_progress",
      "type": "conflict",
      "status": 409,
      "cause": "A payment of this invoice is already under way. Wait a moment and look again."
    },
    {
      "code": "card_payments_not_available",
      "type": "invalid_request",
      "status": 400,
      "cause": "Card payments are not available here yet."
    },
    {
      "code": "card_payments_not_enabled",
      "type": "api_error",
      "status": 503,
      "cause": "Saving cards is not switched on for Parasend at the card processor yet. Try again later."
    },
    {
      "code": "card_processor_unavailable",
      "type": "api_error",
      "status": 503,
      "cause": "The card processor did not answer. Try again in a moment."
    },
    {
      "code": "card_session_failed",
      "type": "conflict",
      "status": 409,
      "cause": "This card was not saved. Open the card form again."
    },
    {
      "code": "card_session_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such card session."
    },
    {
      "code": "card_session_pending",
      "type": "conflict",
      "status": 409,
      "cause": "The card check is not finished yet. Try again in a moment."
    },
    {
      "code": "certificate_language_fixed",
      "type": "conflict",
      "status": 409,
      "cause": "A delivery's certificate is in the language the company had set when it was sent; the other language is refused."
    },
    {
      "code": "company_account_required",
      "type": "conflict",
      "status": 409,
      "cause": "A personal account has no company to verify."
    },
    {
      "code": "company_already_registered",
      "type": "conflict",
      "status": 409,
      "cause": "This company already has a Parasend account. Ask its owner to invite you."
    },
    {
      "code": "company_application_already_approved",
      "type": "conflict",
      "status": 409,
      "cause": "This request has already been approved."
    },
    {
      "code": "company_application_closed",
      "type": "conflict",
      "status": 409,
      "cause": "This application is no longer open."
    },
    {
      "code": "company_application_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such company application."
    },
    {
      "code": "company_application_pending",
      "type": "conflict",
      "status": 409,
      "cause": "You have asked for a new account for this company. Cancel that application first."
    },
    {
      "code": "company_approval_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "This approval link is not valid."
    },
    {
      "code": "company_approval_not_yours",
      "type": "permission_error",
      "status": 403,
      "cause": "This request is for someone else."
    },
    {
      "code": "company_closed",
      "type": "conflict",
      "status": 409,
      "cause": "The company registry lists this company as closed."
    },
    {
      "code": "company_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No company with this code in the company registry."
    },
    {
      "code": "company_registry_not_connected",
      "type": "api_error",
      "status": 503,
      "cause": "The company registry is not connected yet."
    },
    {
      "code": "company_registry_unavailable",
      "type": "api_error",
      "status": 503,
      "cause": "The company registry did not answer. Try again in a moment."
    },
    {
      "code": "confirmation_mismatch",
      "type": "invalid_request",
      "status": 400,
      "cause": "Type the company's name exactly as it is shown."
    },
    {
      "code": "confirmation_required",
      "type": "conflict",
      "status": 409,
      "cause": "Give an e-mail address for the account; a code confirms it."
    },
    {
      "code": "contrast_validation_failed",
      "type": "invalid_request",
      "status": 400,
      "cause": "A colour pair does not reach the contrast of 4.5:1. `message` names the pair."
    },
    {
      "code": "country_fixed_by_eid",
      "type": "invalid_request",
      "status": 400,
      "cause": "The billing country comes from your electronic ID."
    },
    {
      "code": "country_not_supported",
      "type": "invalid_request",
      "status": 400,
      "cause": "Company sign-up is for Icelandic companies for now."
    },
    {
      "code": "credential_missing",
      "type": "api_error",
      "status": 500,
      "cause": "The signed-in session has no credential to issue from."
    },
    {
      "code": "csrf_token_invalid",
      "type": "permission_error",
      "status": 403,
      "cause": "This request needs the Parasend-CSRF header of your current session."
    },
    {
      "code": "cursor_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "The provided cursor is not valid."
    },
    {
      "code": "delete_already_scheduled",
      "type": "conflict",
      "status": 409,
      "cause": "Deletion is already scheduled for this delivery."
    },
    {
      "code": "delete_blocked_legal_hold",
      "type": "conflict",
      "status": 409,
      "cause": "The delivery is under legal hold and cannot be deleted. The message names the case reference, when there is one."
    },
    {
      "code": "delivery_already_confirmed",
      "type": "conflict",
      "status": 409,
      "cause": "The recipient has already confirmed receipt; revocation is not possible."
    },
    {
      "code": "delivery_expired",
      "type": "conflict",
      "status": 409,
      "cause": "The delivery has already expired."
    },
    {
      "code": "delivery_link_expired",
      "type": "authentication_error",
      "status": 401,
      "cause": "This delivery link has expired."
    },
    {
      "code": "delivery_link_invalid",
      "type": "not_found",
      "status": 404,
      "cause": "This delivery link is not valid."
    },
    {
      "code": "delivery_link_wrong_host",
      "type": "conflict",
      "status": 409,
      "cause": "This delivery opens on its own address; the page moves there."
    },
    {
      "code": "delivery_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No delivery with that ID that you may see, in the mode of your key."
    },
    {
      "code": "delivery_revoked",
      "type": "conflict",
      "status": 409,
      "cause": "The delivery is already revoked."
    },
    {
      "code": "delivery_state_invalid",
      "type": "conflict",
      "status": 409,
      "cause": "This delivery has been confirmed or has ended; its follow-ups no longer change."
    },
    {
      "code": "delivery_too_large",
      "type": "invalid_request",
      "status": 400,
      "cause": "The files of one delivery add up to more than a delivery may hold."
    },
    {
      "code": "delivery_visibility_insufficient",
      "type": "permission_error",
      "status": 403,
      "cause": "Webhook endpoints get events for every delivery in the organisation, so managing them needs a key or member that sees all deliveries."
    },
    {
      "code": "document_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No shared document with that ID."
    },
    {
      "code": "document_personal_code_missing",
      "type": "permission_error",
      "status": 403,
      "cause": "This document does not show a kennitala. Use electronic ID, or an Icelandic passport or ID card."
    },
    {
      "code": "domain_exists",
      "type": "conflict",
      "status": 409,
      "cause": "Your organisation already has this domain."
    },
    {
      "code": "domain_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such domain."
    },
    {
      "code": "domain_not_verified",
      "type": "conflict",
      "status": 409,
      "cause": "Verify at least one e-mail domain first: discovery works only on verified domains."
    },
    {
      "code": "domain_public_mail",
      "type": "invalid_request",
      "status": 400,
      "cause": "This is a public mail service: anyone can have an address there, so it cannot be verified for an organisation."
    },
    {
      "code": "eid_sign_in_required",
      "type": "permission_error",
      "status": 403,
      "cause": "You are listed for this company: confirm with your electronic ID to open its account."
    },
    {
      "code": "email_already_registered",
      "type": "conflict",
      "status": 409,
      "cause": "This address already has a Parasend account. Sign in instead."
    },
    {
      "code": "email_disposable",
      "type": "invalid_request",
      "status": 400,
      "cause": "Disposable addresses cannot be used. Use your own address."
    },
    {
      "code": "email_in_use",
      "type": "conflict",
      "status": 409,
      "cause": "This address belongs to another Parasend account. Sign in to that one, or use another address."
    },
    {
      "code": "email_not_confirmed",
      "type": "conflict",
      "status": 409,
      "cause": "Confirm this address first (POST /v1/portal/emails)."
    },
    {
      "code": "email_required",
      "type": "conflict",
      "status": 409,
      "cause": "Confirm an e-mail address for the account first (POST /v1/portal/emails)."
    },
    {
      "code": "email_sender_confirmation_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "This link is not valid any more. Send a new test e-mail from Parasend."
    },
    {
      "code": "email_sender_domain_claimed",
      "type": "conflict",
      "status": 409,
      "cause": "Another organisation on Parasend uses this domain."
    },
    {
      "code": "email_sender_exists",
      "type": "conflict",
      "status": 409,
      "cause": "Your organisation already has this e-mail sender."
    },
    {
      "code": "email_sender_in_use",
      "type": "conflict",
      "status": 409,
      "cause": "A brand profile uses this e-mail sender. Choose another sender there, or archive the profile, first."
    },
    {
      "code": "email_sender_mail_from_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "`mail_from_domain` must be a subdomain of the sending domain that nobody sends or receives mail at."
    },
    {
      "code": "email_sender_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No e-mail sender with that ID."
    },
    {
      "code": "email_sender_not_smtp",
      "type": "invalid_request",
      "status": 400,
      "cause": "This sender goes through Parasend; only an SMTP sender has a server."
    },
    {
      "code": "email_sender_public_domain",
      "type": "invalid_request",
      "status": 400,
      "cause": "Notices can go only from your organisation's own domain, not from a public mail provider."
    },
    {
      "code": "email_sender_removed",
      "type": "conflict",
      "status": 409,
      "cause": "This sender was removed; add it again to use it."
    },
    {
      "code": "email_sender_reserved",
      "type": "invalid_request",
      "status": 400,
      "cause": "Parasend's own domains cannot be a company's sender."
    },
    {
      "code": "email_sender_secret_not_deleted",
      "type": "api_error",
      "status": 500,
      "cause": "The sender's password could not be deleted just now; nothing was removed. Try again."
    },
    {
      "code": "event_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No event with that ID, in the mode of your key."
    },
    {
      "code": "expiry_extension_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "expires_at must be in the future."
    },
    {
      "code": "file_deleted",
      "type": "not_found",
      "status": 404,
      "cause": "The sender has deleted their account; its documents no longer exist."
    },
    {
      "code": "file_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such file in this delivery."
    },
    {
      "code": "file_reference_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "A file the request names does not exist, or is not yours."
    },
    {
      "code": "file_too_large",
      "type": "payload_too_large",
      "status": 413,
      "cause": "The file is larger than a direct upload allows (32 MB)."
    },
    {
      "code": "free_daily_cap_reached",
      "type": "rate_limited",
      "status": 429,
      "cause": "Free transactions have a daily limit, and it is reached. Choose a plan to send more today."
    },
    {
      "code": "free_sms_destination_not_covered",
      "type": "invalid_request",
      "status": 400,
      "cause": "Free transactions include SMS to Iceland and some countries only. Choose a plan to send SMS to this country."
    },
    {
      "code": "gateway_return_unknown",
      "type": "not_found",
      "status": 404,
      "cause": "No sign-in is waiting for this return, or its time is over."
    },
    {
      "code": "gender_wording_unavailable",
      "type": "permission_error",
      "status": 403,
      "cause": "Your organisation may not use the gender word in its wordings. `message` says why."
    },
    {
      "code": "governance_company_only",
      "type": "permission_error",
      "status": 403,
      "cause": "Shared documents are for company accounts."
    },
    {
      "code": "governance_document_shared",
      "type": "conflict",
      "status": 409,
      "cause": "This shared document has been shared and cannot be changed this way."
    },
    {
      "code": "governance_file_blocked",
      "type": "conflict",
      "status": 409,
      "cause": "The file did not pass the malware check and cannot be downloaded."
    },
    {
      "code": "governance_file_too_large",
      "type": "invalid_request",
      "status": 413,
      "cause": "The shared document is larger than allowed."
    },
    {
      "code": "governance_not_connected",
      "type": "api_error",
      "status": 503,
      "cause": "Shared documents are not connected yet."
    },
    {
      "code": "governance_not_your_upload",
      "type": "permission_error",
      "status": 403,
      "cause": "Only the person who uploaded this file can do this."
    },
    {
      "code": "governance_quota_exceeded",
      "type": "conflict",
      "status": 409,
      "cause": "The company's shared documents have used their space. Remove files you no longer need."
    },
    {
      "code": "governance_restore_unavailable",
      "type": "not_found",
      "status": 404,
      "cause": "Nothing to restore: the version is not removed, or more than 30 days have passed."
    },
    {
      "code": "governance_scan_pending",
      "type": "conflict",
      "status": 409,
      "cause": "The file is still being checked for malware. Try again in a minute."
    },
    {
      "code": "icon_not_square",
      "type": "invalid_request",
      "status": 400,
      "cause": "The icon is not square."
    },
    {
      "code": "icon_svg_unsafe",
      "type": "invalid_request",
      "status": 400,
      "cause": "The SVG holds something an icon may not, such as a script or an external link. Export it as a plain SVG, or upload a PNG."
    },
    {
      "code": "icon_too_large",
      "type": "invalid_request",
      "status": 413,
      "cause": "The icon is larger than 1 MB."
    },
    {
      "code": "icon_too_small",
      "type": "invalid_request",
      "status": 400,
      "cause": "The icon is smaller than 180 × 180 pixels."
    },
    {
      "code": "icon_type_unsupported",
      "type": "invalid_request",
      "status": 415,
      "cause": "Send the icon as the request body, as image/png or image/svg+xml."
    },
    {
      "code": "idempotency_key_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "Idempotency-Key must be 1-255 characters of [A-Za-z0-9_-]."
    },
    {
      "code": "idempotency_key_missing",
      "type": "invalid_request",
      "status": 400,
      "cause": "POST requests require an Idempotency-Key header."
    },
    {
      "code": "idempotency_key_reused",
      "type": "conflict",
      "status": 409,
      "cause": "This Idempotency-Key was already used with a different request body."
    },
    {
      "code": "identifier_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "The test sign-in takes a personal code, not a phone number."
    },
    {
      "code": "identity_already_verified",
      "type": "conflict",
      "status": 409,
      "cause": "Your identity is already verified with eID."
    },
    {
      "code": "identity_document_not_verified",
      "type": "permission_error",
      "status": 403,
      "cause": "The passport or ID-card check did not pass. Try again, or choose another way."
    },
    {
      "code": "identity_mismatch",
      "type": "permission_error",
      "status": 403,
      "cause": "The verified identity does not satisfy the authentication condition set by the sender for this delivery."
    },
    {
      "code": "identity_proofing_coming_soon",
      "type": "api_error",
      "status": 503,
      "cause": "The passport check is coming soon."
    },
    {
      "code": "identity_proofing_not_connected",
      "type": "api_error",
      "status": 503,
      "cause": "Identity proofing with an ID document is not connected yet."
    },
    {
      "code": "identity_proofing_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such identity proofing."
    },
    {
      "code": "identity_proofing_unavailable",
      "type": "api_error",
      "status": 503,
      "cause": "Identity proofing did not answer. Try again in a moment."
    },
    {
      "code": "identity_verification_conflict",
      "type": "conflict",
      "status": 409,
      "cause": "This personal code belongs to another member of a team you are in. Contact support@parasend.com."
    },
    {
      "code": "identity_verification_expired",
      "type": "conflict",
      "status": 409,
      "cause": "This verification has ended. Start a new one."
    },
    {
      "code": "identity_verification_failed",
      "type": "conflict",
      "status": 409,
      "cause": "The verification was cancelled."
    },
    {
      "code": "identity_verification_mismatch",
      "type": "conflict",
      "status": 409,
      "cause": "This electronic ID belongs to someone else. Use your own."
    },
    {
      "code": "identity_verification_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such identity verification."
    },
    {
      "code": "identity_verification_pending",
      "type": "conflict",
      "status": 409,
      "cause": "Confirm on your phone first."
    },
    {
      "code": "identity_verification_required",
      "type": "permission_error",
      "status": 403,
      "cause": "Verify your identity with an electronic ID or a passport check before choosing a service plan."
    },
    {
      "code": "image_too_detailed",
      "type": "invalid_request",
      "status": 400,
      "cause": "The photo cannot be made small enough for the page. Choose a calmer photo or crop it."
    },
    {
      "code": "image_too_large",
      "type": "invalid_request",
      "status": 413,
      "cause": "The photo can be at most 5 MB."
    },
    {
      "code": "image_too_small",
      "type": "invalid_request",
      "status": 400,
      "cause": "The photo is smaller than 640 × 320 pixels."
    },
    {
      "code": "image_type_unsupported",
      "type": "invalid_request",
      "status": 415,
      "cause": "The photo must be a JPEG (image/jpeg), PNG (image/png) or WebP (image/webp)."
    },
    {
      "code": "internal_error",
      "type": "api_error",
      "status": 500,
      "cause": "Something went wrong on our side. Try again; if it keeps happening, contact us with the `request_id`."
    },
    {
      "code": "invalid_parameter_value",
      "type": "invalid_request",
      "status": 400,
      "cause": "A parameter has a value the API does not accept. `param` names it, and `message` says what is allowed."
    },
    {
      "code": "invitation_cancelled",
      "type": "conflict",
      "status": 409,
      "cause": "This invitation has been cancelled."
    },
    {
      "code": "invitation_expired",
      "type": "conflict",
      "status": 409,
      "cause": "This invitation has expired. Ask for a new one."
    },
    {
      "code": "invitation_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such invitation."
    },
    {
      "code": "invitation_not_pending",
      "type": "conflict",
      "status": 409,
      "cause": "The invitation is no longer open and can no longer be cancelled."
    },
    {
      "code": "invitation_pending",
      "type": "conflict",
      "status": 409,
      "cause": "This address already has an open invitation: resend it instead."
    },
    {
      "code": "invitation_used",
      "type": "conflict",
      "status": 409,
      "cause": "This invitation has already been used."
    },
    {
      "code": "invitation_wrong_person",
      "type": "permission_error",
      "status": 403,
      "cause": "This invitation is for someone else: only the person it names can accept it."
    },
    {
      "code": "invoice_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such invoice."
    },
    {
      "code": "invoice_not_payable",
      "type": "conflict",
      "status": 409,
      "cause": "Only an unpaid card invoice whose charge was refused is paid here."
    },
    {
      "code": "invoice_pdf_not_available",
      "type": "not_found",
      "status": 404,
      "cause": "This invoice has no PDF: it is test data, or Payday has not booked it yet."
    },
    {
      "code": "join_request_cooldown",
      "type": "conflict",
      "status": 409,
      "cause": "Your last request to join was declined. You can ask again later."
    },
    {
      "code": "join_request_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such join request."
    },
    {
      "code": "join_request_not_pending",
      "type": "conflict",
      "status": 409,
      "cause": "This request has expired."
    },
    {
      "code": "join_request_pending",
      "type": "conflict",
      "status": 409,
      "cause": "You have already asked to join; the request is waiting for an answer."
    },
    {
      "code": "key_decisions_required",
      "type": "invalid_request",
      "status": 400,
      "cause": "The member holds API keys: decide for each whether to roll, keep or delete it."
    },
    {
      "code": "key_delete_holder_only",
      "type": "permission_error",
      "status": 403,
      "cause": "Only the person the key is bound to, or the account owner, can delete it."
    },
    {
      "code": "key_holder_only",
      "type": "permission_error",
      "status": 403,
      "cause": "Only the person this key is bound to can change who sees the deliveries it sends."
    },
    {
      "code": "key_holder_unavailable",
      "type": "conflict",
      "status": 409,
      "cause": "No member can take over these keys."
    },
    {
      "code": "key_holder_unidentified",
      "type": "conflict",
      "status": 409,
      "cause": "A key can be handed only to a member who has signed in to this organisation with eID. Choose another member."
    },
    {
      "code": "key_recent_use_unconfirmed",
      "type": "conflict",
      "status": 409,
      "cause": "The key was used recently. Confirm that you want to delete it: whatever uses it will stop working."
    },
    {
      "code": "key_reveal_issuer_only",
      "type": "permission_error",
      "status": 403,
      "cause": "Only the person this key is bound to can reveal it."
    },
    {
      "code": "key_reveal_not_available",
      "type": "conflict",
      "status": 409,
      "cause": "A live key is shown only once, when it is created or rolled. Roll it to get a new one."
    },
    {
      "code": "key_secret_unavailable",
      "type": "conflict",
      "status": 409,
      "cause": "This key's secret is not stored. Roll it to get a new one you can reveal later."
    },
    {
      "code": "limit_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "`limit` must be a whole number within the range the endpoint allows."
    },
    {
      "code": "link_domain_unavailable",
      "type": "conflict",
      "status": 409,
      "cause": "Your brand profile's link domain is not working, so this delivery's links would be on Parasend's own address. Send with `options.allow_parasend_links: true`, or fix the domain. `error.link_domain` names it."
    },
    {
      "code": "livemode_not_available",
      "type": "conflict",
      "status": 409,
      "cause": "This organisation has no access to live data yet."
    },
    {
      "code": "logo_svg_unsafe",
      "type": "invalid_request",
      "status": 400,
      "cause": "The SVG holds something a logo may not, such as a script or an external link. Export it as a plain SVG, or upload a PNG."
    },
    {
      "code": "logo_too_large",
      "type": "invalid_request",
      "status": 413,
      "cause": "The logo can be at most 1 MB."
    },
    {
      "code": "logo_type_unsupported",
      "type": "invalid_request",
      "status": 415,
      "cause": "Send the logo as the request body, as image/png or image/svg+xml."
    },
    {
      "code": "malformed_json",
      "type": "invalid_request",
      "status": 400,
      "cause": "The request body is not valid JSON, or not the JSON object the endpoint expects."
    },
    {
      "code": "member_already_active",
      "type": "conflict",
      "status": 409,
      "cause": "This person is already a member of the organisation."
    },
    {
      "code": "member_limit_reached",
      "type": "conflict",
      "status": 409,
      "cause": "This team is full: every seat on the organisation's plan is taken."
    },
    {
      "code": "member_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No member with that ID in your organisation."
    },
    {
      "code": "member_not_manageable",
      "type": "permission_error",
      "status": 403,
      "cause": "This member holds rights you do not hold, so you cannot change or remove them."
    },
    {
      "code": "member_role_from_groups",
      "type": "conflict",
      "status": 409,
      "cause": "This member's role comes from their groups in your identity provider: change it there. Their permissions and the deliveries they see can still be changed here."
    },
    {
      "code": "member_self_edit",
      "type": "permission_error",
      "status": 403,
      "cause": "You cannot change your own role, permissions or visibility; another member who manages the team can."
    },
    {
      "code": "membership_required",
      "type": "permission_error",
      "status": 403,
      "cause": "You are no longer a member of this organisation."
    },
    {
      "code": "metadata_too_large",
      "type": "invalid_request",
      "status": 400,
      "cause": "`metadata` has more keys or longer values than allowed."
    },
    {
      "code": "minimum_loa_unsatisfiable",
      "type": "invalid_request",
      "status": 400,
      "cause": "conditional_authentication requires verification_level high or substantial."
    },
    {
      "code": "missing_required_parameter",
      "type": "invalid_request",
      "status": 400,
      "cause": "A required parameter is missing. `param` names it."
    },
    {
      "code": "monthly_delivery_cap_exceeded",
      "type": "rate_limited",
      "status": 429,
      "cause": "This API key has reached its monthly cap of deliveries. The count starts again at the start of next month."
    },
    {
      "code": "nickname_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "A card's name is up to 40 characters, on one line."
    },
    {
      "code": "not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such route."
    },
    {
      "code": "organization_already_verified",
      "type": "conflict",
      "status": 409,
      "cause": "This account is verified already."
    },
    {
      "code": "organization_closed",
      "type": "conflict",
      "status": 409,
      "cause": "This account is being deleted."
    },
    {
      "code": "organization_deletion_not_scheduled",
      "type": "conflict",
      "status": 409,
      "cause": "No deletion is under way."
    },
    {
      "code": "organization_deletion_scheduled",
      "type": "permission_error",
      "status": 403,
      "cause": "This company account is being deleted. Cancel the deletion to use it again, or switch to another account."
    },
    {
      "code": "organization_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such account."
    },
    {
      "code": "organization_not_selected",
      "type": "conflict",
      "status": 409,
      "cause": "Choose an organisation first (PATCH /v1/portal/session)."
    },
    {
      "code": "organization_verification_pending",
      "type": "permission_error",
      "status": 403,
      "cause": "A verification of this account is already waiting. Open it to follow it."
    },
    {
      "code": "owner_cannot_leave",
      "type": "conflict",
      "status": 409,
      "cause": "The owner cannot leave the organisation: transfer ownership to another member first."
    },
    {
      "code": "owner_only",
      "type": "permission_error",
      "status": 403,
      "cause": "Only the owner can transfer ownership."
    },
    {
      "code": "owner_or_admin_required",
      "type": "permission_error",
      "status": 403,
      "cause": "Only the account owner or an admin can verify the company."
    },
    {
      "code": "owner_protected",
      "type": "permission_error",
      "status": 403,
      "cause": "Nobody is invited as owner: ownership changes only by a transfer."
    },
    {
      "code": "owner_required",
      "type": "permission_error",
      "status": 403,
      "cause": "Only the account owner can delete the account."
    },
    {
      "code": "ownership_transfer_expired",
      "type": "conflict",
      "status": 409,
      "cause": "This transfer has expired. Ask the owner to start it again."
    },
    {
      "code": "ownership_transfer_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such ownership transfer."
    },
    {
      "code": "ownership_transfer_not_pending",
      "type": "conflict",
      "status": 409,
      "cause": "This transfer of ownership is no longer waiting for an answer."
    },
    {
      "code": "ownership_transfer_pending",
      "type": "conflict",
      "status": 409,
      "cause": "A transfer of ownership is already waiting for approval. Cancel it first."
    },
    {
      "code": "ownership_transfer_target_only",
      "type": "permission_error",
      "status": 403,
      "cause": "Only the member ownership is being transferred to can approve it."
    },
    {
      "code": "parameter_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "A parameter has a value the API does not accept. `param` names it."
    },
    {
      "code": "parameter_missing",
      "type": "invalid_request",
      "status": 400,
      "cause": "A required parameter is missing. `param` names it."
    },
    {
      "code": "passkey_already_registered",
      "type": "conflict",
      "status": 409,
      "cause": "This passkey is already registered."
    },
    {
      "code": "passkey_attestation_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "attestation must be the WebAuthn registration response (PublicKeyCredential.toJSON())."
    },
    {
      "code": "passkey_below_level",
      "type": "permission_error",
      "status": 403,
      "cause": "This passkey was set up with an e-mail address. Confirm with your eID, or a passkey set up after an eID sign-in."
    },
    {
      "code": "passkey_challenge_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "challenge_id is the one /v1/portal/passkeys/options returned."
    },
    {
      "code": "passkey_enrolment_not_allowed",
      "type": "conflict",
      "status": 409,
      "cause": "A passkey can be added here only right after confirming receipt with your eID (within 10 minutes)."
    },
    {
      "code": "passkey_last_one",
      "type": "conflict",
      "status": 409,
      "cause": "This is your only passkey and your only way to sign in. Add another before removing it."
    },
    {
      "code": "passkey_limit_reached",
      "type": "conflict",
      "status": 409,
      "cause": "You have as many passkeys as allowed. Remove one before adding another."
    },
    {
      "code": "passkey_not_available",
      "type": "conflict",
      "status": 409,
      "cause": "No passkey is available for this confirmation. Confirm with your electronic ID instead."
    },
    {
      "code": "passkey_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such passkey."
    },
    {
      "code": "passkey_not_recognised",
      "type": "authentication_error",
      "status": 401,
      "cause": "This passkey is not recognised here. Sign in with your eID instead."
    },
    {
      "code": "passkey_rate_limited",
      "type": "rate_limited",
      "status": 429,
      "cause": "Too many failed passkey sign-ins. Wait a while or sign in with your eID."
    },
    {
      "code": "passkey_sign_in_expired",
      "type": "conflict",
      "status": 409,
      "cause": "This sign-in has expired or was already used. Start a new one."
    },
    {
      "code": "passkey_user_verification_required",
      "type": "invalid_request",
      "status": 400,
      "cause": "The device did not verify you (Face ID, fingerprint or PIN). Try again."
    },
    {
      "code": "passport_check_coming_soon",
      "type": "conflict",
      "status": 409,
      "cause": "The passport check is coming soon; until then a delivery can be bound to a kennitala (recipient.personal_code) only."
    },
    {
      "code": "payment_method_is_primary",
      "type": "conflict",
      "status": 409,
      "cause": "This card is the primary card. Make another card the primary first."
    },
    {
      "code": "payment_method_merchant_only",
      "type": "conflict",
      "status": 409,
      "cause": "An Apple Pay card is charged automatically each month and cannot pay an invoice here. Use a card, or add one."
    },
    {
      "code": "payment_method_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such card."
    },
    {
      "code": "payment_method_required",
      "type": "conflict",
      "status": 409,
      "cause": "Add a card before choosing to pay by card."
    },
    {
      "code": "payment_overdue",
      "type": "permission_error",
      "status": 402,
      "cause": "Sending is paused: this account has unpaid invoices over its limit. Pay them in the portal (Service plan and billing) and sending opens again at once."
    },
    {
      "code": "permission_denied",
      "type": "permission_error",
      "status": 403,
      "cause": "The API key or member does not have the permission this needs. `param` names it, as resource.action."
    },
    {
      "code": "permission_exceeds_issuer",
      "type": "permission_error",
      "status": 403,
      "cause": "You cannot grant webhooks: webhook endpoints receive events for every delivery, and you see only your own."
    },
    {
      "code": "personal_account",
      "type": "conflict",
      "status": 409,
      "cause": "A personal account has no team: this is for company accounts."
    },
    {
      "code": "personal_account_exists",
      "type": "conflict",
      "status": 409,
      "cause": "You have started a new personal account since; this one cannot be opened again."
    },
    {
      "code": "photo_consent_required",
      "type": "invalid_request",
      "status": 422,
      "cause": "Agree that a photo of your passport's photo page and your selfie are kept with this delivery's evidence and shown to its sender (photo_consent: true) before the passport check starts."
    },
    {
      "code": "picture_too_large",
      "type": "invalid_request",
      "status": 413,
      "cause": "The picture can be at most 5 MB."
    },
    {
      "code": "picture_type_unsupported",
      "type": "invalid_request",
      "status": 415,
      "cause": "The picture must be a JPEG, PNG or WebP image."
    },
    {
      "code": "pin_invalid_for_scheme",
      "type": "invalid_request",
      "status": 400,
      "cause": "`personal_code` must be a 10-digit kennitala, and `id_document_number` a passport or ID-card number."
    },
    {
      "code": "pin_type_incompatible_method",
      "type": "invalid_request",
      "status": 400,
      "cause": "None of the requested methods can assert the declared identity condition."
    },
    {
      "code": "pin_type_required",
      "type": "invalid_request",
      "status": 400,
      "cause": "pin_type is required whenever pin is set."
    },
    {
      "code": "pipedrive_deal_missing",
      "type": "conflict",
      "status": 409,
      "cause": "This account has no Pipedrive deal yet."
    },
    {
      "code": "plan_change_by_agreement",
      "type": "conflict",
      "status": 409,
      "cause": "Plan 1–3 are by written agreement: starting on one, or moving between Pay-as-you-go and Plan 1–3. Contact sales@parasend.com."
    },
    {
      "code": "plan_change_by_contract",
      "type": "conflict",
      "status": 409,
      "cause": "Enterprise is agreed by contract. Contact sales@parasend.com to change it."
    },
    {
      "code": "plan_change_by_parasend",
      "type": "conflict",
      "status": 409,
      "cause": "This account's plan is set by Parasend. Contact sales@parasend.com to change it."
    },
    {
      "code": "plan_required",
      "type": "permission_error",
      "status": 403,
      "cause": "The Trust center is included in Plan 1–3 and Enterprise."
    },
    {
      "code": "policy_archived",
      "type": "conflict",
      "status": 409,
      "cause": "This follow-up policy is archived; duplicate it or create a new one instead."
    },
    {
      "code": "policy_in_use",
      "type": "conflict",
      "status": 409,
      "cause": "The follow-up policy is still used by open batches or pending deliveries. Move them to another policy first."
    },
    {
      "code": "policy_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No follow-up policy in use with that ID."
    },
    {
      "code": "policy_not_resettable",
      "type": "invalid_request",
      "status": 400,
      "cause": "Only Parasend's own policies can be reset; this one is your organisation's."
    },
    {
      "code": "policy_override_choice_required",
      "type": "conflict",
      "status": 409,
      "cause": "Some pending deliveries follow their own policy. Say whether to keep them (`own_policy_deliveries: keep`) or switch them too."
    },
    {
      "code": "policy_override_not_allowed",
      "type": "invalid_request",
      "status": 400,
      "cause": "This batch uses one follow-up policy for every delivery; leave options.reminder_policy out, or ask the batch's owner to allow overrides."
    },
    {
      "code": "policy_sms_too_long",
      "type": "invalid_request",
      "status": 400,
      "cause": "The reminder text is too long: with the sender's name and the link, it must fit in one SMS."
    },
    {
      "code": "policy_step_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "A step of the policy is not valid: its channel, its timing or its wording."
    },
    {
      "code": "policy_step_out_of_range",
      "type": "invalid_request",
      "status": 400,
      "cause": "The step number is outside the policy's steps."
    },
    {
      "code": "portal_beta_invite_only",
      "type": "permission_error",
      "status": 403,
      "cause": "Parasend is in a closed beta: sign-in is by invitation only."
    },
    {
      "code": "portal_session_expired",
      "type": "authentication_error",
      "status": 401,
      "cause": "The portal session has ended. Sign in again."
    },
    {
      "code": "portal_session_missing",
      "type": "authentication_error",
      "status": 401,
      "cause": "Sign in to the portal first."
    },
    {
      "code": "portal_session_required",
      "type": "permission_error",
      "status": 403,
      "cause": "Only a person signed in to the portal can do this; an API key cannot."
    },
    {
      "code": "portal_sign_in_blocked",
      "type": "rate_limited",
      "status": 429,
      "cause": "Too many failed sign-ins. Try again after 24 hours."
    },
    {
      "code": "portal_sign_in_cancelled",
      "type": "conflict",
      "status": 409,
      "cause": "This sign-in was cancelled. Start a new one."
    },
    {
      "code": "portal_sign_in_expired",
      "type": "conflict",
      "status": 409,
      "cause": "This sign-in has already been used. Start a new one."
    },
    {
      "code": "portal_sign_in_failed",
      "type": "authentication_error",
      "status": 401,
      "cause": "This sign-in failed. Start a new one."
    },
    {
      "code": "portal_sign_in_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such sign-in."
    },
    {
      "code": "portal_sign_in_pending",
      "type": "conflict",
      "status": 409,
      "cause": "Confirm the sign-in on your phone first."
    },
    {
      "code": "price_list_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "There is no price list in effect for that plan and date."
    },
    {
      "code": "rail_not_available",
      "type": "invalid_request",
      "status": 400,
      "cause": "That plan cannot be paid that way."
    },
    {
      "code": "rate_limit_exceeded",
      "type": "rate_limited",
      "status": 429,
      "cause": "Too many requests of this kind. Wait the number of seconds in the `Retry-After` header, then try again."
    },
    {
      "code": "rate_limited",
      "type": "rate_limited",
      "status": 429,
      "cause": "Too many requests. Try again shortly."
    },
    {
      "code": "reauthentication_cancelled",
      "type": "conflict",
      "status": 409,
      "cause": "The eID confirmation was cancelled."
    },
    {
      "code": "reauthentication_expired",
      "type": "conflict",
      "status": 409,
      "cause": "This confirmation expired. Start a new one."
    },
    {
      "code": "reauthentication_failed",
      "type": "authentication_error",
      "status": 401,
      "cause": "The eID confirmation did not succeed."
    },
    {
      "code": "reauthentication_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such eID confirmation."
    },
    {
      "code": "reauthentication_pending",
      "type": "conflict",
      "status": 409,
      "cause": "Confirm on your phone first."
    },
    {
      "code": "reauthentication_required",
      "type": "permission_error",
      "status": 403,
      "cause": "This needs a fresh sign-in. Confirm with your electronic ID or passkey, then try again."
    },
    {
      "code": "reauthentication_wrong_person",
      "type": "permission_error",
      "status": 403,
      "cause": "This passkey is not the person signed in. Confirm with your own."
    },
    {
      "code": "recipient_domain_apex",
      "type": "invalid_request",
      "status": 400,
      "cause": "A link domain is a subdomain, such as afhending.fyrirtaeki.example: the domain itself cannot point at Parasend with a CNAME."
    },
    {
      "code": "recipient_domain_claimed",
      "type": "conflict",
      "status": 409,
      "cause": "Another organisation on Parasend uses this domain."
    },
    {
      "code": "recipient_domain_exists",
      "type": "conflict",
      "status": 409,
      "cause": "Your organisation already has this link domain."
    },
    {
      "code": "recipient_domain_in_use",
      "type": "conflict",
      "status": 409,
      "cause": "A brand profile uses this link domain. Choose another domain there, or archive the profile, first."
    },
    {
      "code": "recipient_domain_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No link domain with that ID."
    },
    {
      "code": "recipient_domain_removed",
      "type": "conflict",
      "status": 409,
      "cause": "This domain was removed; add it again to use it."
    },
    {
      "code": "recipient_domain_reserved",
      "type": "invalid_request",
      "status": 400,
      "cause": "Parasend's own domains cannot be a link domain."
    },
    {
      "code": "recipient_domain_too_long",
      "type": "invalid_request",
      "status": 400,
      "cause": "The host name is too long for a link domain: a text message must keep the sender's name readable."
    },
    {
      "code": "recipient_email_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "recipient.email is not a valid e-mail address."
    },
    {
      "code": "recipient_missing_contact",
      "type": "invalid_request",
      "status": 400,
      "cause": "recipient needs at least one contact channel: email or phone."
    },
    {
      "code": "recipient_phone_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "recipient.phone must be in E.164 format (e.g. +3546661234)."
    },
    {
      "code": "recovery_link_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "This sign-in link is not valid. Ask for a new one."
    },
    {
      "code": "recovery_session_restricted",
      "type": "permission_error",
      "status": 403,
      "cause": "Add a passkey first: until then this session can only add one and remove old ones."
    },
    {
      "code": "registration_closed",
      "type": "permission_error",
      "status": 403,
      "cause": "Sign-up is not open."
    },
    {
      "code": "registration_code_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "This link is not valid. Use the code in the e-mail."
    },
    {
      "code": "registration_expired",
      "type": "conflict",
      "status": 409,
      "cause": "This sign-up has expired or was already completed. Start again."
    },
    {
      "code": "registration_not_confirmed",
      "type": "conflict",
      "status": 409,
      "cause": "Confirm the e-mail address first."
    },
    {
      "code": "registration_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such sign-up."
    },
    {
      "code": "registration_required",
      "type": "conflict",
      "status": 409,
      "cause": "Finish registering first; then accept the invitation."
    },
    {
      "code": "registry_not_connected",
      "type": "api_error",
      "status": 500,
      "cause": "The National Registry is not connected yet; type the personal code instead."
    },
    {
      "code": "registry_query_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "Search by a full 10-digit personal code, or by a full name (first name and surname)."
    },
    {
      "code": "registry_rate_limited",
      "type": "rate_limited",
      "status": 429,
      "cause": "Too many registry searches this hour. Type the personal code instead."
    },
    {
      "code": "registry_unavailable",
      "type": "api_error",
      "status": 500,
      "cause": "The National Registry is not answering right now; type the personal code instead."
    },
    {
      "code": "remind_rate_limited",
      "type": "rate_limited",
      "status": 429,
      "cause": "Manual reminders to this recipient have reached their daily cap. Try again tomorrow."
    },
    {
      "code": "remind_state_invalid",
      "type": "conflict",
      "status": 409,
      "cause": "The first notification has not been sent yet."
    },
    {
      "code": "remind_too_soon",
      "type": "conflict",
      "status": 409,
      "cause": "A reminder can be sent a day after the request."
    },
    {
      "code": "request_too_large",
      "type": "payload_too_large",
      "status": 413,
      "cause": "The request body is too large."
    },
    {
      "code": "resource_missing",
      "type": "invalid_request",
      "status": 404,
      "cause": "No such object, or none that this key can see. `param` names the ID when there is one."
    },
    {
      "code": "route_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No endpoint matches this method and path. Check the address against the API reference."
    },
    {
      "code": "scim_not_in_plan",
      "type": "permission_error",
      "status": 403,
      "cause": "Provisioning (SCIM) comes with Plan 1–3 and Enterprise."
    },
    {
      "code": "scim_token_limit_reached",
      "type": "conflict",
      "status": 409,
      "cause": "Two tokens are live already. Revoke one first (two let you rotate without a gap)."
    },
    {
      "code": "scim_token_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such live SCIM token."
    },
    {
      "code": "secret_and_files_mutually_exclusive",
      "type": "invalid_request",
      "status": 400,
      "cause": "files and secret are mutually exclusive; secrets are their own delivery kind (POST /v1/secrets)."
    },
    {
      "code": "send_confirmation_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "This confirmation cannot be used: it was used already, it has expired (30 minutes), or it belongs to another sign-in. Confirm the send again."
    },
    {
      "code": "send_confirmation_mismatch",
      "type": "invalid_request",
      "status": 400,
      "cause": "The files, recipient or message differ from what was confirmed with the passkey. Confirm the send again."
    },
    {
      "code": "sender_authentication_insufficient",
      "type": "permission_error",
      "status": 403,
      "cause": "The person behind this session or key has not been identified strongly enough for this action. Sign in with your electronic ID."
    },
    {
      "code": "sender_representation_lapsed",
      "type": "permission_error",
      "status": 403,
      "cause": "The company registry no longer confirms that the person behind this key represents the company. Renew the confirmation in the portal."
    },
    {
      "code": "sender_representation_unverifiable",
      "type": "api_error",
      "status": 503,
      "cause": "The Company Registry could not be reached to confirm representation; try again later."
    },
    {
      "code": "service_unavailable",
      "type": "api_error",
      "status": 503,
      "cause": "The service is briefly unavailable. Try again in a moment."
    },
    {
      "code": "session_absolute_timeout",
      "type": "authentication_error",
      "status": 401,
      "cause": "The recipient's session has reached its longest allowed time. Open the delivery link again."
    },
    {
      "code": "session_expired",
      "type": "authentication_error",
      "status": 401,
      "cause": "The recipient's session has ended. Open the delivery link again."
    },
    {
      "code": "session_host_mismatch",
      "type": "authentication_error",
      "status": 401,
      "cause": "A recipient session was used on another address than the one it started on. Open the link again."
    },
    {
      "code": "session_state_invalid",
      "type": "conflict",
      "status": 409,
      "cause": "This delivery could not be completed at the level it requires."
    },
    {
      "code": "short_code_unavailable",
      "type": "api_error",
      "status": 500,
      "cause": "Could not allocate a short link for this delivery."
    },
    {
      "code": "sign_in_policy_self_lockout",
      "type": "conflict",
      "status": 409,
      "cause": "Sign in with an electronic ID first: requiring it would end your own access."
    },
    {
      "code": "sign_in_policy_unmet",
      "type": "permission_error",
      "status": 403,
      "cause": "This organisation requires sign-in with an electronic ID. Sign in again with eID or a passkey set up after an eID sign-in."
    },
    {
      "code": "sign_in_required",
      "type": "permission_error",
      "status": 403,
      "cause": "You signed in with your company's single sign-on, which opens only that account. Sign in with eID or a passkey to open another."
    },
    {
      "code": "sms_destination_not_available",
      "type": "invalid_request",
      "status": 400,
      "cause": "Parasend does not send SMS to this country yet. Notify by e-mail instead; see parasend.com/pricing/sms."
    },
    {
      "code": "sms_sender_name_decided",
      "type": "conflict",
      "status": 409,
      "cause": "Parasend has already answered this sender name request."
    },
    {
      "code": "sms_sender_name_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "sms_sender_name must be 3–11 letters (a–z, A–Z) or digits with at least one letter: no spaces, hyphens or Icelandic letters."
    },
    {
      "code": "sms_sender_name_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No SMS sender name with that ID."
    },
    {
      "code": "sms_sender_name_reserved",
      "type": "invalid_request",
      "status": 400,
      "cause": "An SMS sender name cannot name Parasend."
    },
    {
      "code": "sms_sender_name_taken",
      "type": "conflict",
      "status": 409,
      "cause": "Another company has this SMS sender name. One company per name."
    },
    {
      "code": "sms_sender_name_unverified_company",
      "type": "permission_error",
      "status": 403,
      "cause": "Only a verified company can send SMS under its own name. Verify the company under Company settings first."
    },
    {
      "code": "smtp_not_configured",
      "type": "invalid_request",
      "status": 409,
      "cause": "Save the mail server first."
    },
    {
      "code": "smtp_senders_off",
      "type": "invalid_request",
      "status": 409,
      "cause": "Sending through your own mail server is not switched on here yet."
    },
    {
      "code": "spending_cap_reached",
      "type": "rate_limited",
      "status": 429,
      "cause": "This delivery would take the month's estimate over your spending cap. Raise the cap in the portal, or wait for next month."
    },
    {
      "code": "sso_access_turned_off",
      "type": "permission_error",
      "status": 403,
      "cause": "Your organisation has turned off your access to Parasend."
    },
    {
      "code": "sso_address_in_use",
      "type": "conflict",
      "status": 409,
      "cause": "Another person in this organisation already has this address. If that is you, sign in with the electronic ID you use as that member, then try again."
    },
    {
      "code": "sso_assertion_invalid",
      "type": "authentication_error",
      "status": 401,
      "cause": "Single sign-on did not succeed."
    },
    {
      "code": "sso_certificate_expired",
      "type": "conflict",
      "status": 409,
      "cause": "The identity provider's certificate has expired. Ask your administrator to update the connection."
    },
    {
      "code": "sso_company_only",
      "type": "permission_error",
      "status": 403,
      "cause": "Provisioning is for company accounts."
    },
    {
      "code": "sso_connection_disabled",
      "type": "conflict",
      "status": 409,
      "cause": "Turn the connection on again before testing it."
    },
    {
      "code": "sso_connection_exists",
      "type": "conflict",
      "status": 409,
      "cause": "This organisation already has an SSO connection."
    },
    {
      "code": "sso_connection_not_enabled",
      "type": "conflict",
      "status": 409,
      "cause": "Turn single sign-on on first; then it can be required."
    },
    {
      "code": "sso_connection_not_tested",
      "type": "conflict",
      "status": 409,
      "cause": "Test the connection first: sign in once through it with Test."
    },
    {
      "code": "sso_domain_not_verified",
      "type": "conflict",
      "status": 409,
      "cause": "Verify your organisation's e-mail domain first (Team → Domains)."
    },
    {
      "code": "sso_enrolment_needs_proof",
      "type": "permission_error",
      "status": 403,
      "cause": "Sign in with your electronic ID, or verify your passport, to confirm who you are."
    },
    {
      "code": "sso_enrolment_required",
      "type": "conflict",
      "status": 409,
      "cause": "Confirm who you are with your electronic ID before your first sign-in with single sign-on."
    },
    {
      "code": "sso_identity_linked_elsewhere",
      "type": "conflict",
      "status": 409,
      "cause": "This identity is already linked to another person."
    },
    {
      "code": "sso_join_request_needs_email",
      "type": "conflict",
      "status": 409,
      "cause": "Your identity provider sent no e-mail address. Ask your administrator to invite you."
    },
    {
      "code": "sso_link_needs_eid",
      "type": "permission_error",
      "status": 403,
      "cause": "Sign in with your electronic ID first: the link is confirmed by it."
    },
    {
      "code": "sso_membership_suspended",
      "type": "permission_error",
      "status": 403,
      "cause": "Your access to this organisation is suspended. Ask your administrator."
    },
    {
      "code": "sso_metadata_pasted",
      "type": "conflict",
      "status": 409,
      "cause": "This connection's metadata was pasted; paste the new metadata instead."
    },
    {
      "code": "sso_not_available",
      "type": "api_error",
      "status": 503,
      "cause": "Provisioning is not set up in this environment yet."
    },
    {
      "code": "sso_not_configured",
      "type": "not_found",
      "status": 404,
      "cause": "This organisation has no SSO connection."
    },
    {
      "code": "sso_not_in_plan",
      "type": "permission_error",
      "status": 403,
      "cause": "Single sign-on comes with Plan 1–3 and Enterprise."
    },
    {
      "code": "sso_required",
      "type": "permission_error",
      "status": 403,
      "cause": "This organisation requires sign-in with its single sign-on."
    },
    {
      "code": "sso_self_lockout",
      "type": "conflict",
      "status": 409,
      "cause": "Sign in through your single sign-on first (or be the owner or a named admin signed in with eID), so you are not locked out."
    },
    {
      "code": "sso_sign_in_expired",
      "type": "conflict",
      "status": 410,
      "cause": "This sign-in has expired or was already used. Start again."
    },
    {
      "code": "sso_test_expired",
      "type": "conflict",
      "status": 409,
      "cause": "Run the test again: a test can be linked only in the session that ran it, within ten minutes."
    },
    {
      "code": "staff_admin_only",
      "type": "permission_error",
      "status": 403,
      "cause": "Only an admin on the staff list changes plans."
    },
    {
      "code": "staff_eid_required",
      "type": "permission_error",
      "status": 403,
      "cause": "Sign in with your electronic ID, or a passkey made with it, to use the staff admin."
    },
    {
      "code": "staff_member_unknown",
      "type": "invalid_request",
      "status": 400,
      "cause": "Pick someone on the staff list."
    },
    {
      "code": "staff_only",
      "type": "permission_error",
      "status": 403,
      "cause": "This sign-in is not on Parasend's staff list."
    },
    {
      "code": "system_policy_immutable",
      "type": "permission_error",
      "status": 403,
      "cause": "Parasend's own policies cannot be renamed or deleted, and `rpol_none` takes no steps."
    },
    {
      "code": "test_email_address_not_confirmed",
      "type": "invalid_request",
      "status": 400,
      "cause": "to must be one of your own confirmed e-mail addresses."
    },
    {
      "code": "test_email_limit_reached",
      "type": "rate_limited",
      "status": 429,
      "cause": "At most 5 test e-mails an hour. Try again later."
    },
    {
      "code": "theme_knob_plan_gated",
      "type": "permission_error",
      "status": 403,
      "cause": "This part of a brand profile comes with Plan 1 and up."
    },
    {
      "code": "too_many_approval_requests",
      "type": "conflict",
      "status": 409,
      "cause": "Too many requests are waiting. Cancel one first."
    },
    {
      "code": "too_many_checks",
      "type": "rate_limited",
      "status": 429,
      "cause": "Too many checks this hour. Senders are checked every 15 minutes anyway."
    },
    {
      "code": "too_many_company_applications",
      "type": "conflict",
      "status": 409,
      "cause": "Too many company applications are waiting. Cancel one first."
    },
    {
      "code": "too_many_identity_proofings",
      "type": "rate_limited",
      "status": 429,
      "cause": "Too many identity checks today. Try again tomorrow."
    },
    {
      "code": "too_many_join_requests",
      "type": "conflict",
      "status": 409,
      "cause": "Three requests to join by company code are already waiting for an answer."
    },
    {
      "code": "too_many_lookups",
      "type": "rate_limited",
      "status": 429,
      "cause": "Too many company lookups. Try again in an hour."
    },
    {
      "code": "too_many_signups",
      "type": "rate_limited",
      "status": 429,
      "cause": "Too many sign-ups from here, or for this address. Try again in an hour."
    },
    {
      "code": "too_many_tests",
      "type": "rate_limited",
      "status": 429,
      "cause": "Too many test e-mails for this sender this hour. Try again later."
    },
    {
      "code": "unknown_parameter",
      "type": "invalid_request",
      "status": 400,
      "cause": "The request has a parameter the endpoint does not know, often a typo. `param` names it."
    },
    {
      "code": "unsupported_media_type",
      "type": "invalid_request",
      "status": 415,
      "cause": "The request body's Content-Type is not accepted here. Send JSON (application/json) unless the endpoint says otherwise."
    },
    {
      "code": "upload_incomplete",
      "type": "invalid_request",
      "status": 400,
      "cause": "The upload is not complete."
    },
    {
      "code": "upload_link_invalid",
      "type": "authentication_error",
      "status": 401,
      "cause": "This upload link is not valid or has expired."
    },
    {
      "code": "upload_session_invalid",
      "type": "conflict",
      "status": 409,
      "cause": "This upload was cancelled or has expired; start it again."
    },
    {
      "code": "upload_session_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No such part of an open upload."
    },
    {
      "code": "view_link_invalid",
      "type": "authentication_error",
      "status": 401,
      "cause": "This preview link has expired; open it again from the delivery page."
    },
    {
      "code": "webhook_auth_config_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "The endpoint's `auth` settings are missing or malformed for its mode, for example OAuth 2.0 without a `token_url`."
    },
    {
      "code": "webhook_delivery_sources_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "`delivery_sources` is not valid: it names no key and not the portal, too many keys, or a key that is not your organisation's, not in the endpoint's mode, or revoked."
    },
    {
      "code": "webhook_endpoint_limit_reached",
      "type": "invalid_request",
      "status": 400,
      "cause": "You have as many webhook endpoints as one mode may have. Delete one first."
    },
    {
      "code": "webhook_endpoint_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No webhook endpoint with that ID, in the mode of your key."
    },
    {
      "code": "webhook_event_type_unknown",
      "type": "invalid_request",
      "status": 400,
      "cause": "An event type the endpoint should receive is not one Parasend sends."
    },
    {
      "code": "webhook_signature_invalid",
      "type": "authentication_error",
      "status": 401,
      "cause": "The webhook signature does not match."
    },
    {
      "code": "webhook_url_invalid",
      "type": "invalid_request",
      "status": 400,
      "cause": "url must be an https URL."
    },
    {
      "code": "webhook_url_not_public",
      "type": "invalid_request",
      "status": 400,
      "cause": "The host is an IP address or a reserved name, or resolves to a private, loopback or other non-public address."
    },
    {
      "code": "webhook_url_port_not_allowed",
      "type": "invalid_request",
      "status": 400,
      "cause": "The URL uses another port than 443. `param` names the URL."
    },
    {
      "code": "webhook_url_unresolvable",
      "type": "invalid_request",
      "status": 400,
      "cause": "The host has no A or AAAA record. Check the name for a typo."
    },
    {
      "code": "wording_archived",
      "type": "conflict",
      "status": 409,
      "cause": "This saved wording is archived; save a new one instead."
    },
    {
      "code": "wording_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "No saved wording with that ID."
    },
    {
      "code": "wording_version_not_found",
      "type": "not_found",
      "status": 404,
      "cause": "The saved wording has no version with that number."
    },
    {
      "code": "zip_too_large",
      "type": "invalid_request",
      "status": 400,
      "cause": "Download the files one at a time."
    }
  ]
}
