Agent Supply Trust API
Evaluate packages, containers, MCP servers, agent skills and plugins for provenance, permissions and runtime risk.
Quickstart
Three calls: ask for a key, claim it from your inbox, then use it. No account, no dashboard, no card.
1. Ask for a key
curl -X POST https://agentsupplytrust-api.com/v1/keys \
-H 'content-type: application/json' \
-d '{"email":"you@example.com","source":{"source":"web","medium":"docs"}}'
Answers 202 Accepted and emails a one-time claim token to that address. No key is returned by this call. Proving you control the mailbox is what stops anyone who can guess your address from minting a key on your account and spending your allowance. The token is good for 15 minutes; ask again if it lapses.
2. Claim it
curl -X POST https://agentsupplytrust-api.com/v1/keys/claim \
-H 'content-type: application/json' \
-d '{"token":"PASTE_THE_TOKEN_FROM_THE_EMAIL"}'
This response carries the key, and it is shown once — only a peppered hash is stored, so it cannot be read back later; if you lose it, rotate. Free tier: 100 component scans/month.
3. Call the API
curl -X POST https://agentsupplytrust-api.com/v1/scans \
-H "Authorization: Bearer $KEY" \
-H 'content-type: application/json' \
-d '{"components":[{"kind":"mcp_server","name":"acme-mcp","version":"1.4.0"}]}'
Or skip the terminal: every endpoint below has a Try it panel that sends the real request from this page. Start at the playground.
Authentication
Authorization: Bearer sp_live_…
x-api-key is also accepted. Keys are scoped to this API — a key issued for another
product returns invalid_api_key, identical to an unknown key, so the API will not
confirm a key is valid elsewhere. Never put a key in browser JavaScript; authenticated
endpoints deliberately do not support CORS.
Playground
Every endpoint below carries a Try it panel, prefilled with a working request. Edit it,
press Send, and read what this API actually answered — status, timing, requestId and body,
unedited. Requests go straight from your browser to https://agentsupplytrust-api.com; nothing is proxied
through this page and no request is recorded here.
What happens to this key. It is a live credential, and it is treated as one. It is held
in this page's memory for as long as the tab is open and nowhere else — not
localStorage, not sessionStorage, not a cookie, not the URL, not a
query string. It is never logged, and never sent to the server that serves this page. The only
place it goes is the Authorization: Bearer header of requests you send to
https://agentsupplytrust-api.com. Reloading or closing the tab discards it; Clear discards it now.
Copied curl commands carry $KEY, never the key itself. On a shared machine,
clear it when you are done.
What a call costs. Every panel says so above its Send button, taken from the same contract as the rest of this page. No key required is a public endpoint — no key, no quota, no charge. Free — no quota needs your key but reserves nothing. Billable runs against your real account and reserves the stated quota from your plan before it runs, exactly as it would from your own code. Quota: no fixed cost also runs against your real account, but the contract states no fixed amount: endpoints whose work scales with the payload reserve an amount derived from what you send, so try a small request first.
No key yet? Open the Try it panel on POST /v1/keys, put in your email and
press Send. That call answers 202 and emails you a claim token; paste the token
into the Try it panel on POST /v1/keys/claim and send that. The claim
response is the one that carries the key, and it comes back with a button that loads it
straight into this field.
Agent Supply Trust endpoints
What this API does. Everything below is specific to this product.
/v1/scansScan one component
Analyses provenance, requested permissions and instruction surfaces. Static only — nothing is installed or executed.
Try itPOST /v1/scansBillable — 1 unit or more
Runs against your real account. The contract states no fixed quota cost, so one unit is reserved before the call runs — and an endpoint whose work scales with what you send can bill more than that. Read the description above, and start with a small request.
Using the API key from the playground key field — no key set yet. It is sent only in the Authorization: Bearer header, only to https://agentsupplytrust-api.com.
Your browser will not send an Authorization header to this API from this page: authenticated endpoints do not enable cross-origin access, deliberately, so that a key can never be read out of a web app’s front-end. Press Show as curl and run the request from a terminal instead — your edits are carried into it.
Request body
| Field | Type | Notes | |
|---|---|---|---|
kind | "npm_package" | "pypi_package" | "container_image" | "mcp_server" | "agent_skill" | "plugin" | required | |
name | string | required | |
version | string | required | |
provenance | object | optional | |
permissions | string[] | optional | |
instructions | string[] | optional | Free-text surfaces — MCP tool descriptions, SKILL.md. Scanned for injection and exfiltration markers, which is where most scanners do not look. |
Example request
{
"kind": "mcp_server",
"name": "acme-mcp",
"version": "2.1.0",
"provenance": {
"signed": true,
"publisherVerified": true,
"sourceRepo": "https://github.com/acme/mcp"
},
"permissions": [
"tool.invoke"
]
}
curl
curl -X POST https://agentsupplytrust-api.com/v1/scans \
-H "Authorization: Bearer $KEY" \
-H 'content-type: application/json' \
-d '{"kind":"mcp_server","name":"acme-mcp","version":"2.1.0","provenance":{"signed":true,"publisherVerified":true,"sourceRepo":"https://github.com/acme/mcp"},"permissions":["tool.invoke"]}'
Response
| Field | Type | Notes |
|---|---|---|
riskScore | integer | Range 0…100. |
severityCounts | object | |
findings | object[] |
/v1/scans/batchScan up to 100 components in one call (CI use case)
Quota cost scales with the batch — a 50-dependency pipeline run bills 50, never 1.
Try itPOST /v1/scans/batchQuota: no fixed cost
Runs against your real account. The contract gives this endpoint no fixed quota cost: nothing is reserved before it runs, and endpoints whose work scales with the payload reserve an amount derived from the body instead — so a large request here can cost more than one unit. Send a small one first.
Using the API key from the playground key field — no key set yet. It is sent only in the Authorization: Bearer header, only to https://agentsupplytrust-api.com.
Your browser will not send an Authorization header to this API from this page: authenticated endpoints do not enable cross-origin access, deliberately, so that a key can never be read out of a web app’s front-end. Press Show as curl and run the request from a terminal instead — your edits are carried into it.
The contract declares no example for this endpoint, so this body was built from its schema. Check the field table below before sending.
Request body
| Field | Type | Notes | |
|---|---|---|---|
components | object[] | required | At least 1. At most 100. |
policy | object | optional |
curl
curl -X POST https://agentsupplytrust-api.com/v1/scans/batch \
-H "Authorization: Bearer $KEY"
Response
/v1/verdictsScan and apply a policy — returns an auditable allow/warn/deny
The billable artifact. Carries a policy version and a SHA-256 component digest, so the same policy against the same component reproduces the same decision months later. Severity gates before score: any critical finding denies, since exec+network alone is enough to fetch and run arbitrary code.
Try itPOST /v1/verdictsBillable — 1 unit or more
Runs against your real account. The contract states no fixed quota cost, so one unit is reserved before the call runs — and an endpoint whose work scales with what you send can bill more than that. Read the description above, and start with a small request.
Using the API key from the playground key field — no key set yet. It is sent only in the Authorization: Bearer header, only to https://agentsupplytrust-api.com.
Your browser will not send an Authorization header to this API from this page: authenticated endpoints do not enable cross-origin access, deliberately, so that a key can never be read out of a web app’s front-end. Press Show as curl and run the request from a terminal instead — your edits are carried into it.
Request body
| Field | Type | Notes | |
|---|---|---|---|
component | object | required | |
policy | object | optional |
Example request
{
"component": {
"kind": "mcp_server",
"name": "postmark-mcp",
"version": "1.0.3",
"provenance": {
"signed": false,
"publisherVerified": false
},
"permissions": [
"network.outbound",
"process.exec",
"credentials.read"
]
}
}
curl
curl -X POST https://agentsupplytrust-api.com/v1/verdicts \
-H "Authorization: Bearer $KEY" \
-H 'content-type: application/json' \
-d '{"component":{"kind":"mcp_server","name":"postmark-mcp","version":"1.0.3","provenance":{"signed":false,"publisherVerified":false},"permissions":["network.outbound","process.exec","credentials.read"]}}'
Response
| Field | Type | Notes |
|---|---|---|
verdict | object | |
scan | object |
/v1/demo/scanPublic demo — scan components without a key
Runs the real trust engine over the components you supply. Capped in size, nothing is stored, nothing is metered. Use it to see the risk findings before you integrate.
Try itPOST /v1/demo/scanNo key required
Public endpoint. No API key, no quota, nothing billed.
The contract declares no request schema for this endpoint, so there is nothing to prefill. See the description above for what it accepts.
curl
curl -X POST https://agentsupplytrust-api.com/v1/demo/scan
Response
Account, keys and billing
Issue and rotate keys, read your usage against the plan allowance, change or cancel that plan, and pull invoices and payments — plus the two unauthenticated service endpoints. Nothing here is specific to this product: it is the account surface that sits behind every key this API issues.
/v1/keysRequest a free sandbox API key (sends a verification email)
Starts self-serve key issuance. A one-time claim token is emailed to the address you supply; POST it to /v1/keys/claim to receive the key. No key is returned here, and the response is the same whether or not that address already has an account — so this endpoint cannot be used to find out who has one. The email is verified because your account, your usage and your invoice are all keyed to it: issuing on an unverified address would let anyone mint a working key on your account and spend your allowance. Keep using the same address and a paid plan bought with it raises the keys you already hold rather than issuing new ones. Distributed integrations may identify their discovery surface with the optional source object or x-integration-source header; invalid source values are ignored and never block key issuance.
Try itPOST /v1/keysNo key required
Public endpoint. No API key, no quota, nothing billed.
Request body
| Field | Type | Notes | |
|---|---|---|---|
email | string | required | Where the claim token is sent. This becomes your account. Format: email. |
name | string | optional | Optional label for the key, e.g. "staging". Shown in GET /v1/keys. |
source | object | optional | Optional discovery metadata supplied by a README, SDK, Postman collection or MCP client. |
Example request
{
"email": "you@example.com",
"name": "staging",
"source": {
"source": "web",
"medium": "docs"
}
}
curl
curl -X POST https://agentsupplytrust-api.com/v1/keys \
-H 'content-type: application/json' \
-d '{"email":"you@example.com","name":"staging","source":{"source":"web","medium":"docs"}}'
Response
| Field | Type | Notes |
|---|---|---|
status | "verification_sent" | |
email | string | Format: email. |
expiresAt | string | After this, request a new one. Format: date-time. |
next | string | The endpoint that turns the emailed token into a key. |
message | string | |
requestId | string |
/v1/keysList your API keys for this API
Every key on YOUR account for this API — label, non-secret prefix, status, when it was created, when it was last used, and what it has consumed this period. Authenticate with any active key on the account; the account is taken from that key, never from a parameter, so this can only ever return your own keys. Keys you hold for other APIs in the portfolio are not listed here. Secrets are not returned and cannot be: only a peppered hash is stored. Free, and consumes no quota.
Try itGET /v1/keysFree — no quota
Needs your API key. The contract gives this endpoint no quota cost and it takes no request body, so nothing is reserved and nothing is billed.
Using the API key from the playground key field — no key set yet. It is sent only in the Authorization: Bearer header, only to https://agentsupplytrust-api.com.
Your browser will not send an Authorization header to this API from this page: authenticated endpoints do not enable cross-origin access, deliberately, so that a key can never be read out of a web app’s front-end. Press Show as curl and run the request from a terminal instead — your edits are carried into it.
curl
curl -X GET https://agentsupplytrust-api.com/v1/keys \
-H "Authorization: Bearer $KEY"
Response
| Field | Type | Notes |
|---|---|---|
product | string | |
accountId | string | |
keys | object[] | |
requestId | string |
/v1/keys/claimExchange an emailed claim token for the API key
Spends the token emailed by POST /v1/keys and returns the key. The key is shown ONCE — only a peppered hash is stored, so it can never be read back; if you lose it, rotate. The key works only on this API, and the allowance it is issued with reflects your account: your paid plan when you have one, the free sandbox allowance when you do not.
Try itPOST /v1/keys/claimNo key required
Public endpoint. No API key, no quota, nothing billed.
Request body
| Field | Type | Notes | |
|---|---|---|---|
token | string | required | The claim token from the verification email. |
Example request
{
"token": "eyJ2IjoxLCJlIjoieW91QGV4YW1wbGUuY29tIn0.ZXhhbXBsZQ"
}
curl
curl -X POST https://agentsupplytrust-api.com/v1/keys/claim \
-H 'content-type: application/json' \
-d '{"token":"eyJ2IjoxLCJlIjoieW91QGV4YW1wbGUuY29tIn0.ZXhhbXBsZQ"}'
Response
| Field | Type | Notes |
|---|---|---|
apiKey | string | Shown once and never again. Store it now. |
keyId | string | Use this with /v1/keys/{id}/revoke and /v1/keys/{id}/rotate. |
product | string | The key works only on this API. |
quotaPerPeriod | integer | null | |
plan | string | The tier this allowance came from, or "sandbox" on the free tier. |
warning | string | |
usage | string | |
requestId | string |
/v1/keys/{id}/rotateReplace one of your API keys with a new secret
Issues a replacement key and revokes the old one. This is the answer to a leaked or lost key: the new secret is returned once, the old secret stops working immediately, and the label carries over unless you supply a new one. The replacement is issued at your account's current allowance — your paid plan if you have one — not at the old key's. Rotating does not count against the active-key limit, because it replaces rather than adds. Free, and it works while you are out of quota.
Try itPOST /v1/keys/{id}/rotateQuota: no fixed cost
Runs against your real account. The contract gives this endpoint no fixed quota cost: nothing is reserved before it runs, and endpoints whose work scales with the payload reserve an amount derived from the body instead — so a large request here can cost more than one unit. Send a small one first.
Using the API key from the playground key field — no key set yet. It is sent only in the Authorization: Bearer header, only to https://agentsupplytrust-api.com.
Your browser will not send an Authorization header to this API from this page: authenticated endpoints do not enable cross-origin access, deliberately, so that a key can never be read out of a web app’s front-end. Press Show as curl and run the request from a terminal instead — your edits are carried into it.
Request body
| Field | Type | Notes | |
|---|---|---|---|
name | string | optional | Optional new label. Defaults to the old key's. |
Example request
{
"name": "production (rotated)"
}
curl
curl -X POST https://agentsupplytrust-api.com/v1/keys/{id}/rotate \
-H "Authorization: Bearer $KEY" \
-H 'content-type: application/json' \
-d '{"name":"production (rotated)"}'
Response
| Field | Type | Notes |
|---|---|---|
apiKey | string | The new secret. Shown once. |
keyId | string | |
replaced | string | The id of the key that was revoked. |
product | string | |
quotaPerPeriod | integer | null | |
plan | string | |
warning | string | |
requestId | string |
/v1/keys/{id}/revokeRevoke one of your API keys
Kills a key immediately: the very next request made with it is refused with 401 invalid_api_key. There is no propagation delay and no cache to wait out. You may revoke the key you are authenticating with — that is the correct move when it has leaked, though you will then need another key, or the email flow, to get back in; rotate does both in one call. A key belonging to another account, or to another API, answers 404 exactly as an unknown id does, so this cannot be used to probe for keys you do not own. Idempotent, and free.
Try itPOST /v1/keys/{id}/revokeFree — no quota
Needs your API key. The contract gives this endpoint no quota cost and it takes no request body, so nothing is reserved and nothing is billed.
Using the API key from the playground key field — no key set yet. It is sent only in the Authorization: Bearer header, only to https://agentsupplytrust-api.com.
Your browser will not send an Authorization header to this API from this page: authenticated endpoints do not enable cross-origin access, deliberately, so that a key can never be read out of a web app’s front-end. Press Show as curl and run the request from a terminal instead — your edits are carried into it.
The contract declares no request schema for this endpoint, so there is nothing to prefill. See the description above for what it accepts.
curl
curl -X POST https://agentsupplytrust-api.com/v1/keys/{id}/revoke \
-H "Authorization: Bearer $KEY"
Response
| Field | Type | Notes |
|---|---|---|
id | string | |
status | "revoked" | |
message | string | |
requestId | string |
/v1/usageYour consumption and remaining allowance for this period
Reports what YOUR ACCOUNT has consumed in the current quota period, the ceiling being enforced against it, and when that ceiling resets. The allowance belongs to the account, not to a key: every key you hold for this API draws on the same budget, so "used" is the total across all of them and a new key does not arrive with a fresh one. Free, and it consumes no quota, so it still answers once you are getting 429 quota_exceeded — which is the point: compare "used" against "ceiling" and read "period.resetsAt" to tell a period you have simply exhausted from a plan that is no longer active, which shows as a "status" of canceled and a ceiling of 0. "used" counts billing units (see "unit"), not HTTP requests: a single request can consume several. All money is in integer minor units (cents), never a decimal. The period reported here is the quota period — the calendar month in UTC, resetting at 00:00 UTC on the 1st. Your invoice window is anchored to the date you subscribed and is a different window; the amounts here are what this period’s usage has accrued so far, not a bill.
Try itGET /v1/usageFree — no quota
Needs your API key. The contract gives this endpoint no quota cost and it takes no request body, so nothing is reserved and nothing is billed.
Using the API key from the playground key field — no key set yet. It is sent only in the Authorization: Bearer header, only to https://agentsupplytrust-api.com.
Your browser will not send an Authorization header to this API from this page: authenticated endpoints do not enable cross-origin access, deliberately, so that a key can never be read out of a web app’s front-end. Press Show as curl and run the request from a terminal instead — your edits are carried into it.
curl
curl -X GET https://agentsupplytrust-api.com/v1/usage \
-H "Authorization: Bearer $KEY"
Response
| Field | Type | Notes |
|---|---|---|
product | string | The API this key is bound to. A key works only on one. |
tier | string | null | The plan tier you are billed on, e.g. "developer". Null on a free sandbox key with no paid plan. |
status | "sandbox" | "active" | "past_due" | "canceled" | State of your plan. "sandbox" means no paid plan; "canceled" explains a ceiling of 0. |
unit | string | The billing unit this API meters. "used", "included", "ceiling" and "remaining" are all counted in these, not in requests. |
period | object | The quota period: the calendar month in UTC. |
included | integer | Units your flat monthly fee already covers, before overage pricing applies. 0 without a paid plan. |
used | integer | Units your account has consumed so far this period, summed across every key you hold for this API. |
ceiling | integer | null | The hard limit enforced against your ACCOUNT: requests on any of its keys are refused once the total passes it. Null means unlimited. |
remaining | integer | null | ceiling minus used, never below 0. Null when the ceiling is unlimited. |
overageSoFarMinor | integer | What this period’s usage beyond "included" has accrued, in minor units, before your spend cap is applied. 0 without a paid plan. |
spendCapMinor | integer | The most the overage part of one period can ever cost you, in minor units. Your flat base fee is separate and is never capped away. |
requestId | string | Quote this when reporting a problem. |
/v1/checkoutStart a hosted Square checkout for a paid tier
Returns a Square-hosted payment URL for the requested tier. No API key is needed — a prospect has not got one yet. The email Square collects becomes the account, so a key issued later for the same address inherits the paid quota. Enterprise returns a contact route rather than a payment link. THIS IS THE PATH FOR SOMEONE WHO IS NOT YET PAYING. It starts a NEW Square recurring subscription, so it is refused with 409 `conflict` (`details.reason` `existing_subscription`) when the request carries a dashboard session for an account that already has a live plan on this API — a second subscription would be charged alongside the first, every month, and this API cannot cancel either one. Change tier with POST /v1/subscription/plan, or, when Square collects your base fee, cancel it with Square first.
Try itPOST /v1/checkoutNo key required
Public endpoint. No API key, no quota, nothing billed.
Request body
| Field | Type | Notes | |
|---|---|---|---|
tier | string | required | developer | growth | scale | enterprise |
Example request
{
"tier": "developer"
}
curl
curl -X POST https://agentsupplytrust-api.com/v1/checkout \
-H 'content-type: application/json' \
-d '{"tier":"developer"}'
Response
| Field | Type | Notes |
|---|---|---|
checkoutUrl | string | Square-hosted payment page. Redirect the buyer here. Format: uri. |
tier | string | |
sku | string | |
requestId | string |
/v1/subscriptionYour current plan, billing window and available changes (dashboard session required)
Reports the plan this account is on, the billing window it is in, any tier change already staged for the next invoice, and the full pricing ladder marked up so you can see which rungs are an upgrade and which a downgrade. `planChangesGoThrough` is the field to branch on: `self_serve` means POST /v1/subscription/plan can move you; `provider_managed` means Square’s own recurring subscription holds your price and neither this API nor a new checkout can move it — buying again would create a SECOND Square subscription and charge you twice; `checkout` appears only when you have no plan at all, where starting one is exactly right. All money is in integer minor units (cents). AUTHENTICATION IS YOUR DASHBOARD SESSION, NOT AN API KEY. Send the `@sp/core` session cookie this API sets when you sign in, from the same origin. An API key is refused here on purpose: it is a data-plane credential that lives in CI and in third-party integrations, and it must never be able to change what you are billed, cancel your account, or read your payment history. Errors: 401 `unauthenticated` when there is no valid session, 403 `forbidden` when the request is cross-origin or its `x-csrf-token` header is missing or wrong.
Try itGET /v1/subscriptionSign-in required
Needs a signed-in dashboard session, not an API key. Your account comes from the session cookie, so this cannot be called with a bearer token and cannot act on another account.
curl
curl -X GET https://agentsupplytrust-api.com/v1/subscription
Response
| Field | Type | Notes |
|---|---|---|
product | string | |
subscribed | boolean | False when this account has never had a paid plan on this API. |
status | "sandbox" | "active" | "past_due" | "canceled" | "sandbox" when there is no paid plan at all — the same vocabulary GET /v1/usage reports. |
plan | object | null | The tier in force right now. |
pendingPlan | object | null | A tier change already staged, applied when the current window is invoiced. |
planChangesGoThrough | "self_serve" | "provider_managed" | "checkout" | `self_serve` — POST /v1/subscription/plan moves you. `provider_managed` — Square holds your recurring price; the tier cannot be moved from here and starting a new checkout would duplicate the subscription. `checkout` — no plan yet, so POST /v1/checkout is where one starts. |
baseFeeOwner | "internal" | "provider" | Who collects the flat monthly fee: us, or Square’s own recurring subscription. |
cancellation | object | What cancelling would do, stated before you do it. |
tiers | object[] | The published ladder, each rung marked current / upgrade / downgrade. |
requestId | string |
/v1/subscription/planUpgrade or downgrade to another plan (dashboard session required)
Moves this account to another rung of the published pricing ladder and re-derives the ceiling enforced against every API key on it, so an upgrade is usable immediately rather than at the next invoice. The change is STAGED, not overwritten: the current billing window is closed at this instant and priced against the tier that was actually in force for it, and the incoming tier opens the next window with the original billing anniversary preserved. A downgrade therefore never re-prices days you already consumed on the dearer plan. Refused with 409 `conflict` (`details.reason` `provider_owned_base_fee`) when Square’s own recurring subscription holds your price (`baseFeeOwner` is `provider`) — read `planChangesGoThrough` from GET /v1/subscription first. That case cannot be moved from here at all: this API holds no Square subscription of yours to change, and POST /v1/checkout would create a SECOND one and charge you for both. Cancel with Square and buy the tier you want, or contact support. AUTHENTICATION IS YOUR DASHBOARD SESSION, NOT AN API KEY. Send the `@sp/core` session cookie this API sets when you sign in, from the same origin. An API key is refused here on purpose: it is a data-plane credential that lives in CI and in third-party integrations, and it must never be able to change what you are billed, cancel your account, or read your payment history. Errors: 401 `unauthenticated` when there is no valid session, 403 `forbidden` when the request is cross-origin or its `x-csrf-token` header is missing or wrong.
Try itPOST /v1/subscription/planSign-in required
Needs a signed-in dashboard session, not an API key. Your account comes from the session cookie, so this cannot be called with a bearer token and cannot act on another account.
Request body
| Field | Type | Notes | |
|---|---|---|---|
planId | string | required | Tier id from GET /v1/subscription `tiers[].id`, e.g. "growth". |
Example request
{
"planId": "growth"
}
curl
curl -X POST https://agentsupplytrust-api.com/v1/subscription/plan \
-H 'content-type: application/json' \
-d '{"planId":"growth"}'
Response
| Field | Type | Notes |
|---|---|---|
changed | boolean | |
direction | "upgrade" | "downgrade" | |
from | string | |
to | string | |
entitlement | object | The ceiling now enforced on this account’s keys, and when it took effect. |
billing | object | Which tier the closed window is priced against, and when the new one starts. |
requestId | string |
/v1/subscription/cancelCancel this plan and end metered access (dashboard session required)
Cancels the plan and drops every API key on this account for this product to a ceiling of 0, so access ends at the moment you cancel rather than at some later date nothing would enforce. The window you cancel in is closed and invoiced first, prorated to that instant: the elapsed share of the base fee plus any overage you accrued, still under the same spend cap. The invoice it writes is returned as `finalInvoice` and appears in GET /v1/invoices. When Square’s own recurring subscription collects your flat monthly fee (`baseFeeOwner` is `provider`) this API cannot stop that charge, so the request is refused with 409 unless you send `acknowledgeProviderBilling: true` — that flag exists so nobody ends up with a ceiling of zero and a live monthly charge without having been told first. AUTHENTICATION IS YOUR DASHBOARD SESSION, NOT AN API KEY. Send the `@sp/core` session cookie this API sets when you sign in, from the same origin. An API key is refused here on purpose: it is a data-plane credential that lives in CI and in third-party integrations, and it must never be able to change what you are billed, cancel your account, or read your payment history. Errors: 401 `unauthenticated` when there is no valid session, 403 `forbidden` when the request is cross-origin or its `x-csrf-token` header is missing or wrong.
Try itPOST /v1/subscription/cancelSign-in required
Needs a signed-in dashboard session, not an API key. Your account comes from the session cookie, so this cannot be called with a bearer token and cannot act on another account.
Request body
| Field | Type | Notes | |
|---|---|---|---|
acknowledgeProviderBilling | boolean | optional | Required only when `baseFeeOwner` is `provider`: confirms you understand Square will keep charging the monthly fee until you stop it there. |
Example request
{
"acknowledgeProviderBilling": true
}
curl
curl -X POST https://agentsupplytrust-api.com/v1/subscription/cancel \
-H 'content-type: application/json' \
-d '{"acknowledgeProviderBilling":true}'
Response
| Field | Type | Notes |
|---|---|---|
canceled | boolean | |
canceledAt | string | Format: date-time. |
entitlement | object | The ceiling now enforced. 0 — access has ended. |
money | object | Exactly what happens to the charges, per base-fee owner. |
finalInvoice | object | null | The invoice written for the window you cancelled in, or null when nothing had accrued. |
requestId | string |
/v1/invoicesEvery invoice issued against this account, newest first (dashboard session required)
Returns the stored `api_plan_invoices` rows for this account and this API — the rows the billing run actually wrote, never a reconstruction. Each one reconciles against itself: the included allowance and base fee shown are the PRORATED figures applied to that window, `overageMinorRaw` is the uncapped overage and `overageMinorCapped` is what was charged, and `baseChargedMinor` says how much of the base fee this invoice collected — 0 when Square’s recurring subscription had already taken it. An account with no billing history yet gets an empty list and a `note` explaining why, never a fabricated row. AUTHENTICATION IS YOUR DASHBOARD SESSION, NOT AN API KEY. Send the `@sp/core` session cookie this API sets when you sign in, from the same origin. An API key is refused here on purpose: it is a data-plane credential that lives in CI and in third-party integrations, and it must never be able to change what you are billed, cancel your account, or read your payment history. Errors: 401 `unauthenticated` when there is no valid session, 403 `forbidden` when the request is cross-origin or its `x-csrf-token` header is missing or wrong.
Try itGET /v1/invoicesSign-in required
Needs a signed-in dashboard session, not an API key. Your account comes from the session cookie, so this cannot be called with a bearer token and cannot act on another account.
curl
curl -X GET https://agentsupplytrust-api.com/v1/invoices
Response
| Field | Type | Notes |
|---|---|---|
product | string | |
count | integer | |
note | string | null | Present only when the list is empty: says why, in a sentence a customer can act on. |
invoices | object[] | |
requestId | string |
/v1/paymentsEvery payment attempted against this account and how it went (dashboard session required)
The money movements behind your invoices, newest first: what was charged, whether it succeeded, and the processor’s payment id when it did. A billing period that came to nothing produces NO row here — it was closed without asking the processor for anything, and listing it would show you a payment that never happened. A failed attempt does appear, with its reason, because that is why an account goes past due. AUTHENTICATION IS YOUR DASHBOARD SESSION, NOT AN API KEY. Send the `@sp/core` session cookie this API sets when you sign in, from the same origin. An API key is refused here on purpose: it is a data-plane credential that lives in CI and in third-party integrations, and it must never be able to change what you are billed, cancel your account, or read your payment history. Errors: 401 `unauthenticated` when there is no valid session, 403 `forbidden` when the request is cross-origin or its `x-csrf-token` header is missing or wrong.
Try itGET /v1/paymentsSign-in required
Needs a signed-in dashboard session, not an API key. Your account comes from the session cookie, so this cannot be called with a bearer token and cannot act on another account.
curl
curl -X GET https://agentsupplytrust-api.com/v1/payments
Response
| Field | Type | Notes |
|---|---|---|
product | string | |
count | integer | |
note | string | null | |
payments | object[] | |
requestId | string |
/Service index — endpoints, auth and error format
Try itGET /No key required
Public endpoint. No API key, no quota, nothing billed.
curl
curl -X GET https://agentsupplytrust-api.com/
Response
/healthLiveness and deployed version
Try itGET /healthNo key required
Public endpoint. No API key, no quota, nothing billed.
curl
curl -X GET https://agentsupplytrust-api.com/health
Response
Errors
Every failure returns the same shape. Branch on code — it is a stable enum.
message is for humans and may change.
{
"error": {
"code": "quota_exceeded",
"message": "Quota exceeded for this billing period.",
"requestId": "0f3c8b12-…"
}
}
| Code | HTTP | Meaning |
|---|---|---|
missing_api_key | 401 | No Authorization or x-api-key header |
invalid_api_key | 401 | Unknown, revoked, or issued for a different API |
quota_exceeded | 429 | Allowance used for this period |
rate_limited | 429 | Too many requests |
invalid_request | 400 | Validation failed — details.path names the exact field |
not_found | 404 | No such route or resource |
internal_error | 500 | Our fault, not yours |
Two codes return 429 and they mean different things. quota_exceeded is the
allowance for the billing period; it clears at the next period or on upgrade.
rate_limited is a per-minute ceiling on the key. Unless a ceiling has been set
explicitly for the key, it is derived from the key's period allowance: one hour's share of the month
(allowance ÷ 720, rounded up, never below 60) may be spent in any single minute — so
a plan with more volume also gets a higher ceiling. Both codes carry a
Retry-After header in whole seconds (RFC 9110) computed from the real reset
time, never a fixed constant, so honour it rather than guessing a back-off.
requestId appears on every response — success or failure — and in the
x-request-id header. Quote it and we can find the exact request. The playground
shows it above each response.
SDKs
Single files, zero dependencies — no requests, no axios — so they drop
into any environment without a dependency negotiation.
Python
from supply_chain_trust import SupplyChainTrust
client = SupplyChainTrust() # reads SUPPLY_CHAIN_TRUST_API_KEY
# One component per call. Use /v1/scans/batch for many.
res = client.scan({
"kind": "mcp_server",
"name": "acme-mcp",
"version": "2.1.0",
"provenance": {"signed": True, "publisherVerified": True,
"sourceRepo": "https://github.com/acme/mcp"},
"permissions": ["tool.invoke"],
})
print("risk score", res["riskScore"], res["severityCounts"])
for f in res["findings"]:
# facet says which dimension failed; code is the stable enum to branch on.
print(f["severity"], f["code"], f["facet"], f["message"])
TypeScript
import { SupplyChainTrust } from './supply-chain-trust.js'
const client = new SupplyChainTrust() // reads SUPPLY_CHAIN_TRUST_API_KEY
// One component per call. Use /v1/scans/batch for many.
const res = await client.scan({
kind: 'mcp_server',
name: 'acme-mcp',
version: '2.1.0',
provenance: { signed: true, publisherVerified: true,
sourceRepo: 'https://github.com/acme/mcp' },
permissions: ['tool.invoke'],
})
console.log('risk score', res.riskScore, res.severityCounts)
for (const f of res.findings) {
// `facet` says which dimension failed; branch on `code`.
console.log(f.severity, f.code, f.facet, f.message)
}
Download
| File | Size | Notes |
|---|---|---|
Python SDK supply_chain_trust.py | 14.5 kB | Single file, no dependencies — no requests, no httpx. Python 3.9+. |
TypeScript SDK supply_chain_trust.ts | 15.8 kB | Single file, no dependencies — no axios, no node-fetch. Node 18+, Deno, Bun and Workers. |
Postman collection postman_collection.json | 23.6 kB | Every endpoint, generated from the same contract as this page. Import it and set the key variable. |
These are the files from the repo, published here so they are reachable from the site rather than only from a checkout. They are regenerated with this page, so what you download is the version this reference describes.