> ## 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 config

> A config is a permanent split: up to five charities and campaigns and the weight each receives. A campaign created on Donate counts once for each receiver it forwards to, and a config that would pay more than five in all answers 400. For your project, the same beneficiaries and weights always give the same config, so a retry is safe: 201 when this request created it, 200 when it already existed. The request names recipients and nothing else. The fee a donation pays is not part of a config: read it from `GET /v2/configs/{configId}/fee`. A 422 names each entry at fault in `issues`, by its path (`beneficiaries[1]`). Requires your API key.



## OpenAPI

````yaml /openapi.json post /v2/configs
openapi: 3.1.1
info:
  title: Donate API
  version: 2.0.0
  description: >-
    Find charities and campaigns, create donation configs, and read what coins
    and donors have given. Every path starts with its version. Build on `/v2`.
    Its responses hold their own resource and references `{ type, id }` to
    others; every list is `{ items, nextCursor }`; amounts are integer strings
    whose name carries the unit (`UsdE6`, `Atomic`); and every error is `{
    "code": string, "message": string }`. `/v1` is the earlier surface: it keeps
    working, knows only charities, and has its own shapes and error body (`{
    "error": string, "code": string }`). Public reads work without a key and are
    rate limited per IP address; send `donate-api-key` to use the rate limit of
    your organization, which all its keys share. Creating and listing configs,
    reading project analytics and requesting a charity require the key.
servers:
  - url: https://api.donate.gg/api
    description: Every operation path starts with its version.
security: []
tags:
  - name: Beneficiaries
    description: >-
      A beneficiary is something a donation can pay: a charity or a campaign.
      Search for one to name in a config, or resolve the references a config or
      a coin holds into what to show.
  - name: Charities
    description: Registered non-profits listed on Donate.
  - name: Campaigns
    description: >-
      Fundraisers created on Donate or imported from a provider, their donation
      messages and their deposit addresses.
  - name: Configs
    description: >-
      A config is a permanent split: the beneficiaries a donation pays and the
      weight each receives. A donation is made against a config id.
  - name: Coins
    description: >-
      A coin is a token whose fees donate through a config: who it pays, what it
      has given, and how it ranks.
  - name: Donations
    description: >-
      The state of a donation that crosses chains. The donations a charity or a
      campaign has received are listed under Charities and Campaigns.
  - name: Charity requests
    description: >-
      Find a charity in an official register and ask Donate to list it when it
      is not listed yet.
  - name: Reference data
    description: Supported chains and campaign categories.
  - name: Users
    description: People with a Donate profile.
paths:
  /v2/configs:
    post:
      tags:
        - Configs
      summary: Create a config
      description: >-
        A config is a permanent split: up to five charities and campaigns and
        the weight each receives. A campaign created on Donate counts once for
        each receiver it forwards to, and a config that would pay more than five
        in all answers 400. For your project, the same beneficiaries and weights
        always give the same config, so a retry is safe: 201 when this request
        created it, 200 when it already existed. The request names recipients
        and nothing else. The fee a donation pays is not part of a config: read
        it from `GET /v2/configs/{configId}/fee`. A 422 names each entry at
        fault in `issues`, by its path (`beneficiaries[1]`). Requires your API
        key.
      operationId: createConfig
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                beneficiaries:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        enum:
                          - charity
                          - campaign
                        type: string
                        description: The kind of recipient.
                      id:
                        type: string
                        description: >-
                          The `id` of the charity or the campaign, 1 to 128
                          characters.
                      weight:
                        anyOf:
                          - type: number
                          - type: string
                        description: >-
                          This recipient's share relative to the other weights,
                          as a positive integer or the same number as a string.
                          Not a percentage.
                    required:
                      - type
                      - id
                      - weight
                    additionalProperties: false
                  description: 1 to 5 recipients. Each is named once.
              required:
                - beneficiaries
              additionalProperties: false
            example:
              beneficiaries:
                - type: charity
                  id: 9b4dae4e-d8c1-4322-a594-35a4858296b2
                  weight: 3
                - type: campaign
                  id: cmr2icrm701xu04jxvybvmgwn
                  weight: 1
      responses:
        '200':
          description: The config already existed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: >-
                      The config's 32 bytes as lower-case hex. This is the id in
                      every reference, and the `bytes32` an EVM donation names.
                  idBase58:
                    type: string
                    description: >-
                      The same 32 bytes in base58, which a Solana donation names
                      as a public key.
                  beneficiaries:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          enum:
                            - charity
                            - campaign
                            - user
                          type: string
                          description: >-
                            The kind of recipient. More kinds will be added:
                            show one you do not know from its summary.
                        id:
                          type: string
                        weight:
                          type: string
                          description: >-
                            This recipient's share relative to the other
                            weights. Not a percentage.
                      required:
                        - type
                        - id
                        - weight
                    description: Every recipient of the config. None is ever omitted.
                  createdAt:
                    type: string
                    description: RFC 3339 instant in UTC, such as 2026-11-19T09:12:04.118Z.
                required:
                  - id
                  - idBase58
                  - beneficiaries
                  - createdAt
              example:
                id: >-
                  0x7ac4174ed42dc6285a4d8a29f33177218a9e99becb64a5c9845725d1ebfe29f3
                idBase58: 9GEATUZ8sqNxgiuF3BauoNaUKoA7v1MMrV16UZFkqqpW
                beneficiaries:
                  - type: charity
                    id: 9b4dae4e-d8c1-4322-a594-35a4858296b2
                    weight: '3'
                  - type: campaign
                    id: cmr2icrm701xu04jxvybvmgwn
                    weight: '1'
                createdAt: '2026-11-19T09:12:04.118Z'
        '201':
          description: The config was created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: >-
                      The config's 32 bytes as lower-case hex. This is the id in
                      every reference, and the `bytes32` an EVM donation names.
                  idBase58:
                    type: string
                    description: >-
                      The same 32 bytes in base58, which a Solana donation names
                      as a public key.
                  beneficiaries:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          enum:
                            - charity
                            - campaign
                            - user
                          type: string
                          description: >-
                            The kind of recipient. More kinds will be added:
                            show one you do not know from its summary.
                        id:
                          type: string
                        weight:
                          type: string
                          description: >-
                            This recipient's share relative to the other
                            weights. Not a percentage.
                      required:
                        - type
                        - id
                        - weight
                    description: Every recipient of the config. None is ever omitted.
                  createdAt:
                    type: string
                    description: RFC 3339 instant in UTC, such as 2026-11-19T09:12:04.118Z.
                required:
                  - id
                  - idBase58
                  - beneficiaries
                  - createdAt
              example:
                id: >-
                  0x7ac4174ed42dc6285a4d8a29f33177218a9e99becb64a5c9845725d1ebfe29f3
                idBase58: 9GEATUZ8sqNxgiuF3BauoNaUKoA7v1MMrV16UZFkqqpW
                beneficiaries:
                  - type: charity
                    id: 9b4dae4e-d8c1-4322-a594-35a4858296b2
                    weight: '3'
                  - type: campaign
                    id: cmr2icrm701xu04jxvybvmgwn
                    weight: '1'
                createdAt: '2026-11-19T09:12:04.118Z'
        '400':
          description: >-
            `VALIDATION_ERROR`: The request is invalid. `INVALID_JSON`: The
            request body is not valid JSON.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      code:
                        enum:
                          - VALIDATION_ERROR
                        type: string
                      message:
                        type: string
                      issues:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              enum:
                                - required
                                - invalid
                                - too_small
                                - too_large
                                - unknown
                                - duplicate
                              type: string
                            message:
                              type: string
                          required:
                            - path
                            - code
                            - message
                    required:
                      - code
                      - message
                  - type: object
                    properties:
                      code:
                        enum:
                          - INVALID_JSON
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
        '401':
          description: '`UNAUTHENTICATED`: The API key is missing or not valid.'
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    type: string
                    enum:
                      - UNAUTHENTICATED
                  message:
                    type: string
              example:
                code: UNAUTHENTICATED
                message: >-
                  This operation needs your API key. Send it in the
                  donate-api-key header.
        '413':
          description: '`PAYLOAD_TOO_LARGE`: The request body is too large.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    enum:
                      - PAYLOAD_TOO_LARGE
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - message
        '422':
          description: >-
            `BENEFICIARY_NOT_FOUND`: A beneficiary in the request does not exist
            or is not available. `BENEFICIARY_NOT_ELIGIBLE`: A beneficiary in
            the request cannot be named in a new config.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      code:
                        enum:
                          - BENEFICIARY_NOT_FOUND
                        type: string
                      message:
                        type: string
                      issues:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              enum:
                                - required
                                - invalid
                                - too_small
                                - too_large
                                - unknown
                                - duplicate
                              type: string
                            message:
                              type: string
                          required:
                            - path
                            - code
                            - message
                    required:
                      - code
                      - message
                  - type: object
                    properties:
                      code:
                        enum:
                          - BENEFICIARY_NOT_ELIGIBLE
                        type: string
                      message:
                        type: string
                      issues:
                        type: array
                        items:
                          type: object
                          properties:
                            path:
                              type: string
                            code:
                              enum:
                                - required
                                - invalid
                                - too_small
                                - too_large
                                - unknown
                                - duplicate
                              type: string
                            message:
                              type: string
                          required:
                            - path
                            - code
                            - message
                    required:
                      - code
                      - message
        '429':
          description: >-
            `RATE_LIMIT_EXCEEDED`: Too many requests. Wait for the time in the
            Retry-After header.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                properties:
                  code:
                    enum:
                      - RATE_LIMIT_EXCEEDED
                    type: string
                  message:
                    type: string
              example:
                code: RATE_LIMIT_EXCEEDED
                message: >-
                  Too many requests. Wait for the time in the Retry-After
                  header.
        '503':
          description: >-
            `PROVIDER_UNAVAILABLE`: A service this request depends on is
            unavailable. Try again shortly.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    enum:
                      - PROVIDER_UNAVAILABLE
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - message
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: donate-api-key
      description: >-
        Your project API key, from the Developer portal. Required to create and
        list configs, to read project analytics and to request a charity. Send
        it from your server, never from a browser.

````

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