Global Clinic ConnectGuides
Integration step 04

Publish social content

Create drafts, schedule posts, publish approved content, and track each network’s outcome.

OutcomeA social publishing integration with per-network status tracking
Required scopessocial
Step by step

Typical integration workflow

01

Connect accounts first

Connect and verify each social account in Global Clinic Connect before using its account ID.

02

Choose a publishing mode

Use draft for human review, schedule with a future UTC time, or now when the content is ready for immediate submission.

03

Submit target accounts

Include one or more account IDs from the same workspace and content appropriate for every selected network.

04

Respect approval

Check approval_required and wait for approval when the workspace policy requires it.

05

Track each target

Read the post detail and treat every target’s status independently because providers can complete or fail at different times.

API reference

Endpoints for this capability

These are the supported public contracts for this integration step.

POST/api/v1/social/posts
Scope · social

Create or schedule a social post

Create a draft, publish now, or schedule content for connected social accounts.

Example request
POST /api/v1/social/posts
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "mode": "schedule",
  "text": "We are extending clinic hours next week.",
  "account_ids": ["account_example"],
  "scheduled_at": "2026-07-15T09:00:00.000Z",
  "campaign": "extended-hours",
  "acknowledge_warnings": false
}
Example response
{
  "post_id": "post_example",
  "status": "scheduled",
  "approval_required": false,
  "targets": [
    { "target_id": "target_example", "provider": "facebook", "status": "scheduled" }
  ]
}

Error handling

400CONTENT_REQUIRED

Add non-empty post text.

400TARGETS_REQUIRED

Include at least one connected account ID.

400SCHEDULE_REQUIRED

Provide a valid future scheduled_at value.

404ACCOUNT_NOT_FOUND

Confirm the account is connected in the same workspace.

429RATE_LIMITED

Back off until the next minute.

Best practices

  • Create drafts when content still needs human review.
  • Use UTC ISO timestamps for schedules.
  • Check the returned approval_required value.
  • Track each target separately because networks may produce different outcomes.
Try this endpoint in the console
GET/api/v1/social/posts?from=2026-07-01T00:00:00.000Z&to=2026-07-31T23:59:59.999Z
Scope · social

List social posts

Read posts in a date window for synchronization or reporting.

Example request
GET /api/v1/social/posts?from=2026-07-01T00:00:00.000Z&to=2026-07-31T23:59:59.999Z
Authorization: Bearer YOUR_API_KEY
Accept: application/json
Example response
{
  "posts": [
    {
      "post_id": "post_example",
      "status": "scheduled",
      "scheduled_at": "2026-07-15T09:00:00.000Z",
      "campaign": "extended-hours"
    }
  ]
}

Error handling

401API_KEY_INVALID

Use an active key and verify the environment.

403INSUFFICIENT_SCOPE

Create a key with social.

429RATE_LIMITED

Pause until the next minute.

Best practices

  • Use bounded date windows.
  • Use the detail endpoint for per-network outcomes.
  • Treat post content as potentially sensitive clinic information.
Try this endpoint in the console
GET/api/v1/social/posts/{post_id}
Scope · social

Get social post status

Read one post and the outcome for each target network.

Example request
GET /api/v1/social/posts/{post_id}
Authorization: Bearer YOUR_API_KEY
Accept: application/json
Example response
{
  "post_id": "post_example",
  "status": "published",
  "scheduled_at": "2026-07-15T09:00:00.000Z",
  "targets": [
    {
      "target_id": "target_example",
      "provider": "facebook",
      "status": "published",
      "permalink": "https://example.invalid/post"
    }
  ]
}

Error handling

404POST_NOT_FOUND

Confirm the post ID belongs to the key’s workspace.

403INSUFFICIENT_SCOPE

Create a key with social.

429RATE_LIMITED

Back off and retry later.

Best practices

  • Evaluate each target result independently.
  • Do not assume a local scheduled state means the provider has published.
  • Use the permalink returned for the individual target.
Try this endpoint in the console
Production checklist

Best practices

  • Use drafts for content that needs clinical, legal, or brand review.
  • Schedule with UTC timestamps.
  • Avoid patient-identifying content.
  • Use returned target status rather than assuming every network succeeded.
Interactive console

Try a supported API

Requests go directly from this browser tab to the API environment you choose. Keys and responses are held in memory only and are cleared when the page closes.

Do not use real patient data in tests
POST/api/v1/social/posts
Response
Ready when you are

Enter a test key, review the sample request, and send it. The response will appear here.

Equivalent cURL example
curl -X POST 'https://api.connect.globalclinic.app/api/v1/social/posts' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "mode": "schedule",
  "text": "We are extending clinic hours next week.",
  "account_ids": ["account_example"],
  "scheduled_at": "2026-07-15T09:00:00.000Z",
  "campaign": "extended-hours",
  "acknowledge_warnings": false
}'
Required scopesocial

Create a draft, publish now, or schedule content for connected social accounts.

Next steps