Skip to main content
PUT
/
v1
/
mocks
/
scenarios
/
{scenario_id}
Update a scenario
curl --request PUT \
  --url https://api-sandbox.featherhq.com/v1/mocks/scenarios/{scenario_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "priority": 5000,
  "match_method": "<string>",
  "match_path_pattern": "<string>",
  "match_headers": {},
  "match_query": {},
  "match_body": {},
  "response_status": 349,
  "response_headers": {},
  "response_body": {},
  "delay_ms": 30000,
  "is_enabled": true
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "mock_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "priority": 123,
  "match_method": "<string>",
  "match_path_pattern": "<string>",
  "match_headers": {},
  "match_query": {},
  "match_body": {},
  "response_status": 123,
  "response_headers": {},
  "response_body": {},
  "delay_ms": 123,
  "is_enabled": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Path Parameters

scenario_id
string<uuid>
required

Body

application/json

Partial update — every field optional, same caps as create.

Explicit null is honoured only for nullable columns (currently just match_path_pattern); for every other field it's rejected at the schema layer with 422 (see _reject_null_on_not_null).

name
string | null
Required string length: 1 - 255
priority
integer | null
Required range: 0 <= x <= 10000
match_method
string | null
match_path_pattern
string | null
Maximum string length: 1000
match_headers
Match Headers · object
match_query
Match Query · object
match_body
Match Body · object
response_status
integer | null
Required range: 100 <= x <= 599
response_headers
Response Headers · object
response_body
delay_ms
integer | null
Required range: 0 <= x <= 60000
is_enabled
boolean | null

Response

Successful Response

id
string<uuid>
required
mock_id
string<uuid>
required
name
string
required
priority
integer
required
match_method
string
required
match_path_pattern
string | null
required
match_headers
Match Headers · object
required
match_query
Match Query · object
required
match_body
Match Body · object
required
response_status
integer
required
response_headers
Response Headers · object
required
response_body
required
delay_ms
integer
required
is_enabled
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required