---
title: "Publish Event"
method: POST
path: "/publish"
tags: ["Publish"]
---

# Publish Event

`POST /publish`

Publishes an event to the specified topic, potentially routed to a specific destination. Requires Admin API Key.

## Request body

- PublishRequest
  - `id` string — Optional. A unique identifier for the event. If not provided, a ID will be generated.
  - `tenant_id` string — The ID of the tenant to publish for.
  - `destination_id` string — Optional. Route event to a specific destination.
  - `topic` string — Topic name for the event. Required if Outpost has been configured with topics.
  - `eligible_for_retry` boolean — Should event delivery be retried on failure.
  - `time` string, date-time — Optional. Custom timestamp for the event. If not provided, defaults to the current time.
  - `metadata` object — Any key-value string pairs for metadata.
  - `data` object, required — Any JSON payload for the event data.

## Response `202`

Event accepted for publishing. Returns the event ID.

- PublishResponse
  - `id` string, required — The ID of the event that was accepted for publishing. This will be the ID provided in the request's `id` field if present, otherwise it's a server-generated ID.
  - `duplicate` boolean, required — Whether this event was already processed (idempotency hit). If true, the event was not queued again.
  - `destination_ids` string[], required — The IDs of destinations that matched this event. Empty array if no destinations matched.

## Other responses

- `401` — Missing or invalid authentication credentials.
- `409` — Conflict. An event with the provided `id` already exists.
- `422` — The event topic was either required or was invalid.
- `500` — Unexpected server error.

---

[API](https://skmtc.net/hookdeck/apis/outpost-api.md) · [All operations](https://skmtc.net/hookdeck/apis/outpost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hookdeck/outpost-api/revisions/506c7bcee34b/schema)
