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

# Marketing Resources

> Publish affiliate-ready files, social posts, swipe copy, and external links for your program.

Marketing Resources let merchants give affiliates the material they need to promote a program without sending files manually. Affiliates see only published resources for programs they belong to, and AI agents can retrieve the same material through MCP.

## Resource model

| Item            | Purpose                                                                                                                    |
| --------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Collections** | Group related campaign assets, launch kits, or seasonal material. Collections are containers, not `resource_type` records. |
| `file`          | Downloadable files such as images, videos, PDFs, or media bundles.                                                         |
| `social_post`   | Affiliate-ready post copy with platform tags, optional media, instructions, and disclosure guidance.                       |
| `swipe_copy`    | Reusable text snippets for newsletters, posts, ads, or landing pages.                                                      |
| `external_link` | Links to external brand folders, product pages, or campaign material.                                                      |

Resources move through three statuses:

| Status      | Meaning                                                                                   |
| ----------- | ----------------------------------------------------------------------------------------- |
| `draft`     | Visible to merchants only. Use this while preparing or reviewing material.                |
| `published` | Visible to approved affiliates and affiliate MCP clients.                                 |
| `archived`  | Hidden from affiliates and removed from active merchant lists unless explicitly filtered. |

## Supported files and limits

AgentRef accepts PNG, JPEG, WebP, GIF, MP4, QuickTime, WebM, and PDF files.

| Limit                             | Value  |
| --------------------------------- | ------ |
| Standard file upload              | 50 MB  |
| Social post image                 | 50 MB  |
| Social post video                 | 200 MB |
| Total media per social post       | 500 MB |
| Media attachments per social post | 10     |
| Items per collection              | 100    |

Storage and notification limits depend on your billing tier:

| Tier    | Storage | Collections              | Affiliate notifications |
| ------- | ------- | ------------------------ | ----------------------- |
| Free    | 250 MB  | 1 collection per program | 0 per rolling week      |
| Starter | 2 GB    | Unlimited                | 2 per rolling week      |
| Growth  | 10 GB   | Unlimited                | 5 per rolling week      |
| Pro     | 50 GB   | Unlimited                | 10 per rolling week     |

## Social post templates

Social posts can include placeholders that are rendered for each affiliate:

| Placeholder          | Rendered value                                        |
| -------------------- | ----------------------------------------------------- |
| `{{affiliate_link}}` | The selected affiliate tracking link for the program. |
| `{{affiliate_code}}` | The affiliate's referral code.                        |
| `{{program_name}}`   | The program name.                                     |

AgentRef also returns disclosure guidance with rendered social posts. If a post includes a referral link, affiliates should include a clear disclosure such as `#ad` or equivalent wording that fits the platform and your policy.

## Merchant workflow

1. Create or select a collection for the campaign.
2. Upload files, create social posts, add swipe copy, or attach external links.
3. Review the material in `draft` status.
4. Publish the resource when it is ready for affiliates.
5. Optionally notify affiliates when a published resource should be used immediately.

## Surface coverage

Marketing Resources are broader in the dashboard and MCP than they are in the REST API and SDKs. REST and SDKs currently cover listing, social posts, social-post media, status changes, notifications, and download URLs. MCP additionally exposes collection, external-link, generic file-upload, and URL-import workflows.

| Capability                                             | Dashboard | REST API | Node/Python SDKs | Merchant MCP |
| ------------------------------------------------------ | --------- | -------- | ---------------- | ------------ |
| List resources and get details                         | Yes       | Yes      | Yes              | Yes          |
| Create and update social posts                         | Yes       | Yes      | Yes              | Yes          |
| Upload, replace, reorder, and remove social-post media | Yes       | Yes      | Yes              | Yes          |
| Publish, unpublish, archive, notify affiliates         | Yes       | Yes      | Yes              | Yes          |
| Create merchant download URLs                          | Yes       | Yes      | Yes              | Yes          |
| Create or update collections                           | Yes       | No       | No               | Yes          |
| Create external links                                  | Yes       | No       | No               | Yes          |
| Generic file upload sessions                           | Yes       | No       | No               | Yes          |
| Import a resource from a URL                           | Yes       | No       | No               | Yes          |
| Create or update swipe copy                            | Yes       | No       | No               | No           |

<Info>
  Marketing Resources do not currently emit webhook events. Use API/MCP reads or dashboard activity when you need to inspect resource state.
</Info>

## REST API

Merchant Marketing Resources use the `marketing_resources:read` and `marketing_resources:write` scopes.

| Action                              | Endpoint                                                                                                                                                        |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| List resources                      | `GET /api/v1/programs/{id}/marketing-resources`                                                                                                                 |
| Create social post                  | `POST /api/v1/programs/{id}/marketing-resources/social-posts`                                                                                                   |
| Update social post                  | `PATCH /api/v1/marketing-resources/social-posts/{resourceId}`                                                                                                   |
| Create media upload session         | `POST /api/v1/marketing-resources/social-posts/{resourceId}/media/upload-sessions`                                                                              |
| Complete media upload               | `POST /api/v1/marketing-resources/social-posts/{resourceId}/media/complete`                                                                                     |
| Update or remove media              | `PATCH /api/v1/marketing-resources/social-posts/{resourceId}/media/{mediaId}` or `DELETE /api/v1/marketing-resources/social-posts/{resourceId}/media/{mediaId}` |
| Reorder media                       | `POST /api/v1/marketing-resources/social-posts/{resourceId}/media/reorder`                                                                                      |
| Replace media                       | `POST /api/v1/marketing-resources/social-posts/{resourceId}/media/{mediaId}/replace`                                                                            |
| Publish, unpublish, archive, notify | `POST /api/v1/marketing-resources/{resourceId}/{action}`                                                                                                        |
| Create download URL                 | `POST /api/v1/marketing-resources/download-url`                                                                                                                 |

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://www.agentref.co/api/v1/programs/PROGRAM_ID/marketing-resources?kind=social_posts&status=published" \
    -H "Authorization: Bearer ak_live_YOUR_KEY"
  ```

  ```bash Create social post theme={null}
  curl -X POST "https://www.agentref.co/api/v1/programs/PROGRAM_ID/marketing-resources/social-posts" \
    -H "Authorization: Bearer ak_live_YOUR_KEY" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: launch-post-001" \
    -d '{
      "title": "Launch announcement",
      "body": "I am sharing {{program_name}} because it helps teams launch affiliate programs faster. Try it here: {{affiliate_link}}",
      "platforms": ["linkedin", "x"],
      "status": "draft"
    }'
  ```
</CodeGroup>

## MCP tools

Merchant MCP exposes the richest Marketing Resources workflow:

`list_marketing_resources`, `get_marketing_resource`, `create_marketing_collection`, `update_marketing_collection`, `publish_marketing_resource`, `unpublish_marketing_resource`, `archive_marketing_resource`, `create_marketing_social_post`, `update_marketing_social_post`, `create_marketing_social_post_media_upload_session`, `complete_marketing_social_post_media_upload`, `remove_marketing_social_post_media`, `update_marketing_social_post_media`, `reorder_marketing_social_post_media`, `replace_marketing_social_post_media`, `create_marketing_resource_download_url`, `create_marketing_external_link`, `create_marketing_upload_session`, `complete_marketing_upload_session`, `import_marketing_resource_from_url`, and `notify_marketing_resource_affiliates`.

Use the merchant MCP endpoint for these tools:

```text theme={null}
https://www.agentref.co/api/mcp/merchant
```

## What's next

<CardGroup cols={2}>
  <Card title="MCP Server" icon="robot" href="/agent-integration/mcp-server">
    Use AI agents to create, publish, and retrieve marketing resources.
  </Card>

  <Card title="Affiliate Marketing Resources" icon="users" href="/affiliates/marketing-resources">
    See what affiliates can access and render.
  </Card>
</CardGroup>
