---
title: "Deprecated: use /api/capture/http"
method: POST
path: "/api/capture"
deprecated: true
---

# Deprecated: use /api/capture/http

`POST /api/capture`

> **Deprecated.**

Deprecated HTTP capture endpoint.

Kept for backwards compatibility with old smello client wheels in the wild,
which only ever posted HTTP captures here. New clients should use the
typed endpoints `/api/capture/http`, `/api/capture/log`,
`/api/capture/exception`.

## Request body

- HttpCapturePayload
  - `id` string, nullable
  - `timestamp` string, date-time, nullable
  - `app` string
  - `session` string
  - `hierarchy` EventHierarchyInput — Runtime correlation and grouping context captured with one event.
    - `runtime` RuntimeCorrelation — Runtime identity owned or referenced by one captured event.
      - `trace_id` string, required
      - `span_id` string, required
      - `parent_span_id` string, nullable
      - `role` 'operation' | 'annotation', required
      - `origin` 'smello' | 'otel'
    - `group_memberships` union[]
      - union
        - PytestGroupMembership — Position in pytest's collection hierarchy.
          - `kind` 'pytest'
          - `test_directory` GroupReference — Stable group identity and its display label.
            - `id` string, required
            - `label` string, required
          - `test_file` GroupReference, required — Stable group identity and its display label.
            - `id` string, required
            - `label` string, required
          - `test_class` GroupReference — Stable group identity and its display label.
            - `id` string, required
            - `label` string, required
          - `test_case` GroupReference, required — Stable group identity and its display label.
            - `id` string, required
            - `label` string, required
        - HttpRequestGroupMembership — Position in the outgoing HTTP target hierarchy.
          - `kind` 'http_request'
          - `hostname` GroupReference, required — Stable group identity and its display label.
            - `id` string, required
            - `label` string, required
  - `duration_ms` integer
  - `request` HttpRequestData, required
    - `method` string, required
    - `url` string, required
    - `headers` object, required
    - `body` string, nullable
    - `body_size` integer
  - `response` HttpResponseData
    - `status_code` integer, required
    - `headers` object, required
    - `body` string, nullable
    - `body_size` integer
  - `error` HttpOperationError — Exception raised by an outgoing HTTP operation.
    - `type` string, required
    - `message` string
    - `module` string, nullable
  - `meta` HttpMeta
    - `library` string
    - `python_version` string
    - `smello_version` string

## Response `201`

Successful Response

- CaptureResponse
  - `status` string, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-04** `71ae1afbca8d` — 1 breaking, 4 warning, 5 info
  - the `response` request property type/format changed from `object`/`` to ``/``
  - removed the request property `response/body`
  - removed the request property `response/body_size`
  - removed the request property `response/headers`
  - …6 more
- **2026-05-26** `8389ab2610fc` — 2 info
  - added the new optional request property `app`
  - added the new optional request property `session`
- **2026-05-04** `5561c57fbffd` — 2 warning
  - removed the request property `app`
  - removed the request property `session`

[Change history](https://skmtc.dev/smelloscope/apis/smello/changes/api/capture/post.md)

---

[API](https://skmtc.dev/smelloscope/apis/smello.md) · [All operations](https://skmtc.dev/smelloscope/apis/smello/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/smelloscope/smello/revisions/469b056c3641/schema)
