> AffiliateOS Help Center. Index of every article for AI tools: https://www.affiliateos.ai/help/llms.txt

# Give your coding assistant our API reference

Developer docs · For everyone · Updated 30 October 2026
Web version: https://www.affiliateos.ai/help/developers/coding-assistant-api-reference

Give your coding assistant the AffiliateOS reference file for your role before you ask it for code. Each file is plain Markdown with our real endpoints, fields and rules, so the assistant builds on what exists instead of guessing.

## Before you start

- Know which file you need: publisher, advertiser or network. Each covers one role.
- Keep real keys out of the chat. The files never need one, and your code should read keys from your server's environment.

## Steps

### Developer docs, then AI context files

Open the [AI context files](https://www.affiliateos.ai/help/developers#ai-context) on the developer docs. There is one file per role:

| File | For | What it covers |
|---|---|---|
| `/ai/publisher.md` | Publishers | Keys, the Offer API and Top Offers Feed, tracking links, postbacks and signatures, the Hosted Offerwall |
| `/ai/advertiser.md` | Advertisers | Products, campaigns and events, `afos_click_id`, server events, test events and every response status |
| `/ai/network.md` | Networks | The Network API, paging, tracking links for your publishers, postbacks and verifying them |

### Copy for AI, or download the file

**Copy for AI** puts the whole file on your clipboard. The download link beside it saves it as a file. Paste it into the assistant's chat, or add the file to your project so the assistant reads it next to your code.

### Copy prompt

Under the files, **Copy prompt** copies the instruction we suggest sending right after the file:

> Read the attached AffiliateOS reference before writing any code. Use only the endpoints and fields it lists, and ask me for keys instead of inventing them. Keep every key on the server.

### Add help articles when it needs more

Every help article has **Copy page** and **View as Markdown** under its title, and also lives at its own address ending in `.md`. If your assistant can read links, start it at [/help/llms.txt](https://www.affiliateos.ai/help/llms.txt): an index of every article, the developer reference and the three files.

### Check it worked

Ask a question only the file answers, such as "Which postback parameter tells me whose balance to credit, and what do I dedupe on?" A good answer names `sub_id`, then `action_id` and `status` together. If it invents an endpoint, or a host such as `api.affiliateos.xyz` (every call goes to `https://affiliateos.xyz`), paste the file again and resend the prompt.

> **Keys stay on your server.** Anything you paste into an assistant's chat leaves your machine. Give it placeholder names such as `AFFILIATEOS_KEY` and keep the real [API key](https://www.affiliateos.ai/glossary#api-key), postback secret and wall secret in your server's environment.

## In the dashboard

Signed in, each portal has its own copy:

- **Publishers:** **Docs**, then **AI Integration Assistant**, then **Download partner-ai-context.md**.
- **Networks:** **Docs** has the same panel, with **Download network-ai-context.md**.
- **Advertisers:** each campaign's page has **AI docs for your developer**. **Copy AI playbook** copies a step-by-step integration guide with that campaign's IDs filled in, and **Download .md** saves it. Your API key is never in it: mint it yourself and add it to your server.

The portal files come from the API itself. The files on this site are snapshots and say on their first lines when they were checked. Changes after that date are in the [changelog](https://www.affiliateos.ai/changelog), and the developer docs list the [latest changes for integrations](https://www.affiliateos.ai/help/developers#changes).

## Rules your assistant should keep

Each file ends with rules like these:

- Never ship an API key, postback secret or wall secret in an app or a web page.
- Publishers and networks: never credit a [postback](https://www.affiliateos.ai/glossary#postback) that fails verification, or one with `test=true`.
- Publishers and networks: never reuse one `sub_id` for several users.
- Advertisers: send events from your server, never from the app.
