Champ › Guides › API

API

Do you need this? Most stores do not. The API is for developers who want a program or script to read or change forum data. If you only run a forum, skip this guide.

An API (application programming interface) lets your own programs talk to Champ directly, without the dashboard. Champ's API sends and receives JSON, a common text format for data. Use it to import an existing forum, copy topics into a reporting database, or post from a script.

Note The API page in the Champ dashboard marks the API as a work in progress, not yet officially supported.

Base URL#

https://api.getchamp.net

Everything is JSON over HTTPS. There is no unencrypted endpoint.

Authentication#

Two headers on every request:

HeaderValue
X-SHOPIFY-DOMAINYour store's .myshopify.com domain
X-API-SECRETAn API secret generated in the dashboard

To create a secret:

  1. In the Champ dashboard, open API.
  2. Click Create API secret.
  3. Under Permissions, tick only what the integration needs.
  4. Click Save.

Each secret carries its own permissions:

  • read_forums
  • read_topics
  • write_topics
  • read_posts
  • write_posts

Grant only what the integration needs. A reporting script should hold a read-only secret; if it leaks, the damage is bounded.

A missing or wrong secret returns 403. A secret without the permission for that endpoint also returns 403.

Warning An API secret is a bearer credential with access to your whole forum. Keep it in your environment configuration, never in front-end code or a public repository. If one is exposed, delete it in the dashboard — that revokes it immediately — and issue a new one.

Response codes#

CodeMeaning
200The request was handled. On a create or update, check the body: if the record failed validation, it includes an errors array and nothing was saved
403Missing, invalid, or insufficiently permitted API secret
404Record not found, or an unexpected error
422The forum, topic or user you referenced does not belong to your store. The body is empty

Pagination#

GET /topics and GET /posts return up to 200 records per page. Pass ?page=2 for the next page. GET /forums returns all your forums in one response. The API does not tell you the total. Keep requesting pages until one comes back with fewer than 200 records, or empty.

Forums#

List forums#

GET /forums
[
  {
    "id": 412,
    "title": "Gear & setup",
    "description": "Ask about kit, get answers from people who own it",
    "visible": true,
    "hidden": false,
    "position": 1,
    "permission_level": 0,
    "topics_count": 412,
    "posts_count": 3908,
    "sort_order": 0,
    "moderator_tag": "moderator",
    "category": "Product talk",
    "created_at": "2024-03-02T10:14:22.000Z",
    "updated_at": "2026-09-19T08:41:03.000Z"
  }
]

Forums are created in the dashboard, not over the API.

Topics#

List topics#

GET /topics

Optional filters:

ParameterEffect
forum_idOnly topics in that forum
pinnedtrue or false
statusFilter by topic status
GET /topics?forum_id=412&pinned=false&page=1

Get one topic#

GET /topics/:id
{
  "id": 1204,
  "title": "Fine-mist nozzle on the mk2 — worth it?",
  "status": "approved",
  "posts_count": 14,
  "pinned": false,
  "url": "https://northwind-supply.com/community/champ/forums/412-gear-setup/topics/1204-fine-mist-nozzle-on-the-mk2-worth-it",
  "user_id": 88213,
  "username": "Mel B.",
  "forum_id": 412,
  "metadata": {},
  "preview_thumbnail": null,
  "preview_description": null,
  "created_at": "2026-09-18T14:02:11.000Z",
  "updated_at": "2026-09-20T07:55:40.000Z"
}

Create a topic#

POST /topics
{
  "topic": {
    "forum_id": 412,
    "user_id": 88213,
    "title": "Fine-mist nozzle on the mk2 — worth it?",
    "status": "approved"
  }
}

Accepted fields: forum_id, user_id, title, status, pinned, custom_page_title, custom_meta_description, no_index_settings, preview_description, preview_thumbnail, and a free-form metadata object.

The forum and the user must belong to your store, or the request fails.

Update a topic#

PATCH /topics/:id

Same body shape. Useful for pinning, retitling, or moving a topic between forums.

Posts#

List posts#

GET /posts

Filter with topic_id to get one thread:

GET /posts?topic_id=1204&page=1
[
  {
    "id": 99120,
    "content": "Yes — we run it on every mk2 in the shop.",
    "status": "approved",
    "ip": "203.0.113.24",
    "archived": false,
    "user_id": 4412,
    "username": "Jo K.",
    "forum_id": 412,
    "topic_id": 1204,
    "last_edited_at": null,
    "created_at": "2026-09-18T15:11:02.000Z",
    "updated_at": "2026-09-18T15:11:02.000Z"
  }
]

Get one post#

GET /posts/:id

Create a post#

POST /posts
{
  "post": {
    "topic_id": 1204,
    "forum_id": 412,
    "user_id": 4412,
    "content": "Drop the pressure to about 40 psi first.",
    "status": "approved"
  }
}

Accepted fields: topic_id, forum_id, user_id, content, status, approved_at, archived.

Update a post#

PATCH /posts/:id

Editing content, changing status, or archiving.

A worked example#

Importing a thread from an old forum:

# 1. Find the forum you are importing into
curl -s https://api.getchamp.net/forums \
  -H "X-SHOPIFY-DOMAIN: yourstore.myshopify.com" \
  -H "X-API-SECRET: $CHAMP_SECRET"

# 2. Create the topic
TOPIC=$(curl -s -X POST https://api.getchamp.net/topics \
  -H "X-SHOPIFY-DOMAIN: yourstore.myshopify.com" \
  -H "X-API-SECRET: $CHAMP_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"topic":{"forum_id":412,"user_id":88213,"title":"Imported thread","status":"approved"}}')

# 3. Add the replies
curl -s -X POST https://api.getchamp.net/posts \
  -H "X-SHOPIFY-DOMAIN: yourstore.myshopify.com" \
  -H "X-API-SECRET: $CHAMP_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"post":{"topic_id":1204,"forum_id":412,"user_id":4412,"content":"First reply","status":"approved"}}'

Import gently — a script creating thousands of posts as fast as it can is indistinguishable from an attack, and the spam defences may treat it as one. Pace it, and tell us first if you are importing a large archive.

Bulk export#

For reading everything at once, the JSON export in the dashboard's Data section is better than paging the API. See installation.

Next#