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
- Apply in the developer portal (it opens from nineloops: Settings, Developer). publshr reviews every developer by hand.
- Create an app. You get a client id and a client secret (shown once). Register your exact redirect addresses.
- 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.
- Until a product is approved your app is in development: only you can connect it, to your own workspace.
- 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_…"
GET /v1/<module>/<resource>: newest first.limit(1 to 200),offset,updated_since(ISO date), and<field>=<value>to filter.GET /v1/<module>/<resource>/<id>: one record.POSTcreates,PATCH …/<id>changes,DELETE …/<id>archives (or deletes where the module deletes). Writes need the product's:writescope.- A field that names another record (
company_id,project_id, …) must name one in the same workspace; a person field (owner_id, …) must name a member. GET /v1/mesays which workspace and scopes the token has.
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
- 120 calls a minute per workspace connection, 1,200 a minute per app. Over it:
429withRetry-After. - Errors are
{ "ok": false, "error": { "code": "…", "message": "…" } }. Codes includeinvalid_token,insufficient_scope,plan,billing_locked,meta_addon_required,invalid_reference,rate_limited. - If you set an IP allowlist on your app, tokens are issued to and the API answers only those addresses.
- Every call is shown to the workspace in nineloops (Settings, Developer, Connected apps), which can end your access at any time.
Every resource
Read live from /api/openapi.json (OpenAPI 3.1).
| Path | Methods | Scope |
|---|