Create source
create_brain_sourceCreate a file-upload source for Gumloop Brain and set whether uploads index immediately or wait for approval before indexing.
Instructions
Create a file-upload source. Only direct_file_uploads sources can be created through the API; connected sources such as Notion or Google Drive are set up in the Gumloop app because they need an account connection.
By default the source is active and indexes (and bills) each file as soon as it is uploaded. Set require_approval to true to create it as a draft instead: uploads then run a credit estimate, the source owner is notified, and nothing is indexed until Approve source is called.
Explicit confirmation is required for this exact account operation. Runs can spend credits or trigger downstream actions; never resubmit unknown outcomes automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Display name of the source. | |
| scope | No | Which Brain the source belongs to. `team` requires `team_id`. | personal |
| account | No | Named private Gumloop account; selects private credentials and user/team identity. | |
| confirm | No | Set true only when the user asked for exactly this action. | |
| payload | No | Complete JSON request body instead of body flags. Preserves current endpoint fields and values. | |
| team_id | No | The team for `scope: team`. Not accepted with other scopes. | |
| source_type | No | Only `direct_file_uploads` is accepted. | direct_file_uploads |
| payload_file | No | Regular local JSON body file, at most 5 MB. Cannot be mixed with body flags or payload. | |
| require_approval | No | Create as a draft that estimates credits before anything is indexed. |