curl --request POST \
--url https://api.hubapi.com/comments/v3/comments \
--header 'Content-Type: application/json' \
--data '
{
"comment": "This is a test blog comment",
"contentId": "6513512292",
"collectionId": "6513512292",
"contentTitle": "This is a test blog title",
"userEmail": "tester@gmail.com",
"userName": "tester",
"contentAuthorEmail": "author@example.com",
"contentAuthorName": "Blog Author",
"contentPermalink": "https://example.com/blog-post"
}
'{
"id": 409700798,
"portalId": 62515,
"contentId": 6513512292,
"contentTitle": "This is a test blog title",
"contentPermalink": null,
"collectionId": 6513512292,
"createdAt": 1550599262439,
"deletedAt": 0,
"userName": "tester",
"firstName": "tester",
"lastName": "",
"userEmail": "tester@gmail.com",
"comment": "This is a test blog comment",
"userUrl": "",
"state": "PENDING_AKISMET",
"userIp": "216.107.205.146",
"userReferrer": "https://tools.hubteam.com/api/post/api.hubapi.com%2Fcomments%2Fv3%2Fcomments%3F",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36",
"contentAuthorEmail": null,
"contentAuthorName": null,
"contentCreatedAt": 0,
"threadId": "0001.0000.0000.0000.0000.0000.0000.0000.0000.0000",
"replyingTo": null,
"parentId": 0,
"legacyId": 0,
"extraContext": null,
"parent": null
}Create a new comment. This API is considered content agnostic, meaning it may record data for more than a single type of object (a blog post or a landing page, etc.) Due to this difference, the API requires additional fields that may seem redundant if the API were only concerned with a single type.
curl --request POST \
--url https://api.hubapi.com/comments/v3/comments \
--header 'Content-Type: application/json' \
--data '
{
"comment": "This is a test blog comment",
"contentId": "6513512292",
"collectionId": "6513512292",
"contentTitle": "This is a test blog title",
"userEmail": "tester@gmail.com",
"userName": "tester",
"contentAuthorEmail": "author@example.com",
"contentAuthorName": "Blog Author",
"contentPermalink": "https://example.com/blog-post"
}
'{
"id": 409700798,
"portalId": 62515,
"contentId": 6513512292,
"contentTitle": "This is a test blog title",
"contentPermalink": null,
"collectionId": 6513512292,
"createdAt": 1550599262439,
"deletedAt": 0,
"userName": "tester",
"firstName": "tester",
"lastName": "",
"userEmail": "tester@gmail.com",
"comment": "This is a test blog comment",
"userUrl": "",
"state": "PENDING_AKISMET",
"userIp": "216.107.205.146",
"userReferrer": "https://tools.hubteam.com/api/post/api.hubapi.com%2Fcomments%2Fv3%2Fcomments%3F",
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36",
"contentAuthorEmail": null,
"contentAuthorName": null,
"contentCreatedAt": 0,
"threadId": "0001.0000.0000.0000.0000.0000.0000.0000.0000.0000",
"replyingTo": null,
"parentId": 0,
"legacyId": 0,
"extraContext": null,
"parent": null
}Scope requirements
The full text of the comment
The id of the parent blog post
The ID of the blog that the post is a part of
The email address of the blog post author
The name of the blog post author
URL to the blog post
Title of the blog post
The email address of the comment author
The name of the comment author
The homepage of the comment author
Comment created.
The unique id of the comment
The id of the parent blog post
Unix timestamp when the comment was made
The name of the person submitting the comment
The email address of the user submitting the comment
The URL the comment was submitted from
The IP address of the person submitting the comment
The user agent of the commenter's browser
The web site of the user submitting the comment
The full text of the comment
State of the comment; approved, rejected, etc.
Was this page helpful?