GuideUpdated Oct 16, 20264 min read

API keys and webhooks

Create an API key so your own tools can work with your agency's data, and webhooks so they hear about approvals, onboarding and new accounts as they happen.

For agency admins, and the developer connecting your own tools: a CRM, an automation tool or your own server.

By the end, your tool has its own API key, and your server receives a signed message each time a post is approved, a client finishes onboarding or a social account is connected.

Before you start

  • You're an agency admin. Members don't see API & Webhooks.
  • For webhooks, you have an https:// address on your server that accepts POST requests.

1. Create an API key

  1. Step 1: At the bottom of the agency panel's sidebar, click API & Webhooks. API Keys opens.
  2. Step 2: Click Create API Key.
  3. Step 3: Give it a Name that says where it's used, such as "Staging API", and click Create.
  4. Step 4: Copy the key with the copy button. You can only see this key once. Store it safely, then click Done.
1

Your tool sends the key in the x-api-key header of every request. The list shows each key's Name, the start of its Token and when it was Created. Use a key's ⋯ menu to Edit API key (rename it) or Delete API key. A deleted key stops working right away.

2. Read the developer docs

Under Documentation in the same sidebar, the docs cover Introduction, Authentication, Responses, Services, Workspaces, Orders, Boards, Members, Posts and Webhooks, with a ready-to-copy example for each request. Open them from the sidebar, or go to /agency/…/docs.

3. Add a webhook

  1. Step 1: In the same sidebar, click Webhooks, then Create webhook.
  2. Step 2: Type the Endpoint URL. It must be an https:// address.
  3. Step 3: Under Select events to listen, pick one or more events.
  4. Step 4: Click Create.
1

The events are:

EventSent when
post.status_changedA post moves to Approved or Changes Requested
client.onboardingA client member completes onboarding
social_account.connectedA workspace connects a social account

4. Check the signature

Every new webhook gets its own signing secret. Click the webhook to open its page, and under Signing secret click Show or Copy signing secret. (An older webhook without one shows Create secret.)

Every delivery then carries an X-Ovia-Signature header: t= is the time it was sent and v1= is an HMAC-SHA256 of the time, a dot and the body, made with your secret. Compute the same on your server and compare, so you know the message is from us and fresh.

Create new secret replaces it. Deliveries use the new one right away, so your server rejects them until you update it there too.

5. Watch the deliveries

The webhook's page lists Recent deliveries: each one's Status (Delivered or Failed), Event type, http status, event ID and time. Click one to see its Attempts, Sent at, Message payload and your server's Response body.

  • Your server has 10 seconds to answer. Any 2xx answer counts as delivered.
  • Failed deliveries aren't retried by themselves: fix the problem, then click Resend.
  • Disable endpoint in the webhook's ⋯ menu on the Webhooks list pauses it; Enable endpoint turns it back on. On the webhook's page, Edit changes the address or events, and Delete removes it.

If something looks wrong

  • "This endpoint needs an https address": the address starts with http://. Edit it to use https://.
  • "Please enter a valid URL (e.g. example.com/webhook) and select at least one event.": fill in both.
  • Deliveries suddenly fail after you replaced the secret: update the secret on your server.
  • A key stopped working: it was deleted. Create a new one.

Done when

Related articles.

Still stuck?

Send the team a message and we'll help.