---
title: "Create a JWT token to clear the data on the stream using the data plane API."
method: POST
path: "/streams/{id}/clear/token"
tags: ["Data Plane Tokens"]
---

# Create a JWT token to clear the data on the stream using the data plane API.

`POST /streams/{id}/clear/token`

## Request

- Base URL: `https://replace-with-account.api.decodable.co/v1alpha2`
- URL: `https://replace-with-account.api.decodable.co/v1alpha2/streams/{id}/clear/token`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/decodable/apis/decodable-control-plane/docs/streams/:id/clear/token/post.ts> (a function with typed inputs; its response is checked against the schema)

Requires permission matching: `preview:write:default.<name>`.

## Response `200`

A request and token issued by the control plane API for use with the data plane API.

- object
  - `token` string, required: A JWT token issued by the control plane API permitting a specific request to the data plane.
  - `data_plane_request` string: A stringified json request body for the data plane API which is permitted and signed by the associated JWT token. It must be sent verbatim (including whitespace) in order to match the token signature.

## Other responses

- `403`: Access denied: requesting user lacks a required permission.
- `404`: The requested resource does not exist.
- `default`: An error has occurred.

---

[API](https://skmtc.dev/decodable/apis/decodable-control-plane.md) - [All operations](https://skmtc.dev/decodable/apis/decodable-control-plane/llms.txt) - [OpenAPI document](https://skmtc.dev/decodable/apis/decodable-control-plane/revisions/9718a3019da8?raw)
