Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Your factory's Worklayer API key (wrk-...). See Get an API key and Authentication. Requests sent from the playground execute live against your factory.

Headers

Idempotency-Key
string

Your unique key for this Event. 1 to 191 visible ASCII characters. If you send the same key with the same body to the same Room again, you get the same eventId. A body without delivery is the same as a body with delivery set to queue. Send one header only.

Pattern: ^[!-~]{1,191}$

Path Parameters

roomId
string
required

Room ID. Pass web to target your factory's main Room (the conversation in the Worklayer web app).

Required string length: 1 - 191

Body

application/json
type
string
required

Your name for the kind of Event, for example order.shipped. It must not be blank.

Required string length: 1 - 120
content
string
required

The text of the Event. It must not be blank.

attributes
object

Structured metadata stored with the Event (for example, internal IDs). The key type is disallowed. Defaults to {}.

modelContext
object

Facts that the factory gets together with content. Put here what the factory must know to act. Default: {}.

delivery
enum<string>
default:queue

When the factory reads the Event. Default: queue.

Available options:
context,
queue,
steer

Response

The Event is accepted. The factory reads it later.

eventId
string
required

The id of the Event.

delivery
enum<string>
required

The delivery that the API uses for the Event. It is queue when you did not send one.

Available options:
context,
queue,
steer