Pin a new comment thread
POST
/api/v1/rooms/{roomId}/comments
const url = 'https://api.yggy.tech/api/v1/rooms/example/comments';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"board":"example","cardId":"example","x":1,"y":1,"body":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.yggy.tech/api/v1/rooms/example/comments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "board": "example", "cardId": "example", "x": 1, "y": 1, "body": "example" }'x/y is the board point. With cardId, the pin follows that card, and stays at the point if the card is removed.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” roomId
required
string
Request Body
Section titled “Request Body ” Media type application/json
object
board
required
string
cardId
required
string | null
x
required
integer
y
required
integer
body
required
string
Example generated
{ "board": "example", "cardId": "example", "x": 1, "y": 1, "body": "example"}Responses
Section titled “ Responses ”The thread as it is now
Media type application/json
object
id
required
string
board
required
string
x
required
integer
y
required
integer
cardId
required
string | null
cardDx
required
integer | null
cardDy
required
integer | null
createdByUserId
required
string
resolvedAt
required
string | null
resolvedByUserId
required
string | null
createdAt
required
string
comments
required
Array<object>
object
id
required
string
authorUserId
required
string
authorName
required
string
authorImage
required
string | null
body
required
string
createdAt
required
string
editedAt
required
string | null
canEdit
required
boolean
canDelete
required
boolean
Example generated
{ "id": "example", "board": "example", "x": 1, "y": 1, "cardId": "example", "cardDx": 1, "cardDy": 1, "createdByUserId": "example", "resolvedAt": "example", "resolvedByUserId": "example", "createdAt": "example", "comments": [ { "id": "example", "authorUserId": "example", "authorName": "example", "authorImage": "example", "body": "example", "createdAt": "example", "editedAt": "example", "canEdit": true, "canDelete": true } ]}Invalid comment
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Unauthorized
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Not allowed
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Room or comment not found
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}