Home
    Agent
    Dropshipping
    Marketing
Channels
    Online Store
    Subscriptions
Apps
    Market
    Apps
Chats

    No conversations yet

Settings
    Home
    Agent
    Dropshipping
    Marketing
Channels
    Online Store
    Subscriptions
Apps
    Market
    Apps
Chats

    No conversations yet

Settings

Agent API

Call the enterprise Agent Gateway over REST or MCP. Authenticate with a scoped service-account key, then invoke any dtc_* tool.

Full docs

Getting started

Every request is authenticated with a Bearer token. The Gateway base URL is /api/v1/agent/v1. Async tools return a job_id you poll for completion.

1. Create a service-account key

The plaintext key is returned once. Scope it to exactly the capabilities your agent needs.

curl -X POST https://api.platformdtc.com/api/v1/agent/v1/keys \
  -H "Authorization: Bearer <DASHBOARD_USER_JWT>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-agent",
    "scopes": ["store:read", "catalog:read", "analytics:read"],
    "store_ids": ["<STORE_ID>"]
  }'
# -> response.data.key = "sq_agt_..."  (shown once — store it now)

2. Verify the key (whoami)

Confirm the principal, granted scopes, and accessible stores.

curl https://api.platformdtc.com/api/v1/agent/v1/whoami \
  -H "Authorization: Bearer sq_agt_..."

3. Invoke a tool

Pass an Idempotency-Key on mutations so retries are safe.

curl -X POST https://api.platformdtc.com/api/v1/agent/v1/tools/create_project \
  -H "Authorization: Bearer sq_agt_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "name": "Summer launch", "store_id": "<STORE_ID>" }'
# async tools return: { "data": { "job_id": "...", "status": "queued", "poll": "/agent/v1/jobs/<id>" } }

4. Poll the job

Follow the poll URL until the status is terminal.

curl https://api.platformdtc.com/api/v1/agent/v1/jobs/<JOB_ID> \
  -H "Authorization: Bearer sq_agt_..."
# data.status -> queued | running | succeeded | failed | cancelled | pending_approval

Tools

The live tool catalog exposed by the Gateway.