Edit a LinkedIn draft
Save new text, post settings or a proposed publishing time as a new unapproved version. A proposed time is only a proposal. A change a person already approved is refused.
PATCH
https://app.trygtm.com/api/v1/linkedin/drafts/{item_id}- Scope
write- MCP tool
- edit_linkedin_draft
Path parameters
item_idstringrequired- The draft's id (itemId), from list_linkedin_drafts or a drafting tool.
Headers
Idempotency-Keystringoptional- A key unique to this write, up to 255 characters. A retry carrying the same key returns the first response instead of running again. Kept for 24 hours.
Body
expected_revision_idstringrequired- The version you read (revision.id from get_linkedin_draft). A newer version is refused as a conflict.
textstringoptional- The new words: the headline, the About section or the post's text.
visibilitystringoptional- Who can see a new post.
anyoneconnections commentsstringoptional- Who can comment on a new post.
anyoneconnectionsno_one scheduled_forstring | nulloptional- The proposed publishing time, ISO 8601 with an offset. Null proposes no time. Needs timezone.
timezonestring | nulloptional- The IANA time zone the time is shown in, e.g. America/Chicago.
Request
curl -X PATCH https://app.trygtm.com/api/v1/linkedin/drafts/8f2a91c4-6d1e-4c0a-9a57-2f3b1c7e9d10 \
-H "Authorization: Bearer $TRYGTM_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"expected_revision_id": "8f2a91c4-6d1e-4c0a-9a57-2f3b1c7e9d10"
}'Response
{
"data": {
"item_id": "2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a",
"revision_id": "8e9f0a1b-2c3d-4e4f-8a5b-6c7d8e9f0a1b",
"approvable": true,
"blocking_reason": null,
"issues": [],
"review_path": "/linkedin/review/2d3e4f5a-6b7c-4d8e-9f0a-1b2c3d4e5f6a",
"next": "Nothing is published or changed on LinkedIn until a person with LinkedIn access in the workspace approves the exact change on the LinkedIn screen, or the account's automatic posting (which a person turned on there) schedules a post it wrote."
}
}