---
title: "Generate request"
method: POST
path: "/.services/{serviceName}"
tags: ["services"]
---

# Generate request

`POST /.services/{serviceName}`

Generate a valid request for a specific operation within a service.
Returns the generated path, headers, body, and content type.

## Path parameters

- `serviceName` string, required

## Request body

- GenerateRequest
  - `path` string — The path pattern to generate a request for
  - `method` string — HTTP method
  - `context` object — Custom context values for placeholder replacement

## Response `200`

Successful response

- GenerateResponse
  - `path` string — Generated path with placeholders replaced
  - `contentType` string — Request content type (for POST/PUT/PATCH)
  - `headers` object — Generated request headers
  - `body` unknown

## Other responses

- `400` — Bad request (invalid JSON)
- `404` — Service not found

---

[API](https://skmtc.dev/mockzilla/apis/mockzilla-api.md) · [All operations](https://skmtc.dev/mockzilla/apis/mockzilla-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mockzilla/mockzilla-api/revisions/6ea09ec4722c/schema)
