Auth API reference

Auth API · Consumer-Agent-Access

put/{app_slug}/v1/agent-access/configAuth

Push this app's agent access settings

Call it on boot: your code is the source of truth for the resources (your MCP server URLs), the consent page URL and the scope catalogue. The whole object is replaced. Enabling needs a consent URL, a resource and a scope. Requires `auth.agent_access.configure` on the app. Audited as `agent_access.config.updated`.

Path parameters

app_slug*string

The app slug.

Request body

enabled*boolean

Turn agent access on or off.

resources*array

Your MCP server URLs (https, at most 5).

Example: ["https://mcp.example.com/mcp"]

consent_urlstring · uri

Your consent page (https).

scopes*array

The scope catalogue (at most 50).

Response · 200 The settings now stored.

enabled*boolean

Agent access is on. While off, discovery is 404 and every protocol endpoint refuses.

resources*array

Resource indicators (RFC 8707) tokens may be minted for: your MCP server URLs. Every token carries exactly one of them in `aud`.

Example: ["https://mcp.example.com/mcp"]

consent_url*string · uri

Your consent page. /authorize redirects the browser here with `?request=<handle>`; the page signs the user in, shows the request and calls approve or deny.

Example: "https://app.example.com/oauth/consent"

scopes*array

The scopes agents can ask for.

Example

Request

PUT https://api.auth.productcraft.co/{app_slug}/v1/agent-access/config
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "enabled": false,
  "resources": [
    "https://mcp.example.com/mcp"
  ],
  "consent_url": "string",
  "scopes": [
    {
      "name": "disputes:read",
      "description": "Read disputes, transactions and evidence"
    }
  ]
}

Response

{
  "enabled": false,
  "resources": [
    "https://mcp.example.com/mcp"
  ],
  "consent_url": "https://app.example.com/oauth/consent",
  "scopes": [
    {
      "name": "disputes:read",
      "description": "Read disputes, transactions and evidence"
    }
  ]
}