Skip to content

API Reference

mockd exposes a REST API for managing projects and endpoints programmatically. The API is the same one the dashboard uses.

https://api.mockd.sh

All API requests require authentication. Include your session token in the Authorization header:

Authorization: Bearer <token>
GET /api/projects

Returns all projects for the authenticated user.

POST /api/projects
Content-Type: application/json
{
"name": "My Project"
}
DELETE /api/projects/:id
GET /api/projects/:projectId/endpoints
POST /api/projects/:projectId/endpoints
Content-Type: application/json
{
"method": "GET",
"path": "/api/users",
"statusCode": 200,
"responseBody": "{\"users\": []}",
"contentType": "application/json"
}
PUT /api/projects/:projectId/endpoints/:id
Content-Type: application/json
{
"statusCode": 201,
"responseBody": "{\"created\": true}"
}
DELETE /api/projects/:projectId/endpoints/:id