openapi: 3.1.0
info:
title: Svix Application Message API
description: 'Welcome to the Svix API documentation!
Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/)
# Introduction
This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com).
## Main concepts
In Svix you have four important entities you will be interacting with:
- `messages`: these are the webhooks being sent. They can have contents and a few other properties.
- `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform.
- `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type).
- `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint.
## Authentication
Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys).
## Code samples
The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/).
## Idempotency
Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response.
To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Your idempotency key should not begin with the string `auto_`, which is reserved for internal use by the client libraries.
Svix''s idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result for a period of up to 12 hours.
Please note that idempotency is only supported for `POST` requests.
## Cross-Origin Resource Sharing
This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
'
version: 1.84.0
x-logo:
altText: Svix Logo
url: https://www.svix.com/static/img/brand-padded.svg
servers:
- url: https://api.eu.svix.com/
description: The Svix EU region
- url: https://api.us.svix.com/
description: The Svix US region
- url: https://api.ca.svix.com/
description: The Svix Canada region
- url: https://api.au.svix.com/
description: The Svix Australia region
- url: https://api.in.svix.com/
description: The Svix India region
tags:
- name: Message
description: Messages are the webhook events being sent.
paths:
/api/v1/app/{app_id}/msg:
get:
tags:
- Message
summary: List Messages
description: 'List all of the application''s messages.
The `before` and `after` parameters let you filter all items created before or after a certain date. These can be
used alongside an iterator to paginate over results within a certain window.
Note that by default this endpoint is limited to retrieving 90 days'' worth of data
relative to now or, if an iterator is provided, 90 days before/after the time indicated
by the iterator ID. If you require data beyond those time ranges, you will need to explicitly
set the `before` or `after` parameter as appropriate.'
operationId: v1.message.list
parameters:
- in: path
name: app_id
description: The Application's ID or UID.
required: true
schema:
description: The Application's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: query
name: limit
description: Limit the number of returned items
schema:
description: Limit the number of returned items
type: integer
format: uint64
maximum: 250.0
minimum: 1.0
style: form
- in: query
name: iterator
description: The iterator returned from a prior invocation
schema:
description: The iterator returned from a prior invocation
type: string
maxLength: 31
minLength: 31
pattern: ^msg_[A-Za-z0-9]{27}$
nullable: true
example: msg_1srOrx2ZWZBpBUvZwXKQmoEYga2
style: form
- in: query
name: channel
description: Filter response based on the channel.
schema:
description: Filter response based on the channel.
type: string
maxLength: 128
pattern: ^[a-zA-Z0-9\-_.:]+$
nullable: true
example: project_1337
style: form
- in: query
name: before
description: Only include items created before a certain date.
schema:
description: Only include items created before a certain date.
type: string
format: date-time
nullable: true
style: form
- in: query
name: after
description: Only include items created after a certain date.
schema:
description: Only include items created after a certain date.
type: string
format: date-time
nullable: true
style: form
- in: query
name: with_content
description: When `true` message payloads are included in the response.
schema:
description: When `true` message payloads are included in the response.
default: true
type: boolean
style: form
- in: query
name: tag
description: Filter messages matching the provided tag.
schema:
description: Filter messages matching the provided tag.
type: string
maxLength: 128
pattern: ^[a-zA-Z0-9\-_./\\#]+$
nullable: true
example: project_1337
style: form
- in: query
name: event_types
description: Filter response based on the event type
schema:
description: Filter response based on the event type
type: array
items:
description: The event type's name
type: string
maxLength: 256
pattern: ^[a-zA-Z0-9\-_.]+$
example: user.signup
uniqueItems: true
nullable: true
style: form
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ListResponse_MessageOut_'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
security:
- HTTPBearer: []
x-codeSamples:
- label: JavaScript
lang: TypeScript
source: const response = await svix.message.list("app_1srOrx2ZWZBpBUvZwXKQmoEYga2");
- label: TypeScript
lang: TypeScript
source: const response = await svix.message.list("app_1srOrx2ZWZBpBUvZwXKQmoEYga2");
- label: Python
lang: Python
source: "response = svix.message.list(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n)"
- label: Python (Async)
lang: Python
source: "response = await svix.message.list(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n)"
- label: Go
lang: Go
source: response, err := svix.Message.List(ctx, "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", nil)
- label: Kotlin
lang: Kotlin
source: val response = svix.message.list("app_1srOrx2ZWZBpBUvZwXKQmoEYga2")
- label: Java
lang: Java
source: var response = svix.getMessage().list("app_1srOrx2ZWZBpBUvZwXKQmoEYga2");
- label: Ruby
lang: Ruby
source: response = svix.message.list("app_1srOrx2ZWZBpBUvZwXKQmoEYga2")
- label: Rust
lang: Rust
source: "let response = svix\n .message()\n .list(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\".to_string(), None)\n .await?;"
- label: C#
lang: C#
source: var response = svix.Message.List("app_1srOrx2ZWZBpBUvZwXKQmoEYga2");
- label: PHP
lang: PHP
source: "$response = $svix->message->list(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\"\n);"
- label: CLI
lang: Shell
source: svix message list "app_1srOrx2ZWZBpBUvZwXKQmoEYga2"
- label: cURL
lang: Shell
source: "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/app_1srOrx2ZWZBpBUvZwXKQmoEYga2/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json'"
post:
tags:
- Message
summary: Create Message
description: 'Creates a new message and dispatches it to all of the application''s endpoints.
The `eventId` is an optional custom unique ID. It''s verified to be unique only up to a day, after that no verification will be made.
If a message with the same `eventId` already exists for the application, a 409 conflict error will be returned.
The `eventType` indicates the type and schema of the event. All messages of a certain `eventType` are expected to have the same schema. Endpoints can choose to only listen to specific event types.
Messages can also have `channels`, which similar to event types let endpoints filter by them. Unlike event types, messages can have multiple channels, and channels don''t imply a specific message content or schema.
The `payload` property is the webhook''s body (the actual webhook message). Svix supports payload sizes of up to 1MiB, though it''s generally a good idea to keep webhook payloads small, probably no larger than 40kb.'
operationId: v1.message.create
parameters:
- in: path
name: app_id
description: The Application's ID or UID.
required: true
schema:
description: The Application's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: query
name: with_content
description: When `true`, message payloads are included in the response.
schema:
description: When `true`, message payloads are included in the response.
default: true
type: boolean
style: form
- in: header
name: idempotency-key
description: The request's idempotency key
schema:
type: string
style: simple
- in: header
name: idempotency-key
description: The request's idempotency key
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MessageIn'
required: true
responses:
'202':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MessageOut'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'413':
description: Payload too large
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
security:
- HTTPBearer: []
x-codeSamples:
- label: JavaScript
lang: TypeScript
source: "const response = await svix.message.create(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", {\n application: {\n metadata: {},\n name: \"My first application\",\n throttleRate: 1,\n uid: \"unique-identifier\",\n },\n channels: [\"project_123\", \"group_2\"],\n deliverAt: new Date(\"2025-10-02T20:28:42+00:00\"),\n eventId: \"unique-identifier\",\n eventType: \"user.signup\",\n payload: { email: \"test@example.com\", type: \"user.created\", username: \"test_user\" },\n payloadRetentionHours: 1,\n payloadRetentionPeriod: 90,\n tags: [\"my_tag\", \"other\"],\n transformationsParams: {},\n});\n\n// Alternatively, with a raw string payload.\nconst response = await svix.message.create(\n \"app_id\",\n messageInRaw(\"user.signup\", \"This is a raw body.\", \"text/plain\")\n);"
- label: TypeScript
lang: TypeScript
source: "const response = await svix.message.create(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", {\n application: {\n metadata: {},\n name: \"My first application\",\n throttleRate: 1,\n uid: \"unique-identifier\",\n },\n channels: [\"project_123\", \"group_2\"],\n deliverAt: new Date(\"2025-10-02T20:28:42+00:00\"),\n eventId: \"unique-identifier\",\n eventType: \"user.signup\",\n payload: { email: \"test@example.com\", type: \"user.created\", username: \"test_user\" },\n payloadRetentionHours: 1,\n payloadRetentionPeriod: 90,\n tags: [\"my_tag\", \"other\"],\n transformationsParams: {},\n});\n\n// Alternatively, with a raw string payload.\nconst response = await svix.message.create(\n \"app_id\",\n messageInRaw(\"user.signup\", \"This is a raw body.\", \"text/plain\")\n);"
- label: Python
lang: Python
source: "response = svix.message.create(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n MessageIn(\n application=ApplicationIn(\n metadata={},\n name=\"My first application\",\n throttle_rate=1,\n uid=\"unique-identifier\",\n ),\n channels=[\n \"project_123\",\n \"group_2\",\n ],\n deliver_at=datetime.fromisoformat(\"2025-10-02T20:28:42+00:00\"),\n event_id=\"unique-identifier\",\n event_type=\"user.signup\",\n payload={\n \"email\": \"test@example.com\",\n \"type\": \"user.created\",\n \"username\": \"test_user\",\n },\n payload_retention_hours=1,\n payload_retention_period=90,\n tags=[\n \"my_tag\",\n \"other\",\n ],\n transformations_params={},\n ),\n)\n\n# Alternatively, with a raw string payload.\nresponse = svix.message.create(\n \"app_id\",\n message_in_raw(\n event_type=\"user.signup\",\n payload=\"This is a raw body.\",\n content_type=\"text/plain\",\n ),\n)"
- label: Python (Async)
lang: Python
source: "response = await svix.message.create(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n MessageIn(\n application=ApplicationIn(\n metadata={},\n name=\"My first application\",\n throttle_rate=1,\n uid=\"unique-identifier\",\n ),\n channels=[\n \"project_123\",\n \"group_2\",\n ],\n deliver_at=datetime.fromisoformat(\"2025-10-02T20:28:42+00:00\"),\n event_id=\"unique-identifier\",\n event_type=\"user.signup\",\n payload={\n \"email\": \"test@example.com\",\n \"type\": \"user.created\",\n \"username\": \"test_user\",\n },\n payload_retention_hours=1,\n payload_retention_period=90,\n tags=[\n \"my_tag\",\n \"other\",\n ],\n transformations_params={},\n ),\n)\n\n# Alternatively, with a raw string payload.\nresponse = await svix.message.create(\n \"app_id\",\n message_in_raw(\n event_type=\"user.signup\",\n payload=\"This is a raw body.\",\n content_type=\"text/plain\",\n ),\n)"
- label: Go
lang: Go
source: "response, err := svix.Message.Create(\n\tctx,\n\t\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n\tMessageIn{\n\t\tApplication: new(\n\t\t\tApplicationIn{\n\t\t\t\tMetadata: nil,\n\t\t\t\tName: \"My first application\",\n\t\t\t\tThrottleRate: new(uint16(1)),\n\t\t\t\tUid: new(\"unique-identifier\"),\n\t\t\t},\n\t\t),\n\t\tChannels: []string{\"project_123\", \"group_2\"},\n\t\tDeliverAt: new(time.Date(2025, 10, 2, 20, 28, 42, 0, time.UTC)),\n\t\tEventId: new(\"unique-identifier\"),\n\t\tEventType: \"user.signup\",\n\t\tPayload: map[string]any{\n\t\t\t\"email\": \"test@example.com\",\n\t\t\t\"type\": \"user.created\",\n\t\t\t\"username\": \"test_user\",\n\t\t},\n\t\tPayloadRetentionHours: new(int64(1)),\n\t\tPayloadRetentionPeriod: new(int64(90)),\n\t\tTags: []string{\"my_tag\", \"other\"},\n\t\tTransformationsParams: nil,\n\t},\n\tnil,\n)\n\n// Alternatively, with a raw string payload.\nresponse, err := svix.Message.Create(ctx, \"app_id\", &NewMessageInRaw(\n\t\"user.signup\",\n\t\"This is a raw body.\",\n\t&\"text/plain\",\n))"
- label: Kotlin
lang: Kotlin
source: "val response =\n svix.message.create(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n MessageIn(\n application =\n ApplicationIn(\n metadata = mapOf(),\n name = \"My first application\",\n throttleRate = 1u,\n uid = \"unique-identifier\",\n ),\n channels = setOf(\"project_123\", \"group_2\"),\n deliverAt = Instant.parse(\"2025-10-02T20:28:42+00:00\"),\n eventId = \"unique-identifier\",\n eventType = \"user.signup\",\n payload =\n \"{\\\"email\\\": \\\"test@example.com\\\",\\\"type\\\": \\\"user.created\\\",\\\"username\\\": \\\"test_user\\\"}\",\n payloadRetentionHours = 1,\n payloadRetentionPeriod = 90,\n tags = setOf(\"my_tag\", \"other\"),\n transformationsParams = mapOf(),\n ),\n )\n\n// Alternatively, with a raw string payload.\nval response =\n svix.message.create(\n \"app_id\",\n messageInRaw(\n eventType = \"user.signup\",\n payload = \"This is a raw body.\",\n contentType = \"text/plain\",\n ),\n )"
- label: Java
lang: Java
source: "var response = svix.getMessage()\n .create(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n new MessageIn()\n .application(new ApplicationIn()\n .metadata(Map.of())\n .name(\"My first application\")\n .throttleRate(1L)\n .uid(\"unique-identifier\"))\n .channels(Set.of(\"project_123\", \"group_2\"))\n .deliverAt(OffsetDateTime.parse(\"2025-10-02T20:28:42+00:00\"))\n .eventId(\"unique-identifier\")\n .eventType(\"user.signup\")\n .payload(\"{\\\"email\\\": \\\"test@example.com\\\",\\\"type\\\": \\\"user.created\\\",\\\"username\\\":\"\n + \" \\\"test_user\\\"}\")\n .payloadRetentionHours(1L)\n .payloadRetentionPeriod(90L)\n .tags(Set.of(\"my_tag\", \"other\"))\n .transformationsParams(Map.of()));\n\n // Alternatively, with a raw string payload.\n var response = svix.getMessage()\n .create(\n \"app_id\",\n Message.messageInRaw(\"This is a raw body.\", \"text/plain\").eventType(\"user.signup\"));"
- label: Ruby
lang: Ruby
source: "# Alternatively, with a raw string payload.\nresponse = svix\n .message\n .create(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n {\n application: {metadata: {}, name: \"My first application\", throttleRate: 1, uid: \"unique-identifier\"},\n channels: [\"project_123\", \"group_2\"],\n deliverAt: \"2025-10-02T20:28:42+00:00\",\n eventId: \"unique-identifier\",\n eventType: \"user.signup\",\n payload: {\"email\" => \"test@example.com\", \"type\" => \"user.created\", \"username\" => \"test_user\"},\n payloadRetentionHours: 1,\n payloadRetentionPeriod: 90,\n tags: [\"my_tag\", \"other\"],\n transformationsParams: {}\n }\n )\nresponse = svix.message.create(\n \"app_id\",\n message_in_raw(\n payload: \"This is a raw body.\",\n eventType: \"user.signup\",\n content_type: \"test/plain\"\n )\n)"
- label: Rust
lang: Rust
source: "let response = svix\n .message()\n .create(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\".to_string(),\n MessageIn {\n application: Some(ApplicationIn {\n metadata: Some(HashMap::new()),\n name: \"My first application\".to_string(),\n throttle_rate: Some(1),\n uid: Some(\"unique-identifier\".to_string()),\n }),\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n deliver_at: Some(\"2025-10-02T20:28:42+00:00\".to_string()),\n event_id: Some(\"unique-identifier\".to_string()),\n event_type: \"user.signup\".to_string(),\n payload: serde_json::json!(\n { \"email\" : \"test@example.com\", \"type\" : \"user.created\", \"username\" :\n \"test_user\" }\n ),\n payload_retention_hours: Some(1),\n payload_retention_period: Some(90),\n tags: Some(vec![\"my_tag\".to_string(), \"other\".to_string()]),\n transformations_params: Some(serde_json::json!({})),\n },\n None,\n )\n .await?;\n/// Alternatively, with a raw string payload.\nlet response = svix\n .message()\n .create(\n \"app_id\",\n MessageIn::new_raw_payload(\n \"user.signup\".to_string(),\n \"This is a raw body.\".to_string(),\n )\n .with_content_type(\"text/plain\".to_string()),\n None,\n )\n .await?;"
- label: C#
lang: C#
source: "var response = svix.Message.Create(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n new MessageIn\n {\n Application = new ApplicationIn\n {\n Metadata = [],\n Name = \"My first application\",\n ThrottleRate = 1,\n Uid = \"unique-identifier\",\n },\n Channels = [\"project_123\", \"group_2\"],\n DeliverAt = DateTime.Parse(\"2025-10-02T20:28:42+00:00\"),\n EventId = \"unique-identifier\",\n EventType = \"user.signup\",\n Payload = new Dictionary\n {\n { \"email\", \"test@example.com\" },\n { \"type\", \"user.created\" },\n { \"username\", \"test_user\" },\n },\n PayloadRetentionHours = 1,\n PayloadRetentionPeriod = 90,\n Tags = [\"my_tag\", \"other\"],\n TransformationsParams = new Dictionary { },\n }\n);\n\n// Alternatively, with a raw string payload.\nvar response = await svix.Message.CreateAsync(\n \"app_id\",\n svix.Message.messageInRaw(\n eventType: \"user.signup\",\n payload: \"This is a raw body.\",\n contentType: \"text/plain\"\n )\n);"
- label: PHP
lang: PHP
source: "$response = $svix->message->create(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n MessageIn::create(\n eventType: \"user.signup\",\n payload: [\"email\" => \"test@example.com\", \"type\" => \"user.created\", \"username\" => \"test_user\"]\n )\n ->withApplication(ApplicationIn::create(\n name: \"My first application\"\n )\n ->withMetadata([])\n ->withThrottleRate(1)\n ->withUid(\"unique-identifier\"))\n ->withChannels([\"project_123\",\"group_2\"])\n ->withDeliverAt(new DateTimeImmutable(\"2025-10-02T20:28:42+00:00\"))\n ->withEventId(\"unique-identifier\")\n ->withPayloadRetentionHours(1)\n ->withPayloadRetentionPeriod(90)\n ->withTags([\"my_tag\",\"other\"])\n);\n\n// Alternatively, with a raw string payload.\n$response = $svix->message->create(\n \"app_id\",\n MessageIn::createRaw(\n \"user.signup\",\n \"This is a raw body.\",\n \"text/plain\"\n )\n);"
- label: CLI
lang: Shell
source: "svix message create \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\" '{\n \"application\": {\n \"metadata\": {},\n \"name\": \"My first application\",\n \"throttleRate\": 1,\n \"uid\": \"unique-identifier\"\n },\n \"channels\": [\n \"project_123\",\n \"group_2\"\n ],\n \"deliverAt\": \"2025-10-02T20:28:42+00:00\",\n \"eventId\": \"unique-identifier\",\n \"eventType\": \"user.signup\",\n \"payload\": {\n \"email\": \"test@example.com\",\n \"type\": \"user.created\",\n \"username\": \"test_user\"\n },\n \"payloadRetentionHours\": 1,\n \"payloadRetentionPeriod\": 90,\n \"tags\": [\n \"my_tag\",\n \"other\"\n ],\n \"transformationsParams\": {}\n }'"
- label: cURL
lang: Shell
source: "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/app_1srOrx2ZWZBpBUvZwXKQmoEYga2/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"application\": {\n \"metadata\": {},\n \"name\": \"My first application\",\n \"throttleRate\": 1,\n \"uid\": \"unique-identifier\"\n },\n \"channels\": [\n \"project_123\",\n \"group_2\"\n ],\n \"deliverAt\": \"2025-10-02T20:28:42+00:00\",\n \"eventId\": \"unique-identifier\",\n \"eventType\": \"user.signup\",\n \"payload\": {\n \"email\": \"test@example.com\",\n \"type\": \"user.created\",\n \"username\": \"test_user\"\n },\n \"payloadRetentionHours\": 1,\n \"payloadRetentionPeriod\": 90,\n \"tags\": [\n \"my_tag\",\n \"other\"\n ],\n \"transformationsParams\": {}\n }'\n\n\n# Alternatively, with a raw string payload.\ncurl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/{app_id}/msg' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"eventType\": \"user.signup\",\n \"payload\": {},\n \"transformationsParams\": {\n \"rawPayload\": \"This is a raw body.\",\n \"headers\": { \"content-type\": \"text/plain\" }\n }\n }'"
/api/v1/app/{app_id}/msg/expunge-all-contents:
post:
tags:
- Message
summary: Expunge all message contents
description: "Delete all message payloads for the application.\n\nThis operation is only available in the Enterprise plan.\n\nA completed task will return a payload like the following:\n```json\n{\n \"id\": \"qtask_33qen93MNuelBAq1T9G7eHLJRsF\",\n \"status\": \"finished\",\n \"task\": \"application.purge_content\",\n \"data\": {\n \"messagesPurged\": 150\n }\n}\n```"
operationId: v1.message.expunge-all-contents
parameters:
- in: path
name: app_id
description: The Application's ID or UID.
required: true
schema:
description: The Application's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: header
name: idempotency-key
description: The request's idempotency key
schema:
type: string
style: simple
- in: header
name: idempotency-key
description: The request's idempotency key
schema:
type: string
style: simple
responses:
'202':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ExpungeAllContentsOut'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
security:
- HTTPBearer: []
x-codeSamples:
- label: JavaScript
lang: TypeScript
source: const response = await svix.message.expungeAllContents("app_1srOrx2ZWZBpBUvZwXKQmoEYga2");
- label: TypeScript
lang: TypeScript
source: const response = await svix.message.expungeAllContents("app_1srOrx2ZWZBpBUvZwXKQmoEYga2");
- label: Python
lang: Python
source: "response = svix.message.expunge_all_contents(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n)"
- label: Python (Async)
lang: Python
source: "response = await svix.message.expunge_all_contents(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n)"
- label: Go
lang: Go
source: response, err := svix.Message.ExpungeAllContents(ctx, "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", nil)
- label: Kotlin
lang: Kotlin
source: val response = svix.message.expungeAllContents("app_1srOrx2ZWZBpBUvZwXKQmoEYga2")
- label: Java
lang: Java
source: var response = svix.getMessage().expungeAllContents("app_1srOrx2ZWZBpBUvZwXKQmoEYga2");
- label: Ruby
lang: Ruby
source: response = svix.message.expunge_all_contents("app_1srOrx2ZWZBpBUvZwXKQmoEYga2")
- label: Rust
lang: Rust
source: "let response = svix\n .message()\n .expunge_all_contents(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\".to_string(), None)\n .await?;"
- label: C#
lang: C#
source: var response = svix.Message.ExpungeAllContents("app_1srOrx2ZWZBpBUvZwXKQmoEYga2");
- label: PHP
lang: PHP
source: "$response = $svix->message->expungeAllContents(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\"\n);"
- label: CLI
lang: Shell
source: svix message expunge-all-contents "app_1srOrx2ZWZBpBUvZwXKQmoEYga2"
- label: cURL
lang: Shell
source: "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/app_1srOrx2ZWZBpBUvZwXKQmoEYga2/msg/expunge-all-contents' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json'"
/api/v1/app/{app_id}/msg/precheck/active:
post:
tags:
- Message
summary: Create Message Precheck
description: 'A pre-check call for `message.create` that checks whether any active endpoints are
listening to this message.
Note: most people shouldn''t be using this API. Svix doesn''t bill you for
messages not actually sent, so using this API doesn''t save money.
If unsure, please ask Svix support before using this API.'
operationId: v1.message.precheck
parameters:
- in: path
name: app_id
description: The Application's ID or UID.
required: true
schema:
description: The Application's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: header
name: idempotency-key
description: The request's idempotency key
schema:
type: string
style: simple
- in: header
name: idempotency-key
description: The request's idempotency key
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/MessagePrecheckIn'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MessagePrecheckOut'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
security:
- HTTPBearer: []
x-codeSamples:
- label: JavaScript
lang: TypeScript
source: "const response = await svix.message.precheck(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", {\n channels: [\"project_123\", \"group_2\"],\n eventType: \"user.signup\",\n});"
- label: TypeScript
lang: TypeScript
source: "const response = await svix.message.precheck(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", {\n channels: [\"project_123\", \"group_2\"],\n eventType: \"user.signup\",\n});"
- label: Python
lang: Python
source: "response = svix.message.precheck(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n MessagePrecheckIn(\n channels=[\n \"project_123\",\n \"group_2\",\n ],\n event_type=\"user.signup\",\n ),\n)"
- label: Python (Async)
lang: Python
source: "response = await svix.message.precheck(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n MessagePrecheckIn(\n channels=[\n \"project_123\",\n \"group_2\",\n ],\n event_type=\"user.signup\",\n ),\n)"
- label: Go
lang: Go
source: "response, err := svix.Message.Precheck(\n\tctx,\n\t\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n\tMessagePrecheckIn{Channels: []string{\"project_123\", \"group_2\"}, EventType: \"user.signup\"},\n\tnil,\n)"
- label: Kotlin
lang: Kotlin
source: "val response =\n svix.message.precheck(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n MessagePrecheckIn(channels = setOf(\"project_123\", \"group_2\"), eventType = \"user.signup\"),\n )"
- label: Java
lang: Java
source: "var response = svix.getMessage()\n .precheck(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n new MessagePrecheckIn()\n .channels(Set.of(\"project_123\", \"group_2\"))\n .eventType(\"user.signup\"));"
- label: Ruby
lang: Ruby
source: "response = svix\n .message\n .precheck(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", {channels: [\"project_123\", \"group_2\"], eventType: \"user.signup\"})"
- label: Rust
lang: Rust
source: "let response = svix\n .message()\n .precheck(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\".to_string(),\n MessagePrecheckIn {\n channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n event_type: \"user.signup\".to_string(),\n },\n None,\n )\n .await?;"
- label: C#
lang: C#
source: "var response = svix.Message.Precheck(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n new MessagePrecheckIn { Channels = [\"project_123\", \"group_2\"], EventType = \"user.signup\" }\n);"
- label: PHP
lang: PHP
source: "$response = $svix->message->precheck(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n MessagePrecheckIn::create(\n eventType: \"user.signup\"\n )\n ->withChannels([\"project_123\",\"group_2\"])\n);"
- label: CLI
lang: Shell
source: "svix message precheck \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\" '{\n \"channels\": [\n \"project_123\",\n \"group_2\"\n ],\n \"eventType\": \"user.signup\"\n }'"
- label: cURL
lang: Shell
source: "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/app_1srOrx2ZWZBpBUvZwXKQmoEYga2/msg/precheck/active' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"channels\": [\n \"project_123\",\n \"group_2\"\n ],\n \"eventType\": \"user.signup\"\n }'"
/api/v1/app/{app_id}/msg/{msg_id}:
get:
tags:
- Message
summary: Get Message
description: Get a message by its ID or eventID.
operationId: v1.message.get
parameters:
- in: path
name: app_id
description: The Application's ID or UID.
required: true
schema:
description: The Application's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: path
name: msg_id
description: The Message's ID or UID.
required: true
schema:
description: The Message's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: query
name: with_content
description: When `true` message payloads are included in the response.
schema:
description: When `true` message payloads are included in the response.
default: true
type: boolean
style: form
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/MessageOut'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
security:
- HTTPBearer: []
x-codeSamples:
- label: JavaScript
lang: TypeScript
source: "const response = await svix.message.get(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\"\n);"
- label: TypeScript
lang: TypeScript
source: "const response = await svix.message.get(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\"\n);"
- label: Python
lang: Python
source: "response = svix.message.get(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\",\n)"
- label: Python (Async)
lang: Python
source: "response = await svix.message.get(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\",\n)"
- label: Go
lang: Go
source: "response, err := svix.Message.Get(\n\tctx,\n\t\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n\t\"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\",\n\tnil,\n)"
- label: Kotlin
lang: Kotlin
source: "val response =\n svix.message.get(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\")"
- label: Java
lang: Java
source: "var response =\n svix.getMessage().get(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\");"
- label: Ruby
lang: Ruby
source: response = svix.message.get("app_1srOrx2ZWZBpBUvZwXKQmoEYga2", "msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f")
- label: Rust
lang: Rust
source: "let response = svix\n .message()\n .get(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\".to_string(),\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\".to_string(),\n None,\n )\n .await?;"
- label: C#
lang: C#
source: "var response = svix.Message.Get(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\"\n);"
- label: PHP
lang: PHP
source: "$response = $svix->message->get(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\"\n);"
- label: CLI
lang: Shell
source: svix message get "app_1srOrx2ZWZBpBUvZwXKQmoEYga2" "msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f"
- label: cURL
lang: Shell
source: "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/app_1srOrx2ZWZBpBUvZwXKQmoEYga2/msg/msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json'"
/api/v1/app/{app_id}/msg/{msg_id}/content:
delete:
tags:
- Message
summary: Delete message payload
description: 'Delete the given message''s payload.
Useful in cases when a message was accidentally sent with sensitive content.
The message can''t be replayed or resent once its payload has been deleted or expired.'
operationId: v1.message.expunge-content
parameters:
- in: path
name: app_id
description: The Application's ID or UID.
required: true
schema:
description: The Application's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: path
name: msg_id
description: The Message's ID or UID.
required: true
schema:
description: The Message's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
responses:
'204':
description: no content
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
security:
- HTTPBearer: []
x-codeSamples:
- label: JavaScript
lang: TypeScript
source: "await svix.message.expungeContent(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\"\n);"
- label: TypeScript
lang: TypeScript
source: "await svix.message.expungeContent(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\"\n);"
- label: Python
lang: Python
source: "svix.message.expunge_content(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\",\n)"
- label: Python (Async)
lang: Python
source: "await svix.message.expunge_content(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\",\n)"
- label: Go
lang: Go
source: "err := svix.Message.ExpungeContent(\n\tctx,\n\t\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n\t\"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\",\n)"
- label: Kotlin
lang: Kotlin
source: "svix.message.expungeContent(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\",\n)"
- label: Java
lang: Java
source: "svix.getMessage()\n .expungeContent(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\");"
- label: Ruby
lang: Ruby
source: response = svix.message.expunge_content("app_1srOrx2ZWZBpBUvZwXKQmoEYga2", "msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f")
- label: Rust
lang: Rust
source: "svix.message()\n .expunge_content(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\".to_string(),\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\".to_string(),\n )\n .await?;"
- label: C#
lang: C#
source: "var response = svix.Message.ExpungeContent(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\"\n);"
- label: PHP
lang: PHP
source: "$svix->message->expungeContent(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f\"\n);"
- label: CLI
lang: Shell
source: svix message expunge-content "app_1srOrx2ZWZBpBUvZwXKQmoEYga2" "msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f"
- label: cURL
lang: Shell
source: "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/app/app_1srOrx2ZWZBpBUvZwXKQmoEYga2/msg/msg_33ZHzkmDazsPr4mDUsdzXJrGQ1f/content' \\\n -H 'Authorization: Bearer AUTH_TOKEN'"
/api/v1/app/{app_id}/poller/{sink_id}:
get:
tags:
- Message
summary: Poller Poll
description: Reads the stream of created messages for an application, filtered on the Sink's event types and Channels.
operationId: v1.message.poller.poll
parameters:
- in: path
name: app_id
description: The Application's ID or UID.
required: true
schema:
description: The Application's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: path
name: sink_id
description: The Endpoint's ID or UID.
required: true
schema:
description: The Endpoint's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: query
name: limit
description: Limit the number of returned items
schema:
description: Limit the number of returned items
type: integer
format: uint64
maximum: 250.0
minimum: 1.0
style: form
- in: query
name: iterator
description: The iterator returned from a prior invocation
schema:
description: The iterator returned from a prior invocation
type: string
nullable: true
style: form
- in: query
name: event_type
description: Filters messages sent with this event type (optional).
schema:
description: Filters messages sent with this event type (optional).
type: string
maxLength: 256
pattern: ^[a-zA-Z0-9\-_.]+$
nullable: true
example: user.signup
style: form
- in: query
name: channel
description: Filters messages sent with this channel (optional).
schema:
description: Filters messages sent with this channel (optional).
type: string
maxLength: 128
pattern: ^[a-zA-Z0-9\-_.:]+$
nullable: true
example: project_1337
style: form
- in: query
name: after
schema:
type: string
format: date-time
nullable: true
style: form
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/PollingEndpointOut'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
security:
- HTTPBearer: []
x-codeSamples:
- label: JavaScript
lang: TypeScript
source: "const response = await svix.message.poller.poll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\"\n);"
- label: TypeScript
lang: TypeScript
source: "const response = await svix.message.poller.poll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\"\n);"
- label: Python
lang: Python
source: "response = svix.message.poller.poll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n)"
- label: Python (Async)
lang: Python
source: "response = await svix.message.poller.poll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n)"
- label: Go
lang: Go
source: "response, err := svix.Message.Poller.Poll(\n\tctx,\n\t\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n\t\"sink_31Dc11sPYY9aLDkwPuGMa\",\n\tnil,\n)"
- label: Kotlin
lang: Kotlin
source: "val response =\n svix.message.poller.poll(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", \"sink_31Dc11sPYY9aLDkwPuGMa\")"
- label: Java
lang: Java
source: "var response = svix.getMessage()\n .getPoller()\n .poll(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", \"sink_31Dc11sPYY9aLDkwPuGMa\");"
- label: Ruby
lang: Ruby
source: response = svix.message.poller.poll("app_1srOrx2ZWZBpBUvZwXKQmoEYga2", "sink_31Dc11sPYY9aLDkwPuGMa")
- label: Rust
lang: Rust
source: "let response = svix\n .message()\n .poller()\n .poll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\".to_string(),\n \"sink_31Dc11sPYY9aLDkwPuGMa\".to_string(),\n None,\n )\n .await?;"
- label: C#
lang: C#
source: "var response = svix.Message.Poller.Poll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\"\n);"
- label: PHP
lang: PHP
source: "$response = $svix->message->poller->poll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\"\n);"
- label: CLI
lang: Shell
source: svix message poller poll "app_1srOrx2ZWZBpBUvZwXKQmoEYga2" "sink_31Dc11sPYY9aLDkwPuGMa"
- label: cURL
lang: Shell
source: "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/app_1srOrx2ZWZBpBUvZwXKQmoEYga2/poller/sink_31Dc11sPYY9aLDkwPuGMa' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json'"
/api/v1/app/{app_id}/poller/{sink_id}/consumer/{consumer_id}:
get:
tags:
- Message
summary: Poller Consumer Poll
description: 'Reads the stream of created messages for an application, filtered on the Sink''s event types and
Channels, using server-managed iterator tracking.'
operationId: v1.message.poller.consumer-poll
parameters:
- in: path
name: app_id
description: The Application's ID or UID.
required: true
schema:
description: The Application's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: path
name: sink_id
description: The Endpoint's ID or UID.
required: true
schema:
description: The Endpoint's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: path
name: consumer_id
required: true
schema:
type: string
style: simple
- in: query
name: limit
description: Limit the number of returned items
schema:
description: Limit the number of returned items
type: integer
format: uint64
maximum: 250.0
minimum: 1.0
style: form
- in: query
name: iterator
description: The iterator returned from a prior invocation
schema:
description: The iterator returned from a prior invocation
type: string
nullable: true
style: form
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/PollingEndpointOut'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
security:
- HTTPBearer: []
x-codeSamples:
- label: JavaScript
lang: TypeScript
source: "const response = await svix.message.poller.consumerPoll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\"\n);"
- label: TypeScript
lang: TypeScript
source: "const response = await svix.message.poller.consumerPoll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\"\n);"
- label: Python
lang: Python
source: "response = svix.message.poller.consumer_poll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\",\n)"
- label: Python (Async)
lang: Python
source: "response = await svix.message.poller.consumer_poll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\",\n)"
- label: Go
lang: Go
source: "response, err := svix.Message.Poller.ConsumerPoll(\n\tctx,\n\t\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n\t\"sink_31Dc11sPYY9aLDkwPuGMa\",\n\t\"consumer_id\",\n\tnil,\n)"
- label: Kotlin
lang: Kotlin
source: "val response =\n svix.message.poller.consumerPoll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\",\n )"
- label: Java
lang: Java
source: "var response = svix.getMessage()\n .getPoller()\n .consumerPoll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", \"sink_31Dc11sPYY9aLDkwPuGMa\", \"consumer_id\");"
- label: Ruby
lang: Ruby
source: "response = svix\n .message\n .poller\n .consumer_poll(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", \"sink_31Dc11sPYY9aLDkwPuGMa\", \"consumer_id\")"
- label: Rust
lang: Rust
source: "let response = svix\n .message()\n .poller()\n .consumer_poll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\".to_string(),\n \"sink_31Dc11sPYY9aLDkwPuGMa\".to_string(),\n \"consumer_id\".to_string(),\n None,\n )\n .await?;"
- label: C#
lang: C#
source: "var response = svix.Message.Poller.ConsumerPoll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\"\n);"
- label: PHP
lang: PHP
source: "$response = $svix->message->poller->consumerPoll(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\"\n);"
- label: CLI
lang: Shell
source: svix message poller consumer-poll "app_1srOrx2ZWZBpBUvZwXKQmoEYga2" "sink_31Dc11sPYY9aLDkwPuGMa" "consumer_id"
- label: cURL
lang: Shell
source: "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/app/app_1srOrx2ZWZBpBUvZwXKQmoEYga2/poller/sink_31Dc11sPYY9aLDkwPuGMa/consumer/consumer_id' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json'"
/api/v1/app/{app_id}/poller/{sink_id}/consumer/{consumer_id}/seek:
post:
tags:
- Message
summary: Poller Consumer Seek
description: Sets the starting offset for the consumer of a polling endpoint.
operationId: v1.message.poller.consumer-seek
parameters:
- in: path
name: app_id
description: The Application's ID or UID.
required: true
schema:
description: The Application's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: path
name: sink_id
description: The Endpoint's ID or UID.
required: true
schema:
description: The Endpoint's ID or UID.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
style: simple
- in: path
name: consumer_id
required: true
schema:
type: string
style: simple
- in: header
name: idempotency-key
description: The request's idempotency key
schema:
type: string
style: simple
- in: header
name: idempotency-key
description: The request's idempotency key
schema:
type: string
style: simple
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PollingEndpointConsumerSeekIn'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/PollingEndpointConsumerSeekOut'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'403':
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'409':
description: Conflict
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
'429':
description: Too Many Requests
content:
application/json:
schema:
$ref: '#/components/schemas/HttpErrorOut'
security:
- HTTPBearer: []
x-codeSamples:
- label: JavaScript
lang: TypeScript
source: "const response = await svix.message.poller.consumerSeek(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\",\n {\n after: new Date(\"2025-10-02T20:28:42+00:00\"),\n }\n);"
- label: TypeScript
lang: TypeScript
source: "const response = await svix.message.poller.consumerSeek(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\",\n {\n after: new Date(\"2025-10-02T20:28:42+00:00\"),\n }\n);"
- label: Python
lang: Python
source: "response = svix.message.poller.consumer_seek(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\",\n PollingEndpointConsumerSeekIn(\n after=datetime.fromisoformat(\"2025-10-02T20:28:42+00:00\"),\n ),\n)"
- label: Python (Async)
lang: Python
source: "response = await svix.message.poller.consumer_seek(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\",\n PollingEndpointConsumerSeekIn(\n after=datetime.fromisoformat(\"2025-10-02T20:28:42+00:00\"),\n ),\n)"
- label: Go
lang: Go
source: "response, err := svix.Message.Poller.ConsumerSeek(\n\tctx,\n\t\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n\t\"sink_31Dc11sPYY9aLDkwPuGMa\",\n\t\"consumer_id\",\n\tPollingEndpointConsumerSeekIn{After: time.Date(2025, 10, 2, 20, 28, 42, 0, time.UTC)},\n\tnil,\n)"
- label: Kotlin
lang: Kotlin
source: "val response =\n svix.message.poller.consumerSeek(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\",\n PollingEndpointConsumerSeekIn(after = Instant.parse(\"2025-10-02T20:28:42+00:00\")),\n )"
- label: Java
lang: Java
source: "var response = svix.getMessage()\n .getPoller()\n .consumerSeek(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\",\n new PollingEndpointConsumerSeekIn()\n .after(OffsetDateTime.parse(\"2025-10-02T20:28:42+00:00\")));"
- label: Ruby
lang: Ruby
source: "response = svix\n .message\n .poller\n .consumer_seek(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\",\n {after: \"2025-10-02T20:28:42+00:00\"}\n )"
- label: Rust
lang: Rust
source: "let response = svix\n .message()\n .poller()\n .consumer_seek(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\".to_string(),\n \"sink_31Dc11sPYY9aLDkwPuGMa\".to_string(),\n \"consumer_id\".to_string(),\n PollingEndpointConsumerSeekIn {\n after: \"2025-10-02T20:28:42+00:00\".to_string(),\n },\n None,\n )\n .await?;"
- label: C#
lang: C#
source: "var response = svix.Message.Poller.ConsumerSeek(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\",\n new PollingEndpointConsumerSeekIn { After = DateTime.Parse(\"2025-10-02T20:28:42+00:00\") }\n);"
- label: PHP
lang: PHP
source: "$response = $svix->message->poller->consumerSeek(\n \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n \"sink_31Dc11sPYY9aLDkwPuGMa\",\n \"consumer_id\",\n PollingEndpointConsumerSeekIn::create(\n after: new DateTimeImmutable(\"2025-10-02T20:28:42+00:00\")\n )\n\n);"
- label: CLI
lang: Shell
source: "svix message poller consumer-seek \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\" \"sink_31Dc11sPYY9aLDkwPuGMa\" \"consumer_id\" '{\n \"after\": \"2025-10-02T20:28:42+00:00\"\n }'"
- label: cURL
lang: Shell
source: "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/app/app_1srOrx2ZWZBpBUvZwXKQmoEYga2/poller/sink_31Dc11sPYY9aLDkwPuGMa/consumer/consumer_id/seek' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"after\": \"2025-10-02T20:28:42+00:00\"\n }'"
components:
schemas:
ListResponse_MessageOut_:
type: object
required:
- data
- done
- iterator
properties:
data:
type: array
items:
$ref: '#/components/schemas/MessageOut'
done:
type: boolean
iterator:
type: string
example: iterator
nullable: true
prevIterator:
type: string
example: -iterator
nullable: true
PollingEndpointMessageOut:
description: The MessageOut equivalent of polling endpoint
type: object
required:
- eventType
- id
- payload
- timestamp
properties:
channels:
description: List of free-form identifiers that endpoints can filter by
type: array
items:
type: string
maxLength: 128
pattern: ^[a-zA-Z0-9\-_.:]+$
example: project_1337
maxItems: 10
minItems: 1
uniqueItems: true
example:
- project_123
- group_2
nullable: true
deliverAt:
type: string
format: date-time
nullable: true
eventId:
description: Optional unique identifier for the message
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
nullable: true
eventType:
description: The event type's name
type: string
maxLength: 256
pattern: ^[a-zA-Z0-9\-_.]+$
example: user.signup
headers:
type: object
additionalProperties:
type: string
nullable: true
id:
description: The Message's ID.
type: string
maxLength: 31
minLength: 31
pattern: ^msg_[A-Za-z0-9]{27}$
example: msg_1srOrx2ZWZBpBUvZwXKQmoEYga2
payload:
type: object
example:
email: test@example.com
type: user.created
username: test_user
tags:
type: array
items:
type: string
maxLength: 128
pattern: ^[a-zA-Z0-9\-_./\\#]+$
example: project_1337
uniqueItems: true
nullable: true
timestamp:
type: string
format: date-time
ExpungeAllContentsOut:
type: object
required:
- id
- status
- task
- updatedAt
properties:
id:
description: The QueueBackgroundTask's ID.
type: string
maxLength: 33
minLength: 33
pattern: ^qtask_[A-Za-z0-9]{27}$
example: qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2
status:
$ref: '#/components/schemas/BackgroundTaskStatus'
task:
$ref: '#/components/schemas/BackgroundTaskType'
updatedAt:
type: string
format: date-time
HttpErrorOut:
title: HttpError
type: object
required:
- code
- detail
properties:
code:
type: string
detail:
type: string
HTTPValidationError:
type: object
required:
- detail
properties:
detail:
type: array
items:
$ref: '#/components/schemas/ValidationError'
ValidationError:
description: Validation errors have their own schema to provide context for invalid requests eg. mismatched types and out of bounds values. There may be any number of these per 422 UNPROCESSABLE ENTITY error.
type: object
required:
- loc
- msg
- type
properties:
loc:
description: The location as a [`Vec`] of [`String`]s -- often in the form `["body", "field_name"]`, `["query", "field_name"]`, etc. They may, however, be arbitrarily deep.
type: array
items:
type: string
msg:
description: The message accompanying the validation error item.
type: string
type:
description: The type of error, often "type_error" or "value_error", but sometimes with more context like as "value_error.number.not_ge"
type: string
MessageOut:
type: object
required:
- eventType
- id
- payload
- timestamp
properties:
channels:
description: List of free-form identifiers that endpoints can filter by
type: array
items:
type: string
maxLength: 128
pattern: ^[a-zA-Z0-9\-_.:]+$
example: project_1337
maxItems: 10
minItems: 1
uniqueItems: true
example:
- project_123
- group_2
nullable: true
deliverAt:
type: string
format: date-time
nullable: true
eventId:
description: Optional unique identifier for the message
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
nullable: true
eventType:
description: The event type's name
type: string
maxLength: 256
pattern: ^[a-zA-Z0-9\-_.]+$
example: user.signup
id:
description: The Message's ID.
type: string
maxLength: 31
minLength: 31
pattern: ^msg_[A-Za-z0-9]{27}$
example: msg_1srOrx2ZWZBpBUvZwXKQmoEYga2
payload:
type: object
example:
email: test@example.com
type: user.created
username: test_user
tags:
type: array
items:
type: string
maxLength: 128
pattern: ^[a-zA-Z0-9\-_./\\#]+$
example: project_1337
uniqueItems: true
nullable: true
timestamp:
type: string
format: date-time
BackgroundTaskType:
type: string
enum:
- endpoint.replay
- endpoint.recover
- application.stats
- message.broadcast
- sdk.generate
- event-type.aggregate
- application.purge_content
- endpoint.bulk-replay
ApplicationIn:
type: object
required:
- name
properties:
metadata:
default: {}
type: object
additionalProperties:
type: string
name:
description: Application name for human consumption.
type: string
minLength: 1
example: My first application
rateLimit:
description: Deprecated, use `throttleRate` instead.
deprecated: true
type: integer
format: uint16
minimum: 1.0
nullable: true
throttleRate:
description: 'Maximum messages per second to send to this application.
Outgoing messages will be throttled to this rate.'
type: integer
format: uint16
minimum: 1.0
nullable: true
uid:
description: Optional unique identifier for the application.
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
nullable: true
BackgroundTaskStatus:
type: string
enum:
- running
- finished
- failed
MessagePrecheckOut:
type: object
required:
- active
properties:
active:
description: Whether there are any active endpoint that would get sent such a message.
type: boolean
MessagePrecheckIn:
type: object
required:
- eventType
properties:
channels:
type: array
items:
type: string
maxLength: 128
pattern: ^[a-zA-Z0-9\-_.:]+$
example: project_1337
maxItems: 10
minItems: 1
uniqueItems: true
example:
- project_123
- group_2
nullable: true
eventType:
description: The event type's name
type: string
maxLength: 256
pattern: ^[a-zA-Z0-9\-_.]+$
example: user.signup
PollingEndpointOut:
type: object
required:
- data
- done
- iterator
properties:
data:
type: array
items:
$ref: '#/components/schemas/PollingEndpointMessageOut'
done:
type: boolean
iterator:
type: string
PollingEndpointConsumerSeekOut:
type: object
required:
- iterator
properties:
iterator:
type: string
PollingEndpointConsumerSeekIn:
type: object
required:
- after
properties:
after:
type: string
format: date-time
example: '2025-04-21T11:20:34Z'
MessageIn:
type: object
required:
- eventType
- payload
properties:
application:
description: 'Optionally creates a new application alongside the message.
If the application id or uid that is used in the path already exists, this argument is ignored.'
$ref: '#/components/schemas/ApplicationIn'
nullable: true
channels:
description: List of free-form identifiers that endpoints can filter by
type: array
items:
type: string
maxLength: 128
pattern: ^[a-zA-Z0-9\-_.:]+$
example: project_1337
maxItems: 10
minItems: 1
uniqueItems: true
example:
- project_123
- group_2
nullable: true
deliverAt:
description: 'The date and time at which the message will be delivered.
Note that this time is best-effort-only. Must be at least one minute and no more than 24 hours in the future.'
type: string
format: date-time
nullable: true
eventId:
description: Optional unique identifier for the message
type: string
maxLength: 256
minLength: 1
pattern: ^[a-zA-Z0-9\-_.]+$
example: unique-identifier
nullable: true
eventType:
description: The event type's name
type: string
maxLength: 256
pattern: ^[a-zA-Z0-9\-_.]+$
example: user.signup
payload:
description: 'JSON payload to send as the request body of the webhook.
We also support sending non-JSON payloads. Please contact us for more information.'
type: object
example:
email: test@example.com
type: user.created
username: test_user
payloadRetentionHours:
description: Optional number of hours to retain the message payload. Note that this is mutually exclusive with `payloadRetentionPeriod`.
default: null
type: integer
format: int64
maximum: 2160.0
minimum: 1.0
nullable: true
payloadRetentionPeriod:
description: Optional number of days to retain the message payload. Defaults to 90. Note that this is mutually exclusive with `payloadRetentionHours`.
default: 90
type: integer
format: int64
maximum: 90.0
minimum: 1.0
example: 90
nullable: true
tags:
description: List of free-form tags that can be filtered by when listing messages
type: array
items:
type: string
maxLength: 128
pattern: ^[a-zA-Z0-9\-_./\\#]+$
example: project_1337
maxItems: 5
uniqueItems: true
example:
- my_tag
- other
nullable: true
transformationsParams:
description: Extra parameters to pass to Transformations (for future use)
type: object
nullable: true
securitySchemes:
HTTPBearer:
type: http
scheme: bearer
description: HTTP Bearer token passed in the `Authorization` header
x-tagGroups:
- name: General
tags:
- Background Task
- Environment
- name: Dispatch
tags:
- Application
- Event Type
- Authentication
- Endpoint
- Message
- Message Attempt
- Integration
- Connector
- name: Stream
tags:
- Stream
- Sink
- Event
- Stream Event Type
- Stream Authentication
- name: Ingest
tags:
- Ingest Source
- Ingest Endpoint
- name: Operational Webhooks
tags:
- Webhook
- Webhook Endpoint
- name: Statistics
tags:
- Statistics
- name: Utility
tags:
- Health
x-webhooks:
background_task.finished:
post:
description: Sent when a background task is finished.
operationId: background_task.finished
requestBody:
content:
application/json:
example:
data:
data:
appStats:
- appId: app_1srOrx2ZWZBpBUvZwXKQmoEYga2
appUid: null
messageDestinations: 343
status: finished
task: application.stats
taskId: qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2
type: background_task.finished
schema:
$ref: '#/components/schemas/BackgroundTaskFinishedEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: background_task.finished
tags:
- Webhook
endpoint.created:
post:
description: Sent when an endpoint is created.
operationId: endpoint.created
requestBody:
content:
application/json:
example:
data:
appId: app_1srOrx2ZWZBpBUvZwXKQmoEYga2
appUid: unique-app-identifier
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
endpointUid: unique-endpoint-identifier
type: endpoint.created
schema:
$ref: '#/components/schemas/EndpointCreatedEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: endpoint.created
tags:
- Webhook
x-svix-group-name: dispatch
endpoint.deleted:
post:
description: Sent when an endpoint is deleted.
operationId: endpoint.deleted
requestBody:
content:
application/json:
example:
data:
appId: app_1srOrx2ZWZBpBUvZwXKQmoEYga2
appUid: unique-app-identifier
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
endpointUid: unique-endpoint-identifier
type: endpoint.deleted
schema:
$ref: '#/components/schemas/EndpointDeletedEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: endpoint.deleted
tags:
- Webhook
x-svix-group-name: dispatch
endpoint.disabled:
post:
description: Sent when an endpoint has been automatically disabled after continuous failures, or manually via an API call.
operationId: endpoint.disabled
requestBody:
content:
application/json:
example:
data:
appId: app_1srOrx2ZWZBpBUvZwXKQmoEYga2
appUid: unique-app-identifier
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
endpointUid: unique-endpoint-identifier
failSince: '2022-11-06T15:04:05Z'
trigger: automatic
type: endpoint.disabled
schema:
$ref: '#/components/schemas/EndpointDisabledEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: endpoint.disabled
tags:
- Webhook
x-svix-group-name: dispatch
endpoint.enabled:
post:
description: Sent when an endpoint has been enabled.
operationId: endpoint.enabled
requestBody:
content:
application/json:
example:
data:
appId: app_1srOrx2ZWZBpBUvZwXKQmoEYga2
appUid: unique-app-identifier
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
endpointUid: unique-endpoint-identifier
type: endpoint.enabled
schema:
$ref: '#/components/schemas/EndpointEnabledEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: endpoint.enabled
tags:
- Webhook
x-svix-group-name: dispatch
endpoint.updated:
post:
description: Sent when an endpoint is updated.
operationId: endpoint.updated
requestBody:
content:
application/json:
example:
data:
appId: app_1srOrx2ZWZBpBUvZwXKQmoEYga2
appUid: unique-app-identifier
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
endpointUid: unique-endpoint-identifier
type: endpoint.updated
schema:
$ref: '#/components/schemas/EndpointUpdatedEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: endpoint.updated
tags:
- Webhook
x-svix-group-name: dispatch
ingest.endpoint.disabled:
post:
description: Sent when an ingest endpoint has been automatically disabled after continuous failures, or manually via an API call.
operationId: ingest.endpoint.disabled
requestBody:
content:
application/json:
example:
data:
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
endpointUid: unique-endpoint-identifier
failSince: '2022-11-06T15:04:05Z'
sourceId: src_30HT9jb8WZXKVWIO44ZDr
trigger: automatic
type: ingest.endpoint.disabled
schema:
$ref: '#/components/schemas/IngestEndpointDisabledEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: ingest.endpoint.disabled
tags:
- Webhook
ingest.message.attempt.exhausted:
post:
description: Sent when a message delivery has failed (all of the retry attempts have been exhausted).
operationId: ingest.message.attempt.exhausted
requestBody:
content:
application/json:
example:
data:
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
lastAttempt:
id: atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2
responseStatusCode: 500
timestamp: '2022-11-06T15:04:05Z'
msgEventId: unique-msg-identifier
msgId: msg_1srOrx2ZWZBpBUvZwXKQmoEYga2
sourceId: src_30HT9jb8WZXKVWIO44ZDr
type: ingest.message.attempt.exhausted
schema:
$ref: '#/components/schemas/IngestMessageAttemptExhaustedEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: ingest.message.attempt.exhausted
tags:
- Webhook
ingest.message.attempt.failing:
post:
description: 'Sent after a message has been failing for a few times.
It''s sent on the fourth failure. It complements `ingest.message.attempt.exhausted` which is sent after the last failure.'
operationId: ingest.message.attempt.failing
requestBody:
content:
application/json:
example:
data:
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
lastAttempt:
id: atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2
responseStatusCode: 500
timestamp: '2022-11-06T15:04:05Z'
msgEventId: unique-msg-identifier
msgId: msg_1srOrx2ZWZBpBUvZwXKQmoEYga2
sourceId: src_30HT9jb8WZXKVWIO44ZDr
type: ingest.message.attempt.failing
schema:
$ref: '#/components/schemas/IngestMessageAttemptFailingEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: ingest.message.attempt.failing
tags:
- Webhook
ingest.message.attempt.recovered:
post:
description: Sent on a successful dispatch after an earlier failure op webhook has already been sent.
operationId: ingest.message.attempt.recovered
requestBody:
content:
application/json:
example:
data:
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
lastAttempt:
id: atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2
responseStatusCode: 200
timestamp: '2022-11-06T15:04:05Z'
msgEventId: unique-msg-identifier
msgId: msg_1srOrx2ZWZBpBUvZwXKQmoEYga2
sourceId: src_30HT9jb8WZXKVWIO44ZDr
type: ingest.message.attempt.recovered
schema:
$ref: '#/components/schemas/IngestMessageAttemptRecoveredEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: ingest.message.attempt.recovered
tags:
- Webhook
message.attempt.exhausted:
post:
description: Sent when a message delivery has failed (all of the retry attempts have been exhausted).
operationId: message.attempt.exhausted
requestBody:
content:
application/json:
example:
data:
appId: app_1srOrx2ZWZBpBUvZwXKQmoEYga2
appUid: unique-app-identifier
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
lastAttempt:
id: atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2
responseStatusCode: 500
timestamp: '2022-11-06T15:04:05Z'
msgEventId: unique-msg-identifier
msgId: msg_1srOrx2ZWZBpBUvZwXKQmoEYga2
type: message.attempt.exhausted
schema:
$ref: '#/components/schemas/MessageAttemptExhaustedEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: message.attempt.exhausted
tags:
- Webhook
x-svix-group-name: dispatch
message.attempt.failing:
post:
description: 'Sent after a message has been failing for a few times.
It''s sent on the fourth failure. It complements `message.attempt.exhausted` which is sent after the last failure.'
operationId: message.attempt.failing
requestBody:
content:
application/json:
example:
data:
appId: app_1srOrx2ZWZBpBUvZwXKQmoEYga2
appUid: unique-app-identifier
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
lastAttempt:
id: atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2
responseStatusCode: 500
timestamp: '2022-11-06T15:04:05Z'
msgEventId: unique-msg-identifier
msgId: msg_1srOrx2ZWZBpBUvZwXKQmoEYga2
type: message.attempt.failing
schema:
$ref: '#/components/schemas/MessageAttemptFailingEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: message.attempt.failing
tags:
- Webhook
x-svix-group-name: dispatch
message.attempt.log:
post:
description: Sent after message attempts are made. Contains metadata about message attempts and their results. In order to reduce the frequency of webhooks, these are sent in batches periodically.
operationId: message.attempt.log
requestBody:
content:
application/json:
example:
data:
- appId: app_1srOrx2ZWZBpBUvZwXKQmoEYga2
appUid: unique-app-identifier
attemptCount: 1
attemptEnd: '2022-11-06T15:04:07Z'
attemptId: atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2
attemptStart: '2022-11-06T15:04:06Z'
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
eventType: user.signup
msgCreated: '2022-11-06T15:04:05Z'
msgEventId: unique-msg-identifier
msgId: msg_1srOrx2ZWZBpBUvZwXKQmoEYga2
orgId: env_1srOrx2ZWZBpBUvZwXKQmoEYga2
responseStatusCode: 200
status: 0
type: message.attempt.log
schema:
$ref: '#/components/schemas/MessageAttemptLogEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: message.attempt.log
tags:
- Webhook
x-internal: true
x-svix-feature-flags:
- attempt_log
x-svix-group-name: dispatch
message.attempt.recovered:
post:
description: Sent on a successful dispatch after an earlier failure op webhook has already been sent.
operationId: message.attempt.recovered
requestBody:
content:
application/json:
example:
data:
appId: app_1srOrx2ZWZBpBUvZwXKQmoEYga2
appUid: unique-app-identifier
endpointId: ep_1srOrx2ZWZBpBUvZwXKQmoEYga2
lastAttempt:
id: atmpt_1srOrx2ZWZBpBUvZwXKQmoEYga2
responseStatusCode: 200
timestamp: '2022-11-06T15:04:05Z'
msgEventId: unique-msg-identifier
msgId: msg_1srOrx2ZWZBpBUvZwXKQmoEYga2
type: message.attempt.recovered
schema:
$ref: '#/components/schemas/MessageAttemptRecoveredEvent'
responses:
2XX:
description: Return any 2XX status to indicate that the data was received successfully
summary: message.attempt.recovered
tags:
- Webhook
x-svix-group-name: dispatch