Skip to main content
POST
Create a scenario

Authorizations

Authorization
string
header
required

nia_sk_...

Headers

Idempotency-Key
string
required

Required. Kept 24 hours with the hash of the body: a retry with the same key returns the first answer, and the same key with a different body returns 409 conflict.

Required string length: 1 - 256

Body

application/json

Turns kept as a scenario, with the assertions they must keep passing; without assertions, the ones suggested by rule from the turns.

name
string
required
Required string length: 1 - 256
turn_ids
string[]
required
Required array length: 1 - 50 elements
Pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
assertions
ReplayAssertion · object[]
Maximum array length: 50

Response

The scenario.

assertions
ReplayAssertion · object[]
required
created_at
string<date-time>
required
name
string
required
origin
enum<string>
required
Available options:
manual,
report
scenario_id
string
required
Required string length: 1 - 512
status
enum<string>
required
Available options:
active,
retired
turn_ids
string[]
required
Pattern: ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
updated_at
string<date-time>
required
version
integer
required

Grows with every change of the name, the assertions or the status.