Download OpenAPI specification:
FlowState is a premier sports team asset generation platform built for scale. This API enables Data to Content Automation, allowing you to programmatically generate professional, broadcast-quality graphics from your dynamic data sources.
To get started with the FlowState API, contact your account manager to receive your API credentials. API key management via the dashboard is coming soon.
All public API endpoints require authentication via the x-api-key header in your HTTP request.
GET /api/v1/templates HTTP/1.1
Host: flowstate.bot
x-api-key: your_api_key_here
FlowState is designed for chaining automated workflows:
Handles the OAuth callback from Google.
On success, redirects to / with session cookie set.
On failure, redirects to /auth/login-failed.
| code required | string OAuth authorization code from Google |
| state | string OAuth state parameter |
Destroys the user session and clears authentication cookies
{- "error": {
- "type": "invalid_request_error",
- "code": "missing_required_parameter",
- "message": "Missing required field 'logo'",
- "param": "logo"
}
}Returns error information when OAuth authentication fails
{- "error": {
- "type": "invalid_request_error",
- "code": "missing_required_parameter",
- "message": "Missing required field 'logo'",
- "param": "logo"
}
}Renders a single PNG asset from uploaded logo and team color.
Process:
| logo required | string <binary> Team logo file (PNG, JPG, GIF, SVG) |
| teamHomeColor required | string^#[0-9A-Fa-f]{6}$ Hex color code (with |
| template required | string Template ID from /api/v1/templates |
{- "error": {
- "type": "invalid_request_error",
- "code": "missing_required_parameter",
- "message": "Missing required field 'logo'",
- "param": "logo"
}
}Returns metadata for all available templates including:
{- "object": "list",
- "data": [
- {
- "id": "angled-logo",
- "name": "Angled Logo",
- "description": "Team logo with angled edge and solid background color",
- "templateFile": "asset_butler_template.html",
- "viewport": {
- "width": 678,
- "height": 720
}, - "screenshot": {
- "selector": ".container",
- "omitBackground": true
}, - "placeholders": [
- {
- "key": "TEAM_FARBE",
- "description": "Team home color (hex)",
- "required": true,
- "type": "color"
}
], - "outputFormat": {
- "type": "png",
- "namingPattern": "{teamName}_Angled.png"
}
}
], - "has_more": false
}Returns all available workflows. A workflow defines a sequence of templates to generate from shared input data (e.g., generate logo, banner, and social media assets from one set of team data).
{- "object": "list",
- "data": [
- {
- "id": "team-asset-package",
- "name": "Team Asset Package",
- "description": "Generate complete asset package for a team",
- "version": "1.0.0",
- "templates": [
- "angled-logo",
- "square-logo",
- "banner"
], - "sharedData": {
- "property1": {
- "type": "text",
- "required": true,
- "description": "string"
}, - "property2": {
- "type": "text",
- "required": true,
- "description": "string"
}
}, - "outputFormat": {
- "zipName": "{{teamName}}_Assets_{{timestamp}}.zip"
}
}
], - "has_more": false
}Returns detailed workflow configuration including field schema for form generation. Use this to build dynamic forms for workflow execution.
| id required | string Example: team-asset-package Workflow ID |
{- "object": "workflow",
- "data": {
- "id": "team-asset-package",
- "name": "Team Asset Package",
- "description": "Generate complete asset package for a team",
- "version": "1.0.0",
- "templates": [
- "angled-logo",
- "square-logo",
- "banner"
], - "sharedData": {
- "property1": {
- "type": "text",
- "required": true,
- "description": "string"
}, - "property2": {
- "type": "text",
- "required": true,
- "description": "string"
}
}, - "outputFormat": {
- "zipName": "{{teamName}}_Assets_{{timestamp}}.zip"
}, - "fieldSchema": [
- {
- "key": "teamName",
- "label": "Team Name",
- "type": "text",
- "required": true,
- "description": "Name of the team"
}
]
}
}Executes a workflow with provided data and generates all assets defined in the workflow. Returns a ZIP archive containing all generated assets organized by template.
Process:
| id required | string Example: team-asset-package Workflow ID |
| property name* additional property | any |
{- "error": {
- "type": "invalid_request_error",
- "code": "missing_required_parameter",
- "message": "Missing required field 'logo'",
- "param": "logo"
}
}Diagnostic endpoint that returns information about the workflows directory, loaded workflows, and any configuration errors. No authentication required.
{- "cwd": "string",
- "workflowsDir": "string",
- "exists": true,
- "files": [
- "string"
], - "loadedWorkflows": 0,
- "workflows": [
- {
- "id": "team-asset-package",
- "name": "Team Asset Package",
- "description": "Generate complete asset package for a team",
- "version": "1.0.0",
- "templates": [
- "angled-logo",
- "square-logo",
- "banner"
], - "sharedData": {
- "property1": {
- "type": "text",
- "required": true,
- "description": "string"
}, - "property2": {
- "type": "text",
- "required": true,
- "description": "string"
}
}, - "outputFormat": {
- "zipName": "{{teamName}}_Assets_{{timestamp}}.zip"
}
}
]
}Initiates a new background render job. Perfect for automation workflows where data is pushed to FlowState to generate a graphic.
| templateId required | string |
| data required | object Key-value pairs matching template placeholders |
{- "templateId": "string",
- "data": { }
}{- "jobId": "string"
}Returns a list of all configured automations for the organization, detailing how incoming data maps to templates.
[- {
- "id": "auto-789",
- "name": "Match Events to Social Graphics",
- "data_source_id": "ds-123",
- "target_type": "template",
- "template_id": "match-score",
- "mappings": {
- "TEAM_HOME_NAME": "$.match.home.name",
- "TEAM_AWAY_NAME": "$.match.away.name"
}
}
]Creates a new automation rule mapping an incoming data source webhook payload to a specific graphic template's placeholders.
| name required | string |
| data_source_id required | string The ID of the source generating the data. |
| target_type required | string Enum: "template" "workflow" |
| template_id | string Required if target_type is 'template'. |
| mappings | object JSONPath rules to map data source fields to template placeholders. |
{- "name": "Match Events to Social Graphics",
- "data_source_id": "string",
- "target_type": "template",
- "template_id": "string",
- "mappings": { }
}Production webhook URL where external systems (like live data providers or custom apps) POST their JSON payloads. This triggers any active automations linked to this data source, automatically generating graphics in the background.
| slug required | string Unique webhook slug generated by FlowState upon Data Source creation. |
The arbitrary JSON payload required by the connected Automations.
{ }Returns a list of all external publishing destinations (e.g., Google Drive, AWS S3, Webhooks) where completed renders are sent.
[- {
- "id": "dest-456",
- "name": "Marketing Google Drive",
- "type": "gdrive",
- "config": { }
}
]Connects a new external destination for automated publishing of generated assets.
| name required | string |
| type required | string Enum: "gdrive" "s3" "webhook" "email" |
| config required | object Destination-specific authentication and configuration settings. |
{- "name": "Marketing Google Drive",
- "type": "gdrive",
- "config": { }
}Creates a new data source (e.g., a webhook receiver or a REST polling config) to ingest external data into FlowState.
| name required | string |
| type required | string Enum: "WEBHOOK" "REST_GET" |
| config | object |
{- "name": "string",
- "type": "WEBHOOK",
- "config": { }
}| name required | string |
| abbreviation | string |
| logo_url | string |
| primary_color | string |
| secondary_color | string |
| club_id | string |
| league_id | string |
| external_id | string |
{- "name": "string",
- "abbreviation": "string",
- "logo_url": "string",
- "primary_color": "string",
- "secondary_color": "string",
- "club_id": "string",
- "league_id": "string",
- "external_id": "string"
}| first_name required | string |
| last_name required | string |
| jersey_number | integer [ 0 .. 999 ] |
| position | string |
| image_url | string |
| team_id required | string <uuid> |
| external_player_id | string |
{- "first_name": "string",
- "last_name": "string",
- "jersey_number": 999,
- "position": "string",
- "image_url": "string",
- "team_id": "810007d0-bec5-486c-b5d1-28fcd8a079ba",
- "external_player_id": "string"
}Import teams or players from CSV. Use entity_type 'players' for player imports.
| csv_content required | string |
| mapping required | object |
| options | object |
| entity_type | string Default: "teams" Enum: "teams" "players" |
{- "csv_content": "string",
- "mapping": { },
- "options": { },
- "entity_type": "teams"
}Processes CSV file with multiple teams and generates all templates for each team. Returns ZIP archive with organized folder structure.
CSV Format:
logoHomePath,teamHomeColor
TeamName1.png,#FF5733
TeamName2.png,#3498DB
Output Structure:
batch_assets.zip
├── TeamName1/
│ ├── Angled Logo.png
│ ├── Square Logo.png
│ └── Banner.png
└── TeamName2/
├── Angled Logo.png
├── Square Logo.png
└── Banner.png
| csvFile required | string <binary> CSV file with team data (logoHomePath, teamHomeColor) |
| logoFiles required | Array of strings <binary> [ items <binary > ] Multiple logo files matching CSV logoHomePath column |
{- "error": {
- "type": "invalid_request_error",
- "code": "missing_required_parameter",
- "message": "Missing required field 'logo'",
- "param": "logo"
}
}DEPRECATED: Use /api/v1/batch-render instead.
This endpoint is kept for backward compatibility.
| csv required | string <binary> CSV file with team data |
| logos required | Array of strings <binary> [ items <binary > ] Multiple logo files |
{- "error": {
- "type": "invalid_request_error",
- "code": "missing_required_parameter",
- "message": "Missing required field 'logo'",
- "param": "logo"
}
}DEPRECATED: Use /api/v1/templates instead.
This endpoint is kept for backward compatibility.
{- "templates": [
- {
- "id": "angled-logo",
- "name": "Angled Logo",
- "description": "Team logo with angled edge and solid background color",
- "templateFile": "asset_butler_template.html",
- "viewport": {
- "width": 678,
- "height": 720
}, - "screenshot": {
- "selector": ".container",
- "omitBackground": true
}, - "placeholders": [
- {
- "key": "TEAM_FARBE",
- "description": "Team home color (hex)",
- "required": true,
- "type": "color"
}
], - "outputFormat": {
- "type": "png",
- "namingPattern": "{teamName}_Angled.png"
}
}
]
}DEPRECATED: Use /api/v1/render instead.
This endpoint is kept for backward compatibility.
| logo required | string <binary> Team logo file (PNG, JPG, GIF, SVG) |
| teamHomeColor required | string^#[0-9A-Fa-f]{6}$ Hex color code (with |
| template required | string Template ID from /api/templates |
{- "error": {
- "type": "invalid_request_error",
- "code": "missing_required_parameter",
- "message": "Missing required field 'logo'",
- "param": "logo"
}
}DEPRECATED: Use /api/v1/batch-render instead.
This endpoint is kept for backward compatibility.
| csv required | string <binary> CSV file with team data |
| logos required | Array of strings <binary> [ items <binary > ] Multiple logo files |
{- "error": {
- "type": "invalid_request_error",
- "code": "missing_required_parameter",
- "message": "Missing required field 'logo'",
- "param": "logo"
}
}