JavaScript SDK: swarmhit.pendingComments.update(pendingCommentId, params)
Replace the draft comment text without approving it. 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 An API key created on the Access tokens page.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X PATCH "https://example.com/pending-comments/string" \ -H "Content-Type: application/json" \ -d '{ "text": "string" }'{ "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" }}Approve a voice note POST
**JavaScript SDK:** [`swarmhit.pendingVoiceNotes.approve(pendingVoiceNoteId)`](/smart-api/sdk/methods#pendingVoiceNotes) Approve a generated note so the campaign sends it on its next run. The audio is sent as it stands, so to change the wording call `regeneratePendingVoiceNote` first. An unknown id is a 400 with `code: warning-pending-voice-note-not-found`, and a note that is no longer `pending` a 400 with `code: warning-pending-voice-note-decided`.
Get a comment draft GET
**JavaScript SDK:** [`swarmhit.pendingComments.get(pendingCommentId)`](/smart-api/sdk/methods#pendingComments)