Streams API
Manage event streams and ingest tokens.
Create Stream
Create a new event stream for an organization.
Endpoint
POST /api/streams
Authentication
Requires a Personal Access Token with streams:create
ability.
Request Format
Headers
Header | Value | Required |
---|---|---|
Authorization |
Bearer <USER_PAT> |
✅ |
Content-Type |
application/json |
✅ |
Body
{
"name": "My Stream"
}
Field | Type | Description | Required |
---|---|---|---|
name |
string | Human-readable stream name | ✅ |
Response Format
The create stream endpoint returns different responses based on the request outcome.
Issue Ingest Token
Generate a new ingest token for an existing stream.
Endpoint
POST /api/streams/{stream}/ingest-token
Authentication
Requires a Personal Access Token with streams:issue-token
ability.
Request Format
Headers
Header | Value | Required |
---|---|---|
Authorization |
Bearer <USER_PAT> |
✅ |
Content-Type |
application/json |
✅ |
Body
{
"ttl": 15552000
}
Field | Type | Description | Required |
---|---|---|---|
ttl |
integer | Token lifetime in seconds (default: 180 days) | ❌ |
Response Format
Success Response
HTTP/1.1 200 OK
Content-Type: application/json
{
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"expires_at": "2025-07-01T00:00:00Z"
}