Skip to content
Connect an agent

Organisations

Save a whiteboard tab to the organisation's library

As a new diagram (to new), or as a new version of the library diagram the tab is linked to (to linked).

POST/v1/boards/{board}/tabs/{tab}/save

TL;DR

QuestionAnswer
What does it do?Save a whiteboard tab to the organisation's library.
What does it take?A JSON body of type AgentSaveBoardTabBody.
What does it return?Status 200 with a body of type AgentSaveBoardTabResult.
What can go wrong?400 the body is not valid; 401 the API key is missing or not valid; 403 the account's plan does not include the REST API (plan.rest_not_included), the key is a person's own or a person's own agent (boards.org_key_required), a trusted publisher (boards.publisher_not_allowed), an organisation key without the boards scope (key.scope_missing), boards are not on for the organisation (boards.not_enabled), or the caller may look but not change the board (boards.forbidden); 404 no such board or tab, or the board is not open to the caller: the cases look alike; 409 the tab changed since baseVersion and the edit no longer applies (diagram.version_conflict, with details.currentVersion and each operation's result), the board has as many tabs as it may (boards.tab_limit), or the organisation is on legal hold; 413 the source is longer than a tab may be (boards.source_too_long), or the board holds as much as it may (boards.storage_full); 422 the result has errors (diagram.invalid, the diagnostics in details), an edit did not apply to the current version (boards.operation_failed, details.results), or it holds something that looks like a secret and the organisation blocks them (boards.secret_blocked); 429 too many requests, or a daily limit is spent; 503 live whiteboards are not set up on this server. Every failure uses the one error envelope.

What it does

As a new diagram (to new), or as a new version of the library diagram the tab is linked to (to linked). Every library rule applies: folder rules, the label, secret scanning, the size, and approval, which holds the save (status held, W601). A linked save answers 409 diagram.version_conflict when the library diagram changed since libraryVersion. The REST twin of save_board_tab.

Path parameters

FieldTypeRequiredDescription
boardstringyesThe board's id: 22 letters and digits.
tabstringyesThe tab's id: 12 letters and digits.

Request body

The body has the type AgentSaveBoardTabBody.

FieldTypeRequiredDescription
to"new" | "linked"yesnew: a new library diagram. linked: a new version of the library diagram the tab is linked to.
namestringnoat least 1 character; at most 200 characters.
folderstring | nullnoat most 200 characters.
libraryVersionintegernoFor linked: the library diagram's version the tab last saw. Left out, the tab's own link. minimum 0.

Responses

StatusMeaningBody
200Saved, held for approval, or unchanged.AgentSaveBoardTabResult
400The body is not valid.ErrorResponse
401The API key is missing or not valid.ErrorResponse
403The account's plan does not include the REST API (plan.rest_not_included), the key is a person's own or a person's own agent (boards.org_key_required), a trusted publisher (boards.publisher_not_allowed), an organisation key without the boards scope (key.scope_missing), boards are not on for the organisation (boards.not_enabled), or the caller may look but not change the board (boards.forbidden).ErrorResponse
404No such board or tab, or the board is not open to the caller: the cases look alike.ErrorResponse
409The tab changed since baseVersion and the edit no longer applies (diagram.version_conflict, with details.currentVersion and each operation's result), the board has as many tabs as it may (boards.tab_limit), or the organisation is on legal hold.ErrorResponse
413The source is longer than a tab may be (boards.source_too_long), or the board holds as much as it may (boards.storage_full).ErrorResponse
422The result has errors (diagram.invalid, the diagnostics in details), an edit did not apply to the current version (boards.operation_failed, details.results), or it holds something that looks like a secret and the organisation blocks them (boards.secret_blocked).ErrorResponse
429Too many requests, or a daily limit is spent.ErrorResponse
503Live whiteboards are not set up on this server.ErrorResponse

Response body

A 200 answer has the type AgentSaveBoardTabResult.

FieldTypeRequiredDescription
diagramobjectyes
diagram.idstringyes
diagram.namestring | nullyes
diagram.versionintegeryes
status"saved" | "held" | "unchanged"yes
approvalobject | nullyes
approval.codestringyes
approval.messagestringyes
tabAgentBoardTabyes
tab.idstringyesat least 12 characters; at most 12 characters; pattern ^[0-9A-Za-z]+$.
tab.namestringyes
tab.kindstringyes
tab.positionnumberyes
tab.versionintegeryesSend it as baseVersion with the next edit, and as sinceVersion to learn what changed after it.
tab.updatedAtintegeryes
tab.updatedBystringyes

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools