{
    "openapi": "3.1.0",
    "info": {
        "title": "Namens API",
        "version": "1",
        "description": "The company register, watches with webhooks, and the government post of the companies an organisation follows. Every call carries a key of an organisation; a test key works on sample data."
    },
    "servers": [
        {
            "url": "https://app.namens.be/api/v1"
        }
    ],
    "security": [
        {
            "key": []
        }
    ],
    "paths": {
        "/account": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "Whose key this is",
                "description": "The organisation of the key, whether it is a test or a live key, its limits and what it used today. The first call to try a key with.",
                "responses": {
                    "200": {
                        "description": "The answer.",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": {
                                        "organisation": "Kantoor Vermeulen",
                                        "key": {
                                            "name": "Dossier system",
                                            "mode": "test",
                                            "created_at": "2026-11-29T08:00:00+00:00"
                                        },
                                        "limits": {
                                            "requests_per_minute": 60,
                                            "register_lookups_per_day": 100,
                                            "watches": 250
                                        },
                                        "today": {
                                            "requests": 12,
                                            "register_lookups": 3
                                        },
                                        "watches": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/register/{number}": {
            "get": {
                "tags": [
                    "Company register"
                ],
                "summary": "Look an enterprise up",
                "description": "Name, status, legal form, registered seat and the people who hold a function in the enterprise: a legal representative among them is who validates a mandate. An answer is kept for some hours; \"source.retrieved_at\" says how old it is. A lookup that has to ask the register counts for the daily number of the key.",
                "parameters": [
                    {
                        "name": "number",
                        "in": "path",
                        "required": true,
                        "description": "A Belgian enterprise number: ten digits, with or without dots or \"BE\".",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer.",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": {
                                        "enterprise_number": "0100000169",
                                        "formatted_number": "0100.000.169",
                                        "name": "Bakkerij De Korenaar",
                                        "active": true,
                                        "status": "Actief",
                                        "legal_form": "Besloten vennootschap",
                                        "address": "Graanmarkt 12, 9000 Gent",
                                        "function_holders": [
                                            {
                                                "role": "Bestuurder",
                                                "holder": "Vermeulen, An",
                                                "since": "3 maart 2015"
                                            }
                                        ],
                                        "register_url": null
                                    },
                                    "source": {
                                        "name": "KBO, FOD Economie",
                                        "retrieved_at": "2026-11-29T08:15:00+00:00"
                                    },
                                    "terms": "Personal data in this answer, such as names of function holders and all data of a natural-person enterprise, may not be used for direct marketing (royal decree of 18 July 2008, article 2)."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/register": {
            "get": {
                "tags": [
                    "Company register"
                ],
                "summary": "Search enterprises by name",
                "description": "Enterprises whose name contains the words given, best matches first. Answered from the daily files of the register, so it costs no lookup; it says \"search_unavailable\" while those files are not loaded.",
                "parameters": [
                    {
                        "name": "name",
                        "in": "query",
                        "required": true,
                        "description": "At least three characters of the name.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "How many results, 20 by default and 50 at most.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer.",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": [
                                        {
                                            "enterprise_number": "0100000169",
                                            "formatted_number": "0100.000.169",
                                            "name": "Bakkerij De Korenaar",
                                            "legal_form": "Besloten vennootschap",
                                            "address": "Graanmarkt 12, 9000 Gent",
                                            "status": "Actief"
                                        }
                                    ],
                                    "source": {
                                        "name": "KBO, FOD Economie",
                                        "retrieved_at": "2026-11-29T08:15:00+00:00"
                                    },
                                    "terms": "Personal data in this answer, such as names of function holders and all data of a natural-person enterprise, may not be used for direct marketing (royal decree of 18 July 2008, article 2)."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/watches": {
            "post": {
                "tags": [
                    "Watches"
                ],
                "summary": "Watch an enterprise number",
                "description": "From now on the register is asked again about this number, and every change is kept and sent to your webhooks as \"register.changed\". Asking twice for the same number returns the watch that is there (200 instead of 201). Send JSON.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "required": [
                                    "enterprise_number"
                                ],
                                "properties": {
                                    "enterprise_number": {
                                        "type": "string",
                                        "description": "The number to watch."
                                    },
                                    "reference": {
                                        "type": "string",
                                        "description": "Your own name or number for this enterprise, at most 100 characters; it comes back in every event."
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "The answer.",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": {
                                        "enterprise_number": "0100000169",
                                        "reference": "client-381",
                                        "name": "Bakkerij De Korenaar",
                                        "status": "Actief",
                                        "legal_form": "Besloten vennootschap",
                                        "address": "Graanmarkt 12, 9000 Gent",
                                        "function_holders": [
                                            {
                                                "role": "Bestuurder",
                                                "holder": "Vermeulen, An",
                                                "since": "3 maart 2015"
                                            }
                                        ],
                                        "checked_at": "2026-11-29T08:15:00+00:00",
                                        "created_at": "2026-11-29T08:15:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Watches"
                ],
                "summary": "List the watches",
                "description": "Every number the organisation watches, with what the register said the last time.",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "The page, from 1.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 50 by default and 100 at most.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer.",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": [
                                        {
                                            "enterprise_number": "0100000169",
                                            "reference": "client-381",
                                            "name": "Bakkerij De Korenaar",
                                            "status": "Actief",
                                            "legal_form": "Besloten vennootschap",
                                            "address": "Graanmarkt 12, 9000 Gent",
                                            "function_holders": [
                                                {
                                                    "role": "Bestuurder",
                                                    "holder": "Vermeulen, An",
                                                    "since": "3 maart 2015"
                                                }
                                            ],
                                            "checked_at": "2026-11-29T08:15:00+00:00",
                                            "created_at": "2026-11-29T08:15:00+00:00"
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 50,
                                        "total": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/watches/{number}": {
            "get": {
                "tags": [
                    "Watches"
                ],
                "summary": "One watch",
                "description": "What is known about one watched number.",
                "parameters": [
                    {
                        "name": "number",
                        "in": "path",
                        "required": true,
                        "description": "A Belgian enterprise number: ten digits, with or without dots or \"BE\".",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer."
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "tags": [
                    "Watches"
                ],
                "summary": "Stop watching",
                "description": "Removes the watch and what it recorded. Answers 204 without a body.",
                "parameters": [
                    {
                        "name": "number",
                        "in": "path",
                        "required": true,
                        "description": "A Belgian enterprise number: ten digits, with or without dots or \"BE\".",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer."
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/changes": {
            "get": {
                "tags": [
                    "Watches"
                ],
                "summary": "What changed",
                "description": "The changes the watches recorded, newest first: for those who would rather ask than receive a webhook. One row is everything one answer of the register changed. For \"function_holders\", \"before\" lists who went and \"after\" who came.",
                "parameters": [
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "description": "Only changes detected after this date or moment.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "enterprise_number",
                        "in": "query",
                        "required": false,
                        "description": "Only changes of this number.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "The page, from 1.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 50 by default and 100 at most.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer.",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": [
                                        {
                                            "id": 18,
                                            "enterprise_number": "0100000169",
                                            "reference": "client-381",
                                            "changes": [
                                                {
                                                    "kind": "address",
                                                    "before": "Graanmarkt 12, 9000 Gent",
                                                    "after": "Korenlei 3, 9000 Gent"
                                                }
                                            ],
                                            "detected_at": "2026-11-30T02:41:07+00:00"
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 50,
                                        "total": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/companies": {
            "get": {
                "tags": [
                    "Post"
                ],
                "summary": "The companies you follow",
                "description": "The companies whose post the organisation follows in the application, with the state of each mandate: none, requested, waiting, active or refused.",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "The page, from 1.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 50 by default and 100 at most.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer.",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": [
                                        {
                                            "enterprise_number": "0100000169",
                                            "formatted_number": "0100.000.169",
                                            "name": "Bakkerij De Korenaar",
                                            "legal_form": "Besloten vennootschap",
                                            "address": "Graanmarkt 12, 9000 Gent",
                                            "register_status": "Actief",
                                            "function_holders": [
                                                {
                                                    "role": "Bestuurder",
                                                    "holder": "Vermeulen, An",
                                                    "since": "3 maart 2015"
                                                }
                                            ],
                                            "register_checked_at": "2026-11-29T02:41:00+00:00",
                                            "mandates": {
                                                "ebox": "active",
                                                "fps": "waiting"
                                            },
                                            "created_at": "2026-11-20T10:00:00+00:00"
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 50,
                                        "total": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/companies/{number}": {
            "get": {
                "tags": [
                    "Post"
                ],
                "summary": "One company you follow",
                "description": "The same, for one company. 404 when the organisation does not follow this number.",
                "parameters": [
                    {
                        "name": "number",
                        "in": "path",
                        "required": true,
                        "description": "A Belgian enterprise number: ten digits, with or without dots or \"BE\".",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer."
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/messages": {
            "get": {
                "tags": [
                    "Post"
                ],
                "summary": "The inbox",
                "description": "The items of post of all followed companies, newest first: e-Box messages (\"ebox\"), documents of FPS Finance (\"fps\") and changes in the company register (\"kbo\"). An item is described: who it is for, who sent it, what kind it is, and its deadline. The content is never in this list.",
                "parameters": [
                    {
                        "name": "enterprise_number",
                        "in": "query",
                        "required": false,
                        "description": "Only items of this company.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "source",
                        "in": "query",
                        "required": false,
                        "description": "ebox, fps or kbo.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "unread",
                        "in": "query",
                        "required": false,
                        "description": "1 for items nobody opened yet.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Words that have to occur in the item or in the name of its company.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "The page, from 1.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 50 by default and 100 at most.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer.",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": [
                                        {
                                            "id": "ebox-1042",
                                            "source": "ebox",
                                            "title": "Aanslagbiljet vennootschapsbelasting",
                                            "company": {
                                                "enterprise_number": "0100000169",
                                                "name": "Bakkerij De Korenaar"
                                            },
                                            "sender": "FOD Financiën",
                                            "sender_number": "0308357159",
                                            "type": "Aanslagbiljet",
                                            "received_at": "2026-11-27T06:12:00+00:00",
                                            "registered_mail": false,
                                            "unread": true,
                                            "deadline": {
                                                "due_on": "2027-01-27",
                                                "kind": "payment",
                                                "origin": "sender",
                                                "basis": null
                                            },
                                            "handled_at": null
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 50,
                                        "total": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/messages/{id}": {
            "get": {
                "tags": [
                    "Post"
                ],
                "summary": "One item",
                "description": "The item, and under \"content\" what of it can be fetched. \"marks_read\" says whether fetching that part marks the message as read in the e-Box of the company itself.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The id of the item, such as ebox-1042.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer.",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": {
                                        "id": "ebox-1042",
                                        "source": "ebox",
                                        "title": "Aanslagbiljet vennootschapsbelasting",
                                        "company": {
                                            "enterprise_number": "0100000169",
                                            "name": "Bakkerij De Korenaar"
                                        },
                                        "sender": "FOD Financiën",
                                        "sender_number": "0308357159",
                                        "type": "Aanslagbiljet",
                                        "received_at": "2026-11-27T06:12:00+00:00",
                                        "registered_mail": false,
                                        "unread": true,
                                        "deadline": {
                                            "due_on": "2027-01-27",
                                            "kind": "payment",
                                            "origin": "sender",
                                            "basis": null
                                        },
                                        "handled_at": null,
                                        "content": {
                                            "body": {
                                                "marks_read": false
                                            },
                                            "attachments": [
                                                {
                                                    "id": "att-1",
                                                    "file_name": "aanslagbiljet.pdf",
                                                    "media_type": "application/pdf",
                                                    "marks_read": true
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/messages/{id}/body": {
            "get": {
                "tags": [
                    "Post"
                ],
                "summary": "The body of an e-Box message",
                "description": "Opens the body, exactly as a click on \"Open\" in the application does: the opening is written in the log of the organisation under the name of the key. When opening marks the message as read in the e-Box of the company, the call is refused with \"mark_read_required\" unless mark_read=true is given.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The id of an e-Box message.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "mark_read",
                        "in": "query",
                        "required": false,
                        "description": "true to accept that the message is marked as read for the company too.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer."
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/messages/{id}/attachments/{attachment}": {
            "get": {
                "tags": [
                    "Post"
                ],
                "summary": "An attachment of an e-Box message",
                "description": "The file itself. The same rule for mark_read holds, and the opening is logged.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The id of an e-Box message.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "attachment",
                        "in": "path",
                        "required": true,
                        "description": "The id of the attachment, from \"content.attachments\".",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "mark_read",
                        "in": "query",
                        "required": false,
                        "description": "true to accept that the message is marked as read for the company too.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer."
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/messages/{id}/document": {
            "get": {
                "tags": [
                    "Post"
                ],
                "summary": "The document of an item of FPS Finance",
                "description": "The file itself. Fetching it marks nothing as read at FPS Finance; the opening is logged.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "The id of an item of FPS Finance, such as fps-77.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer."
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/deadlines": {
            "get": {
                "tags": [
                    "Post"
                ],
                "summary": "The deadlines",
                "description": "The deadlines of items nobody handled yet, soonest first, from today on.",
                "parameters": [
                    {
                        "name": "enterprise_number",
                        "in": "query",
                        "required": false,
                        "description": "Only deadlines of this company.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "include_passed",
                        "in": "query",
                        "required": false,
                        "description": "1 to add deadlines that passed without the item being handled.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "The page, from 1.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 50 by default and 100 at most.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The answer.",
                        "content": {
                            "application/json": {
                                "example": {
                                    "data": [
                                        {
                                            "id": 9,
                                            "due_on": "2027-01-27",
                                            "kind": "payment",
                                            "origin": "sender",
                                            "basis": null,
                                            "company": {
                                                "enterprise_number": "0100000169",
                                                "name": "Bakkerij De Korenaar"
                                            },
                                            "message": "ebox-1042"
                                        }
                                    ],
                                    "meta": {
                                        "page": 1,
                                        "per_page": 50,
                                        "total": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "A refusal.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "webhooks": {
        "register.changed": {
            "post": {
                "summary": "The company register changed about a number you watch (\"origin\": \"watch\") or about a company you follow in the application (\"origin\": \"company\").",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "id": "evt_01jdzx3k8v4q2m7h5w9c6r0t1b",
                                "type": "register.changed",
                                "created_at": "2026-11-30T02:41:07+00:00",
                                "mode": "live",
                                "data": {
                                    "origin": "watch",
                                    "enterprise_number": "0100000169",
                                    "reference": "client-381",
                                    "name": "Bakkerij De Korenaar",
                                    "changes": [
                                        {
                                            "kind": "address",
                                            "before": "Graanmarkt 12, 9000 Gent",
                                            "after": "Korenlei 3, 9000 Gent"
                                        }
                                    ],
                                    "source": {
                                        "name": "KBO, FOD Economie",
                                        "retrieved_at": "2026-11-30T02:41:07+00:00"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any answer from 200 to 299 counts as received."
                    }
                }
            }
        },
        "message.received": {
            "post": {
                "summary": "A new item of post arrived for a followed company. The item is described, as in GET /messages; its content is not sent.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "id": "evt_01jdzx3k8v4q2m7h5w9c6r0t1b",
                                "type": "message.received",
                                "created_at": "2026-11-30T02:41:07+00:00",
                                "mode": "live",
                                "data": {
                                    "message": {
                                        "id": "ebox-1042",
                                        "source": "ebox",
                                        "title": "Aanslagbiljet vennootschapsbelasting",
                                        "company": {
                                            "enterprise_number": "0100000169",
                                            "name": "Bakkerij De Korenaar"
                                        },
                                        "sender": "FOD Financiën",
                                        "type": "Aanslagbiljet",
                                        "received_at": "2026-11-27T06:12:00+00:00",
                                        "registered_mail": false
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any answer from 200 to 299 counts as received."
                    }
                }
            }
        },
        "message.handled": {
            "post": {
                "summary": "Someone marked an item as handled in the application.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "id": "evt_01jdzx3k8v4q2m7h5w9c6r0t1b",
                                "type": "message.handled",
                                "created_at": "2026-11-30T02:41:07+00:00",
                                "mode": "live",
                                "data": {
                                    "message": {
                                        "id": "ebox-1042",
                                        "handled_at": "2026-12-02T09:30:00+00:00"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any answer from 200 to 299 counts as received."
                    }
                }
            }
        },
        "deadline.set": {
            "post": {
                "summary": "An item got a deadline, or its deadline changed.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "id": "evt_01jdzx3k8v4q2m7h5w9c6r0t1b",
                                "type": "deadline.set",
                                "created_at": "2026-11-30T02:41:07+00:00",
                                "mode": "live",
                                "data": {
                                    "deadline": {
                                        "id": 9,
                                        "due_on": "2027-01-27",
                                        "kind": "payment",
                                        "origin": "sender",
                                        "basis": null,
                                        "company": {
                                            "enterprise_number": "0100000169",
                                            "name": "Bakkerij De Korenaar"
                                        },
                                        "message": "ebox-1042"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any answer from 200 to 299 counts as received."
                    }
                }
            }
        },
        "mandate.changed": {
            "post": {
                "summary": "The state of a mandate of a followed company changed: none, requested, waiting, active or refused.",
                "requestBody": {
                    "content": {
                        "application/json": {
                            "example": {
                                "id": "evt_01jdzx3k8v4q2m7h5w9c6r0t1b",
                                "type": "mandate.changed",
                                "created_at": "2026-11-30T02:41:07+00:00",
                                "mode": "live",
                                "data": {
                                    "company": {
                                        "enterprise_number": "0100000169",
                                        "name": "Bakkerij De Korenaar"
                                    },
                                    "source": "ebox",
                                    "before": "waiting",
                                    "after": "active"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Any answer from 200 to 299 counts as received."
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "key": {
                "type": "http",
                "scheme": "bearer",
                "description": "A key of the organisation, made in the application under \"Developers\"."
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string",
                                "enum": [
                                    "unauthorized",
                                    "too_many_requests",
                                    "daily_limit_reached",
                                    "register_busy",
                                    "register_unavailable",
                                    "search_unavailable",
                                    "invalid_number",
                                    "unknown_number",
                                    "watch_limit_reached",
                                    "mark_read_required",
                                    "source_error",
                                    "not_found"
                                ]
                            },
                            "message": {
                                "type": "string"
                            }
                        }
                    }
                }
            }
        }
    }
}