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

# Approve source

> Approve a `draft` source. It becomes `active`, the paused estimate run resumes as a real indexing run, and credits are charged. Later uploads index without another approval.



## OpenAPI

````yaml post /brain/sources/{source_id}/approve
openapi: 3.0.0
info:
  title: Public API
  version: 1.0.0
servers:
  - url: https://api.gumloop.com/api/v1
security: []
paths:
  /brain/sources/{source_id}/approve:
    post:
      tags:
        - Brain
      summary: Approve source
      description: >-
        Approve a `draft` source. It becomes `active`, the paused estimate run
        resumes as a real indexing run, and credits are charged. Later uploads
        index without another approval.
      operationId: approveBrainSource
      parameters:
        - $ref: '#/components/parameters/BrainSourceId'
      responses:
        '200':
          description: Source approved.
          content:
            application/json:
              schema:
                type: object
                required:
                  - source
                properties:
                  source:
                    $ref: '#/components/schemas/BrainSource'
        '401':
          description: Unauthorized — missing or invalid Gumloop API credentials.
        '403':
          description: Forbidden — the caller cannot manage this source.
        '404':
          description: Source not found.
        '409':
          description: The source is not a draft (`source_not_draft`).
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >
            curl -X POST
            'https://api.gumloop.com/api/v1/brain/sources/jVustMhHWG43CFQBFMckcn/approve'
            \
              -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
        - lang: python
          label: Python
          source: >
            from gumloop import Gumloop


            client = Gumloop(access_token="YOUR_ACCESS_TOKEN")

            print(client.brain.approve_source("jVustMhHWG43CFQBFMckcn").source.status)
components:
  parameters:
    BrainSourceId:
      name: source_id
      in: path
      required: true
      schema:
        type: string
      description: The source id.
  schemas:
    BrainSource:
      type: object
      required:
        - id
        - name
        - source_type
        - status
        - scope
      properties:
        id:
          type: string
          example: PFqdAMir8PA2Xc6qcszSN9
        name:
          type: string
          example: Engineering docs
        source_type:
          type: string
          description: >-
            `direct_file_uploads` for sources created through the API; connected
            sources report their type, for example `notion`.
          example: direct_file_uploads
        status:
          type: string
          enum:
            - draft
            - active
            - paused
          description: '`draft` sources only estimate credits until approved.'
        scope:
          type: string
          enum:
            - personal
            - team
            - organization
        team_id:
          type: string
          nullable: true
          description: Set for `team` scope only.
        created_by_user_id:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A personal API key or an [OAuth 2.0](/api-reference/oauth) access token.
        Personal API keys also require the `x-auth-key` header with your user
        ID.

````