Skip to content
campaiDeveloper
campai.com

Crm · Social posts

POST/{organizationId}/crm/communication/socialPosts/{postId}/schedule

Reschedule social post

Reschedules a scheduled social post using organizationId, postId, and a nullable scheduledAt datetime. A null scheduledAt publishes the post immediately. Returns postId.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Who may call it

  • The caller must have organization access and the social.edit permission.

Request

Path parameters

  • organizationIdidrequired
  • postIdidrequired

Body

Content-Type: application/json

  • scheduledAtstring · date-timerequirednullable
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/crm/communication/socialPosts/YOUR_POST_ID/schedule' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

Content-Type: application/json

  • postIdid
Response200
{
  "postId": "000000000000000000000001"
}

What else happens

  • Updates the matching socialPosts record with the new schedule, or sets it to pending for immediate publication.
  • For immediate publication, attempts to start the crm.processSocialPost job on DefaultQueue. A queue submission failure does not fail the request.

Errors

Other errors

StatusErrorWhen
409This post is no longer scheduled. It may already be publishing.If no scheduled post matches the postId and organizationId, the endpoint returns HTTP 409 with key socialPost.notScheduled.

Errors nearly every request can meet are listed under Errors.