bots/list or threads/send, takes one JSON input, and returns one JSON output.
The shape of a call
Every procedure is aPOST to /rpc/ plus its path. The input goes in a json field. The output comes back in a json field.
- Always
POSTto$CADENCE_URL/rpc/<path>, where a dot in the procedure name becomes a slash (computer.statusis/rpc/computer/status). - Wrap the input in
json. A procedure with no input takes{}as the body. - Read the result from
json. Themetaarray describes values JSON cannot carry natively, such as dates. You can ignore it when you only need plain values.
Spaces
Requests act inside one space. Without a hint, the API uses your default space. To act in another space you belong to, send its id in thex-cadenceplus-space-id header:
spaces/list returns the spaces you can use. See Spaces.
TypeScript
The procedures are defined with oRPC inpackages/contracts/src/rpc.ts. Inside the Cadence repository you can call them with a fully typed client:
What’s in the reference
Authentication
Get a token and send it with each call.
Errors
The error shape and what to do about each code.
Streaming
Follow a chat live as the bot works.
Webhooks
Start a bot’s routines from another system.
packages/contracts/src/rpc.ts.