For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
  • API Reference
      • GETList workflows
      • POSTCreate a workflow
      • POSTFilter workflows
      • GETGet latest workflow draft
      • DELDelete workflow
      • PATCHUpdate latest workflow draft
      • GETList workflow versions
      • POSTCreate workflow version
      • GETGet workflow version
      • PATCHUpdate workflow version
      • POSTDeploy workflow version
      • DELUndeploy workflow
      • POSTValidate workflow
  • Reference
    • Filters API Reference
LogoLogo
DiscordPlatform
API ReferenceWorkflows

Get latest workflow draft

GET
https://api.respan.ai/api/workflows/:workflow_id/
GET
/api/workflows/:workflow_id/
$curl https://api.respan.ai/api/workflows/workflow_id/ \
> -H "Authorization: Bearer sk_live_xxxxx" \
> -H "Content-Type: application/json"
1{
2 "id": "a3f1c9d2-7b4e-4f8a-9d3e-2b5f6c7d8e9f",
3 "workflow_id": "wf_20240615_001",
4 "version": 3,
5 "name": "Customer Support Ticket Automation",
6 "description": "Automates triage and routing of incoming support tickets.",
7 "type": "automations",
8 "trigger_event_type": "ticket_created",
9 "tasks": [
10 {
11 "task_id": "task_001",
12 "name": "Classify Ticket",
13 "type": "classification",
14 "parameters": {
15 "model": "ticket_classifier_v2",
16 "confidence_threshold": 0.85
17 }
18 }
19 ],
20 "graph": {
21 "nodes": [
22 {
23 "id": "task_001",
24 "type": "classification"
25 }
26 ],
27 "edges": []
28 },
29 "workflow_activities": [
30 {
31 "timestamp": "2024-06-10T14:22:00Z",
32 "feature_type": "task",
33 "object_id": "task_001",
34 "activity_type": "update",
35 "message": "Updated classification model to ticket_classifier_v2"
36 }
37 ],
38 "is_enabled": true,
39 "is_starred": false,
40 "is_read_only": false,
41 "has_async_steps": true,
42 "created_at": "2024-05-01T08:00:00Z",
43 "updated_at": "2024-06-10T14:22:00Z",
44 "deployed_version": 2
45}

Get the latest editable (draft) version of a workflow.

Was this page helpful?
Previous

Delete workflow

Next
Built with

Path parameters

workflow_idstringRequired
Workflow ID.

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

Response

Successful response for Get workflow
idstring
workflow_idstring
versioninteger
namestring
descriptionstring or null
typeenum
Allowed values:
trigger_event_typestring or null
taskslist of maps from strings to any
graphmap from strings to any or null
workflow_activitieslist of objects
is_enabledboolean
is_starredboolean
is_read_onlyboolean
has_async_stepsboolean
created_atdatetime
updated_atdatetime
deployed_versioninteger or null

Errors

401
Unauthorized Error
404
Not Found Error