company logo

Turnward Help Center

Powered by
All collectionsDevelopersAPI authentication and quickstart

API authentication and quickstart

Keys, scopes, agency routes, and agent rules.

API authentication and quickstart

Turnward API v1 requires active billing. Create keys in Dashboard → Settings → Developer.

Base URL

https://app.turnward.com/api/v1

https://api.leadpanther.ai/v1 is not the Turnward app API base URL.

Authorization

Authorization: Bearer lp_live_REDACTED

Supported prefixes: lp_live_ and lp_test_. Keep keys server-side. Never put keys in query strings, browser code, mobile bundles, logs, public repos, or screenshots.

Check your key

curl "https://app.turnward.com/api/v1/me" \
  -H "Authorization: Bearer lp_live_REDACTED"

Most other endpoints also need a specific scope. The * scope satisfies any required scope.

Common scopes

  • clients:read

  • posts:read / posts:write

  • lead_magnets:read / lead_magnets:write

  • analytics:read

  • leads:read

  • activity:read

  • media and workspace social-action scopes as documented

Direct vs agency

Direct routes (examples): /posts, /lead-magnets, /leads, /activity

Agency nested routes: /clients/{clientId}/posts, /clients/{clientId}/lead-magnets, …

clientId is the client account user_id from GET /clients. A valid agency key alone is not enough; an active grant for that client is required.

Workspace social actions use /workspaces/{workspaceId}/social-actions (not a clientId route).

Pagination and errors

List endpoints use limit / offset. Success responses use a data envelope plus request_id. Errors include stable error.code, error.message, and request_id.

Agent / LLM rules

  • Use only documented paths under the Turnward base URL

  • Do not invent endpoints

  • On 403 for agency calls, check scope and grant

  • Follow https://turnward.com/docs/llm-guide for codegen

Docs index

  • Overview: https://turnward.com/docs/overview

  • Quickstart: https://turnward.com/docs/quickstart

  • Auth: https://turnward.com/docs/auth

  • Agency Mode: https://turnward.com/docs/agency-mode

  • Workflows: https://turnward.com/docs/workflows

  • Errors: https://turnward.com/docs/errors

  • Reference: https://turnward.com/docs/reference

Did this answer your question?
😞
😐
😁