Skip to content

Creating Endpoints

Endpoints are the core of mockd. Each endpoint responds to a specific HTTP method and path with the response you define.

  1. Open your project from the dashboard
  2. Click New Endpoint
  3. Fill in the configuration:
FieldDescription
MethodHTTP method (GET, POST, PUT, PATCH, DELETE)
PathURL path (e.g. /api/users)
Status CodeHTTP status code to return (e.g. 200, 404)
Response BodyThe content returned to the caller
Content-TypeResponse content type (defaults to application/json)

Paths support dynamic segments. For example, /api/users/:id matches any request to /api/users/123, /api/users/abc, etc.

The response body can be any valid text. For JSON responses, enter valid JSON:

{
"users": [
{ "id": 1, "name": "Alice" },
{ "id": 2, "name": "Bob" }
]
}

Once created, your endpoint is available at:

https://<project-slug>.mockd.sh/<path>