Developers

The nineloops API

Read and change every nineloops module from your own app. Provided by publshr LTD. Free for every module; Meta is a £49 a month add-on per workspace.

How access works

  1. Apply in the developer portal (it opens from nineloops: Settings, Developer). publshr reviews every developer by hand.
  2. Create an app. You get a client id and a client secret (shown once). Register your exact redirect addresses.
  3. Request the products your app needs (CRM, Spaces, Docs, Calendar, People, Finance, Studio, Coverage, Inbox, Meta), read or read and change, and say why. publshr approves each one.
  4. Until a product is approved your app is in development: only you can connect it, to your own workspace.
  5. A workspace owner or admin connects your app with OAuth. Your app then acts as that person, inside that one workspace: it can never see or do more than they can.

OAuth 2.0 with PKCE

PKCE (S256) is required of every app. Send the person to:

GET https://publshr.ae/oauth/authorize
  ?response_type=code
  &client_id=nl_…
  &redirect_uri=https://yourapp.com/callback
  &scope=crm:read tasks:write
  &state=…
  &code_challenge=BASE64URL(SHA256(verifier))
  &code_challenge_method=S256

They approve on nineloops.ae and come back to your redirect address with ?code=…&state=…. Exchange the code within 60 seconds:

curl https://publshr.ae/oauth/token \
  -u "nl_CLIENT_ID:nls_CLIENT_SECRET" \
  -d grant_type=authorization_code \
  -d code=… -d redirect_uri=https://yourapp.com/callback -d code_verifier=…
{ "access_token": "nlat_…", "token_type": "Bearer", "expires_in": 3600,
  "refresh_token": "nlrt_…", "scope": "crm:read tasks:write", "workspace_id": "…" }

Access tokens last one hour. Refresh with grant_type=refresh_token: every refresh token is used once and replaced. A refresh token used twice ends the whole connection, as does a code used twice. Revoke with POST /oauth/revoke and token=….

Calling the API

curl https://publshr.ae/api/v1/crm/contacts?limit=50 \
  -H "Authorization: Bearer nlat_…"

Meta actions

Need meta:write and the workspace's Meta add-on.

POST /v1/meta/posts/publish        { "caption": "…", "account_ids": ["…"], "media": [{ "url": "https://…", "type": "image" }] }
POST /v1/meta/comments/{id}/reply  { "message": "…" }
POST /v1/meta/conversations/{id}/messages   { "message": "…" }
POST /v1/meta/leads/sync           {}
POST /v1/whatsapp/conversations/{id}/messages   { "text": "…" }  or  { "template_name": "…", "language": "en_GB" }

Send "publish": false to save a post as a draft in nineloops instead of publishing it. Read accounts, posts, comments, conversations, leads, insights and WhatsApp threads with the meta/* and whatsapp/* resources below. Meta's own rules apply: see the API Terms.

Limits and errors

Every resource

Read live from /api/openapi.json (OpenAPI 3.1).

PathMethodsScope