Skip to main content
POST
Create a new post

Authorizations

x-api-key
string
header
default:yalg_live_your_api_key
required

YALG Developer API key. Send it in the x-api-key header from a server-side environment only.

Body

application/json
content
string

The content of the LinkedIn post (optional for HOOK_CREATED status)

Maximum string length: 5000
Example:

"Just had an amazing experience at the tech conference! Here are my key takeaways..."

agentCreated
boolean

Whether the post was created by an agent

Example:

true

imageUrl
string

URL of an image to include in the post

Maximum string length: 255
Example:

"https://example.com/image.jpg"

videoUrl
string

URL of a video to include in the post

Maximum string length: 255
Example:

"https://example.com/video.mp4"

anecdoteIds
string<uuid>[]

UUIDs of the anecdotes this post is based on

Example:
tags
string[]

Tags associated with the post for categorization

Example:
linkedInUrl
string

Original LinkedIn post URL

Maximum string length: 500
Example:

"https://www.linkedin.com/feed/update/urn:li:activity:1234567890"

originalTimestamp
string<date-time>

Original timestamp of the post (for imported posts)

Example:

"2023-12-01T10:30:00Z"

scheduledAt
string<date-time>

Scheduled publication timestamp for the post

Example:

"2023-12-01T15:30:00Z"

publishedAt
string<date-time>

Actual publication timestamp when the post was published

Example:

"2023-12-01T15:32:15Z"

likesCount
number

Number of likes/reactions on the post

Required range: x >= 0
Example:

42

commentsCount
number

Number of comments on the post

Required range: x >= 0
Example:

8

sharesCount
number

Number of shares/reposts of the post

Required range: x >= 0
Example:

3

impressionsCount
number

Number of impressions/views of the post

Required range: x >= 0
Example:

1250

status
enum<string>

Status of the post

Available options:
drafted,
scheduled,
published,
failed
Example:

"published"

targetPlatforms
enum<string>[]

Target platforms for publishing

Available options:
linkedin,
instagram,
facebook
Example:
instagramFormat
enum<string>

Instagram post format (carousel or single image)

Available options:
carousel,
single
Example:

"carousel"

authorId
string
deprecated

Do not send this field in public API requests. YALG ignores arbitrary owner identifiers and derives the owner from the authenticated API key.

Response

Post created successfully