Components
Create components
Creates one or more library components in your workspace.
The operation is all-or-nothing: if any component is invalid, none are created.
post/components
Request
- Base URL: https://api.dittowords.com/v2
- URL: https://api.dittowords.com/v2/components
- Auth: API key in header Authorization
Request body
Example request
{
"components": [
{
"text": "Hello world",
"name": "Component One"
},
{
"developerId": "custom-id",
"text": "Custom ID example",
"name": "Custom Component",
"notes": "For the homepage CTA",
"characterLimit": 80
},
{
"text": "In folder",
"name": "Folder Component",
"folderId": "my-folder-id"
},
{
"text": "{{count}} items in your cart",
"name": "Cart Count",
"variables": [
"count"
],
"plurals": [
{
"form": "one",
"text": "{{count}} item in your cart"
},
{
"form": "other",
"text": "{{count}} items in your cart"
}
]
},
{
"text": "Hello world",
"name": "Localized Component",
"variants": [
{
"variantId": "french",
"text": "Bonjour le monde"
}
]
}
]
}Response
Returns the developer IDs of the created components
Example response
{
"developerIds": [
"component-one",
"custom-id",
"folder-component"
]
}Changes
No recorded changes to this operation across all 1 revision of this API.