API referenceGetting started
Introduction
What the API does and the order to build against it.
What this is
Acrune measures what your creators drive. Give one of your users a link, and every tap on it is recorded against them and against the post they put it in. This API is how your product does that without your user ever seeing Acrune: they see a link on your product, on your dashboard.
Everything is scoped to the account the key belongs to. The account is resolved from the key itself and never from the request, so there is no account parameter anywhere in the API and no field a caller could set to reach somebody else's data.
https://track.acrune.comThere is a machine-readable version of all of this at https://track.acrune.com/openapi.json. It is OpenAPI 3.1, it needs no key, and it is generated from the router and from the same schemas the routes parse with, so it cannot describe a call that does not exist, or a body the API would refuse. Point a client generator at it rather than transcribing these pages.
What you can build
Clicks, and which post produced them. That is the whole measurement, and it is deliberately the whole measurement.
Rank the posts in a campaign by what they actually drove, rather than by what the platform says they reached.
Give every creator a link that is theirs alone, and show them its number inside your own UI.
Settle a campaign on delivery you can point at, instead of on screenshots.
Compare two creators on the same campaign without either platform's analytics in the middle.
Clicks are not click-through. No organic platform exposes an impression to a third party, so there is no denominator and nothing here may be rendered as a rate. What these numbers support is ordering posts within a campaign.
The shape of an integration
Four moments, in the order they happen in your product.
| When | Call | What it does |
|---|---|---|
| A brand opens a campaign | POST /v1/campaigns | Registers the destination. Idempotent on your own campaign id. |
| A creator joins it | POST /v1/creators | Enrols them and returns the link that is theirs alone. |
| They submit their clip | PATCH /v1/links/:linkId | Attaches the post URL, which is what makes per-post ranking possible. |
| Anyone opens a dashboard | GET /v1/campaigns/:ref/stats | The leaderboard: posts ranked by clicks, over a window you choose. |
Everything else on these pages is detail about those four, plus the bulk forms of two of them.
Putting it all together
Every object takes your id as well as ours. Pass externalId when you open a campaign and you can name that campaign by it everywhere afterwards, which means an integration stores nothing of Acrune's, the id is already on the row that triggered the call.
// Once, when the brand publishes. Safe to retry.
await acrune.createCampaign({
externalId: campaign.id,
name: campaign.title,
destinationUrl: campaign.landingUrl,
})
// On every render of your creator dashboard. Idempotent.
const { link } = await acrune.enrolCreator({
campaignExternalId: campaign.id,
externalId: socialAccount.id,
handle: socialAccount.handle,
platform: "tiktok",
})
// When they submit, and whenever you draw the board.
await acrune.attachPost(link.id, submission.postUrl)
const { posts } = await acrune.campaignStats(campaign.id)There is no script to install and no pixel to embed. This is HTTP from code you already own, and a single client file you paste in if you want the types.