---
title: "Creates a signed embed token with locked-in filters."
method: POST
path: "/v1/accounts/{accountSid}/embeds/token"
tags: ["Embeds"]
---

# Creates a signed embed token with locked-in filters.

`POST /v1/accounts/{accountSid}/embeds/token`

## Request

- Base URL: `https://api.apitraffic.io`
- URL: `https://api.apitraffic.io/v1/accounts/{accountSid}/embeds/token`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apitraffic/apis/apitraffic-api-documentation/docs/v1/accounts/:accountSid/embeds/token/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `accountSid` string, required: accountSid

## Request body

- Model23
  - `view` 'request-log': The type of embed view.
  - `bucketSid` string, required: The bucket to scope the embed to.
  - `filters` Filters: Filters locked into the embed token.
    - `environmentSid` string, nullable: Environment to filter by.
    - `criteria` string, nullable: Search criteria string (same format as the request log API).
    - `streamViewSid` string, nullable: Stream view to use for filtering.
  - `ttl` integer: Token time-to-live in seconds (min 60, max 86400).
  - `theme` 'light' | 'dark' | 'auto': Theme preference for the embed.

## Response `200`

Successful

- Embed20Token20Response (unresolved $ref)

## Other responses

- `400`: Bad Request

---

[API](https://skmtc.dev/apitraffic/apis/apitraffic-api-documentation.md) - [All operations](https://skmtc.dev/apitraffic/apis/apitraffic-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/apitraffic/apis/apitraffic-api-documentation/revisions/b2a22a9b5c98?raw)
