Skip to main content
POST
/
v2
/
workflows
Create Workflow
curl --request POST \
  --url https://public.api.serval.com/v2/workflows \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "teamId": "<string>",
  "name": "<string>",
  "description": "<string>",
  "type": "WORKFLOW_TYPE_UNSPECIFIED",
  "executionScope": "WORKFLOW_EXECUTION_SCOPE_UNSPECIFIED",
  "requireFormConfirmation": true,
  "isTemporary": true,
  "content": "<string>",
  "parameters": "<string>"
}'
{
  "data": {
    "id": "<string>",
    "teamId": "<string>",
    "name": "<string>",
    "description": "<string>",
    "type": "WORKFLOW_TYPE_UNSPECIFIED",
    "executionScope": "WORKFLOW_EXECUTION_SCOPE_UNSPECIFIED",
    "requireFormConfirmation": true,
    "isTemporary": true,
    "content": "<string>",
    "parameters": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
teamId
string

The ID of the team.

name
string

The name of the workflow.

description
string

A description of the workflow.

type
enum<string>

The type of the workflow.

Available options:
WORKFLOW_TYPE_UNSPECIFIED,
EXECUTABLE,
GUIDANCE
executionScope
enum<string>

The execution scope of the workflow.

Available options:
WORKFLOW_EXECUTION_SCOPE_UNSPECIFIED,
TEAM_PRIVATE,
TEAM_PUBLIC
requireFormConfirmation
boolean | null

Whether the workflow requires form confirmation (optional).

isTemporary
boolean | null

Whether the workflow is temporary (optional).

content
string | null

The content/code of the workflow (optional).

parameters
string | null

The parameters schema of the workflow (JSON, optional).

Response

Success

data
object

The created workflow.

I