> ## Documentation Index
> Fetch the complete documentation index at: https://docs.donate.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a beneficiary config

> Create an immutable config naming charities and campaigns. Users are not supported. Weights are positive safe integers. Equivalent requests return the existing config. New configs require eligible beneficiaries; retries preserve existing configs. The standard API fee is 20% (2,000 basis points), set by the server.



## OpenAPI

````yaml https://api.donate.gg/api/openapi post /v2/configs
openapi: 3.1.1
info:
  title: Donate Developer API
  version: 1.0.0
  description: >-
    Public JSON API for charities, configs, campaigns, tokens, and related
    catalog reads. Operations are grouped by version (`/v1` and `/v2`). V2
    supports named charity and campaign beneficiaries; v1 preserves user/charity
    config shapes. GET/HEAD catalog routes may omit `donate-api-key` and are IP
    rate-limited for anonymous callers (~20 req/min). Authenticated keys share
    one organization rate-tier bucket. Create/list configs and project analytics
    require an API key. Configs are permanent; the retained authenticated DELETE
    endpoint rejects deletion. Unpublished internal routes are omitted. Spec
    routes (`/api/openapi`, `/api/postman`) are unauthenticated and unmetered.
servers:
  - url: /api
    description: API origin. Version prefixes live on each operation path.
security:
  - {}
  - ApiKeyAuth: []
paths:
  /v2/configs:
    post:
      summary: Create a beneficiary config
      description: >-
        Create an immutable config naming charities and campaigns. Users are not
        supported. Weights are positive safe integers. Equivalent requests
        return the existing config. New configs require eligible beneficiaries;
        retries preserve existing configs. The standard API fee is 20% (2,000
        basis points), set by the server.
      operationId: v2.configs.create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                beneficiaries:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        enum:
                          - charity
                          - campaign
                        type: string
                      id:
                        type: string
                      weight:
                        type: number
                    required:
                      - type
                      - id
                      - weight
                    additionalProperties: false
              required:
                - beneficiaries
              additionalProperties: false
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: object
                    properties:
                      hex:
                        type: string
                      base58:
                        type: string
                    required:
                      - hex
                      - base58
                    additionalProperties: false
                  feeBps:
                    type: string
                    description: >-
                      Stored config fee. Use the effective-fee endpoint for
                      current pricing.
                  beneficiaries:
                    type: array
                    items:
                      anyOf:
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            logo:
                              type: string
                              description: >-
                                Public image URL, or the Donate placeholder when
                                no image is available.
                            type:
                              const: charity
                            weight:
                              type: string
                          required:
                            - id
                            - name
                            - logo
                            - type
                            - weight
                          additionalProperties: false
                        - type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            logo:
                              type: string
                              description: >-
                                Public image URL, or the Donate placeholder when
                                no image is available.
                            type:
                              const: campaign
                            source:
                              enum:
                                - donate
                                - tiltify
                              type: string
                            weight:
                              type: string
                          required:
                            - id
                            - name
                            - logo
                            - type
                            - source
                            - weight
                          additionalProperties: false
                required:
                  - id
                  - feeBps
                  - beneficiaries
                additionalProperties: false
        '400':
          description: '400'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: VALIDATION_ERROR
                      status:
                        const: 400
                      message:
                        type: string
                        default: Validation failed
                      data:
                        type: object
                        properties:
                          error:
                            type: string
                          code:
                            const: VALIDATION_ERROR
                          issues:
                            type: array
                            items:
                              anyOf:
                                - {}
                                - type: 'null'
                        required:
                          - error
                          - code
                        additionalProperties: false
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: BENEFICIARY_NOT_FOUND
                      status:
                        const: 400
                      message:
                        type: string
                        default: One or more beneficiary IDs do not exist.
                      data:
                        type: object
                        properties:
                          error:
                            type: string
                          code:
                            const: BENEFICIARY_NOT_FOUND
                        required:
                          - error
                          - code
                        additionalProperties: false
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: BENEFICIARY_NOT_ELIGIBLE
                      status:
                        const: 400
                      message:
                        type: string
                        default: New configs require eligible beneficiaries.
                      data:
                        type: object
                        properties:
                          error:
                            type: string
                          code:
                            const: BENEFICIARY_NOT_ELIGIBLE
                        required:
                          - error
                          - code
                        additionalProperties: false
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: INVALID_JSON
                      status:
                        const: 400
                      message:
                        type: string
                        default: Invalid JSON body
                      data:
                        type: object
                        properties:
                          error:
                            type: string
                          code:
                            const: INVALID_JSON
                        required:
                          - error
                          - code
                        additionalProperties: false
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '409':
          description: '409'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: BENEFICIARY_UNAVAILABLE
                      status:
                        const: 409
                      message:
                        type: string
                        default: >-
                          A beneficiary is temporarily unavailable for new
                          configs.
                      data:
                        type: object
                        properties:
                          error:
                            type: string
                          code:
                            const: BENEFICIARY_UNAVAILABLE
                        required:
                          - error
                          - code
                        additionalProperties: false
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '413':
          description: '413'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: PAYLOAD_TOO_LARGE
                      status:
                        const: 413
                      message:
                        type: string
                        default: Request body too large
                      data:
                        type: object
                        properties:
                          error:
                            type: string
                          code:
                            const: PAYLOAD_TOO_LARGE
                        required:
                          - error
                          - code
                        additionalProperties: false
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: donate-api-key
      description: >-
        Developer API key. Required for config create/list and project
        analytics. The disabled config DELETE endpoint also requires
        authentication. Optional on public GET reads (anonymous callers are IP
        rate-limited). Obtain from the Developer dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.