Facebook Pixel
APICreating Posts

Text post

Publish a text-only LinkedIn post with a single API call. Examples in cURL, JavaScript, and Python.

A text post is the simplest kind — no upload, just one call to POST /posts/create.

When to use

You're posting words only: an update, a question, an announcement. No image, video, or file.

The one call

Send text (and optional visibility) to POST /posts/create. That's the whole flow.

Create a text post
curl -X POST https://api.connectsafely.ai/linkedin/posts/create -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{ "text": "We just shipped document posts in our API. Ask me anything below.", "visibility": "ANYONE" }'

Fields

FieldRequiredNotes
textyesThe post body.
visibilitynoANYONE (default) or CONNECTIONS_ONLY.
accountIdnoWhich connected account posts. Omit for your default account.

Common mistakes

  • Over 3,000 characters. LinkedIn rejects post text longer than 3,000 characters. The API returns success with no post URL in that case — trim the text and retry.
  • Empty text. text is required, even for media posts.

Reference