Givebutter Campaigns API

The Campaigns API from Givebutter — 4 operation(s) for campaigns.

OpenAPI Specification

givebutter-campaigns-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Givebutter Campaigns API
  version: 1.0.0
  description: 'Best-effort OpenAPI 3.1 description of the Givebutter REST API covering

    campaigns, contacts, transactions, funds, households, tickets, plans,

    payouts, pledges, webhooks, and discount codes. Authentication uses

    Bearer-token authentication with an API key. Sourced from

    https://docs.givebutter.com/.

    '
  contact:
    name: Givebutter API Docs
    url: https://docs.givebutter.com/reference/reference-getting-started
servers:
- url: https://api.givebutter.com/v1
  description: Production
security:
- bearerAuth: []
tags:
- name: Campaigns
paths:
  /campaigns:
    get:
      summary: List campaigns
      operationId: listCampaigns
      tags:
      - Campaigns
      parameters:
      - $ref: '#/components/parameters/PerPage'
      - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: Paginated list of campaigns
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignList'
    post:
      summary: Create a campaign
      operationId: createCampaign
      tags:
      - Campaigns
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Campaign'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
  /campaigns/{id}:
    parameters:
    - $ref: '#/components/parameters/IdInt'
    get:
      summary: Retrieve a campaign
      operationId: getCampaign
      tags:
      - Campaigns
      responses:
        '200':
          description: Campaign
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
    patch:
      summary: Update a campaign
      operationId: updateCampaign
      tags:
      - Campaigns
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Campaign'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
    delete:
      summary: Delete a campaign
      operationId: deleteCampaign
      tags:
      - Campaigns
      responses:
        '204':
          description: Deleted
  /campaigns/{id}/members:
    parameters:
    - $ref: '#/components/parameters/IdInt'
    get:
      summary: List campaign members (individual fundraisers)
      operationId: listCampaignMembers
      tags:
      - Campaigns
      responses:
        '200':
          description: Members
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CampaignMember'
  /campaigns/{id}/teams:
    parameters:
    - $ref: '#/components/parameters/IdInt'
    get:
      summary: List campaign teams
      operationId: listCampaignTeams
      tags:
      - Campaigns
      responses:
        '200':
          description: Teams
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CampaignTeam'
components:
  parameters:
    PerPage:
      in: query
      name: per_page
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
    IdInt:
      in: path
      name: id
      required: true
      schema:
        type: integer
    Page:
      in: query
      name: page
      schema:
        type: integer
        minimum: 1
        default: 1
  schemas:
    CampaignList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Campaign'
        meta:
          type: object
          properties:
            current_page:
              type: integer
            per_page:
              type: integer
            total:
              type: integer
    CampaignTeam:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        raised:
          type: integer
        goal:
          type: integer
    CampaignMember:
      type: object
      properties:
        id:
          type: integer
        first_name:
          type: string
        last_name:
          type: string
        raised:
          type: integer
        goal:
          type: integer
    Campaign:
      type: object
      properties:
        id:
          type: integer
        code:
          type: string
        type:
          type: string
        title:
          type: string
        slug:
          type: string
        goal:
          type: integer
        raised:
          type: integer
        donors:
          type: integer
        currency:
          type: string
        status:
          type: string
        created_at:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using a personal API key.