Skip to content
Connect an agent

Organisations

Change an embed link's websites, end or name

Keeps the address.

PATCH/orgs/{org}/diagrams/{id}/embed-links/{link}

TL;DR

QuestionAnswer
What does it do?Change an embed link's websites, end or name.
What does it take?A JSON body of type UpdateEmbedLinkBody.
What does it return?Status 200 with a body of type EmbedLink.
What can go wrong?400 a website is not a host name, or the end is not allowed; 401 not signed in; 403 not on the plan, the setting is off, the role may not, or the request came from an origin that may not make changes; 404 no such organisation, diagram or link, or the caller is not a member, or the diagram is in a folder the caller may not use; 409 labelled Confidential, or waiting for approval; 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope.

What it does

Keeps the address. The same people and checks as making one.

Path parameters

FieldTypeRequiredDescription
orgstringyesThe organisation's id or its slug.
idstringyes
linkstringyesThe embed link's id.

Request body

The body has the type UpdateEmbedLinkBody.

FieldTypeRequiredDescription
sitesstring[]no
expiresAtinteger | nullno
labelstring | nullnoat most 80 characters.

Responses

StatusMeaningBody
200The link now.EmbedLink
400A website is not a host name, or the end is not allowed.ErrorResponse
401Not signed in.ErrorResponse
403Not on the plan, the setting is off, the role may not, or the request came from an origin that may not make changes.ErrorResponse
404No such organisation, diagram or link, or the caller is not a member, or the diagram is in a folder the caller may not use.ErrorResponse
409Labelled Confidential, or waiting for approval.ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 200 answer has the type EmbedLink.

FieldTypeRequiredDescription
idstringyes
diagramIdstringyes
urlstring | nullyesThe address, {EMBED_URL}/o/<token>.svg. A page on one of sites that shows it as an image gets the picture, without its source; anything else gets a placeholder. Null when the server cannot show it again: rotate the link for a new one.
labelstring | nullyesAn optional name for the page it is for.
sitesstring[]yesThe websites a page must be on, lower case.
proxiedSitesstring[]yesSites in sites whose images reach Plotwork through a proxy that names no page (GitHub), so the link shows them the placeholder.
expiresAtinteger | nullyesWhen it stops, in milliseconds since the epoch, or null for never.
expiredbooleanyes
createdBystring | nullyes
createdAtintegeryes
updatedAtintegeryes
rotatedAtinteger | nullyes

See also

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