curl --request POST \
--url https://api.dittowords.com/v2/projects/{projectId}/publish \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'{
"published": [
"welcome-header",
"sign-in-button"
],
"revertedToBase": [],
"skipped": [
{
"textItemId": "welcome-subheader",
"reason": "outdated"
}
]
}{
"message": "Project isn't connected to a base"
}{
"message": "This project is paired with the branch \"feature/onboarding\" and publishes to the base when that branch is merged"
}Publish to base
Publishes a project’s text items to the base it’s connected to.
Pass textItemIds to publish specific text items, or omit it to publish every text item that is Modified or New. Text items in Conflict (changed in both the project and the base since they last synced) are only acted on when named in conflictResolutions: project publishes the project’s version to the base, and base reverts the project’s text item to the base’s version.
Text items that can’t be published are skipped rather than failing the request; the response lists each one with the reason.
BETA This endpoint is part of a feature that is still in development and will not be available until the feature has been released.
curl --request POST \
--url https://api.dittowords.com/v2/projects/{projectId}/publish \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'{
"published": [
"welcome-header",
"sign-in-button"
],
"revertedToBase": [],
"skipped": [
{
"textItemId": "welcome-subheader",
"reason": "outdated"
}
]
}{
"message": "Project isn't connected to a base"
}{
"message": "This project is paired with the branch \"feature/onboarding\" and publishes to the base when that branch is merged"
}Body
Developer IDs of the project text items to publish. If omitted, every text item that is Modified or New is published. Text items named in conflictResolutions don't need to be listed here.
1Response
Returns the text items that were published, reverted to the base's version, or skipped