JavaScript SDK: swarmhit.pendingComments.approve(pendingCommentId, params?)
Approve a draft (optionally replacing its text) so the campaign posts it on its next run. An unknown id is a 400 with code: warning-pending-comment-not-found, and a draft that is no longer pending a 400 with code: warning-pending-comment-decided.
Authorization
bearerAuth AuthorizationBearer <token>
An API key created on the Access tokens page.
In: header
Path Parameters
id*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/pending-comments/string/approve" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "id": "string", "campaignId": "string", "campaignLeadId": "string", "leadId": "string", "stepId": "string", "status": "pending", "postUrl": "string", "postText": "string", "prompt": "string", "comment": "string", "firstName": "string", "lastName": "string", "headline": "string", "profileUrl": "string", "publicIdentifier": "string", "decidedAt": "2019-08-24T14:15:22Z", "postedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}