How to publish an ACP discovery document
A step-by-step guide to serving /.well-known/acp.json: what goes in it, the headers it needs, server examples, and the mistakes that make agents ignore it.
The ACP discovery document is a small JSON file that tells an AI agent you support the Agentic Commerce Protocol, which versions you accept and where your API is. It is the only part of an ACP integration that anyone can read without credentials.
This guide covers publishing one. It assumes you already run an ACP API. If you do not, stop here: the document describes an API, and publishing one that points at nothing is worse than publishing none. What is ACP? explains whether you need the API at all.
Accurate as of November 2026, against ACP release 2026-04-17.
1. Write the document
{
"protocol": {
"name": "acp",
"version": "2026-04-17",
"supported_versions": ["2026-01-30", "2026-04-17"]
},
"api_base_url": "https://shop.example/api/acp",
"transports": ["rest"],
"capabilities": {
"services": ["checkout", "orders"]
}
}
Field by field:
| Field | Rule |
|---|---|
protocol.name |
The literal string acp |
protocol.version |
The release you implement, as a date. Must be a real release |
protocol.supported_versions |
Every version you accept, oldest first. Must include version |
api_base_url |
An https:// address on a public host |
transports |
Includes rest. Add mcp only if you serve it |
capabilities.services |
What you offer, from checkout, orders, carts, delegate_payment |
List only what works. An agent takes services at its word.
2. Keep secrets out of it
The file is public and cached by whatever fetches it. It must not contain API keys, bearer tokens, webhook secrets or merchant account identifiers. These get in when someone copies a private configuration file as a starting point, so write the document from scratch.
3. Serve it at the fixed address
https://shop.example/.well-known/acp.json
Three things about the response matter as much as the body:
- Status 200, with no login. A redirect to a sign-in page is a missing document.
Content-Type: application/json.Cache-Control: public, max-age=3600. The specification recommends an hour.
Nginx
location = /.well-known/acp.json {
default_type application/json;
add_header Cache-Control "public, max-age=3600";
alias /var/www/shop/acp.json;
}
If your configuration blocks paths that begin with a dot, this rule has to come before that one.
Apache
<Files "acp.json">
ForceType application/json
Header set Cache-Control "public, max-age=3600"
</Files>
Laravel
Route::get('/.well-known/acp.json', fn () => response()
->json(config('acp.discovery'))
->header('Cache-Control', 'public, max-age=3600'));
Node (Express)
app.get('/.well-known/acp.json', (req, res) => {
res.set('Cache-Control', 'public, max-age=3600').json(discovery);
});
Generating it from configuration, as the last two do, has one advantage: api_base_url and the version list cannot drift from what the application actually runs.
4. Serve it on every host
If your bare domain redirects to www, decide which is canonical and make sure the document answers there with a 200. Agents are not obliged to follow a redirect on a well-known address, and one that points to another domain entirely should not be trusted.
5. Check it from outside
curl -i https://shop.example/.well-known/acp.json
Confirm the status, the two headers and the body. Then check the API the document names is alive, because the file being right is no use if the address in it is dead:
curl -i -H "API-Version: 2026-04-17" https://shop.example/api/acp/checkout_sessions/test
Without credentials this should be refused with a 401 or 403. That is the correct answer. A 500, a timeout or a 200 is a problem.
Our free check does all of this in one run and validates the body against the schema published with the specification. How to validate an ACP discovery document goes through each test.
What goes wrong afterwards
Publishing is the easy part. The document goes stale when:
- You upgrade the API and forget to change
versionor add tosupported_versions. - You retire an old version and leave it in the list.
- The API moves in a replatform and
api_base_urlstill names the old address. - A CDN or firewall rule changes and the file starts returning a challenge page.
None of these raise an error on your side. A daily check is the practical way to hear about them.
Read next
- How to validate an ACP discovery document — every test, and what a failure means
- What is ACP? — the protocol, and where it stands now
- What is a .well-known file? — why the address is fixed, and how serving one goes wrong