Developers · Messages
AvailableHow do I get the government messages of my companies into my own software?
With the Namens API. You request the companies your organisation follows, with the state of their mandates, their inbox across e-Box Enterprise and MyMinfin, and their deadlines. You get the content of a message only on an explicit request, and that goes into the log.
What can I request?
- The companies your organisation follows, with the state of the mandate per source.
- The inbox: every item with company, source, sender, type and dates, filterable.
- The deadlines: what is due by when, and where the date comes from.
- The content of a message, an attachment or a document, after an explicit request.
What does fetching content change?
In e-Box Enterprise a message counts as read as soon as its main content has been fetched, for everyone in the company's e-Box. That is why the API asks for a deliberate choice: without mark_read=true it refuses. Documents from FPS Finance have no read status at the source.
What can the API not do?
File, reply, move or delete. It reads, just like Namens itself.
curl "https://app.namens.be/api/v1/messages" \
-H "Authorization: Bearer <your key>"
curl "https://app.namens.be/api/v1/messages/ebox-1042/body?mark_read=true" \
-H "Authorization: Bearer <your key>"
mark_read_required
409: fetching this marks the message as read for the
company; add mark_read=true.
Frequently asked questions
Does the API read an e-Box directly?
No. The API gives what Namens already reads for the companies your organisation follows, each with the company's mandate. Without an active mandate there is nothing to read for that company.
Is a message marked as read when I request the list?
No. The list gives descriptions. Only fetching the content marks an e-Box message as read for the company, and the API only does that if you pass mark_read=true.
Why do I have to pass mark_read=true?
Because it cannot be undone. A message that has been fetched shows as read for everyone in the company's e-Box. The API refuses the call without that parameter, so that nobody does it by accident.
Is my call in the log?
Yes. Every time the content of a message is fetched, it is in the organisation's log, like a click in the application.
Can I request or validate a mandate through the API?
No. You read the state of each mandate and get a webhook when it changes. The company validates itself, with the government.
Where do I start?
Available- Create an account. You start in the simulator, with sample companies and sample messages.
- Create a test key in the simulator. It answers with the sample companies and never asks anything of the real register.
- Build and test against the test key. A real key then works the same way, on real data.