API reference

Docs

List docs

GET/v1/docs

Lists every guide and concept in reading order. No auth.

Returns a list object whose data items are doc summaries (slug, title, summary, tags).

Next step: GET /v1/docs/{slug} for the full text.

Parameters

NameDescription
MonetizePay-Accountheader, string or null

Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.

Stripe-Accountheader, string or null

Optional. A synonym of MonetizePay-Account; holds a merchant id (mch_...).

Responses

StatusDescriptionBody
200

Successful Response

DocList
400

Invalid request. A parameter, header or body field failed validation (code parameter_invalid, with param naming it), or another invalid_request code this operation's description lists. Fix the request; do not retry it unchanged.

ErrorResponse

Example

curl
curl -X GET "https://api.monetize.pay/v1/docs"
Python
import requests

response = requests.get(
    "https://api.monetize.pay/v1/docs",
)
print(response.json())
Node.js
const response = await fetch("https://api.monetize.pay/v1/docs", {
  method: "GET",
});
console.log(await response.json());

Read one doc

GET/v1/docs/{slug}

Returns one document as JSON with its markdown body. No auth.

Errors: resource_missing when the slug does not exist (GET /v1/docs lists valid slugs).

Parameters

NameDescription
slugpath, stringRequired
MonetizePay-Accountheader, string or null

Optional. The merchant (mch_...) this request acts on, when the body has no merchant_id: the analogue of Stripe's Stripe-Account header.

Stripe-Accountheader, string or null

Optional. A synonym of MonetizePay-Account; holds a merchant id (mch_...).

Responses

StatusDescriptionBody
200

Successful Response

DocDetail
400

Invalid request. A parameter, header or body field failed validation (code parameter_invalid, with param naming it), or another invalid_request code this operation's description lists. Fix the request; do not retry it unchanged.

ErrorResponse
404

No such resource for this platform (resource_missing), or another not_found code this operation's description lists.

ErrorResponse

Example

curl
curl -X GET "https://api.monetize.pay/v1/docs/{slug}"
Python
import requests

response = requests.get(
    "https://api.monetize.pay/v1/docs/{slug}",
)
print(response.json())
Node.js
const response = await fetch("https://api.monetize.pay/v1/docs/{slug}", {
  method: "GET",
});
console.log(await response.json());

Agent-readable docs index

GET/llms.txt

Plain-text index of every doc with absolute links, in the llms.txt convention. No auth.

Responses

StatusDescriptionBody
200

Successful Response

string

Example

curl
curl -X GET "https://api.monetize.pay/llms.txt"
Python
import requests

response = requests.get(
    "https://api.monetize.pay/llms.txt",
)
print(response.status_code)
Node.js
const response = await fetch("https://api.monetize.pay/llms.txt", {
  method: "GET",
});
console.log(response.status);