API buttons send an outbound HTTP request every time you press them. The URL, method, headers, and body are all stored in the button spec.Documentation Index
Fetch the complete documentation index at: https://docs.buttons.sh/llms.txt
Use this file to discover all available pages before exploring further.
Basic GET
{{user_id}} placeholder in the URL path is replaced with the value you pass. Values in path segments are encoded with PathEscape to prevent injection.
POST with a body
Context-aware encoding
{{arg}} substitution is aware of where in the request the value appears:
| Location | Encoding applied |
|---|---|
| URL path segment | url.PathEscape |
| URL query parameter | url.QueryEscape |
JSON body (Content-Type: application/json) | JSON string escape |
Form body (Content-Type: application/x-www-form-urlencoded) | url.QueryEscape |
O'Reilly & Sons is safe to pass into a JSON body or a query string without manual escaping. See template encoding for the full details.
Custom headers
Pass--header once per header. Headers support {{arg}} substitution just like the URL and body:
Response size limit
Responses are capped at 10 MB by default. Override with--max-response-size (value in bytes):
Private network targets
By default, HTTP buttons block requests to private network ranges (loopback, RFC 1918, link-local). To allow a localhost or intranet target, pass--allow-private-networks at create time:
Related
- URL and body templates — how
{{arg}}substitution works - SSRF protection — private network blocking
- Arguments — declare typed args