> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.heyreach.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.heyreach.io/_mcp/server.

# GetCampaignSequenceV2

GET https://api//api/public/campaign/GetCampaignSequenceV2?campaignId=<long>

## Retrieves the current sequence (workflow) of a campaign with every message version in full - text and voice alike.

The v2 version of **GetCampaignSequence**, and the read to use for a campaign with voice notes. A `MESSAGE` node's payload carries `messageVersions`: every version of the step, voice versions included, each with the length and transcript of the recording behind it.

The returned object can be sent as-is in the `sequence` field of **CreateV2** and **UpdateSequenceV2**. Do not send it to the v1 **Create** or **UpdateSequence**: they refuse a non-empty `messageVersions` with 400. Returns an empty 200 response if the campaign has no sequence.

### Query Parameters

- **campaignId** _(long, required)_: The campaign whose sequence to retrieve.

### What the response contains

The node and message version fields are described on **UpdateSequenceV2**. Every node type other than `MESSAGE` returns the same payload as **GetCampaignSequence**, including its rules for the `SEND_LEAD_TO_*` external lead flags.

- A STATIC voice version that holds a recording reports the recording's `durationMs` and `transcript`. Its `staticClipTranscript` is always the recording's own transcript, and its `importedTranscript` is `null`.
    
- A STATIC version without a recording has `staticClipId: null` and `needsRecording: true` - for example a step that arrived in a shared sequence, which never carries audio. It shows the transcripts it arrived with in `staticClipTranscript` and `importedTranscript`. Give it a recording before you send the sequence back (see **UpdateSequenceV2**).
    
- A version whose `staticClipId` is not a recording in your workspace comes back with that id and with `durationMs`, `transcript` and `staticClipTranscript` set to `null`. The read still answers 200, but sending that version back is rejected with 400 `STATIC_CLIP_NOT_FOUND`.
    
- `message` on a STATIC version is always empty (`""` or `null`).
    
- TEXT and DYNAMIC versions return `staticClipId`, `durationMs`, `transcript`, `staticClipTranscript` and `importedTranscript` as `null`, and `needsRecording` as `false`.

### Errors

- **404** `CAMPAIGN_NOT_FOUND`: no campaign with this id in the workspace.
- **404** `CAMPAIGN_API_NOT_ENABLED`: the campaign API is not enabled for your account.

Reference: https://docs.heyreach.io/hey-reach-api/campaigns/get-campaign-sequence-v-2

## Request

### Query parameters

- `campaignId` (long, required) — The campaign whose sequence to retrieve.

### Headers

- `X-API-KEY` (string, optional) — API key header using this scheme. Example: "X-API-KEY: \{API\_KEY}"

## Response

### 200

OK. The body is empty when the campaign has no sequence.

- `nodeType` (enum, required) — The action or check this node performs. Required on every node.
  - Allowed values: `CONNECTION_REQUEST`, `MESSAGE`, `INMAIL`, `VIEW_PROFILE`, `FOLLOW`, `LIKE_POST`, `END`, `CHECK_IS_CONNECTION`, `CHECK_IS_OPEN_PROFILE`, `SEND_LEAD_TO_INSTANTLY`, `FIND_EMAIL`, `SEND_LEAD_TO_SMARTLEAD`, `SEND_LEAD_TO_BISON`
- `actionDelay` (integer, optional, default: 0) — The wait before this node runs, in `actionDelayUnit`. A node after an action step needs at least 3 hours - see **UpdateSequenceV2**.
- `actionDelayUnit` (enum, optional, default: HOUR) — Unit of `actionDelay`.
  - Allowed values: `HOUR`, `DAY`
- `payload` (PublicSequenceNodeDtoV2Payload, optional) — Node-specific configuration. A `MESSAGE` node uses the v2 message payload; every other node type uses its v1 payload (see **UpdateSequence**). `VIEW_PROFILE`, `FOLLOW`, `FIND_EMAIL`, `CHECK_IS_CONNECTION`, `CHECK_IS_OPEN_PROFILE` and `END` have no payload.
- `conditionalNode` (PublicSequenceNodeDtoV2, optional) — The next node when the branching condition is `true`. On `MESSAGE` and `INMAIL`, the `END` node taken when the lead replies.
- `unconditionalNode` (PublicSequenceNodeDtoV2, optional) — The next node to follow unconditionally, or when a branching condition is `false`. Required for every node except `END`.
- `externalReference` (string, optional, nullable) — Your own tracking ID for this step. Left out of responses when not set.

## Errors

### 404 Get Campaign Sequence V2campaigns Request Not Found Error

Not Found. `CAMPAIGN_NOT_FOUND`: no campaign with this id in the workspace. `CAMPAIGN_API_NOT_ENABLED`: the campaign API is not enabled for your account.

- `errorMessage` (string, required)
- `errorCode` (enum, optional)
  - Allowed values: `ELEVENLABS_VOICE_NOT_FOUND`, `ELEVENLABS_VOICE_ACCESS_DENIED`

## Types

### PublicSequenceNodeDtoV2Payload

Node-specific configuration. A `MESSAGE` node uses the v2 message payload; every other node type uses its v1 payload (see **UpdateSequence**). `VIEW_PROFILE`, `FOLLOW`, `FIND_EMAIL`, `CHECK_IS_CONNECTION`, `CHECK_IS_OPEN_PROFILE` and `END` have no payload.

- Public Message Payload V2: PublicMessagePayloadV2
- map from string to any

### PublicSequenceNodeDtoV2

One node of a campaign sequence on the v2 endpoints (**GetCampaignSequenceV2**, **UpdateSequenceV2**, **CreateV2**). Nodes form a tree through `conditionalNode` and `unconditionalNode`. The START node is implicit - the root is your first action node - and every path ends with an `END` node.

- `nodeType` (enum, required) — The action or check this node performs. Required on every node.
  - Allowed values: `CONNECTION_REQUEST`, `MESSAGE`, `INMAIL`, `VIEW_PROFILE`, `FOLLOW`, `LIKE_POST`, `END`, `CHECK_IS_CONNECTION`, `CHECK_IS_OPEN_PROFILE`, `SEND_LEAD_TO_INSTANTLY`, `FIND_EMAIL`, `SEND_LEAD_TO_SMARTLEAD`, `SEND_LEAD_TO_BISON`
- `actionDelay` (integer, optional, default: 0) — The wait before this node runs, in `actionDelayUnit`. A node after an action step needs at least 3 hours - see **UpdateSequenceV2**.
- `actionDelayUnit` (enum, optional, default: HOUR) — Unit of `actionDelay`.
  - Allowed values: `HOUR`, `DAY`
- `payload` (PublicSequenceNodeDtoV2Payload, optional) — Node-specific configuration. A `MESSAGE` node uses the v2 message payload; every other node type uses its v1 payload (see **UpdateSequence**). `VIEW_PROFILE`, `FOLLOW`, `FIND_EMAIL`, `CHECK_IS_CONNECTION`, `CHECK_IS_OPEN_PROFILE` and `END` have no payload.
- `conditionalNode` (PublicSequenceNodeDtoV2, optional) — The next node when the branching condition is `true`. On `MESSAGE` and `INMAIL`, the `END` node taken when the lead replies.
- `unconditionalNode` (PublicSequenceNodeDtoV2, optional) — The next node to follow unconditionally, or when a branching condition is `false`. Required for every node except `END`.
- `externalReference` (string, optional, nullable) — Your own tracking ID for this step. Left out of responses when not set.

### PublicMessagePayloadV2

The payload of a `MESSAGE` node on the v2 endpoints.

- `messageVersions` (list of PublicMessageVersion, required) — One entry per version of the step; one version is picked at random for each lead. At least one is required. On write the list replaces what is stored: versions you leave out are deleted.
- `fallbackMessage` (string, optional, nullable) — Plain text sent instead of a version whose text uses a variable the lead has no value for, and instead of a voice version whose voice note cannot be produced. Required when any version is VOICE. May use only `{FIRST_NAME}`, `{LAST_NAME}`, `{MY_FIRST_NAME}` and `{MY_LAST_NAME}`. Max 8000 characters.

### PublicMessageVersion

One version of a `MESSAGE` step: a text message, an AI voice note (VOICE + DYNAMIC) or an uploaded recording (VOICE + STATIC).

- `message` (string, optional, nullable) — TEXT: the message text, max 8000 characters. DYNAMIC: the spoken script, max 800 characters and at least 3 spoken words. STATIC: must be empty.
- `type` (enum, optional, default: TEXT)
  - Allowed values: `TEXT`, `VOICE`
- `voiceMode` (enum, optional, default: DYNAMIC) — Used only when `type` is `VOICE`.
  - Allowed values: `DYNAMIC`, `STATIC`
- `messageId` (string, optional, nullable) — The version's id. Send back the id GetCampaignSequenceV2 returned when you edit a sequence; leave it out only for a new version. Unique within a step; `FALLBACK`, `MANUAL` and `unknown` are reserved.
- `staticClipId` (long, optional, nullable) — STATIC only, and required there: the `clipId` returned by **UploadStaticClip**. Refused on TEXT and DYNAMIC versions.
- `durationMs` (integer, optional, nullable) — Length of the version's recording in milliseconds. Ignored on write.
- `transcript` (string, optional, nullable) — Transcript of the version's recording. Null is normal and never blocks sending. Ignored on write.
- `staticClipTranscript` (string, optional, nullable) — Read-only on a STATIC version: always the recording's own transcript, and a value you send is ignored. Must be empty on TEXT and DYNAMIC versions.
- `importedTranscript` (string, optional, nullable) — Read-only on a STATIC version: the script a shared step arrived with, shown only while it has no recording, and ignored on write. Must be empty on TEXT and DYNAMIC versions.
- `needsRecording` (boolean, optional) — True on a STATIC version that has no recording. Give such a version a `staticClipId` before you send it back, or the write is rejected with 400. The value you send is ignored.

## Examples

**Response**

```json
{
  "nodeType": "CONNECTION_REQUEST",
  "actionDelay": 0,
  "actionDelayUnit": "DAY",
  "payload": {
    "fallbackMessage": "Hi there, I'd love to connect!",
    "messageVersions": [
      {}
    ]
  },
  "externalReference": "externalReference"
}
```

**SDK Code**

```python
import requests

url = "https://api//api/public/campaign/GetCampaignSequenceV2"

querystring = {"campaignId":"<long>"}

headers = {"X-API-KEY": "{{HR_API_KEY}}"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api//api/public/campaign/GetCampaignSequenceV2?campaignId=%3Clong%3E';
const options = {method: 'GET', headers: {'X-API-KEY': '{{HR_API_KEY}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api//api/public/campaign/GetCampaignSequenceV2?campaignId=%3Clong%3E"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-KEY", "{{HR_API_KEY}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api//api/public/campaign/GetCampaignSequenceV2?campaignId=%3Clong%3E")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '{{HR_API_KEY}}'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api//api/public/campaign/GetCampaignSequenceV2?campaignId=%3Clong%3E")
  .header("X-API-KEY", "{{HR_API_KEY}}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api//api/public/campaign/GetCampaignSequenceV2?campaignId=%3Clong%3E', [
  'headers' => [
    'X-API-KEY' => '{{HR_API_KEY}}',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api//api/public/campaign/GetCampaignSequenceV2?campaignId=%3Clong%3E");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-KEY", "{{HR_API_KEY}}");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-KEY": "{{HR_API_KEY}}"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api//api/public/campaign/GetCampaignSequenceV2?campaignId=%3Clong%3E")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```