Save a Room canvas
PUT
/api/v1/rooms/{roomId}/canvas
const url = 'https://api.yggy.tech/api/v1/rooms/example/canvas';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"cards":[{"id":"example","type":"note","title":"example","x":1,"y":1,"width":1,"height":1,"projectId":"example","content":{"additionalProperty":"example"}}],"connectors":[{"id":"example","fromCardId":"example","toCardId":"example","label":"example"}],"baseVersion":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.yggy.tech/api/v1/rooms/example/canvas \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "cards": [ { "id": "example", "type": "note", "title": "example", "x": 1, "y": 1, "width": 1, "height": 1, "projectId": "example", "content": { "additionalProperty": "example" } } ], "connectors": [ { "id": "example", "fromCardId": "example", "toCardId": "example", "label": "example" } ], "baseVersion": 1 }'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
cards
required
Array<object>
object
id
required
string
type
required
string
title
string | null
x
required
integer
y
required
integer
width
required
integer
height
required
integer
projectId
string | null
content
required
object
key
additional properties
connectors
required
Array<object>
object
id
required
string
fromCardId
required
string
toCardId
required
string
label
string | null
baseVersion
integer
Responses
Section titled “ Responses ”Saved
Media type application/json
object
id
required
string
title
required
string
createdByUserId
required
string
canEdit
required
boolean
canDelete
required
boolean
projects
required
Array<object>
object
projectId
required
string
name
required
string
slug
required
string
cards
required
Array<object>
object
id
required
string
type
required
string
title
required
string | null
x
required
integer
y
required
integer
width
required
integer
height
required
integer
availability
required
string
unavailableReason
required
string | null
projectId
required
string | null
content
required
object
key
additional properties
connectors
required
Array<object>
object
id
required
string
fromCardId
required
string
toCardId
required
string
label
required
string | null
version
required
integer
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "cards": [ { "type": "note", "availability": "available", "unavailableReason": "not_shared" } ]}Invalid request
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" }}Forbidden
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 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" }}The Room changed since this version; error.details.room is the current Room
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" }}