Skip to content
API reference/Donations

List a site's gifts

Try it

Gifts made through the site's Donate section, newest first, each with its payments. Filter by how often, state, or the calendar year it was given.

GET/api/v1/sites/{site_id}/donations

Authentication

An API key as Authorization: Bearer or x-api-key. It needs the donations:read scope — read gifts made through a site's Donate section.

donations:readRead onlyMCP tool: list_donations

Parameters

Named placeholders go in the path; the rest in the query string.

site_idstringPath · required
The site's id.1 to 100 characters
frequencystringQuery · optional
One of: once, monthly
statusstringQuery · optional
One of: paid, active, canceled
yearintegerQuery · optional
Only gifts given in this calendar year (the account's time zone).2020 to 2100
limitintegerQuery · optional
How many to return (1–100).1 to 100Default 50
cursorstringQuery · optional
next_cursor from the previous page.1 to 100 characters

Response

200 with JSON on success (schema on the right). Errors use the standard envelope.

curl
curl -X GET 'https://websites.workflowcorp.com/api/v1/sites/SITE_ID/donations?frequency=monthly' \
  -H "Authorization: Bearer $WEBSITEBUDDY_API_KEY"
Example arguments
{
  "site_id": "SITE_ID",
  "frequency": "monthly"
}
Response schema
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "number": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The site's gift number (#1, #2 …)."
          },
          "frequency": {
            "type": "string",
            "enum": [
              "once",
              "monthly"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "paid",
              "active",
              "canceled"
            ],
            "description": "paid = a one-time gift received; active = a monthly gift still giving; canceled = a monthly gift stopped."
          },
          "amount_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "The gift (each month's, for a monthly one)."
          },
          "currency": {
            "type": "string"
          },
          "donor": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "email": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "email"
            ],
            "additionalProperties": false
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "purpose": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the gift is for — the Donate section's “purpose” when it was given."
          },
          "page_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "received_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Money received for this gift so far."
          },
          "refunded_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Of that, given back by card refund (refund_donation_payment, or in Stripe)."
          },
          "last_paid_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "canceled_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "payments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "amount_cents": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "refunded_cents": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991,
                  "description": "Given back by card refund — confirmed by Stripe."
                },
                "paid_at": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "amount_cents",
                "refunded_cents",
                "paid_at"
              ],
              "additionalProperties": false
            },
            "description": "Each charge, oldest first."
          },
          "is_sample": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "number",
          "frequency",
          "status",
          "amount_cents",
          "currency",
          "donor",
          "note",
          "purpose",
          "page_path",
          "received_cents",
          "refunded_cents",
          "last_paid_at",
          "canceled_at",
          "created_at",
          "payments",
          "is_sample"
        ],
        "additionalProperties": false
      }
    },
    "has_more": {
      "type": "boolean"
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "totals": {
      "type": "object",
      "properties": {
        "year": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "received_cents": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "Received in that calendar year (the account's time zone), less card refunds."
        },
        "payments": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "monthly_givers": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "Monthly gifts giving right now."
        },
        "monthly_cents": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "What they give each month, in all."
        }
      },
      "required": [
        "year",
        "received_cents",
        "payments",
        "monthly_givers",
        "monthly_cents"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data",
    "has_more",
    "next_cursor",
    "totals"
  ],
  "additionalProperties": false
}