Components

Publish a text item to the library

Publishes an existing project text item to the component library, turning it into a reusable library component.

The text item's current text, variables, variants, and other fields are carried over to the new component, and the text item becomes its first linked instance. The new component keeps the text item's existing developer ID. The text item must not already be a library instance.

post/components/publish

Request

  • Base URL: https://api.dittowords.com/v2
  • URL: https://api.dittowords.com/v2/components/publish
  • Auth: API key in header Authorization

Request body

textItemIdstring required

Developer ID of the text item to publish. It must not already be a library instance.

namestring required

The name of the new library component.

folderIdstring

The developer ID of the folder to add the component to. If omitted, the component will be added to the library root.

Example request

{
  "textItemId": "text-item-id-1",
  "name": "New Component",
  "folderId": "my-folder-id"
}

Response

Returns the developer ID of the newly created library component

developerIdstring required

Developer ID of the newly created library component. This is the same developer ID the text item had before publishing.

Example response

{
  "developerId": "text-item-id-1"
}

Changes

No recorded changes to this operation across all 1 revision of this API.