JavaScript SDK: swarmhit.pendingVoiceNotes.approve(pendingVoiceNoteId)
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.
Authorization
bearerAuth An API key created on the Access tokens page.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/pending-voice-notes/string/approve"{ "data": { "id": "string", "campaignId": "string", "campaignLeadId": "string", "leadId": "string", "stepId": "string", "variantId": "string", "status": "pending", "script": "string", "voiceId": "string", "voiceName": "string", "audioUrl": "string", "audioMimeType": "string", "durationMs": 0, "firstName": "string", "lastName": "string", "headline": "string", "profileUrl": "string", "publicIdentifier": "string", "decidedAt": "2019-08-24T14:15:22Z", "sentAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}Approve a comment draft POST
**JavaScript SDK:** [`swarmhit.pendingComments.approve(pendingCommentId, params?)`](/smart-api/sdk/methods#pendingComments) 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`.
Edit a comment draft PATCH
**JavaScript SDK:** [`swarmhit.pendingComments.update(pendingCommentId, params)`](/smart-api/sdk/methods#pendingComments) 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`.