Donately Donations API

Create, list, retrieve, and refund donations against an account or campaign. The create endpoint accepts donation_type values of cc, ach, cash, and paypal and can be called unauthenticated from public embeddable forms.

OpenAPI Specification

donately-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Donately API
  description: >-
    The Donately API is a REST/JSON API for online donation and fundraising
    management. It exposes accounts, campaigns, donations, recurring
    subscriptions, people (donors), fundraisers, forms, and webhooks. Base URL
    https://api.donately.com/v2 (API version 2019-03-15). Requests are
    authenticated with an API token via HTTP Basic Auth (the token is
    base64-encoded with a trailing colon); the token is found in the Donately
    dashboard under Settings -> API. Most endpoints require an account_id
    parameter identifying which account to operate against. NOTE: Donately's
    reference renders as a JavaScript single-page app that could not be fully
    crawled; endpoints confirmed from documentation and third-party connectors
    are marked as such, and the remainder are modeled on Donately's Stripe-style
    REST conventions - verify exact paths against developer.donately.com/api.
  version: '2019-03-15'
  contact:
    name: Donately
    url: https://developer.donately.com/
servers:
  - url: https://api.donately.com/v2
    description: Donately API (version 2019-03-15)
security:
  - basicAuth: []
tags:
  - name: Accounts
    description: The organizations a token has access to.
  - name: Campaigns
    description: Fundraising pages with goals and settings.
  - name: Donations
    description: One-time and recurring gifts.
  - name: Subscriptions
    description: Recurring donation schedules.
  - name: People
    description: Donors and contacts.
  - name: Fundraisers
    description: Peer-to-peer fundraising pages under a campaign.
paths:
  /accounts:
    get:
      operationId: listAccounts
      tags:
        - Accounts
      summary: List accounts
      description: >-
        Lists the accounts (organizations) the authenticated token can access.
        MODELED - verify against the live reference.
      responses:
        '200':
          description: A list of accounts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /accounts/{id}:
    get:
      operationId: getAccount
      tags:
        - Accounts
      summary: Retrieve an account
      description: Retrieves a single account by ID. MODELED - verify against the live reference.
      parameters:
        - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: An account object.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /donations:
    get:
      operationId: listDonations
      tags:
        - Donations
      summary: List donations
      description: >-
        Returns donations for the specified account. CONFIRMED. Accepts an
        account_id parameter and standard list pagination parameters.
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
      responses:
        '200':
          description: A list of donations.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createDonation
      tags:
        - Donations
      summary: Create a donation
      description: >-
        Creates a new donation. CONFIRMED. This endpoint can be called
        unauthenticated for public campaign donations (as the embeddable form
        does). donation_type accepts cc, ach, cash, or paypal.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DonationCreate'
      responses:
        '200':
          description: The created donation.
        '400':
          $ref: '#/components/responses/BadRequest'
  /donations/{id}:
    get:
      operationId: getDonation
      tags:
        - Donations
      summary: Retrieve a donation
      description: Retrieves a single donation by ID. MODELED - verify against the live reference.
      parameters:
        - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: A donation object.
        '404':
          $ref: '#/components/responses/NotFound'
  /donations/{id}/refund:
    post:
      operationId: refundDonation
      tags:
        - Donations
      summary: Refund a donation
      description: Refunds a donation. MODELED - verify against the live reference.
      parameters:
        - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: The refunded donation.
        '404':
          $ref: '#/components/responses/NotFound'
  /campaigns:
    get:
      operationId: listCampaigns
      tags:
        - Campaigns
      summary: List campaigns
      description: Returns campaigns for the specified account. CONFIRMED.
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
      responses:
        '200':
          description: A list of campaigns.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createCampaign
      tags:
        - Campaigns
      summary: Create a campaign
      description: Creates a new campaign. MODELED - verify against the live reference.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignCreate'
      responses:
        '200':
          description: The created campaign.
        '400':
          $ref: '#/components/responses/BadRequest'
  /campaigns/{id}:
    get:
      operationId: getCampaign
      tags:
        - Campaigns
      summary: Retrieve a campaign
      description: Retrieves a single campaign by ID. MODELED - verify against the live reference.
      parameters:
        - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: A campaign object.
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateCampaign
      tags:
        - Campaigns
      summary: Update a campaign
      description: Updates an existing campaign. CONFIRMED.
      parameters:
        - $ref: '#/components/parameters/IdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CampaignCreate'
      responses:
        '200':
          description: The updated campaign.
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteCampaign
      tags:
        - Campaigns
      summary: Delete a campaign
      description: Deletes a campaign. MODELED - verify against the live reference.
      parameters:
        - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: Deletion confirmation.
        '404':
          $ref: '#/components/responses/NotFound'
  /subscriptions:
    get:
      operationId: listSubscriptions
      tags:
        - Subscriptions
      summary: List subscriptions
      description: >-
        Returns recurring subscriptions for the specified account. CONFIRMED.
        Each subscription generates donations on its configured frequency.
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
      responses:
        '200':
          description: A list of subscriptions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /subscriptions/{id}:
    get:
      operationId: getSubscription
      tags:
        - Subscriptions
      summary: Retrieve a subscription
      description: Retrieves a single subscription by its unique identifier. CONFIRMED.
      parameters:
        - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: A subscription object.
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: cancelSubscription
      tags:
        - Subscriptions
      summary: Cancel a subscription
      description: Cancels a recurring subscription. MODELED - verify against the live reference.
      parameters:
        - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: The cancelled subscription.
        '404':
          $ref: '#/components/responses/NotFound'
  /people:
    get:
      operationId: listPeople
      tags:
        - People
      summary: List people
      description: >-
        Returns the people (donors and contacts) for the specified account.
        MODELED - verify against the live reference.
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
      responses:
        '200':
          description: A list of people.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createPerson
      tags:
        - People
      summary: Create a person
      description: Creates a new person (donor/contact). MODELED - verify against the live reference.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PersonCreate'
      responses:
        '200':
          description: The created person.
        '400':
          $ref: '#/components/responses/BadRequest'
  /people/{id}:
    get:
      operationId: getPerson
      tags:
        - People
      summary: Retrieve a person
      description: Retrieves a single person by ID. MODELED - verify against the live reference.
      parameters:
        - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: A person object.
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updatePerson
      tags:
        - People
      summary: Update a person
      description: Updates an existing person. MODELED - verify against the live reference.
      parameters:
        - $ref: '#/components/parameters/IdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PersonCreate'
      responses:
        '200':
          description: The updated person.
        '404':
          $ref: '#/components/responses/NotFound'
  /fundraisers:
    get:
      operationId: listFundraisers
      tags:
        - Fundraisers
      summary: List fundraisers
      description: >-
        Returns peer-to-peer fundraisers for the specified account or campaign.
        MODELED - verify against the live reference.
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
      responses:
        '200':
          description: A list of fundraisers.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createFundraiser
      tags:
        - Fundraisers
      summary: Create a fundraiser
      description: Creates a new peer-to-peer fundraiser under a campaign. MODELED - verify against the live reference.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FundraiserCreate'
      responses:
        '200':
          description: The created fundraiser.
        '400':
          $ref: '#/components/responses/BadRequest'
  /fundraisers/{id}:
    get:
      operationId: getFundraiser
      tags:
        - Fundraisers
      summary: Retrieve a fundraiser
      description: Retrieves a single fundraiser by ID. MODELED - verify against the live reference.
      parameters:
        - $ref: '#/components/parameters/IdParam'
      responses:
        '200':
          description: A fundraiser object.
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      operationId: updateFundraiser
      tags:
        - Fundraisers
      summary: Update a fundraiser
      description: Updates an existing fundraiser. MODELED - verify against the live reference.
      parameters:
        - $ref: '#/components/parameters/IdParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FundraiserCreate'
      responses:
        '200':
          description: The updated fundraiser.
        '404':
          $ref: '#/components/responses/NotFound'
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        HTTP Basic Auth. Use your Donately API token as the username with an
        empty password (the token is base64-encoded with a trailing colon). Find
        the token in the Donately dashboard under Settings -> API.
  parameters:
    IdParam:
      name: id
      in: path
      required: true
      description: The unique identifier of the resource.
      schema:
        type: string
    AccountIdParam:
      name: account_id
      in: query
      required: true
      description: The ID of the account to operate against.
      schema:
        type: string
  responses:
    Unauthorized:
      description: Authentication failed or was not provided.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: The request was malformed or missing required parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    ListResponse:
      type: object
      description: Standard Donately list envelope.
      properties:
        object:
          type: string
        data:
          type: array
          items:
            type: object
        summary:
          type: object
        params:
          type: object
    Error:
      type: object
      properties:
        object:
          type: string
          example: error
        error:
          type: object
          properties:
            type:
              type: string
            message:
              type: string
    DonationCreate:
      type: object
      required:
        - account_id
        - amount_in_cents
        - donation_type
      properties:
        account_id:
          type: string
          description: The account this donation belongs to.
        amount_in_cents:
          type: integer
          description: The donation amount in cents.
        donation_type:
          type: string
          enum:
            - cc
            - ach
            - cash
            - paypal
          description: The payment method for the donation.
        campaign_id:
          type: string
          description: Optional campaign to attribute the donation to.
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
    CampaignCreate:
      type: object
      required:
        - account_id
        - title
      properties:
        account_id:
          type: string
        title:
          type: string
        goal_in_cents:
          type: integer
        description:
          type: string
    PersonCreate:
      type: object
      required:
        - account_id
        - email
      properties:
        account_id:
          type: string
        email:
          type: string
        first_name:
          type: string
        last_name:
          type: string
    FundraiserCreate:
      type: object
      required:
        - account_id
        - campaign_id
        - title
      properties:
        account_id:
          type: string
        campaign_id:
          type: string
        title:
          type: string
        goal_in_cents:
          type: integer