Back to reference

API Reference

Approve pending campaign content (legacy)

Legacy route that atomically approves one prospect's campaign-scoped workflow run. When `contentItems` is provided, it must include every unapproved generated item for that run exactly once; partial batches are rejected without continuing the run. New clients should call the workflow-run messages endpoint first, then approve the workflow run.

POST/v1/accounts/{accountGroupId}/campaigns/{campaignId}/workflow-instances/{workflowInstanceId}/approve

Legacy route

This legacy route can still update contentItems while approving. New clients should PATCH workflow-run messages first, then approve the workflow run with an empty body.

Editable fields

Use pendingContent[].nodeId as contentItems[].nodeId. Use message for direct-message, InMail, and comment text; subject for InMail or email subjects; and requestMessage for connection-request invite notes.

Line breaks and comments

Messages and comments preserve JSON \n line breaks. For comment approvals, an empty or whitespace-only message skips the comment while still clearing the approval gate.

Integration notes

Required API permission

campaigns:write.

Prerequisites

integration_api_key, account_group_access.

Idempotency

send a stable Idempotency-Key header when 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

Idempotency-KeyHeader

Type: string

Request field for idempotency key.

Required

Request body

Required

Optional

Content types

application/json

Schema

ApproveCampaignPendingContentBody

Fields

contentItems

Type: array<object>

Legacy inline message updates to apply before approving and continuing the workflow run.

Optional

Responses

200

Campaign run approved and workflow status refreshed

Schema: CampaignApprovalResultSuccessResponse

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 JSONCampaignApprovalResultSuccessResponse
{
    "success": true,
    "data": {
        "action": "approved",
        "workflowInstanceId": "507f1f77bcf86cd799439011",
        "leadStatus": {
            "leadId": "507f1f77bcf86cd799439011",
            "workflowStatus": "pending",
            "workflowInstanceId": "507f1f77bcf86cd799439011",
            "latestStep": "string",
            "workflowStopReason": "CONTENT_DISCARDED",
            "hasPendingApproval": 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"
}