Skip to content
Connect an agent
Hosting

File a hosted diagram in a folder

Moves the diagram into a folder (a path such as Payments/Checkout, up to five levels and forty characters a name) or to the top level with null.

PATCH/user/diagrams/{id}

TL;DR

QuestionAnswer
What does it do?File a hosted diagram in a folder.
What does it take?A JSON body of type MoveDiagramBody.
What does it return?Status 204 with no body.
What can go wrong?400 the folder path is not valid; details says why; 401 not signed in; 403 the request came from an origin that may not make changes; 404 no such diagram; 409 the diagram is locked (hosting.diagram_locked); details says when and that you can unlock it; 429 too many requests. Every failure uses the one error envelope.

What it does

Moves the diagram into a folder (a path such as Payments/Checkout, up to five levels and forty characters a name) or to the top level with null. An invalid path is a 400 with the reason, never rewritten. The link and the expiry do not change. A diagram that is not yours is a 404.

Path parameters

FieldTypeRequiredDescription
idstringyes

Request body

The body has the type MoveDiagramBody.

FieldTypeRequiredDescription
folderstring | nullyesThe folder to file the diagram in, or null for the top level.

Responses

StatusMeaningBody
204Moved.none
400The folder path is not valid; details says why.ErrorResponse
401Not signed in.ErrorResponse
403The request came from an origin that may not make changes.ErrorResponse
404No such diagram.ErrorResponse
409The diagram is locked (hosting.diagram_locked); details says when and that you can unlock it.ErrorResponse
429Too many requests.ErrorResponse

See also

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