Back to reference

API Reference

Update campaign run messages

Saves edited messages for one prospect's workflow run while it is waiting for approval. The request may update selected items, but it does not approve, discard, continue, stop, or duplicate the run. Send final rendered text only: unresolved template variables such as `{{ First_name }}` are rejected by approval validation. Use `message` for direct-message, InMail, and comment text, `subject` for InMail or email subject lines, and `requestMessage` for connection-request invite notes. Message and comment text preserves `\n` line breaks; for comment content, an empty or whitespace-only `message` skips the comment step after approval.

PATCH/v1/accounts/{accountGroupId}/campaigns/{campaignId}/workflow-runs/{workflowInstanceId}/messages

Messages only

This endpoint saves edited pending messages and keeps the workflow run waiting for approval. It does not send, approve, discard, continue, or stop the run.

Integration notes

Required API permission

campaigns:write.

Prerequisites

integration_api_key, account_group_access.

Idempotency

not supported; check the current resource state before retrying this request.

Parameters

accountGroupIdPath

Type: string

Account group ID that scopes the request.

Required

campaignIdPath

Type: string

Campaign ID that identifies the campaign to read or mutate.

Required

workflowInstanceIdPath

Type: string

Unique identifier for the workflow instance.

Required

Request body

Required

Optional

Content types

application/json

Schema

UpdateCampaignRunMessagesBody

Fields

contentItems

Type: array<object>

Message updates to save while keeping the workflow run waiting for approval.

Required

Responses

200

Campaign run messages updated; workflow run is still waiting for approval

Schema: CampaignContentApprovalSuccessResponse

400

Request validation failed

Schema: ValidationErrorResponse

401

Invalid or missing API key

Schema: ErrorResponse

403

Missing required permission

Schema: ErrorResponse

404

Resource not found

Schema: ErrorResponse

409

Conflict — resource is in a state that prevents this operation

Schema: ErrorResponse

429

Rate limit exceeded

Schema: ErrorResponse

500

Internal server error

Schema: ErrorResponse

502

Upstream service error

Schema: ErrorResponse

Response examples

200 Example JSONCampaignContentApprovalSuccessResponse
{
    "success": true,
    "data": {
        "workflowInstanceId": "507f1f77bcf86cd799439011",
        "campaignId": "507f1f77bcf86cd799439011",
        "campaignName": "Avery Stone",
        "linkedListId": "507f1f77bcf86cd799439011",
        "leadId": "507f1f77bcf86cd799439011",
        "personId": "507f1f77bcf86cd799439011",
        "firstName": "Avery Stone",
        "lastName": "Avery Stone",
        "title": "string",
        "companyName": "Avery Stone",
        "photoUrl": "https://example.com/resource",
        "linkedinUrl": "https://example.com/resource",
        "latestStep": "string",
        "pendingContent": [
            {
                "nodeId": "507f1f77bcf86cd799439011",
                "nodeSubType": "string",
                "contentType": "direct_message",
                "subject": "Quick follow-up",
                "message": "Thanks for the context. I can send over details this afternoon.",
                "requestMessage": "Thanks for the context. I can send over details this afternoon.",
                "generatedAt": "string",
                "previousStepSubType": "string",
                "workflowPath": [
                    {
                        "conditionSubType": "string",
                        "branch": "string"
                    }
                ],
                "reviewContext": {
                    "displayLabel": "string",
                    "sequence": 25,
                    "contentSequence": 25,
                    "pathLabel": "string",
                    "previousStepSubType": "string"
                },
                "postLink": "string",
                "postSummary": "string"
            }
        ],
        "workflowReview": {
            "nodes": [
                {
                    "nodeId": "507f1f77bcf86cd799439011",
                    "nodeSubType": "string",
                    "nodeType": "TRIGGER",
                    "displayLabel": "string",
                    "sequence": 25,
                    "contentSequence": 25,
                    "isContentStep": true
                }
            ],
            "edges": [
                {
                    "sourceNodeId": "507f1f77bcf86cd799439011",
                    "targetNodeId": "507f1f77bcf86cd799439011",
                    "branch": "true"
                }
            ]
        }
    },
    "error": null,
    "traceId": "507f1f77bcf86cd799439011"
}
400 Example JSONValidationErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "VALIDATION_ERROR",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
401 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
403 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
404 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
409 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
429 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
500 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
502 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}