Platform API
For the people who run the platform itself: one key that can maintain every business,
and the /v1/platform endpoints for businesses, users, plans, SaaS billing, settings and operations.
Platform keys
- Format
dap1.<id>.<secret>; created only by a super admin under Super Admin → API & MCP, and shown once. platform_readreads everything and changes nothing;platformcan do anything a super admin can in the panel.- Every request re-checks the key: not revoked, not expired, from an allowed IP (if a list is set), and its
owner still a super admin. Any failure is
401/403straight away. - Every call is audited against the business it touched.
Acting on a business
Any endpoint in the public reference works with a platform key once you name the
business with the DA-Business-Id header (MCP: the business_id argument). Tenancy is
unchanged — an id from another business is still 404 — and that business's plan features still
apply. Platform calls are not counted against the business's API usage.
The platform endpoints
/v1/platform/* takes no business header. The full reference for them is shown to super admins in the
panel at Super Admin → API & MCP → Platform reference; business keys get 404
for every platform path.
Over MCP
Point an AI agent at the same MCP server with a platform key. It gets every tenant tool
from the catalogue with an extra, required business_id argument,
plus the platform_* tools (a platform_read key gets their read-only half). A typical
job runs in two steps: find the business with platform_businesses_list, then call tenant tools
with its id. Add ?modules=platform to offer only the platform tools.
Keeping a platform key safe
- Use
platform_readunless the agent must change things, and give every key an expiry date. - Lock long-lived keys to the IP addresses your agent runs from.
- Have the agent's client ask before any destructive tool. A platform key can delete a whole business.
platform_businesses_deletealso needs the business's exact name as confirmation. - Review the calls under Super Admin → API & MCP, and revoke a key there the moment it is no longer needed.
A business's contacts
curl https://api.digitalagency.tools/v1/contacts \
-H "Authorization: Bearer $DA_PLATFORM_KEY" \
-H "DA-Business-Id: 258"
Find a business
curl "https://api.digitalagency.tools/v1/platform/businesses?q=northlight" \
-H "Authorization: Bearer $DA_PLATFORM_KEY"
Missing business · 422
{ "error": { "type": "invalid_request",
"message": "A platform key must say which business to act on: send the DA-Business-Id header (MCP: the business_id argument).",
"details": [{ "field": "DA-Business-Id", "issue": "required" }] },
"meta": { "request_id": "req_…" } }