Quickstart

Pick what you are building, then either hand the prompt to your coding agent or follow the steps yourself. Everything here runs against a real account. There is no sandbox mode, so use accounts you do not mind posting to or advertising from.

1. Pick what you are building

Each use case has a prompt for your coding agent. It tells the agent which pages to read, the calls to make in order, and where to stop and ask you. Steps 2 and 3 below are the same for every use case; the rest are written out for the one you pick.

Using a coding agent? Give it this prompt.

2. Create an API key

Sign in at /sign-in with Google. Any Google account works, and your first sign-in creates your account, an organization you own, and a default profile in it.

Open Settings → API keys in the dashboard sidebar, or go straight to /settings/api-keys. Give the key a label such as Local testing and select Create key.

The secret is shown once

Copy it immediately — Adeli stores only a hash and cannot show it to you again. A key belongs to your organization and can act on every profile in it, and deleting a key revokes it instantly.

Save it alongside the base URL:

bash
export ADELI_URL=https://app.tryadeli.com
export ADELI_API_KEY='rk_live_...'

Still in the dashboard, open Settings → OAuth and register the exact client callback your app will send customers back to, such as https://client.example/callback. For local development, http://localhost and http://127.0.0.1 are also accepted. See OAuth setup for production, staging, and browser-return guidance.

3. Install the SDK

On Node.js 22 or later, install the server-side TypeScript SDK. It reads ADELI_API_KEY from the environment. From any other language, call the REST API directly: every step below has curl and Python too.

bash
npm install @adeli/sdk

Other ways in

To call Adeli from Claude, Cursor, or Codex without writing code, connect the MCP server with the same key. To click through the API first, fork the Postman collection.

Publish posts from your app

Your users connect their Instagram, Facebook, TikTok, YouTube, X, LinkedIn, or Bluesky accounts, and your app publishes to them.

Before you start

  • An API key, from step 2.
  • An Instagram professional (Business or Creator) account you can post to. TikTok, YouTube, and the rest follow the same shape; the differences are in the Posts reference.
  • Nothing else. Connecting accounts past the free plan's allowance returns 402 billing_required; see Pricing.

1. List your profiles, or create one

A profile is one of your customers. Every profile-scoped request names the profile it acts on, with a profileId or with an accountId that belongs to it, and nothing defaults to one. This call lists your organization's profiles, the default first, and confirms the key works. GET /api/v1/accounts is the organization-wide exception: omit profileId to discover accounts across all profiles.

curl "$ADELI_URL/api/v1/profiles" \
  -H "Authorization: Bearer $ADELI_API_KEY"
json
{
  "profiles": [
    {
      "id": "00000000-0000-4000-8000-000000000001",
      "name": "Client A",
      "externalId": "customer-123",
      "metadata": {},
      "isDefault": true,
      "createdAt": "2026-09-08T20:00:00.000Z",
      "updatedAt": "2026-09-08T20:00:00.000Z"
    }
  ]
}

To give a new customer their own profile instead, create one. The optional Idempotency-Key makes a retry return the same profile rather than a 409 profile_name_conflict:

bash
curl -X POST "$ADELI_URL/api/v1/profiles" \
  -H "Authorization: Bearer $ADELI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: customer-123" \
  -d '{"name":"Client A","externalId":"customer-123"}'

Save the profile's id. The next three calls need it.

bash
export PROFILE_ID=00000000-0000-4000-8000-000000000001

2. Start a connection

This returns an authUrl. Open it in your customer's browser — they authorize Instagram directly with Meta, and Adeli never sees their credentials.

curl -X POST \
  "$ADELI_URL/api/v1/profiles/$PROFILE_ID/connect" \
  -H "Authorization: Bearer $ADELI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform":"instagram","redirectUrl":"https://client.example/callback"}'
json
{
  "id": "00000000-0000-4000-8000-000000000002",
  "profileId": "00000000-0000-4000-8000-000000000001",
  "platform": "instagram",
  "status": "pending_authorization",
  "accountId": null,
  "expiresAt": "2026-09-08T20:10:00.000Z",
  "completedAt": null,
  "error": null,
  "authUrl": "https://www.instagram.com/oauth/authorize?..."
}

redirectUrl must be registered exactly

Register the complete URI under Settings → OAuth for the API key's organization. Scheme, host, port, path, and fixed query string must match; another path on the same origin is not accepted. Production URIs use HTTPS, with HTTP allowed only for localhost and 127.0.0.1. An invalid or unregistered URI returns 400 invalid_redirect_uri. You can omit redirectUrl entirely and just poll instead. See OAuth setup.

3. Poll until the connection lands

The session expires ten minutes after it is created. Poll it until status is one of the three terminal values: connected, failed, or expired.

curl \
  "$ADELI_URL/api/v1/profiles/$PROFILE_ID/connect/$CONNECTION_SESSION_ID" \
  -H "Authorization: Bearer $ADELI_API_KEY"

If you supplied a redirectUrl, the browser comes back to it with connectionSessionId, status, and — on success — accountId in the query string. Treat those as a hint for your UI and poll the session for the authoritative answer.

4. List the connected accounts

curl "$ADELI_URL/api/v1/accounts" \
  -H "Authorization: Bearer $ADELI_API_KEY"
json
{
  "status": "complete",
  "accounts": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "accountId": "00000000-0000-0000-0000-000000000000",
      "profileId": "00000000-0000-4000-8000-000000000001",
      "platform": "instagram",
      "providerId": "17841400000000000",
      "displayName": "@adeli",
      "displayIdentifier": "adeli",
      "connectionStatus": "connected"
    }
  ],
  "errors": []
}

Use accountId — Adeli's UUID — in every later request. It belongs to exactly one profile, so a request that passes it needs no profileId. providerId is informational.

5. Publish an image

Images are sent as base64 and must be JPEG, PNG, or WebP, decoding to no more than 8 MiB. Adeli normalizes them to JPEG before handing them to Instagram.

# Build the request body without putting base64 on the command line.
node -e '
const fs = require("node:fs");
fs.writeFileSync("/tmp/adeli-post.json", JSON.stringify({
  platform: "instagram",
  accountId: process.env.ACCOUNT_ID,
  caption: "Published through Adeli",
  image: { contentType: "image/png", base64: fs.readFileSync("./photo.png").toString("base64") },
}));
'

curl -X POST "$ADELI_URL/api/v1/posts" \
  -H "Authorization: Bearer $ADELI_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @/tmp/adeli-post.json

A successful publish returns 201 and the normalized post:

json
{
  "id": "instagram_post_00000000-0000-0000-0000-000000000000_17900000000000000",
  "platform": "instagram",
  "accountId": "00000000-0000-0000-0000-000000000000",
  "profileId": "00000000-0000-4000-8000-000000000001",
  "providerId": "17900000000000000",
  "caption": "Published through Adeli",
  "media": [{ "type": "IMAGE", "url": "https://media.example/staging/key.jpg", "thumbnailUrl": "https://media.example/staging/key.jpg" }],
  "permalink": null,
  "engagement": { "likes": null, "comments": null },
  "publishedAt": "2026-04-01T12:00:00.000Z"
}

Pass images instead of image — an array of 2 to 10 — to publish a carousel.

What just happened

  • POST /api/v1/profiles gave your customer a profile: one per customer, the unit Adeli bills by.
  • POST /api/v1/profiles/{profileId}/connect sent them to Instagram to authorize. Adeli never saw their password, and now holds and refreshes the token.
  • POST /api/v1/posts published through Adeli's app on each platform, so you needed no Meta app or App Review of your own.

If it fails

A connect with an unregistered redirectUrl fails before the customer leaves your app:

json
{
  "error": {
    "code": "invalid_redirect_uri",
    "message": "redirectUrl is not registered for this organization"
  }
}

Register the exact URI under Settings → OAuth, or leave redirectUrl out and poll. A session that ends failed carries the reason in error.code. Every code is in Errors.

Next steps