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

API reference

Projects

POST/api/v1/projects

Add a project that apps can send traffic to by its key.

CLI
sendmock projects create
MCP tool
sendmock_project_create
In the app
Settings > Projects > New project

Request body (application/json)

ProjectInput : Body of POST /api/v1/projects.

FieldTypeDescription
keystring
What apps send as the SMTP username, the X-SendMock-Project header or the /projects/<key>/ URL prefix. It never changes.Example: shop
namestring
A name for the project, shown in the UI.Example: Shop

Answer

201 Project

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

Try it in Demo mode

PATCH/api/v1/projects/{projectKey}

Rename a project; its key stays the same.

CLI
sendmock projects update <projectKey>
MCP tool
sendmock_project_update
In the app
Settings > Projects > Rename

Request body (application/json)

ProjectUpdate : Body of PATCH /api/v1/projects/{projectKey}: the new name.

FieldTypeDescription
namestring
A name for the project, shown in the UI.Example: Shop

Answer

200 Project

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

Try it in Demo mode