> ## Documentation Index
> Fetch the complete documentation index at: https://api.onlysocial.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrations and webhooks

> Connect your own CRM or dashboard with the Partner API, single sign-on and the Client Connect API, and get webhooks about your customers.

## Integrations

**Agency Dashboard > Integrations** holds the credentials for connecting your own system, such as a CRM or a client portal, to your agency. The menu item appears when your whitelabel plan includes at least one of these:

| Integration | What it lets you do |
| - | - |
| **Partner API** | Create and manage your customers from your own system. Everyone you create is your customer, on your plans, and counts towards your allowance. |
| **Single sign-on** | Sign your customers in from your own dashboard, with no second password. |
| **Client Connect API** | Send customers a hosted link to connect or reconnect their social accounts from your side. |

Each section says **Included** or **Not in your plan**. To get one your plan does not include, move to a bigger whitelabel plan.

### Create your credentials

Click **Create credentials**. The page shows:

* your **Partner key**, which identifies your agency;
* an **API key** for the Partner API, sent as the `X-API-KEY` header;
* an **SSO secret** for signing single sign-on requests;
* the **Base URL** and **Sign-in endpoint** to call.

![The Integrations page with the Partner API and single sign-on credentials](https://mintcdn.com/onlysocial/_kl1T5u7Oy1U4YMh/images/whitelabel/agency/integrations.jpg?fit=max\&auto=format\&n=_kl1T5u7Oy1U4YMh\&q=85\&s=4c11b2667d457c1cf73dfb29cb6e19c9)

> [!WARNING]
>
> The API key and SSO secret stay on this page for you and for team members whose role may manage API keys. Treat them like passwords: keep them in your secret manager and never share a screen that shows them. If one leaks, click **Replace the API key** or **Replace the SSO secret**: after you confirm, the old one stops working at once, so update your system straight after.

### Limits on who and where

| Setting | What it does |
| - | - |
| **Allowed e-mail domains** | One per line. Only people with an address on these domains can be created or signed in through your credentials. Leave it empty to allow any address. |
| **Client Connect API return addresses** | One per line, `https://` only. A customer who finishes connecting an account is sent back to one of these. |

Click **Save** after changing them.

### How to call them

The calls work as described in the Partner tab, with the credentials you created here instead of ones from OnlySocial, and the base URL shown on the Integrations page:

* [Partner API overview](https://api.onlysocial.io/partner/overview.md): create customers, find them and issue their workspace API keys.
* [Single sign-on](https://api.onlysocial.io/partner/single-sign-on.md): sign a short-lived JWT with your SSO secret, post it with your partner key, and open the link you get back. Customers land on your domain.
* [Client Connect API](https://api.onlysocial.io/partner/client-connect.md): create hosted connect and reconnect links. The pages your customers see carry your brand.

Customers you create through the Partner API are your sub-accounts, on your plans, like any other.

To manage sub-accounts, plans and webhooks from your own code with one key, use the [Agency API](https://api.onlysocial.io/whitelabel/agency-api.md) instead.

If the single sign-on section says it is not switched on for this service yet, contact OnlySocial support.

## Webhooks

Webhooks tell your own system what happens to your customers, as it happens. Set them up in **Agency Dashboard > Webhooks**.

**1. Add an endpoint**

Click **New endpoint**, give it a **Name**, enter your **Endpoint URL** (`https://`), and tick the **Events** you want.

**2. Copy the signing secret**

After you save, the signing secret is shown once. Copy it and keep it with your receiver.

**3. Send a test**

Click **Send test** to send a sample event, and check **Recent deliveries** to see what your endpoint answered.

![Two webhook endpoints and their recent deliveries, with one failed attempt retried](https://mintcdn.com/onlysocial/_kl1T5u7Oy1U4YMh/images/whitelabel/agency/webhooks.jpg?fit=max\&auto=format\&n=_kl1T5u7Oy1U4YMh\&q=85\&s=168710b67624a1d9344ed659eeefbba7)

### Events

| Group | Events |
| - | - |
| Sub-accounts | `workspace.created`, `workspace.suspended`, `workspace.restored`, `workspace.deleted`, `workspace.trial_ending`, `workspace.trial_ended`, `workspace.no_accounts_after_a_day`, `workspace.no_posts_after_first_account` |
| Users | `user.created`, `user.email_verified`, `user.deleted` |
| Billing | `subscription.changed` (plan changed), `subscription.created`, `subscription.updated`, `subscription.cancelled`, `subscription.cancellation_requested`, `subscription.trial_converted`, `subscription.ended`, `subscription.moved_to_free`, `payment.succeeded`, `payment.failed`, `addon.granted`, `addon.revoked` |
| Posts | `post.first_published` (a customer published their first post), `post.failed` |

The two `workspace.no_…` events are useful for onboarding: they tell you about a customer who has not connected an account a day after signing up, or has not posted a day after connecting their first one.

### What a delivery looks like

Each delivery is a JSON `POST`:

```json theme={null}
{
  "id": "6f1c2b8e-1a4d-4c0e-9b5a-2f7d3e8c9a10",
  "event": "subscription.changed",
  "occurred_at": "2026-12-01T09:00:00+00:00",
  "agency_id": 42,
  "data": {
    "workspace": {
      "uuid": "11111111-1111-1111-1111-111111111111",
      "name": "Example Customer",
      "status": "active",
      "plan": { "uuid": "22222222-2222-2222-2222-222222222222", "name": "Pro" }
    },
    "plan": { "uuid": "22222222-2222-2222-2222-222222222222", "name": "Pro" }
  }
}
```

With these headers:

| Header | Value |
| - | - |
| `X-Agency-Event` | The event name. |
| `X-Agency-Delivery` | The delivery's `id`. Use it to ignore a delivery you have already handled. |
| `X-Agency-Signature` | `sha256=` followed by an HMAC-SHA256 of the raw body, keyed with your signing secret. |

Always check the signature before you trust a delivery: compute the HMAC of the raw request body with your secret and compare it with the header.

### Failed deliveries

Your endpoint should answer with a `2xx` status within 8 seconds. A delivery that fails is tried up to three times in all, a few minutes apart. Redirects are not followed, so give the final address. **Recent deliveries** shows each attempt.

To pause an endpoint, **Edit** it and switch it off. **Rotate secret** replaces the signing secret: the old one stops working at once. **Remove** deletes the endpoint.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.