# Programmatic RAG uploads?

**URL:** https://meta.discourse.org/t/programmatic-rag-uploads/374408
**Category:** Support
**Tags:** ai, ai-bot
**Created:** [July 16, 2025, 7:52am UTC](https://meta.discourse.org/t/programmatic-rag-uploads/374408 "2025-07-16T07:52:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Wurzelseppi](https://avatars.discourse-cdn.com/v4/letter/w/eada6e/32.png) [@Wurzelseppi](https://meta.discourse.org/u/Wurzelseppi)
#### Post date: [July 16, 2025, 7:52am UTC](https://meta.discourse.org/t/programmatic-rag-uploads/374408/1 "2025-07-16T07:52:48Z")

</div>

Hey guys,

can anyone explain, how I can upload files to a persona programmatically?

Maybe with a PostMan (or Bruno) collection / request ?

Many many thanks in advance!

Greetings,

WS

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [July 16, 2025, 7:57am UTC](https://meta.discourse.org/t/programmatic-rag-uploads/374408/2 "2025-07-16T07:57:03Z")

</div>

Maybe you can figure it out with reverse engineering

> [@Reverse engineer the Discourse API](https://meta.discourse.org/t/reverse-engineer-the-discourse-api/20576):
>
> Discourse is backed by a complete JSON api. Anything you can do on the site you can also do using the JSON api. The API is documented at [docs.discourse.org](https://docs.discourse.org). You can also use the [discourse\_api](https://github.com/discourse/discourse_api) Ruby gem as a client library. However, not every endpoint is documented. To determine how to do something with the JSON API here are some steps you can follow. Example: recategorize a topic. Go to a topic and start editing a category: Open Chrome dev tools, switch to the Network tab, select …

---

<div class="post-metadata">

### Author: ![Wurzelseppi](https://avatars.discourse-cdn.com/v4/letter/w/eada6e/32.png) [@Wurzelseppi](https://meta.discourse.org/u/Wurzelseppi)
#### Post date: [July 22, 2025, 6:13am UTC](https://meta.discourse.org/t/programmatic-rag-uploads/374408/3 "2025-07-22T06:13:17Z")

</div>

Hmmmm, somehow I´m lost.

I can upload a file, and I see it in the table uploads, but somehow I can´t create the reference to the user so it shows up in upload\_references.

When I do it manually I see an entry like that

![image](https://global.discourse-cdn.com/meta/original/4X/5/6/2/562f02dfbd6d70d5fac42e4be687a9a43ec97e2d.png)

But I can´t figure out, how to create that relation programmatically ☹

Thanks for hints and Greetings,

WS
