RankSharkDocs
Workflows

Set a campaign's workflow

RankShark EnhanceScopecampaigns:write

PUT
/api/v1/campaigns/{id}/flow

Validated against the campaign's tasks[] and saved. A linear flow (traffic sources, each followed by its own steps) is stored as classic tasks.

Authorization

headerAuthorizationBearer <token>

An Enhance API key (rsen_…) or an OAuth 2.1 access token, as "Authorization: Bearer …".

Path Parameters

id*string

Campaign id

Request Body

application/json
  1. body

A workflow (GET /api/v1/schema/flow documents nodes, edges and subflows; mode nodes reference tasks[] by index)

nodes*array<>
edges*array<>
subflows?
[key: string]?any

Response Body

Saved

application/json
  1. response
id?string
saved?boolean
storedAs?string
Value in"flow""classic"
taskCount?integer
warnings?array<string>
summary?
Example Request
curl -X PUT 'https://panel.rankshark.io/api/v1/campaigns/string/flow' \  -H 'Content-Type: application/json' \  -d '{  "nodes": [    {}  ],  "edges": [    {}  ]}'
Example Response
{  "id": "string",  "saved": true,  "storedAs": "flow",  "taskCount": 0,  "warnings": [    "string"  ],  "summary": {}}