Svix Stream Authentication API

The Stream Authentication API from Svix — 5 operation(s) for stream authentication.

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /api/v1/auth/stream-portal-access/{stream_id} Get a magic link to the Stream Consumer Portal · Get Stream Portal Access #
Ask an LLM
“How do I give a customer a login link to their stream consumer portal?”
“Can I control how long a stream portal link stays valid?”
Tell an agent
Generate a stream portal magic link for stream {stream_id}.
Create a stream consumer portal login for {stream_id} that expires in {expiry} seconds.
POST /api/v1/auth/stream-logout Log out a stream token · Stream Logout #
Ask an LLM
“How do I log out a stream portal token when a user signs out?”
“Can stream logout invalidate tokens that aren't stream tokens?”
Tell an agent destructive · confirm first
Log out the stream token I'm using.
End this stream portal token's session.
POST /api/v1/auth/stream/{stream_id}/expire-all Expire every token for a stream · Stream Expire All #
Ask an LLM
“How do I revoke all portal tokens issued for a stream?”
“Can I expire only specific stream portal sessions?”
Tell an agent destructive · confirm first
Expire all tokens for stream {stream_id}.
Expire stream {stream_id} portal sessions {sessionIds}.
POST /api/v1/auth/stream/{stream_id}/sink/{sink_id}/poller/token/rotate Rotate a stream sink's poller token · Rotate Poller Token #
Ask an LLM
“How do I rotate the token for polling events from a stream sink?”
“Can the previous stream poller token keep working briefly after rotation?”
Tell an agent
Rotate the poller token for sink {sink_id} on stream {stream_id}.
Rotate stream {stream_id} sink {sink_id}'s poller token, keeping the old one for {oldTokenExpiry} seconds.
GET /api/v1/auth/stream/{stream_id}/sink/{sink_id}/poller/token Get a stream sink's current poller token · Get Poller Token #
Ask an LLM
“Where do I find the current token for polling a stream sink?”
“Which poller token is active for my stream sink right now?”
Tell an agent
Get the current poller token for sink {sink_id} on stream {stream_id}.
Show stream {stream_id} sink {sink_id}'s poller token without rotating it.

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:svix-stream-authentication-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 form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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

OpenAPI Specification

svix-stream-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Svix Stream Authentication API
  description: Welcome to the Svix API documentation!
  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: Stream Authentication
paths:
  /api/v1/auth/stream-portal-access/{stream_id}:
    post:
      tags:
      - Stream Authentication
      summary: Get Stream Portal Access
      description: Use this function to get magic links (and authentication codes) for connecting your users to the Stream Consumer Portal.
      operationId: v1.authentication.stream-portal-access
      parameters:
      - in: path
        name: stream_id
        description: The Stream's ID or UID.
        required: true
        schema:
          description: The Stream's ID or UID.
          type: string
          maxLength: 60
          minLength: 1
          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/StreamPortalAccessIn'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppPortalAccessOut'
        '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.authentication.streamPortalAccess(\n  \"strm_31Dc0DD72P5AddYUguyBd\",\n  {\n    featureFlags: [],\n    expiry: 1,\n    sessionId: \"user_1FB8\",\n  }\n);"
      - lang: TypeScript
        label: TypeScript
        source: "const response = await svix.authentication.streamPortalAccess(\n  \"strm_31Dc0DD72P5AddYUguyBd\",\n  {\n    featureFlags: [],\n    expiry: 1,\n    sessionId: \"user_1FB8\",\n  }\n);"
      - lang: Python
        label: Python
        source: "response = svix.authentication.stream_portal_access(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    StreamPortalAccessIn(\n        feature_flags=[],\n        expiry=1,\n        session_id=\"user_1FB8\",\n    ),\n)"
      - lang: Python
        label: Python (Async)
        source: "response = await svix.authentication.stream_portal_access(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    StreamPortalAccessIn(\n        feature_flags=[],\n        expiry=1,\n        session_id=\"user_1FB8\",\n    ),\n)"
      - lang: Go
        label: Go
        source: "response, err := svix.Authentication.StreamPortalAccess(\n\tctx,\n\t\"strm_31Dc0DD72P5AddYUguyBd\",\n\tStreamPortalAccessIn{\n\t\tFeatureFlags: []string{},\n\t\tExpiry:       new(uint64(1)),\n\t\tSessionId:    new(\"user_1FB8\"),\n\t},\n\tnil,\n)"
      - lang: Kotlin
        label: Kotlin
        source: "val response =\n    svix.authentication.streamPortalAccess(\n        \"strm_31Dc0DD72P5AddYUguyBd\",\n        StreamPortalAccessIn(featureFlags = setOf(), expiry = 1u, sessionId = \"user_1FB8\"),\n    )"
      - lang: Java
        label: Java
        source: "var response = svix.getAuthentication()\n        .streamPortalAccess(\n            \"strm_31Dc0DD72P5AddYUguyBd\",\n            new StreamPortalAccessIn().featureFlags(Set.of()).expiry(1L).sessionId(\"user_1FB8\"));"
      - lang: Ruby
        label: Ruby
        source: "response = svix\n  .authentication\n  .stream_portal_access(\"strm_31Dc0DD72P5AddYUguyBd\", {featureFlags: [], expiry: 1, sessionId: \"user_1FB8\"})"
      - lang: Rust
        label: Rust
        source: "let response = svix\n    .authentication()\n    .stream_portal_access(\n        \"strm_31Dc0DD72P5AddYUguyBd\".to_string(),\n        StreamPortalAccessIn {\n            feature_flags: Some(vec![]),\n            expiry: Some(1),\n            session_id: Some(\"user_1FB8\".to_string()),\n        },\n        None,\n    )\n    .await?;"
      - lang: C#
        label: C#
        source: "var response = svix.Authentication.StreamPortalAccess(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    new StreamPortalAccessIn\n    {\n        FeatureFlags = [],\n        Expiry = 1,\n        SessionId = \"user_1FB8\",\n    }\n);"
      - lang: PHP
        label: PHP
        source: "$response = $svix->authentication->streamPortalAccess(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    StreamPortalAccessIn::create()\n    ->withFeatureFlags([])\n    ->withExpiry(1)\n    ->withSessionId(\"user_1FB8\")\n);"
      - lang: Shell
        label: CLI
        source: "svix authentication stream-portal-access \"strm_31Dc0DD72P5AddYUguyBd\" '{\n    \"featureFlags\": [],\n    \"expiry\": 1,\n    \"sessionId\": \"user_1FB8\"\n  }'"
      - lang: Shell
        label: cURL
        source: "curl -X 'POST' \\\n  'https://api.eu.svix.com/api/v1/auth/stream-portal-access/strm_31Dc0DD72P5AddYUguyBd' \\\n  -H 'Authorization: Bearer AUTH_TOKEN' \\\n  -H 'Accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"featureFlags\": [],\n    \"expiry\": 1,\n    \"sessionId\": \"user_1FB8\"\n  }'"
  /api/v1/auth/stream-logout:
    post:
      tags:
      - Stream Authentication
      summary: Stream Logout
      description: 'Logout a stream token.


        Trying to log out other tokens will fail.'
      operationId: v1.authentication.stream-logout
      parameters:
      - in: header
        name: idempotency-key
        description: The request's idempotency key
        schema:
          type: string
        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:
      - lang: TypeScript
        label: JavaScript
        source: await svix.authentication.streamLogout();
      - lang: TypeScript
        label: TypeScript
        source: await svix.authentication.streamLogout();
      - lang: Python
        label: Python
        source: svix.authentication.stream_logout()
      - lang: Python
        label: Python (Async)
        source: await svix.authentication.stream_logout()
      - lang: Go
        label: Go
        source: err := svix.Authentication.StreamLogout(ctx, nil)
      - lang: Kotlin
        label: Kotlin
        source: "svix.authentication\n    .streamLogout()"
      - lang: Java
        label: Java
        source: svix.getAuthentication().streamLogout();
      - lang: Ruby
        label: Ruby
        source: response = svix.authentication.stream_logout
      - lang: Rust
        label: Rust
        source: svix.authentication().stream_logout(None).await?;
      - lang: C#
        label: C#
        source: var response = svix.Authentication.StreamLogout();
      - lang: PHP
        label: PHP
        source: $svix->authentication->streamLogout();
      - lang: Shell
        label: CLI
        source: svix authentication stream-logout
      - lang: Shell
        label: cURL
        source: "curl -X 'POST' \\\n  'https://api.eu.svix.com/api/v1/auth/stream-logout' \\\n  -H 'Authorization: Bearer AUTH_TOKEN'"
  /api/v1/auth/stream/{stream_id}/expire-all:
    post:
      tags:
      - Stream Authentication
      summary: Stream Expire All
      description: Expire all of the tokens associated with a specific stream.
      operationId: v1.authentication.stream-expire-all
      parameters:
      - in: path
        name: stream_id
        description: The Stream's ID or UID.
        required: true
        schema:
          description: The Stream's ID or UID.
          type: string
          maxLength: 60
          minLength: 1
          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/StreamTokenExpireIn'
        required: true
      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:
      - lang: TypeScript
        label: JavaScript
        source: "await svix.authentication.streamExpireAll(\"strm_31Dc0DD72P5AddYUguyBd\", {\n  expiry: 60,\n  sessionIds: [],\n});"
      - lang: TypeScript
        label: TypeScript
        source: "await svix.authentication.streamExpireAll(\"strm_31Dc0DD72P5AddYUguyBd\", {\n  expiry: 60,\n  sessionIds: [],\n});"
      - lang: Python
        label: Python
        source: "svix.authentication.stream_expire_all(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    StreamTokenExpireIn(\n        expiry=60,\n        session_ids=[],\n    ),\n)"
      - lang: Python
        label: Python (Async)
        source: "await svix.authentication.stream_expire_all(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    StreamTokenExpireIn(\n        expiry=60,\n        session_ids=[],\n    ),\n)"
      - lang: Go
        label: Go
        source: "err := svix.Authentication.StreamExpireAll(\n\tctx,\n\t\"strm_31Dc0DD72P5AddYUguyBd\",\n\tStreamTokenExpireIn{Expiry: new(int64(60)), SessionIds: []string{}},\n\tnil,\n)"
      - lang: Kotlin
        label: Kotlin
        source: "svix.authentication.streamExpireAll(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    StreamTokenExpireIn(expiry = 60, sessionIds = listOf()),\n)"
      - lang: Java
        label: Java
        source: "svix.getAuthentication()\n        .streamExpireAll(\n            \"strm_31Dc0DD72P5AddYUguyBd\",\n            new StreamTokenExpireIn().expiry(60L).sessionIds(List.of()));"
      - lang: Ruby
        label: Ruby
        source: 'response = svix.authentication.stream_expire_all("strm_31Dc0DD72P5AddYUguyBd", {expiry: 60, sessionIds: []})'
      - lang: Rust
        label: Rust
        source: "svix.authentication()\n    .stream_expire_all(\n        \"strm_31Dc0DD72P5AddYUguyBd\".to_string(),\n        StreamTokenExpireIn {\n            expiry: Some(60),\n            session_ids: Some(vec![]),\n        },\n        None,\n    )\n    .await?;"
      - lang: C#
        label: C#
        source: "var response = svix.Authentication.StreamExpireAll(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    new StreamTokenExpireIn { Expiry = 60, SessionIds = [] }\n);"
      - lang: PHP
        label: PHP
        source: "$svix->authentication->streamExpireAll(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    StreamTokenExpireIn::create()\n    ->withExpiry(60)\n    ->withSessionIds([])\n);"
      - lang: Shell
        label: CLI
        source: "svix authentication stream-expire-all \"strm_31Dc0DD72P5AddYUguyBd\" '{\n    \"expiry\": 60,\n    \"sessionIds\": []\n  }'"
      - lang: Shell
        label: cURL
        source: "curl -X 'POST' \\\n  'https://api.eu.svix.com/api/v1/auth/stream/strm_31Dc0DD72P5AddYUguyBd/expire-all' \\\n  -H 'Authorization: Bearer AUTH_TOKEN' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"expiry\": 60,\n    \"sessionIds\": []\n  }'"
  /api/v1/auth/stream/{stream_id}/sink/{sink_id}/poller/token/rotate:
    post:
      tags:
      - Stream Authentication
      summary: Rotate Poller Token
      description: Create a new auth token for the stream poller API.
      operationId: v1.authentication.rotate-stream-poller-token
      parameters:
      - in: path
        name: stream_id
        description: The Stream's ID or UID.
        required: true
        schema:
          description: The Stream's ID or UID.
          type: string
          maxLength: 60
          minLength: 1
          example: unique-identifier
        style: simple
      - in: path
        name: sink_id
        description: The StreamSink's ID or UID.
        required: true
        schema:
          description: The StreamSink's ID or UID.
          type: string
          maxLength: 60
          minLength: 1
          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/RotatePollerTokenIn'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiTokenOut'
        '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.authentication.rotateStreamPollerToken(\n  \"strm_31Dc0DD72P5AddYUguyBd\",\n  \"sink_31Dc11sPYY9aLDkwPuGMa\",\n  {\n    expiry: 1,\n    oldTokenExpiry: 1,\n  }\n);"
      - lang: TypeScript
        label: TypeScript
        source: "const response = await svix.authentication.rotateStreamPollerToken(\n  \"strm_31Dc0DD72P5AddYUguyBd\",\n  \"sink_31Dc11sPYY9aLDkwPuGMa\",\n  {\n    expiry: 1,\n    oldTokenExpiry: 1,\n  }\n);"
      - lang: Python
        label: Python
        source: "response = svix.authentication.rotate_stream_poller_token(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\",\n    RotatePollerTokenIn(\n        expiry=1,\n        old_token_expiry=1,\n    ),\n)"
      - lang: Python
        label: Python (Async)
        source: "response = await svix.authentication.rotate_stream_poller_token(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\",\n    RotatePollerTokenIn(\n        expiry=1,\n        old_token_expiry=1,\n    ),\n)"
      - lang: Go
        label: Go
        source: "response, err := svix.Authentication.RotateStreamPollerToken(\n\tctx,\n\t\"strm_31Dc0DD72P5AddYUguyBd\",\n\t\"sink_31Dc11sPYY9aLDkwPuGMa\",\n\tRotatePollerTokenIn{Expiry: new(int64(1)), OldTokenExpiry: new(int64(1))},\n\tnil,\n)"
      - lang: Kotlin
        label: Kotlin
        source: "val response =\n    svix.authentication.rotateStreamPollerToken(\n        \"strm_31Dc0DD72P5AddYUguyBd\",\n        \"sink_31Dc11sPYY9aLDkwPuGMa\",\n        RotatePollerTokenIn(expiry = 1, oldTokenExpiry = 1),\n    )"
      - lang: Java
        label: Java
        source: "var response = svix.getAuthentication()\n        .rotateStreamPollerToken(\n            \"strm_31Dc0DD72P5AddYUguyBd\",\n            \"sink_31Dc11sPYY9aLDkwPuGMa\",\n            new RotatePollerTokenIn().expiry(1L).oldTokenExpiry(1L));"
      - lang: Ruby
        label: Ruby
        source: "response = svix\n  .authentication\n  .rotate_stream_poller_token(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\",\n    {expiry: 1, oldTokenExpiry: 1}\n  )"
      - lang: Rust
        label: Rust
        source: "let response = svix\n    .authentication()\n    .rotate_stream_poller_token(\n        \"strm_31Dc0DD72P5AddYUguyBd\".to_string(),\n        \"sink_31Dc11sPYY9aLDkwPuGMa\".to_string(),\n        RotatePollerTokenIn {\n            expiry: Some(1),\n            old_token_expiry: Some(1),\n        },\n        None,\n    )\n    .await?;"
      - lang: C#
        label: C#
        source: "var response = svix.Authentication.RotateStreamPollerToken(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\",\n    new RotatePollerTokenIn { Expiry = 1, OldTokenExpiry = 1 }\n);"
      - lang: PHP
        label: PHP
        source: "$response = $svix->authentication->rotateStreamPollerToken(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\",\n    RotatePollerTokenIn::create()\n    ->withExpiry(1)\n    ->withOldTokenExpiry(1)\n);"
      - lang: Shell
        label: CLI
        source: "svix authentication rotate-stream-poller-token \"strm_31Dc0DD72P5AddYUguyBd\" \"sink_31Dc11sPYY9aLDkwPuGMa\" '{\n    \"expiry\": 1,\n    \"oldTokenExpiry\": 1\n  }'"
      - lang: Shell
        label: cURL
        source: "curl -X 'POST' \\\n  'https://api.eu.svix.com/api/v1/auth/stream/strm_31Dc0DD72P5AddYUguyBd/sink/sink_31Dc11sPYY9aLDkwPuGMa/poller/token/rotate' \\\n  -H 'Authorization: Bearer AUTH_TOKEN' \\\n  -H 'Accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"expiry\": 1,\n    \"oldTokenExpiry\": 1\n  }'"
  /api/v1/auth/stream/{stream_id}/sink/{sink_id}/poller/token:
    get:
      tags:
      - Stream Authentication
      summary: Get Poller Token
      description: Get the current auth token for the stream poller.
      operationId: v1.authentication.get-stream-poller-token
      parameters:
      - in: path
        name: stream_id
        description: The Stream's ID or UID.
        required: true
        schema:
          description: The Stream's ID or UID.
          type: string
          maxLength: 60
          minLength: 1
          example: unique-identifier
        style: simple
      - in: path
        name: sink_id
        description: The StreamSink's ID or UID.
        required: true
        schema:
          description: The StreamSink's ID or UID.
          type: string
          maxLength: 60
          minLength: 1
          example: unique-identifier
        style: simple
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiTokenOut'
        '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.authentication.getStreamPollerToken(\n  \"strm_31Dc0DD72P5AddYUguyBd\",\n  \"sink_31Dc11sPYY9aLDkwPuGMa\"\n);"
      - lang: TypeScript
        label: TypeScript
        source: "const response = await svix.authentication.getStreamPollerToken(\n  \"strm_31Dc0DD72P5AddYUguyBd\",\n  \"sink_31Dc11sPYY9aLDkwPuGMa\"\n);"
      - lang: Python
        label: Python
        source: "response = svix.authentication.get_stream_poller_token(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\",\n)"
      - lang: Python
        label: Python (Async)
        source: "response = await svix.authentication.get_stream_poller_token(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\",\n)"
      - lang: Go
        label: Go
        source: "response, err := svix.Authentication.GetStreamPollerToken(\n\tctx,\n\t\"strm_31Dc0DD72P5AddYUguyBd\",\n\t\"sink_31Dc11sPYY9aLDkwPuGMa\",\n)"
      - lang: Kotlin
        label: Kotlin
        source: "val response =\n    svix.authentication.getStreamPollerToken(\n        \"strm_31Dc0DD72P5AddYUguyBd\",\n        \"sink_31Dc11sPYY9aLDkwPuGMa\",\n    )"
      - lang: Java
        label: Java
        source: "var response = svix.getAuthentication()\n        .getStreamPollerToken(\"strm_31Dc0DD72P5AddYUguyBd\", \"sink_31Dc11sPYY9aLDkwPuGMa\");"
      - lang: Ruby
        label: Ruby
        source: response = svix.authentication.get_stream_poller_token("strm_31Dc0DD72P5AddYUguyBd", "sink_31Dc11sPYY9aLDkwPuGMa")
      - lang: Rust
        label: Rust
        source: "let response = svix\n    .authentication()\n    .get_stream_poller_token(\n        \"strm_31Dc0DD72P5AddYUguyBd\".to_string(),\n        \"sink_31Dc11sPYY9aLDkwPuGMa\".to_string(),\n    )\n    .await?;"
      - lang: C#
        label: C#
        source: "var response = svix.Authentication.GetStreamPollerToken(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\"\n);"
      - lang: PHP
        label: PHP
        source: "$response = $svix->authentication->getStreamPollerToken(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\"\n);"
      - lang: Shell
        label: CLI
        source: svix authentication get-stream-poller-token "strm_31Dc0DD72P5AddYUguyBd" "sink_31Dc11sPYY9aLDkwPuGMa"
      - lang: Shell
        label: cURL
        source: "curl -X 'GET' \\\n  'https://api.eu.svix.com/api/v1/auth/stream/strm_31Dc0DD72P5AddYUguyBd/sink/sink_31Dc11sPYY9aLDkwPuGMa/poller/token' \\\n  -H 'Authorization: Bearer AUTH_TOKEN' \\\n  -H 'Accept: application/json'"
components:
  schemas:
    StreamPortalAccessIn:
      type: object
      properties:
        featureFlags:
          description: The set of feature flags the created token will have access to.
          type: array
          uniqueItems: true
          items:
            type: string
            maxLength: 256
            pattern: ^[a-zA-Z0-9\-_.]+$
          maxItems: 25
          minItems: 1
          example: []
        expiry:
          description: 'How long the token will be valid for, in seconds.


            Valid values are between 1 hour and 7 days. The default is 7 days.'
          type: integer
          format: uint64
          default: 604800
          maximum: 604800
          minimum: 3600
          nullable: true
        sessionId:
          description: 'An optional session ID to attach to the token.


            When expiring tokens with "Expire All", you can include the session ID to only expire tokens that were created with that session ID.'
          type: string
          maxLength: 64
          minLength: 1
          pattern: ^[a-zA-Z0-9@_-]+$
          example: user_1FB8
          nullable: true
    RotatePollerTokenIn:
      type: object
      properties:
        expiry:
          description: How long the token will be valid for, in seconds. Can be up to 31,536,000 seconds (1 year).
          type: integer
          format: int64
          maximum: 31536000
          minimum: 1
          nullable: true
        oldTokenExpiry:
          description: 'Updates the previous token''s expiration, in seconds.


            If set to 0, the old token will immediately be revoked. Must be between 0 and 86,400 seconds (1 day).


            Defaults to 300 seconds (5 minutes).'
          type: integer
          format: int64
          default: 300
          maximum: 86400
          minimum: 0.0
    AppPortalAccessOut:
      type: object
      properties:
        url:
          type: string
          format: uri
          minLength: 1
          maxLength: 65536
          example: https://app.svix.com/login#key=eyJhcHBJZCI6ICJhcHBfMXRSdFl
        token:
          type: string
          example: appsk_kV3ts5tKPNJN4Dl25cMTfUNdmabxbX0O
      required:
      - token
      - url
    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
      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
      required:
      - loc
      - msg
      - type
    StreamTokenExpireIn:
      type: object
      properties:
        expiry:
          description: How many seconds until the old key is expired.
          type: integer
          format: int64
          nullable: true
          maximum: 259200
          minimum: 0
          example: 60
        sessionIds:
          description: 'An optional list of session ids.


            If any session ids are specified, only Stream tokens created with that session id will be expired.'
          type: array
          items:
            type: string
            maxLength: 64
            minLength: 1
            pattern: ^[a-zA-Z0-9@_-]+$
            example: user_1FB8
          maxItems: 1000
    ApiTokenOut:
      type: object
      properties:
        token:
          type: string
        id:
          type: string
        name:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
          nullable: true
        scopes:
          type: array
          items:
            type: string
          nullable: true
      required:
      - createdAt
      - id
      - token
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      required:
      - detail
    HttpErrorOut:
      title: HttpError
      type: object
      properties:
        code:
          type: string
        detail:
          type: string
      required:
      - code
      - detail
  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:


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