Exchange events between Odigos and your system

Another system can tell Odigos that something has happened, and your system can find out when something changes in Odigos. Below are the options, when to choose each one and what isn't possible.

In short

  • To send a notification to Odigos, use a POST on an Odigos API. The notification can store a record, start a process, or both.
  • To hear what changes in Odigos, there are two options. A process calls your system itself, or your system keeps a WebSocket open and gets a signal for each change.
  • To let Odigos listen, point it at a mailbox or at Salesforce. This is called a listener.

There is no screen where you enter an address that Odigos calls on every change. If you need that, build it with a process, as described below.

Send a notification to Odigos

An external system sends a notification to an Odigos API with a POST. It is an ordinary call, with a token in the header. On the API, the administrator uses Save the message directly in Dossier in Orchestra to choose what happens to the notification:

  • On (the default). The notification becomes a record in the data structure, which you also see in Dossier. Then the processes linked to this API start, along with the processes that start on a new record in this structure. You get a 201 with the id of the record.
  • Off. The notification isn't stored. It is passed as data to the process linked to the API. You get a 200.
curl -X POST "https://api.voorbeeld.nl/api/v1.0.0/betalingen" \
  -H "Authorization: Bearer odg_<id>_<geheim>" \
  -H "Content-Type: application/json" \
  -d '{ "ordernummer": "A-1042", "status": "betaald" }'

The response when the notification isn't stored:

{
  "status": "success",
  "data": {
    "ok": true,
    "constraintViolations": [],
    "startedProcesses": [ ... ],
    "resumedProcesses": 0,
    "governance": { ... }
  },
  ...
}

Odigos always checks the notification first. An unknown field or a wrong type returns a 400, and nothing starts. The administrator sets per API how strictly the content rules of the data structure apply.

Check startedProcesses
If storing is off and no process is linked to the API, you still get "ok": true , with a warning in warnings . The notification then hasn't landed anywhere. So when you test, check that startedProcesses is filled. If the process couldn't start, you get a 503. Nothing was stored, so send the notification again later.

What you need to start a process

  • An API on the data structure with Write turned on. If you don't want to store anything, Save the message directly in Dossier is off.
  • A process whose start event is linked to that API in the Orchestra process modeller. See Start and end of a process.
  • A name for the incoming data on that start event. Without that name, the process gets stuck right after it starts.
  • A token for the sender, with permission to create on this API.

A sender that can't send a token

Some systems can't send their own Authorization header with a token in a webhook. For such a sender, an API can also accept a fixed secret value in a header, for example Basic authentication with a username and password.

This only applies to creating records. Reading, updating and deleting always require a token. Odigos then only checks the secret, not a signature on the content of the message.

This is handled by Digidux, your implementation partner. They set up the secret for your API. Contact them if you have a sender that can't send a token.

Hear what changes in Odigos

With a process that calls your system

To have Odigos call your system when something happens, build a process. A process can start when a record is created or changed. In that process, add a REST API task that calls your system. You choose the address, the headers and the content. That way the process works as a webhook that you fully control.

Choose this option if your system can't keep a connection open, or if you want to process the data before you pass it on.

With a WebSocket

A system that wants to listen itself can open a WebSocket on the same address as the API. It then gets a short signal for each create, update or delete of a record. Choose this option if your system can keep a connection open.

wss://api.voorbeeld.nl/websocket
Authorization: Bearer odg_<id>_<geheim>

Don't send an Origin header. Then subscribe to an API with this message:

{"type":"subscribe","api":"<jouw-api>"}

If the token can read the list of that API, you get a confirmation with "type":"subscribed". If it can't, you get a message with "type":"error" and a code that says why. After the confirmation, a message like this arrives for each change:

{"listenerkey":"recordwijziging#...","payload":{"structuur":"...","id":2284,"wijziging":"update","tijdstip":"2026-11-04T22:49:25.401Z"}}

wijziging is create, update or delete. The timestamp is in UTC. You then fetch the record yourself through the API, with ?id= and with your own permissions.

This is how the WebSocket is secured:

  • The connection belongs to the environment you connect to. A token from another organisation or another environment doesn't work there.
  • Odigos checks the token the same way as for the API. You can only subscribe to a structure whose list the token can read.
  • A signal only names the structure, the id, the type of change and the timestamp. It never contains field values.
  • Odigos checks the token and the subscriptions again every ten minutes. If the token has been revoked or can no longer read the structure, the connection closes.

A signal can get lost
If you aren't connected, you miss the signal. Signals aren't stored and aren't acknowledged. A subscription doesn't survive the connection: after every interruption, reconnect, subscribe again and read the list once more for anything you may have missed.

Also note:

  • A signal only arrives once the change has actually been saved.
  • Send {"type":"ping"} now and then. You get a message with "type":"pong" back.
  • One connection follows at most 200 structures.
  • Only a structure with its own storage sends signals.

Let Odigos listen

Odigos can also listen to another system itself. A listener reads new messages from a mailbox, or events from a Salesforce channel. For each message it starts a process. Your system doesn't need to send anything for this.

To see which listeners there are, whether they are running and what last went wrong, go to Listeners in Orchestra.

See also