Preview: SendMock has no stable release yet. These docs follow develop.

CLI reference

HTTP Catcher commands

sendmock http bin create

Add a bin; 409 when the name is taken.

sendmock http bin create [flags]
FlagTypeDescription
--name <name>requiredstring
The bin's name; your app calls /catch/<name>/....Example: slack
--preset <preset>string
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

Example

sendmock http bin create --name slack --preset slack

Output with --json: HttpBin. Exit codes: 0, 1, 2.

API
POST/api/v1/http/bins
MCP tool
sendmock_http_bin_create
In the app
HTTP Catcher > New bin

sendmock http bin delete

Delete a bin and its requests.

sendmock http bin delete <binId> [flags]
ArgumentTypeDescription
<binId>requiredstring
The HTTP bin's ID, from GET /api/v1/http/bins.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
FlagTypeDescription
--yesboolean
Confirms a destructive command; without it the command stops.

Example

sendmock http bin delete 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --yes

Output with --json: nothing. Exit codes: 0, 1, 2, 3.

API
DELETE/api/v1/http/bins/{binId}
MCP tool
sendmock_http_bin_delete
In the app
HTTP Catcher > bin > Delete bin

sendmock http bin list

Bins, each a capture URL with its own responses.

sendmock http bin list

Also runs as sendmock http bins.

Example

sendmock http bin list

Output with --json: HttpBin[]. Exit codes: 0, 1, 2.

API
GET/api/v1/http/bins
MCP tool
sendmock_http_bin_list
In the app
HTTP Catcher > bins

sendmock http bin update

Change a bin's default response.

sendmock http bin update <binId> [flags]
ArgumentTypeDescription
<binId>requiredstring
The HTTP bin's ID, from GET /api/v1/http/bins.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
FlagTypeDescription
--default-response <default-response>requiredHttpMockResponse (JSON)
The reply sent when no rule matches.

Example

sendmock http bin update 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --default-response '{"status_code":200,"headers":{"Content-Type":"application/json"},"body":"{\"ok\": true}"}'

Output with --json: HttpBin. Exit codes: 0, 1, 2, 3.

API
PATCH/api/v1/http/bins/{binId}
MCP tool
sendmock_http_bin_update
In the app
HTTP Catcher > bin > Responses > Edit default reply

sendmock http clear

Delete captured requests, all or one bin's.

sendmock http clear [flags]
FlagTypeDescription
--bin-id <bin-id>string
Only this bin.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
--yesboolean
Confirms a destructive command; without it the command stops.

Example

sendmock http clear --yes

Output with --json: nothing. Exit codes: 0, 1, 2.

API
DELETE/api/v1/http/requests
MCP tool
sendmock_http_clear
In the app
HTTP Catcher > bin > Clear requests

sendmock http file

Download a file uploaded in a captured request.

sendmock http file <requestId> <fileIndex>
ArgumentTypeDescription
<requestId>requiredstring
The captured request's ID, from GET /api/v1/http/requests or GET /api/v1/logs/http.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
<fileIndex>requiredinteger
Position of the uploaded file in the request's files, starting at 0.Example: 0

Example

sendmock http file 01JB7T9Q2R5W8X3Y6Z1A4B7C9D 0

Output with --json: file (application/octet-stream). Exit codes: 0, 1, 2, 3.

API
GET/api/v1/http/requests/{requestId}/files/{fileIndex}
MCP tool
sendmock://http/requests/{requestId}/files/{fileIndex}
In the app
HTTP Catcher > request > Body > files

sendmock http forward

Send a captured request on to another URL.

sendmock http forward <requestId> [flags]
ArgumentTypeDescription
<requestId>requiredstring
The captured request's ID, from GET /api/v1/http/requests or GET /api/v1/logs/http.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
FlagTypeDescription
--url <url>requiredstring
Where the captured request is sent again, e.g. your local handler.Example: http://localhost:3000/webhooks/slack

Example

sendmock http forward 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --url http://localhost:3000/webhooks/slack

Output with --json: HttpForwardResult. Exit codes: 0, 1, 2, 3.

API
POST/api/v1/http/requests/{requestId}/forward
MCP tool
sendmock_http_forward
In the app
HTTP Catcher > request > Forward to URL

sendmock http list

Captured requests, newest first.

sendmock http list [flags]
FlagTypeDescription
--cursor <cursor>string
The next_cursor of the previous page.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
--limit <limit>integer
Items per page, 1 to 200 (default 50).Example: 50
--bin-id <bin-id>string
Only this bin.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Example

sendmock http list --cursor 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --limit 50

Output with --json: PageOf_CapturedHttpRequest. Exit codes: 0, 1, 2.

API
GET/api/v1/http/requests
MCP tool
sendmock_http_list
In the app
HTTP Catcher > Requests

sendmock http response list

A bin's response rules, checked from top to bottom.

sendmock http response list <binId>
ArgumentTypeDescription
<binId>requiredstring
The HTTP bin's ID, from GET /api/v1/http/bins.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Example

sendmock http response list 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Output with --json: HttpResponseRule[]. Exit codes: 0, 1, 2, 3.

API
GET/api/v1/http/bins/{binId}/responses
MCP tool
sendmock_http_response_list
In the app
HTTP Catcher > bin > Responses

sendmock http response preview

Which rule a captured request would match, and its answer.

sendmock http response preview <binId> [flags]
ArgumentTypeDescription
<binId>requiredstring
The HTTP bin's ID, from GET /api/v1/http/bins.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
FlagTypeDescription
--rule <rule>requiredHttpResponseRule (JSON)
The rule to try, saved or not.
--request-id <request-id>requiredstring
The captured request to try it on.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Example

sendmock http response preview 01JB7T9Q2R5W8X3Y6Z1A4B7C9D --rule '{"id":"01JB7T9Q2R5W8X3Y6Z1A4B7C9D","name":"Rate limit the push API","is_enabled":true,"method":"POST","path_glob":"/v1/*","filter":{"all":[null]},"response":{"status_code":200,"headers":{"Content-Type":"application/json"},"body":"{\"ok\": true}"},"delay_min_ms":0,"delay_max_ms":500,"failure_rate_percent":10,"failure_status_code":503}' --request-id 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Output with --json: HttpRulePreviewResult. Exit codes: 0, 1, 2, 3.

API
POST/api/v1/http/bins/{binId}/responses/preview
MCP tool
sendmock_http_response_preview
In the app
HTTP Catcher > bin > Responses > rule sheet > Preview

sendmock http response set

Replace a bin's response rules.

sendmock http response set <binId>
ArgumentTypeDescription
<binId>requiredstring
The HTTP bin's ID, from GET /api/v1/http/bins.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Example

sendmock http response set 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Output with --json: HttpResponseRule[]. Exit codes: 0, 1, 2, 3.

API
PUT/api/v1/http/bins/{binId}/responses
MCP tool
sendmock_http_response_set
In the app
HTTP Catcher > bin > Responses > Add rule, edit, move, enabled switch

sendmock http send

Capture a request in a bin and answer with its matching response rule or default response.

sendmock http send <bin> [flags]
ArgumentTypeDescription
<bin>requiredstring
The bin's name, then any path your app adds, e.g. slack/services/T000/B000.Example: slack
FlagTypeDescription
--method <method>requiredstring
Picks the operation: GET, POST, PUT, PATCH, DELETE.One of: GET, POST, PUT, PATCH, DELETEExample: GET
--file <path>path
The raw request body (*/*). From a file; - reads stdin.Example: body.json

Example

sendmock http send slack --method GET

Output with --json: file (*/*). Exit codes: 0, 1, 2.

API
method: GETGET/catch/{binPath}method: POSTPOST/catch/{binPath}method: PUTPUT/catch/{binPath}method: PATCHPATCH/catch/{binPath}method: DELETEDELETE/catch/{binPath}
MCP tool
sendmock_http_send
In the app
HTTP Catcher > Send a sample request

sendmock http show

One captured request and what SendMock answered.

sendmock http show <requestId>
ArgumentTypeDescription
<requestId>requiredstring
The captured request's ID, from GET /api/v1/http/requests or GET /api/v1/logs/http.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Example

sendmock http show 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Output with --json: CapturedHttpRequest. Exit codes: 0, 1, 2, 3.

API
GET/api/v1/http/requests/{requestId}
MCP tool
sendmock_http_get
In the app
HTTP Catcher > open a request