Comments

Create mass comments

Add several comments to campaign leads in a single request.

When to use. Create many comments at once instead of calling Create comment repeatedly. Each item is validated and stored independently, so one invalid item does not stop the others from being created.

Parameters. Send an array of comment objects. Each object needs creator_user_id, campaign_lead_id and body, and the referenced user and campaign lead must already exist.

Returns. { "comments": [ ... ] } with one result per submitted item. Each result carries a success field: true when the comment was created, returned alongside its id and created_at, or a message explaining why the item was rejected.

Example.

[
  {
    "creator_user_id": "100",
    "campaign_lead_id": "1234",
    "body": "first comment"
  },
  {
    "creator_user_id": "100",
    "campaign_lead_id": "1235",
    "body": "second comment"
  }
]
post/{sub_domain}/api/comments/mass-comments

Request

  • Base URL
    https://api.commpeak.com/dialer
  • URL
    https://api.commpeak.com/dialer/{sub_domain}/api/comments/mass-comments
  • Auth
    API key in header Authorization

Path parameters

sub_domainstring required

Dialer Name (subdomain)

Request body

creator_user_idstring required

ID of the user creating the comment.

campaign_lead_idstring required

ID of the campaign lead the comment relates to.

bodystring required

The comment's text.

Response

Successful Response

total_commentsinteger nullable

Total number of comments in the response.

Example response

{
  "comments": [
    {
      "body": "I should be the one to call back to this customer",
      "campaign_lead_id": 257456,
      "created_at": "2016-12-07 11:15:02",
      "creator_user_id": 126,
      "id": 33923,
      "lead_id": 171287,
      "original_identifier": "500040",
      "username": "demo"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.