Skip to main content
POST
Create a mapping rule

Authorizations

hookie_session
string
cookie
required

The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.

Headers

Idempotency-Key
string

Makes a POST safe to retry for 24 hours: the same key, credential, path and body returns the stored response (Idempotent-Replayed: true) instead of running again. 422 if the key was used for a different request; 409 while the first is in flight.

Required string length: 1 - 255

Path Parameters

project_id
string
required

Project id (UUID) belonging to the caller workspace.

Body

application/json
name
string
required

Trimmed before storing; must be non-empty and at most 80 characters.

Required string length: 1 - 80
dataset
string
required

The logical table matched events land in.

Pattern: ^[A-Za-z][A-Za-z0-9_]{0,62}$
enabled
boolean
default:true

Anything other than the literal false is treated as true.

conditions
object[]

Conditions in the one dialect (see Condition); equals, not_equals and in compare as text. A path has no whitespace, does not begin with a dot and is not a $-special path. Empty or omitted = match every event.

Maximum array length: 10
mappings
object[]

Omitted, null or empty means identity - store the whole payload.

Maximum array length: 50

Response

Created.

id
string
required
rule
object

The created rule, as GET by id returns it (#201).