List workflows
const url = 'https://safe-api.safetyradar.com/v2/workflows?flowType=assessment&q=Safety&page=1&limit=50';const options = { method: 'GET', headers: {'x-team': 'my-team-slug', Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://safe-api.safetyradar.com/v2/workflows?flowType=assessment&q=Safety&page=1&limit=50' \ --header 'Authorization: Bearer <token>' \ --header 'x-team: my-team-slug'List all active workflow definitions for a team. Only returns the active version of each workflow.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Filter by flow type (e.g., ‘assessment’, ‘form_submission’)
Example
assessmentFilter by flow type (e.g., ‘assessment’, ‘form_submission’)
Search workflows by name
Example
SafetySearch workflows by name
Page number, starting at 1 (default: 1)
Example
1Page number, starting at 1 (default: 1)
Results per page (default: 50, max: 1000). A larger value is refused with a 400 validation_error; it is not clamped.
Example
50Results per page (default: 50, max: 1000). A larger value is refused with a 400 validation_error; it is not clamped.
Header Parameters
Section titled “Header Parameters”Deprecated — accepted but ignored; the v2 API is org-scoped.
Example
my-team-slugDeprecated — accepted but ignored; the v2 API is org-scoped.
Responses
Section titled “Responses”List of workflows
object
object
object
object
Examplegenerated
{ "data": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "organizationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "teamId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "flowType": "example", "name": "example", "version": 1, "isActive": true, "createdById": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "createdAt": "example", "updatedAt": "example" } ], "meta": { "pagination": { "page": 1, "limit": 1, "total": 1, "totalPages": 1, "hasNext": true, "hasPrev": true } }}Invalid request: a parameter or the body failed validation (validation_error), or the body is not valid JSON (invalid_json)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Unauthorized
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Rate limit exceeded (rate_limit_exceeded)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}Unexpected server error (internal_error)
object
Machine-readable error code
Human-readable error message
Additional error details. For validation_error: issues, a list of { location, path, message } (location is query, param, header or json).
object
Example
{ "code": "validation_error", "message": "Request validation failed"}
