Publish a document to a connection
View as MarkdownPOST
/v1/documents/{documentId}/publicationsCreates a publication of a document (and its subpages with includeSubpages) to a connection, and queues the first run unless publishNow is false. config follows the connector's configSchema (connector.list). Needs edit access to the document.
curl -X POST "https://api.lydie.co/v1/documents/01JCQ3V5MZ8G4ZK2X7T9R6N1PB/publications" \
-H "Authorization: Bearer $LYDIE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"connectionId": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB"
}'Path parameters
Body
- includeSubpagesboolean
Default
false Publish only documents whose property equals this (lists: contains it).
Default
null- configobject
Default
{} - autoPublishboolean
Default
false - publishNowboolean
Default
true
Response
- publicationPublication
Show 15 fieldsHide fields
- idULID
- connectionIdULID
- connectorstring
- documentIdULID
- includeSubpagesboolean
Publish only documents whose property equals this (lists: contains it).
- configobject
- autoPublishboolean
- itemsPublicationItem[]
Show 9 fieldsHide fields
- idULID
- documentIdULID
- statestring
One of
draftscheduledpublishingpublishedupdated_pendingfailedunpublisheddiverged For diverged items: reason, base/ours/theirs (destination format), conflicts, marked text and the pull request.
- updatedAttimestamp
- createdAttimestamp
- updatedAttimestamp
A run and its log.
Show 15 fieldsHide fields
{
"publication": {
"id": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
"workspaceId": "01JCQ3TZ0WJ8K4M2X7T9R6N1PA",
"connectionId": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
"connector": "string",
"documentId": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
"includeSubpages": false,
"filter": null,
"config": {},
"autoPublish": false,
"lastRunAt": null,
"items": [
{
"id": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
"documentId": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
"state": "draft",
"externalId": null,
"externalUrl": null,
"lastPublishedAt": null,
"lastError": null,
"divergence": null,
"updatedAt": "2026-11-12T09:30:00.000Z"
}
],
"createdBy": null,
"updatedBy": null,
"createdAt": "2026-11-12T09:30:00.000Z",
"updatedAt": "2026-11-12T09:30:00.000Z"
},
"run": null
}Errors use one envelope for every endpoint. See Errors and versions.