This is a reference example, not a required API design or a drop-in implementation. Adapt the endpoints, fields, responses, and fulfillment steps to your product. Only the linked ZeroClick integration requirements are platform contracts.
Example choices
- ZeroClick policy: choose
offwhen document delivery needs no verified agent-owner email. - Seller input: accept optional
contactEmailonly if you have a defined use for it, such as sending a copy when requested. Omit the field entirely if you do not need it. - Fulfillment: return a download URL from your document service. A direct download works without any email address.
Build the example
Describe the action and endpoints
Add a service such as
white-paper and describe its outcome and $0 cost. Register your endpoint schemas without meter links, following shared setup. These paths are suggestions for your API:These endpoints belong to your upstream API and are called through your pay URL. They are not built-in ZeroClick API operations.
Define the seller inputs
This reference design uses the following inputs. Adapt their names and required status to your product:
For example, the request body could be:
Validate and fulfill the request
Use the Return the response without reporting billable usage. Your application supplies the fulfillment logic and error handling; the seller SDK supplies request verification.
verifyFreeActionRequest helper from shared setup with service slug white-paper. Return a guard denial immediately, then parse and validate your input. Return 400 for malformed or missing fields before creating any records or sending messages.Look up the document by id and check that it is available. For direct delivery, return a URL your user can actually open. If it expires, include the expiration in the response and document how to obtain a new one.If sendCopy is true, require contactEmail in your input validation before requesting email delivery. This conditional requirement is your application rule and is independent of ZeroClick’s Off setting. Accepting that address does not verify it.Deduplicate email delivery by the verified agent id and operationId so retries do not send repeated copies. Report whether the email was queued separately from the download result. Keep storage credentials on your server.Return 200 OK with the download result. If you use signed URLs, include an expiresAt timestamp. Do not claim that a queued email was delivered.Test through your pay URL
Use a staging integration. Save the example body as Run the shared integration checks, then test the cases specific to this action:
request.json, replace its values and the placeholder pay URL below, and get an agent token through your storefront’s /auth.md recipe.- Request the direct download without
contactEmail: the result includes a usable URL. - Set
sendCopytotruewithout an address: your API rejects the input even though ZeroClick policy is Off. - Request an unknown document: return
404rather than a broken download URL. - Repeat an email request with the same
operationId: only one copy is queued. - Open the returned URL from the intended recipient’s environment; check expiration behavior if applicable.
Describe the agent's workflow
List the available documents, choose one relevant to the user’s request, retrieve its URL, and return the title and link. Ask for an email only if the user wants email delivery. If you choose to gate downloads on contact collection, document that as a seller input requirement; requiring the ZeroClick owner’s verified email is a separate decision.Publish these instructions with your service and add discovery signals on the relevant website page.