Social (Ayrshare)

The social integration uses Ayrshare as the abstraction layer for multi-network publishing. One connection, one API key, posts to LinkedIn, X, Instagram, Facebook, TikTok, YouTube, Pinterest, Threads — all from the Content module.

Why Ayrshare

Each social network has its own API, auth flow, rate limits, and content quirks. Building+maintaining 8 of those for every feature is a tax we don't want to pay; Ayrshare absorbs it. From the platform's perspective there's one integration; from your perspective there are many networks to publish to.

The trade-off: you're dependent on Ayrshare's uptime + their network coverage. For the networks we care about, they're reliable and cover all major + most long-tail platforms.

Setup

  1. Sign up at ayrshare.com and grab your API key.
  2. Settings → Integrations → Ayrshare → paste API key + (optional) webhook secret.
  3. In Ayrshare's dashboard, link each social account you want to publish to.
  4. Back in CCD-Suite, Settings → Integrations → Ayrshare → Refresh linked accounts. The platform pulls Ayrshare's profile list and you pick which to enable.

That's it — the Content module's calendar now shows enabled networks as rows.

Publishing a post

The agent-flow (see Content module):

  1. You ask the orchestrator to draft a post, or you draft manually.
  2. The post lands as a planned action in the Inbox.
  3. You confirm → worker calls Ayrshare → post publishes to all target networks.
  4. Ayrshare returns per-network publish IDs, which the worker stores on the Post entity.

Per-network variants: a single post can have different copy per network (LinkedIn longer, X shorter, hashtags styled differently). The agent generates variants in one call when drafting; you can edit each in the Inbox before confirm.

Engagement polling

After publish, the worker polls Ayrshare's /post/{id} endpoint at increasing intervals to capture engagement metrics:

IntervalAfter publish
5 minFirst check
1 hourSecond check
6 hoursThird check
24 hoursFourth check
7 daysFinal check

Each poll updates the post's Engagement entity. The exponential backoff keeps Ayrshare quota use modest while still capturing viral spikes (the early checks catch fast-moving content).

Webhooks

Ayrshare can push events instead of waiting for polls. To enable:

  1. In Ayrshare's dashboard → Webhooks → set the URL to https://<your-app>/api/webhooks/ayrshare.
  2. Set the shared secret in Ayrshare AND in .env (AYRSHARE_WEBHOOK_SECRET=...).
  3. The platform verifies the secret on every callback (constant- time comparison, see Security). Requests with a missing or mismatched header are rejected.

When webhooks are wired, polling shifts to a longer-interval safety net rather than the primary path.

Network specifics

Each network has constraints the Content module surfaces in the draft editor:

NetworkLimitNotes
LinkedIn3000 chars, 9 imagesURLs in body auto-preview.
X / Twitter280 chars (Free), 25k (Premium)Thread-able; the editor supports multi-tweet drafting.
Instagram2200 chars, 10 imagesMust include at least 1 image or video.
Facebook63k chars, 4 imagesPage or group posting.
TikTokCaptions only (separate video upload)We surface the caption; video uploads handled out-of-band.
YouTubeCommunity posts only via AyrshareVideo uploads out-of-band.
PinterestImage-requiredEach pin gets one image + caption + destination URL.
Threads500 charsBeta in Ayrshare; subject to platform changes.

When you compose a post for multiple networks at once, the editor flags per-network warnings (too long for X, no image for IG, etc.) before you can schedule.

Scheduling

Two paths:

  1. Schedule for a future time — Ayrshare holds the post and publishes at the scheduled moment.
  2. Schedule via internal queue — CCD-Suite holds the post and submits to Ayrshare at the scheduled moment.

Default is path 1 (Ayrshare holds it). Path 2 is useful if you need approval flows or content checks that run between scheduling and submitting. Toggle per-tenant in Settings → Integrations → Ayrshare → Scheduling.

Costs

Ayrshare charges per post per network. The platform passes through their pricing (no markup); see ayrshare.com/pricing for current tiers. Cloud-edition tenants on Scale get a managed Ayrshare subscription as part of their plan; self-host requires your own Ayrshare account.

Disconnecting

Settings → Integrations → Ayrshare → Disconnect. Revokes the API key on our side; doesn't affect Ayrshare itself. To fully deactivate, cancel through Ayrshare's dashboard.

Read next

  • Content module — the producer side of social publishing.
  • Webhooks — generic webhook contract; Ayrshare's callbacks are one consumer.