curl --request PATCH \
--url https://api.dittowords.com/v2/components/unlink \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"textItemIds": [
"text-item-id-1"
]
}
'{
"success": true,
"unlinkedCount": 1
}{
"message": "Text items are not linked to a library component: text-item-id-1"
}Unlink text items from a component
Unlinks one or more text items from their component by developer ID.
Each unlinked text item keeps its current text, and future edits to the component no longer affect it. A given developer ID unlinks every text item that currently carries it, not just one. Copies of the same base text item in different projects share its developer ID, and so do text items linked to the same component without component versioning, or before it was turned on. Those shared-component instances each get a freshly generated developer ID when unlinked. In workspaces that have opted into component versioning, other unlinked text items keep their own Developer IDs. Pass projectId to scope the unlink to only the instances in one project, leaving instances elsewhere untouched.
curl --request PATCH \
--url https://api.dittowords.com/v2/components/unlink \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"textItemIds": [
"text-item-id-1"
]
}
'{
"success": true,
"unlinkedCount": 1
}{
"message": "Text items are not linked to a library component: text-item-id-1"
}Body
Developer IDs of the text items to unlink from their component. Each must currently be a library instance. A given developer ID unlinks every text item that currently carries it, not just one. Copies of the same base text item in different projects share its developer ID, and so do text items linked to the same component without component versioning, or before it was turned on. Scope this with projectId to affect only the instances in one project.
1Response
Returns success status of the unlink operation and the number of text items actually unlinked