API Reference
mockd exposes a REST API for managing projects and endpoints programmatically. The API is the same one the dashboard uses.
Base URL
Section titled “Base URL”https://api.mockd.shAuthentication
Section titled “Authentication”All API requests require authentication. Include your session token in the Authorization header:
Authorization: Bearer <token>Projects
Section titled “Projects”List Projects
Section titled “List Projects”GET /api/projectsReturns all projects for the authenticated user.
Create Project
Section titled “Create Project”POST /api/projectsContent-Type: application/json
{ "name": "My Project"}Delete Project
Section titled “Delete Project”DELETE /api/projects/:idEndpoints
Section titled “Endpoints”List Endpoints
Section titled “List Endpoints”GET /api/projects/:projectId/endpointsCreate Endpoint
Section titled “Create Endpoint”POST /api/projects/:projectId/endpointsContent-Type: application/json
{ "method": "GET", "path": "/api/users", "statusCode": 200, "responseBody": "{\"users\": []}", "contentType": "application/json"}Update Endpoint
Section titled “Update Endpoint”PUT /api/projects/:projectId/endpoints/:idContent-Type: application/json
{ "statusCode": 201, "responseBody": "{\"created\": true}"}Delete Endpoint
Section titled “Delete Endpoint”DELETE /api/projects/:projectId/endpoints/:id