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

API reference

HTTP Catcher

POST/api/v1/http/bins

Add a bin; 409 when the name is taken.

CLI
sendmock http bin create
MCP tool
sendmock_http_bin_create
In the app
HTTP Catcher > New bin

Request body (application/json)

HttpBinInput : Body of POST /api/v1/http/bins.

FieldTypeDescription
namestring
The bin's name; your app calls /catch/<name>/....Example: slack
presetHttpBinPreset | 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

Answer

201 HttpBin

Errors: 400, 409, as { error: { code, message } }

Try it in Demo mode

PATCH/api/v1/http/bins/{binId}

Change a bin's default response.

CLI
sendmock http bin update <binId>
MCP tool
sendmock_http_bin_update
In the app
HTTP Catcher > bin > Responses > Edit default reply

Request body (application/json)

HttpBinUpdate : Body of `PATCH /http/bins/{binId}`.

FieldTypeDescription
default_responseHttpMockResponse
The reply sent when no rule matches.

Answer

200 HttpBin

Errors: 404, as { error: { code, message } }

Try it in Demo mode

PUT/api/v1/http/bins/{binId}/responses

Replace a bin's response rules.

CLI
sendmock http response set <binId>
MCP tool
sendmock_http_response_set
In the app
HTTP Catcher > bin > Responses > Add rule, edit, move, enabled switch

Request body (application/json)

HttpResponseRule[] : One mock response rule; rules are checked in order and the first match answers.

FieldTypeDescription
idUlid
Empty for a new rule in a PUT; the API assigns it.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D
namestring
A name for the rule, shown in the list.Example: Rate limit the push API
is_enabledboolean
Off rules are kept but skipped.Example: true
methodHttpMethod | null
Null matches any method.One of: GET, POST, PUT, PATCH, DELETEExample: POST
path_globstring
Relative to the bin, e.g. /v1/*; empty matches any path.Example: /v1/*
filterRuleFilter | null
Header and body conditions, as in webhook rules.
responseHttpMockResponse
The reply sent when the rule matches.
delay_min_msnumber
A fixed delay when both are equal, else a random one in the range.Example: 0
delay_max_msnumber
The longest delay before replying, in milliseconds; equal to delay_min_ms for a fixed delay.Example: 500
failure_rate_percentnumber
The share of matching requests answered with failure_status_code instead, 0 to 100.Example: 10
failure_status_codenumber
The status sent for a simulated failure.Example: 503

Answer

200 HttpResponseRule[]

Errors: 400, 404, as { error: { code, message } }

Try it in Demo mode

POST/api/v1/http/bins/{binId}/responses/preview

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

CLI
sendmock http response preview <binId>
MCP tool
sendmock_http_response_preview
In the app
HTTP Catcher > bin > Responses > rule sheet > Preview

Request body (application/json)

HttpRulePreviewRequest : Body of POST /api/v1/http/bins/{binId}/responses/preview.

FieldTypeDescription
ruleHttpResponseRule
The rule to try, saved or not.
request_idUlid
The captured request to try it on.Example: 01JB7T9Q2R5W8X3Y6Z1A4B7C9D

Answer

200 HttpRulePreviewResult

Errors: 404, as { error: { code, message } }

Try it in Demo mode

GET/api/v1/http/requests

Captured requests, newest first.

CLI
sendmock http list
MCP tool
sendmock_http_list
In the app
HTTP Catcher > Requests

Answer

200 PageOf_CapturedHttpRequest

Try it in Demo mode

DELETE/api/v1/http/requests

Delete captured requests, all or one bin's.

CLI
sendmock http clear
MCP tool
sendmock_http_clear
In the app
HTTP Catcher > bin > Clear requests

Answer

204 No content

Try it in Demo mode

GET/api/v1/http/requests/{requestId}

One captured request and what SendMock answered.

CLI
sendmock http show <requestId>
MCP tool
sendmock_http_get
In the app
HTTP Catcher > open a request

Answer

200 CapturedHttpRequest

Errors: 404, as { error: { code, message } }

Try it in Demo mode

POST/api/v1/http/requests/{requestId}/forward

Send a captured request on to another URL.

CLI
sendmock http forward <requestId>
MCP tool
sendmock_http_forward
In the app
HTTP Catcher > request > Forward to URL

Request body (application/json)

HttpForwardRequest : Body of POST /api/v1/http/requests/{requestId}/forward.

FieldTypeDescription
urlstring
Where the captured request is sent again, e.g. your local handler.Example: http://localhost:3000/webhooks/slack

Answer

200 HttpForwardResult

Errors: 400, 404, as { error: { code, message } }

Try it in Demo mode

GET/catch/{binPath}

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

CLI
sendmock http send <bin>
MCP tool
sendmock_http_send
In the app
HTTP Catcher > Send a sample request

Answer

200 string (*/*)

Try it in Demo mode

POST/catch/{binPath}

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

CLI
sendmock http send <bin>
MCP tool
sendmock_http_send
In the app
HTTP Catcher > Send a sample request

Request body (*/*)

string

Answer

200 string (*/*)

Try it in Demo mode

PUT/catch/{binPath}

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

CLI
sendmock http send <bin>
MCP tool
sendmock_http_send
In the app
HTTP Catcher > Send a sample request

Request body (*/*)

string

Answer

200 string (*/*)

Try it in Demo mode

PATCH/catch/{binPath}

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

CLI
sendmock http send <bin>
MCP tool
sendmock_http_send
In the app
HTTP Catcher > Send a sample request

Request body (*/*)

string

Answer

200 string (*/*)

Try it in Demo mode

DELETE/catch/{binPath}

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

CLI
sendmock http send <bin>
MCP tool
sendmock_http_send
In the app
HTTP Catcher > Send a sample request

Answer

200 string (*/*)

Try it in Demo mode