Skip to content

Comments

Comments are short text notes in a thread with a common context.

TermDescription
threadA group of comments.
contextThe Sheep URI that the comments all refer to.
commentThe text snippet, automatically logged against the user and the current date and time.
keyA unique ID for the thread (to allow multiple threads to exist on the same context).

$CONTEXT is shorthand for the URI that we are commenting about. A full URI would look like /api/v1/example/organisation/5fa523e080859e33dc285c7e/threads/.

Create a new thread with no comments. A unique key for the thread is optional.

POST https://sls-api.sheepcrm.com/comments/v2/$CONTEXT/
Authorization: Bearer $API_KEY
Content-Type: application/json
{"title": "So I have a question..."}
HTTP/1.0 201 Created
{
"bucket": "example",
"data": {
"context": {
"display_value": "JW Travel",
"ref": "/example/organisation/5fa523e080859e33dc285c7e/"
},
"key": "c3c0fecd38",
"thread": {
"comments": []
},
"title": "So I have a question..."
},
"uri": "/example/comment/603e35982e77f9de9421d470/"
}

Start a new thread and provide the first comment

Section titled “Start a new thread and provide the first comment”
POST https://sls-api.sheepcrm.com/comments/v2/$CONTEXT/
Authorization: Bearer $API_KEY
Content-Type: application/json
{
"title": "So I have a question...",
"comment": "Do you think these guys like us?"
}
GET https://sls-api.sheepcrm.com/comments/v2/$CONTEXT/
Authorization: Bearer $API_KEY
HTTP/1.0 200 OK
{
"comments": {
"37d91faf3": {
"comments": [],
"title": "pricing query",
"uri": "/example/comment/603e326a535341676d33bb4c/"
},
"8e75026d34": {
"comments": [
{
"comment": "Do you think these guys like us?",
"datetime": "2021-03-02T13:00:21.187000",
"uid": "f7d95f2939",
"user": "/sheepcrm/user/5cab33e1638e5512a16d4a1f/"
}
],
"title": "So I have a question...",
"uri": "/example/comment/603e36e52e77f9de9421d473/"
}
}
}
DELETE https://sls-api.sheepcrm.com/comments/v2/$CONTEXT/thread/{key}/
Authorization: Bearer $API_KEY
HTTP/1.0 200 OK
{
"deleted": true
}
GET https://sls-api.sheepcrm.com/comments/v2/$CONTEXT/thread/{key}/comment/
Authorization: Bearer $API_KEY
HTTP/1.0 200 OK
{
"thread": [
{
"comment": "Do you think these guys like us?",
"datetime": "2023-04-14T15:55:31.454000",
"uid": "bc28e4bdf",
"user": "/sheepcrm/user/.../",
"user_display": "Support User"
},
{
"comment": "Yeah, probably!",
"datetime": "2023-04-14T16:13:11.430000",
"uid": "488d65d531",
"user": "/sheepcrm/user/.../",
"user_display": "Support User"
}
],
"title": "So I have a question...",
"tuid": "537b52d3b4",
"uri": "/example/comment/603e36e52e77f9de9421d473/"
}
ParameterDescription
commentRequired. Text comment.
keyRequired. The thread key.
POST https://sls-api.sheepcrm.com/comments/v2/$CONTEXT/thread/{key}/comment/
Authorization: Bearer $API_KEY
Content-Type: application/json
{"comment": "Why wouldn't they like us?"}
HTTP/1.0 200 OK
{
"comments": {
"comments": [
{
"comment": "Do you think these guys like us?",
"datetime": "2021-03-02T13:00:21.187000",
"uid": "f7d95f2939",
"user": "/sheepcrm/user/5cab33e1638e5512a16d4a1f/"
},
{
"comment": "Why wouldn't they like us?",
"datetime": "2021-03-02T13:04:22.711633",
"uid": "204f6a060d",
"user": "/sheepcrm/user/5cab33e1638e5512a16d4a1f/"
}
]
}
}
DELETE https://sls-api.sheepcrm.com/comments/v2/$CONTEXT/thread/{key}/comment/{comment-uid}/
Authorization: Bearer $API_KEY
HTTP/1.0 200 OK
{
"comments": {
"comments": [
{
"comment": "Why wouldn't they like us?",
"datetime": "2021-03-02T13:04:22.711000",
"uid": "204f6a060d",
"user": "/sheepcrm/user/5cab33e1638e5512a16d4a1f/"
}
]
}
}