Skip to main content
PUT
/
v1
/
mocks
/
{mock_id}
Update a mock
curl --request PUT \
  --url https://api-sandbox.featherhq.com/v1/mocks/{mock_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "default_status": 349,
  "default_response_body": {},
  "is_enabled": true
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "slug": "<string>",
  "name": "<string>",
  "description": "<string>",
  "default_status": 123,
  "default_response_body": {},
  "is_enabled": true,
  "created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "public_url_path": "<string>",
  "scenarios": [
    {
      "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

mock_id
string<uuid>
required

Body

application/json

Partial update. Fields the client omits are not modified. An explicit null on a nullable column (description, default_response_body) clears it; an explicit null on a NOT-NULL column is rejected at the schema layer (see _reject_null_on_not_null).

name
string | null
Required string length: 1 - 255
description
string | null
Maximum string length: 4000
default_status
integer | null
Required range: 100 <= x <= 599
default_response_body
is_enabled
boolean | null

Response

Successful Response

id
string<uuid>
required
organization_id
string<uuid>
required
slug
string
required
name
string
required
description
string | null
required
default_status
integer
required
default_response_body
required
is_enabled
boolean
required
created_by
string<uuid> | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
public_url_path
string
required
scenarios
MockScenarioResponse · object[]