Create draft post

Create a draft in Sprout for one or more profiles.

POST https://cotlet.dev/api/v1/sprout-social/draft-posts

write

Creates a draft in Compose. With several profiles, Sprout creates one draft per network so each can be edited. A draft publishes nothing and reaches no one, so create_draft_post runs without asking first; your team finds the drafts in the Drafts tab and can edit, schedule or delete them there.

Parameters

Parameters: create_draft_post
NameTypeDescription
profile_ids string[] required string[] Profile IDs from list_profiles.
text string required string Post text.
media_urls string[] string[] Public URLs of images or video to attach.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/sprout-social/draft-posts \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"profile_ids":["profile ids"],"text":"text"}'
Python
result = client.call("sprout-social", "create_draft_post", {"profile_ids":["profile ids"],"text":"text"})
Node.js
const result = await cotlet.call('sprout-social', 'create_draft_post', {"profile_ids":["profile ids"],"text":"text"});
CLI
cotlet call sprout-social create_draft_post --data '{"profile_ids":["profile ids"],"text":"text"}'

Example response

JSON

{
  "drafts": [
    {
      "draft_id": "drf_702",
      "profile_id": "p_li_02",
      "status": "draft"
    },
    {
      "draft_id": "drf_703",
      "profile_id": "p_ig_01",
      "status": "draft"
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.