---
title: "POST /v0/projects/{projectName}/snippets/request"
method: POST
path: "/v0/projects/{projectName}/snippets/request"
---

# POST /v0/projects/{projectName}/snippets/request

`POST /v0/projects/{projectName}/snippets/request`

## Path parameters

- `projectName` string, required

## Request body

- object
  - `language` 'node' | 'typescript' | 'python' | 'go' | 'java' | 'kotlin' | 'ruby' | 'terraform' | 'cli' | 'php' | 'csharp' | 'sql' | 'openapi', required
  - `version` 'next' | 'latest_released', required
  - `request` union, required
    - object
      - `method` string, required
      - `path` string, required
      - `parameters` object[], required
        - `name` string, required
        - `in` 'path' | 'query' | 'header' | 'cookie', required
        - `value` unknown
      - `body` object
        - `fileParam` string
        - `filePath` string
    - object
      - `method` string, required
      - `url` string, required
      - `postData` union
        - object
          - `mimeType` string, required
          - `text` string, required
        - object
          - `mimeType` string, required
          - `params` object[], required
            - `name` string, required
            - `value` string
      - `queryString` object[], required
        - `name` string, required
        - `value` unknown

## Response `200`

success

- object
  - `snippet` string, required

## Changes

- **2026-01-05** `c9cc06ef2a81` — 1 info
  - added the new `sql` enum value to the request property `language`
- **2025-12-17** `6783cf45e0ea` — 1 info
  - added the new `openapi` enum value to the request property `language`
- **2025-07-07** `f8b160dfac6c` — 3 breaking, 2 warning, 1 info
  - added `subschema #1, subschema #2` to the `request/anyOf[subschema #2]/postData` request property `allOf` list
  - the `request/anyOf[subschema #2]/postData` request property type/format changed from `object`/`` to ``/``
  - the `request/anyOf[subschema #2]/queryString/items/value` request property type/format changed from `string`/`` to ``/``
  - removed the request property `request/anyOf[subschema #2]/postData/mimeType`
  - …2 more

[Change history](https://skmtc.dev/stainless-api/apis/my-api/changes/v0/projects/:projectName/snippets/request/post.md)

---

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