---
title: "Replay events or send a test event"
method: POST
path: "/accounts/integrations/{id}/subscriptions/{sid}/replay"
tags: ["Task Subscriptions"]
---

# Replay events or send a test event

`POST /accounts/integrations/{id}/subscriptions/{sid}/replay`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/accounts/integrations/{id}/subscriptions/{sid}/replay`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/docs/accounts/integrations/:id/subscriptions/:sid/replay/post.ts> (a function with typed inputs; its response is checked against the schema)

Queued in the background; read the outcome in the delivery log. Replay covers `from < sequence <= to`, ignores delivered markers, keeps kind and echo filters, and is capped at 10 000 events. A paused subscription refuses replay (`409 subscription_paused`) but accepts a test.

## Path parameters

- `id` string, required
- `sid` string, required

## Request body

- ReplayRequest
  - `from_cursor` union: Exclusive start. Required unless `test` is true.
    - string
    - integer
  - `to_cursor` union: Inclusive end. Omit or 0 for the end of the stream. Must be greater than `from_cursor`.
    - string
    - integer
  - `test` boolean: Send a synthetic `test` event instead. Works on a paused subscription.

## Response `202`

Accepted.

- object
  - `data` ReplayAccepted, required
    - `request_id` string, required
    - `type` 'replay' | 'test', required

## Other responses

- `400`: Bad request. `code` names the cause.
- `401`: Not authenticated, the caller is not a root or admin user, or the integration token was revoked (`token_revoked`).
- `403`: Forbidden: `scope_denied`, or `integration_not_allowed` for an integration bearer outside workspaces.
- `404`: Not found.
- `409`: Conflict. `code` names the cause.
- `503`: A backing store is unreachable. Retry. `code` is `storage_unavailable`.

## Changes

- **2026-10-08** `bcf3a5f49584`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/changes/accounts/integrations/:id/subscriptions/:sid/replay/post.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/revisions/700eb1ace61a?raw)
