Call the enterprise Agent Gateway over REST or MCP. Authenticate with a scoped service-account key, then invoke any dtc_* tool.
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.
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)Confirm the principal, granted scopes, and accessible stores.
curl https://api.platformdtc.com/api/v1/agent/v1/whoami \
-H "Authorization: Bearer sq_agt_..."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>" } }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_approvalThe live tool catalog exposed by the Gateway.