Frontend states

Empty, partial, stale, and validation states for UI checks. Load a template into the create form, then adjust the response before creating an endpoint.

200application/jsonGET

Empty dashboard

An empty-state response for first-run UI checks.

Use template
View payload and cURL

Headers

none

Body

{
  "items": [],
  "message": "Nothing here yet. Create your first item when you are ready."
}

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "{\"items\":[],\"message\":\"Nothing here yet. Create your first item when you are ready.\"}",
  "content_type": "application/json",
  "headers": null,
  "methods": [
    "GET"
  ],
  "status": 200
}'
207application/jsonPOST

Partial success

Test toasts, banners, and retry UI after a mixed result.

Use template
View payload and cURL

Headers

none

Body

{
  "accepted": [
    "row_001",
    "row_003"
  ],
  "failed": [
    {
      "id": "row_002",
      "message": "Missing email"
    }
  ]
}

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "{\n  \"accepted\": [\"row_001\", \"row_003\"],\n  \"failed\": [{\"id\": \"row_002\", \"message\": \"Missing email\"}]\n}",
  "content_type": "application/json",
  "headers": null,
  "methods": [
    "POST"
  ],
  "status": 207
}'
422application/jsonPOST

Form field errors

Check inline validation, summary banners, and focus handling.

Use template
View payload and cURL

Headers

none

Body

{
  "message": "Fix the highlighted fields.",
  "fields": {
    "name": "Name is required.",
    "email": "Use a valid email address."
  }
}

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "{\n  \"message\": \"Fix the highlighted fields.\",\n  \"fields\": {\n    \"name\": \"Name is required.\",\n    \"email\": \"Use a valid email address.\"\n  }\n}",
  "content_type": "application/json",
  "headers": null,
  "methods": [
    "POST"
  ],
  "status": 422
}'
200application/jsonGET

Stale data warning

Show a freshness warning while still rendering cached data.

Use template
View payload and cURL

Headers

{
  "X-Data-Freshness": "stale"
}

Body

{
  "items": [
    {
      "id": "item_1",
      "name": "Cached result"
    }
  ],
  "warning": "This data may be out of date."
}

Create with cURL

curl -i 'https://stubpoint.dev/api/endpoints' -H 'Content-Type: application/json' -d '{
  "body": "{\n  \"items\": [{\"id\": \"item_1\", \"name\": \"Cached result\"}],\n  \"warning\": \"This data may be out of date.\"\n}",
  "content_type": "application/json",
  "headers": {
    "X-Data-Freshness": "stale"
  },
  "methods": [
    "GET"
  ],
  "status": 200
}'

Other recipe shelves