Contents

POST /charities#

Register a new charity with the Donau. Only allowed if the request comes with the administrator bearer token. The request body defines the charity’s signing key, contact information, and the initial accounting values for the current business year. On success the Donau assigns a numeric identifier to the charity record.

Request: CharityRequest

Response:

Details:

201 Created:

The request was successful, and the response is a CharityResponse.

403 Forbidden:

The request did not contain an accepted administrator bearer token in its header.

404 Not found:

The referenced resource needed to create the charity was not found. This response comes with a standard ErrorDetail response.

409 Conflict:

A charity with the same public key exists in the backend, but it has different details. This response comes with a standard ErrorDetail response.

interface CharityRequest {

  // Long-term EdDSA public key that identifies the charity.
  charity_pub: EddsaPublicKey;

  // Canonical URL that should be presented to donors.
  charity_url: string;

  // Human-readable display name of the charity.
  charity_name: string;

  // Allowed donation volume for the charity per calendar year.
  max_per_year: Amount;
}
interface CharityResponse {

  // Unique ID assigned to the charity in the backend.
  charity_id: Integer;
}