Svix Message API

Messages are the webhook events being sent.

Operations 15

GET /api/v1/app/{app_id}/msg List Messages #
POST /api/v1/app/{app_id}/msg Create Message #
POST /api/v1/app/{app_id}/msg/precheck/active Create Message Precheck #
GET /api/v1/app/{app_id}/events Message Events #
GET /api/v1/app/{app_id}/msg/{msg_id} Get Message #
DELETE /api/v1/app/{app_id}/msg/{msg_id}/content Delete message payload #
POST /api/v1/app/{app_id}/msg/search Search Messages #
POST /api/v1/app/{app_id}/msg/expunge-all-contents Expunge all message contents #
GET /api/v1/app/{app_id}/msg/{msg_id}/raw Get Raw Message Payload #
POST /api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt Create Message Attempt For Endpoint #
GET /api/v1/app/{app_id}/poller/{sink_id} Poller Poll #
POST /api/v1/app/{app_id}/poller/{sink_id}/consumer/{consumer_id}/seek Poller Consumer Seek #
GET /api/v1/app/{app_id}/poller/{sink_id}/consumer/{consumer_id} Poller Consumer Poll #
GET /api/v1/app/{app_id}/polling-endpoint/{sink_id}/consumer/{consumer_id} Pollerv2 Consumer Poll #
POST /api/v1/app/{app_id}/polling-endpoint/{sink_id}/consumer/{consumer_id}/commit Pollerv2 Consumer Commit #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/svix-message-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

svix-message-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Svix 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).


    <SecurityDefinitions />



    ## 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.922.0
  x-logo:
    url: https://www.svix.com/static/img/brand-padded.svg
    altText: Svix Logo
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
          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.
          type: boolean
          default: true
        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:
      - lang: TypeScript
        label: JavaScript
        source: const response = await svix.message.list("app_1srOrx2ZWZBpBUvZwXKQmoEYga2");
      - lang: TypeScript
        label: TypeScript
        source: const response = await svix.message.list("app_1srOrx2ZWZBpBUvZwXKQmoEYga2");
      - lang: Python
        label: Python
        source: "response = svix.message.list(\n    \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n)"
      - lang: Python
        label: Python (Async)
        source: "response = await svix.message.list(\n    \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n)"
      - lang: Go
        label: Go
        source: response, err := svix.Message.List(ctx, "app_1srOrx2ZWZBpBUvZwXKQmoEYga2", nil)
      - lang: Kotlin
        label: Kotlin
        source: val response = svix.message.list("app_1srOrx2ZWZBpBUvZwXKQmoEYga2")
      - lang: Java
        label: Java
        source: var response = svix.getMessage().list("app_1srOrx2ZWZBpBUvZwXKQmoEYga2");
      - lang: Ruby
        label: Ruby
        source: response = svix.message.list("app_1srOrx2ZWZBpBUvZwXKQmoEYga2")
      - lang: Rust
        label: Rust
        source: "let response = svix\n    .message()\n    .list(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\".to_string(), None)\n    .await?;"
      - lang: C#
        label: C#
        source: var response = svix.Message.List("app_1srOrx2ZWZBpBUvZwXKQmoEYga2");
      - lang: PHP
        label: PHP
        source: "$response = $svix->message->list(\n    \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\"\n);"
      - lang: Shell
        label: CLI
        source: svix message list "app_1srOrx2ZWZBpBUvZwXKQmoEYga2"
      - lang: Shell
        label: cURL
        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.
          type: boolean
          default: true
        style: form
      - 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'
        '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'
        '413':
          description: Payload too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
      security:
      - HTTPBearer: []
      x-codeSamples:
      - lang: TypeScript
        label: JavaScript
        source: "const response = await svix.message.create(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", {\n  eventId: \"unique-identifier\",\n  eventType: \"user.signup\",\n  payload: { email: \"test@example.com\", type: \"user.created\", username: \"test_user\" },\n  channels: [\"project_123\", \"group_2\"],\n  application: {\n    name: \"My first application\",\n    throttleRate: 1,\n    uid: \"unique-identifier\",\n    metadata: {},\n  },\n  tags: [\"my_tag\", \"other\"],\n  transformationsParams: {},\n  deliverAt: new Date(\"2025-10-02T20:28:42+00:00\"),\n  payloadRetentionPeriod: 90,\n  payloadRetentionHours: 1,\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);"
      - lang: TypeScript
        label: TypeScript
        source: "const response = await svix.message.create(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", {\n  eventId: \"unique-identifier\",\n  eventType: \"user.signup\",\n  payload: { email: \"test@example.com\", type: \"user.created\", username: \"test_user\" },\n  channels: [\"project_123\", \"group_2\"],\n  application: {\n    name: \"My first application\",\n    throttleRate: 1,\n    uid: \"unique-identifier\",\n    metadata: {},\n  },\n  tags: [\"my_tag\", \"other\"],\n  transformationsParams: {},\n  deliverAt: new Date(\"2025-10-02T20:28:42+00:00\"),\n  payloadRetentionPeriod: 90,\n  payloadRetentionHours: 1,\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);"
      - lang: Python
        label: Python
        source: "response = svix.message.create(\n    \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n    MessageIn(\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        channels=[\n            \"project_123\",\n            \"group_2\",\n        ],\n        application=ApplicationIn(\n            name=\"My first application\",\n            throttle_rate=1,\n            uid=\"unique-identifier\",\n            metadata={},\n        ),\n        tags=[\n            \"my_tag\",\n            \"other\",\n        ],\n        transformations_params={},\n        deliver_at=datetime.fromisoformat(\"2025-10-02T20:28:42+00:00\"),\n        payload_retention_period=90,\n        payload_retention_hours=1,\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)"
      - lang: Python
        label: Python (Async)
        source: "response = await svix.message.create(\n    \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n    MessageIn(\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        channels=[\n            \"project_123\",\n            \"group_2\",\n        ],\n        application=ApplicationIn(\n            name=\"My first application\",\n            throttle_rate=1,\n            uid=\"unique-identifier\",\n            metadata={},\n        ),\n        tags=[\n            \"my_tag\",\n            \"other\",\n        ],\n        transformations_params={},\n        deliver_at=datetime.fromisoformat(\"2025-10-02T20:28:42+00:00\"),\n        payload_retention_period=90,\n        payload_retention_hours=1,\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)"
      - lang: Go
        label: Go
        source: "response, err := svix.Message.Create(\n\tctx,\n\t\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n\tMessageIn{\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\tChannels: []string{\"project_123\", \"group_2\"},\n\t\tApplication: new(\n\t\t\tApplicationIn{\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\tMetadata:     nil,\n\t\t\t},\n\t\t),\n\t\tTags:                   []string{\"my_tag\", \"other\"},\n\t\tTransformationsParams:  nil,\n\t\tDeliverAt:              new(time.Date(2025, 10, 2, 20, 28, 42, 0, time.UTC)),\n\t\tPayloadRetentionPeriod: new(int64(90)),\n\t\tPayloadRetentionHours:  new(int64(1)),\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))"
      - lang: Kotlin
        label: Kotlin
        source: "val response =\n    svix.message.create(\n        \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n        MessageIn(\n            eventId = \"unique-identifier\",\n            eventType = \"user.signup\",\n            payload =\n                \"{\\\"email\\\": \\\"test@example.com\\\",\\\"type\\\": \\\"user.created\\\",\\\"username\\\": \\\"test_user\\\"}\",\n            channels = setOf(\"project_123\", \"group_2\"),\n            application =\n                ApplicationIn(\n                    name = \"My first application\",\n                    throttleRate = 1u,\n                    uid = \"unique-identifier\",\n                    metadata = mapOf(),\n                ),\n            tags = setOf(\"my_tag\", \"other\"),\n            transformationsParams = mapOf(),\n            deliverAt = Instant.parse(\"2025-10-02T20:28:42+00:00\"),\n            payloadRetentionPeriod = 90,\n            payloadRetentionHours = 1,\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    )"
      - lang: Java
        label: Java
        source: "var response = svix.getMessage()\n        .create(\n            \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n            new MessageIn()\n                .eventId(\"unique-identifier\")\n                .eventType(\"user.signup\")\n                .payload(\"{\\\"email\\\": \\\"test@example.com\\\",\\\"type\\\": \\\"user.created\\\",\\\"username\\\":\"\n                    + \" \\\"test_user\\\"}\")\n                .channels(Set.of(\"project_123\", \"group_2\"))\n                .application(new ApplicationIn()\n                    .name(\"My first application\")\n                    .throttleRate(1L)\n                    .uid(\"unique-identifier\")\n                    .metadata(Map.of()))\n                .tags(Set.of(\"my_tag\", \"other\"))\n                .transformationsParams(Map.of())\n                .deliverAt(OffsetDateTime.parse(\"2025-10-02T20:28:42+00:00\"))\n                .payloadRetentionPeriod(90L)\n                .payloadRetentionHours(1L));\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\"));"
      - lang: Ruby
        label: Ruby
        source: "# Alternatively, with a raw string payload.\nresponse = svix\n  .message\n  .create(\n    \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n    {\n      eventId: \"unique-identifier\",\n      eventType: \"user.signup\",\n      payload: {\"email\" => \"test@example.com\", \"type\" => \"user.created\", \"username\" => \"test_user\"},\n      channels: [\"project_123\", \"group_2\"],\n      application: {name: \"My first application\", throttleRate: 1, uid: \"unique-identifier\", metadata: {}},\n      tags: [\"my_tag\", \"other\"],\n      transformationsParams: {},\n      deliverAt: \"2025-10-02T20:28:42+00:00\",\n      payloadRetentionPeriod: 90,\n      payloadRetentionHours: 1\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)"
      - lang: Rust
        label: Rust
        source: "let response = svix\n    .message()\n    .create(\n        \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\".to_string(),\n        MessageIn {\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            channels: Some(vec![\"project_123\".to_string(), \"group_2\".to_string()]),\n            application: Some(ApplicationIn {\n                name: \"My first application\".to_string(),\n                throttle_rate: Some(1),\n                uid: Some(\"unique-identifier\".to_string()),\n                metadata: Some(HashMap::new()),\n            }),\n            tags: Some(vec![\"my_tag\".to_string(), \"other\".to_string()]),\n            transformations_params: Some(serde_json::json!({})),\n            deliver_at: Some(\"2025-10-02T20:28:42+00:00\".to_string()),\n            payload_retention_period: Some(90),\n            payload_retention_hours: Some(1),\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?;"
      - lang: C#
        label: C#
        source: "var response = svix.Message.Create(\n    \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\",\n    new MessageIn\n    {\n        EventId = \"unique-identifier\",\n        EventType = \"user.signup\",\n        Payload = new Dictionary<string, string>\n        {\n            { \"email\", \"test@example.com\" },\n            { \"type\", \"user.created\" },\n            { \"username\", \"test_user\" },\n        },\n        Channels = [\"project_123\", \"group_2\"],\n        Application = new ApplicationIn\n        {\n            Name = \"My first application\",\n            ThrottleRate = 1,\n            Uid = \"unique-identifier\",\n            Metadata = [],\n        },\n        Tags = [\"my_tag\", \"other\"],\n        TransformationsParams = new Dictionary<string, string> { },\n        DeliverAt = DateTime.Parse(\"2025-10-02T20:28:42+00:00\"),\n        PayloadRetentionPeriod = 90,\n        PayloadRetentionHours = 1,\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);"
      - lang: PHP
        label: 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    ->withEventId(\"unique-identifier\")\n    ->withChannels([\"project_123\",\"group_2\"])\n    ->withApplication(ApplicationIn::create(\n        name: \"My first application\"\n    )\n    ->withThrottleRate(1)\n    ->withUid(\"unique-identifier\")\n    ->withMetadata([]))\n    ->withTags([\"my_tag\",\"other\"])\n    ->withDeliverAt(new DateTimeImmutable(\"2025-10-02T20:28:42+00:00\"))\n    ->withPayloadRetentionPeriod(90)\n    ->withPayloadRetentionHours(1)\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);"
      - lang: Shell
        label: CLI
        source: "svix message create \"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\" '{\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    \"channels\": [\n      \"project_123\",\n      \"group_2\"\n    ],\n    \"application\": {\n      \"name\": \"My first application\",\n      \"throttleRate\": 1,\n      \"uid\": \"unique-identifier\",\n      \"metadata\": {}\n    },\n    \"tags\": [\n      \"my_tag\",\n      \"other\"\n    ],\n    \"transformationsParams\": {},\n    \"deliverAt\": \"2025-10-02T20:28:42+00:00\",\n    \"payloadRetentionPeriod\": 90,\n    \"payloadRetentionHours\": 1\n  }'"
      - lang: Shell
        label: cURL
        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    \"eventId\": \"unique-identifier\",\n    \"eventType\": \"user.signup\",\n    \"payload\": {\n      \"email\": \"test@example.com\",\n      \"type\": \"user.created\",\n      \"username\": \"test_user\"\n    },\n    \"channels\": [\n      \"project_123\",\n      \"group_2\"\n    ],\n    \"application\": {\n      \"name\": \"My first application\",\n      \"throttleRate\": 1,\n      \"uid\": \"unique-identifier\",\n      \"metadata\": {}\n    },\n    \"tags\": [\n      \"my_tag\",\n      \"other\"\n    ],\n    \"transformationsParams\": {},\n    \"deliverAt\": \"2025-10-02T20:28:42+00:00\",\n    \"payloadRetentionPeriod\": 90,\n    \"payloadRetentionHours\": 1\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/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
      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:
      - lang: TypeScript
        label: JavaScript
        source: "const response = await svix.message.precheck(\"app_1srOrx2ZWZBpBUvZwXKQmoEYga2\", {\n  eventType: \"user.signup\",\n  channels: [\"project_123\", \"group_2\"],\n});"
      - lang: TypeScript
        label: TypeScript
        source: "const re

# --- truncated at 32 KB (120 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/svix/refs/heads/main/openapi/svix-message-api-openapi.yml