API ReferenceView as MarkdownOpenAPI

Donations

View as Markdown

Donations are fundraising campaigns: a story, an optional target amount, predefined amounts to give and add-on options such as a gift.

Endpoints that need a token: the site owner creates it in their admin (Developers > API reference). AI assistants: how to ask the user for one.

5 endpoints.

List all donations

Returns the site's donations, newest first unless a sort is given.

User with accessOptional user

Needs a signed-in user whose plan grants access.

Query parameters
publishedstring

Only donations with this published.

completedstring

Only donations with this completed.

sortBystring

The order of the results.

collectionstring

Only results in this collection.

skipstring

How many results to skip - for paging.

wherestring

Only donations with this where.

Returns

Returns a list of Donation objects.

Status codes

200 401 402 404 500

GET/donations
curl -X GET 'http://cloudoffice-gr.max-media.io/donations?ionic=true&published=...&completed=...&sortBy=...' \
  -H 'Authorization: Bearer <TOKEN>'
Response
[
  {
    "enabled": false,
    "has_shippable_items": false,
    "medias": [
      {
        "media": "6543210fedcba98765432100",
        "gcs_url": "example-item",
        "gcs_480_30_url": "example-item",
        "gcs_720_30_url": "example-item",
        "gcs_1080_30_url": "example-item",
        "duration": 1,
        "vimeo_uri": "example",
        "vimeo_picture": "example",
        "vimeo_url": "example-item",
        "youtube_url": "example-item",
        "youtube_picture": "example",
        "thumbnail": "example",
        "_id": "6543210fedcba98765432100"
      }
    ],
    "url": "example-item",
    "static_url": "example-item",
    "title": "Example",
    "description": "Text shown on the site.",
    "about_page": "6543210fedcba98765432100",
    "collection_id": "6543210fedcba98765432100",
    "topics": [
      {
        "collection_id": "6543210fedcba98765432100",
        "_id": "6543210fedcba98765432100"
      }
    ],
    "owner_id": "6543210fedcba98765432100",
    "options": [
      {
        "name": "Example",
        "options": [],
        "_id": "6543210fedcba98765432100"
      }
    ],
    "_id": "6543210fedcba98765432100",
    "updatedAt": "2026-11-04T12:00:00.000Z",
    "createdAt": "2026-11-04T12:00:00.000Z",
    "target_amount": {
      "enabled": false,
      "amount": 0
    },
    "predefined_amounts": {
      "enabled": false,
      "amounts": "example"
    }
  }
]

Create a donation

Creates a donation from the fields sent.

Admin token

Needs a site admin token.

Parameters
titlestring

Name of the campaign, required.

Returns

Returns the Donation object.

Status codes

201 400 401 500

POST/donations
curl -X POST 'http://cloudoffice-gr.max-media.io/donations?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{ "title": "..." }'
Response
{
  "enabled": false,
  "has_shippable_items": false,
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "url": "example-item",
  "static_url": "example-item",
  "title": "Example",
  "description": "Text shown on the site.",
  "about_page": "6543210fedcba98765432100",
  "collection_id": "6543210fedcba98765432100",
  "topics": [
    {
      "collection_id": "6543210fedcba98765432100",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "owner_id": "6543210fedcba98765432100",
  "options": [
    {
      "name": "Example",
      "options": [],
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "target_amount": {
    "enabled": false,
    "amount": 0
  },
  "predefined_amounts": {
    "enabled": false,
    "amounts": "example"
  }
}

Update a donation

Changes the fields sent; the others stay as they are.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the donation.

Returns

Returns the Donation object.

Status codes

200 400 401 404 500

PATCH/donations/:id
curl -X PATCH 'http://cloudoffice-gr.max-media.io/donations/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'
Response
{
  "enabled": false,
  "has_shippable_items": false,
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "url": "example-item",
  "static_url": "example-item",
  "title": "Example",
  "description": "Text shown on the site.",
  "about_page": "6543210fedcba98765432100",
  "collection_id": "6543210fedcba98765432100",
  "topics": [
    {
      "collection_id": "6543210fedcba98765432100",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "owner_id": "6543210fedcba98765432100",
  "options": [
    {
      "name": "Example",
      "options": [],
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "target_amount": {
    "enabled": false,
    "amount": 0
  },
  "predefined_amounts": {
    "enabled": false,
    "amounts": "example"
  }
}

Delete a donation

Deletes the donation. This cannot be undone.

Admin token

Needs a site admin token.

Path parameters
idstringRequired

The ID of the donation.

Returns

Returns an empty answer on success.

Status codes

200 401 404 500

DELETE/donations/:id
curl -X DELETE 'http://cloudoffice-gr.max-media.io/donations/{id}?ionic=true' \
  -H 'Authorization: Bearer <TOKEN>'

Retrieve a donation

Returns one donation, found by its URL slug.

Page accessOptional user

Pages limited to some users check the token when one is sent.

Path parameters
urlstringRequired

The donation's URL slug, as in its address on the site.

Query parameters
sessionIdstring

Only donations with this session id.

Returns

Returns the Donation object.

Status codes

200 401 402 404 500

GET/donations/:url
curl -X GET 'http://cloudoffice-gr.max-media.io/donations/{url}?ionic=true&sessionId=...'
Response
{
  "enabled": false,
  "has_shippable_items": false,
  "medias": [
    {
      "media": "6543210fedcba98765432100",
      "gcs_url": "example-item",
      "gcs_480_30_url": "example-item",
      "gcs_720_30_url": "example-item",
      "gcs_1080_30_url": "example-item",
      "duration": 1,
      "vimeo_uri": "example",
      "vimeo_picture": "example",
      "vimeo_url": "example-item",
      "youtube_url": "example-item",
      "youtube_picture": "example",
      "thumbnail": "example",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "url": "example-item",
  "static_url": "example-item",
  "title": "Example",
  "description": "Text shown on the site.",
  "about_page": "6543210fedcba98765432100",
  "collection_id": "6543210fedcba98765432100",
  "topics": [
    {
      "collection_id": "6543210fedcba98765432100",
      "_id": "6543210fedcba98765432100"
    }
  ],
  "owner_id": "6543210fedcba98765432100",
  "options": [
    {
      "name": "Example",
      "options": [],
      "_id": "6543210fedcba98765432100"
    }
  ],
  "_id": "6543210fedcba98765432100",
  "updatedAt": "2026-11-04T12:00:00.000Z",
  "createdAt": "2026-11-04T12:00:00.000Z",
  "target_amount": {
    "enabled": false,
    "amount": 0
  },
  "predefined_amounts": {
    "enabled": false,
    "amounts": "example"
  }
}
↑↓ Navigate↵ GoEsc Close