GET/api/v1/http/bins
Bins, each a capture URL with its own responses.
- CLI
sendmock http bin list- MCP tool
sendmock_http_bin_list- In the app
- HTTP Catcher > bins
Answer
200 HttpBin[]
/api/v1/http/binsBins, each a capture URL with its own responses.
sendmock http bin listsendmock_http_bin_list200 HttpBin[]
/api/v1/http/binsAdd a bin; 409 when the name is taken.
sendmock http bin createsendmock_http_bin_createHttpBinInput : Body of POST /api/v1/http/bins.
| Field | Type | Description |
|---|---|---|
| name | string | The bin's name; your app calls /catch/<name>/....Example: slack |
| preset | HttpBinPreset | null | A ready-made bin that answers like the real service ( slack, discord, teams, google_chat, telegram, fcm, expo, onesignal, generic); null for a plain bin.One of: slack, discord, teams, google_chat, telegram, fcm, expo, onesignal, genericExample: slack |
201 HttpBin
Errors: 400, 409, as { error: { code, message } }
/api/v1/http/bins/{binId}Change a bin's default response.
sendmock http bin update <binId>sendmock_http_bin_updateHttpBinUpdate : Body of `PATCH /http/bins/{binId}`.
| Field | Type | Description |
|---|---|---|
| default_response | HttpMockResponse | The reply sent when no rule matches. |
200 HttpBin
Errors: 404, as { error: { code, message } }
/api/v1/http/bins/{binId}Delete a bin and its requests.
sendmock http bin delete <binId>sendmock_http_bin_delete204 No content
Errors: 404, as { error: { code, message } }
/api/v1/http/bins/{binId}/responsesA bin's response rules, checked from top to bottom.
sendmock http response list <binId>sendmock_http_response_list200 HttpResponseRule[]
Errors: 404, as { error: { code, message } }
/api/v1/http/bins/{binId}/responsesReplace a bin's response rules.
sendmock http response set <binId>sendmock_http_response_setHttpResponseRule[] : One mock response rule; rules are checked in order and the first match answers.
| Field | Type | Description |
|---|---|---|
| id | Ulid | Empty for a new rule in a PUT; the API assigns it.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
| name | string | A name for the rule, shown in the list.Example: Rate limit the push API |
| is_enabled | boolean | Off rules are kept but skipped.Example: true |
| method | HttpMethod | null | Null matches any method.One of: GET, POST, PUT, PATCH, DELETEExample: POST |
| path_glob | string | Relative to the bin, e.g. /v1/*; empty matches any path.Example: /v1/* |
| filter | RuleFilter | null | Header and body conditions, as in webhook rules. |
| response | HttpMockResponse | The reply sent when the rule matches. |
| delay_min_ms | number | A fixed delay when both are equal, else a random one in the range.Example: 0 |
| delay_max_ms | number | The longest delay before replying, in milliseconds; equal to delay_min_ms for a fixed delay.Example: 500 |
| failure_rate_percent | number | The share of matching requests answered with failure_status_code instead, 0 to 100.Example: 10 |
| failure_status_code | number | The status sent for a simulated failure.Example: 503 |
200 HttpResponseRule[]
Errors: 400, 404, as { error: { code, message } }
/api/v1/http/bins/{binId}/responses/previewWhich rule a captured request would match, and its answer.
sendmock http response preview <binId>sendmock_http_response_previewHttpRulePreviewRequest : Body of POST /api/v1/http/bins/{binId}/responses/preview.
| Field | Type | Description |
|---|---|---|
| rule | HttpResponseRule | The rule to try, saved or not. |
| request_id | Ulid | The captured request to try it on.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D |
200 HttpRulePreviewResult
Errors: 404, as { error: { code, message } }
/api/v1/http/requestsCaptured requests, newest first.
sendmock http listsendmock_http_list200 PageOf_CapturedHttpRequest
/api/v1/http/requestsDelete captured requests, all or one bin's.
sendmock http clearsendmock_http_clear204 No content
/api/v1/http/requests/{requestId}One captured request and what SendMock answered.
sendmock http show <requestId>sendmock_http_get200 CapturedHttpRequest
Errors: 404, as { error: { code, message } }
/api/v1/http/requests/{requestId}/files/{fileIndex}Download a file uploaded in a captured request.
sendmock http file <requestId> <fileIndex>sendmock://http/requests/{requestId}/files/{fileIndex}200 string (application/octet-stream)
Errors: 404, as { error: { code, message } }
/api/v1/http/requests/{requestId}/forwardSend a captured request on to another URL.
sendmock http forward <requestId>sendmock_http_forwardHttpForwardRequest : Body of POST /api/v1/http/requests/{requestId}/forward.
| Field | Type | Description |
|---|---|---|
| url | string | Where the captured request is sent again, e.g. your local handler.Example: http://localhost:3000/webhooks/slack |
200 HttpForwardResult
Errors: 400, 404, as { error: { code, message } }
/catch/{binPath}Capture a request in a bin and answer with its matching response rule or default response.
sendmock http send <bin>sendmock_http_send200 string (*/*)
/catch/{binPath}Capture a request in a bin and answer with its matching response rule or default response.
sendmock http send <bin>sendmock_http_sendstring
200 string (*/*)
/catch/{binPath}Capture a request in a bin and answer with its matching response rule or default response.
sendmock http send <bin>sendmock_http_sendstring
200 string (*/*)
/catch/{binPath}Capture a request in a bin and answer with its matching response rule or default response.
sendmock http send <bin>sendmock_http_sendstring
200 string (*/*)
/catch/{binPath}Capture a request in a bin and answer with its matching response rule or default response.
sendmock http send <bin>sendmock_http_send200 string (*/*)