Tracking Links
Create Tracking Link
Creates a tracking link on OnlyFans and stores it in the FansMetric database. Requires permission api_tracking_links_create.
https://public-api.fansmetric.comAuthorization
defaultAuthorizationBearer <token>Send your FansMetric API key as a Bearer token in the Authorization header.
In: header
Path Parameters
account_id*integerOnlyFans numeric account ID.
Request Body
application/jsonname*stringCampaign name.
tag_idsarrayFansMetric tag IDs to assign.
custom_source_urlstringCustom source URL for traffic tracking.
Response Fields
data.idintegerNewly created OnlyFans campaign ID.
data.campaignNamestringCampaign name as stored on OnlyFans.
data.campaignCodeintegerNumeric code used in the tracking link URL.
data.campaignUrlstring | nullFull public tracking-link URL (
https://onlyfans.com/{username}/c{campaignCode}).nullif the username or code could not be resolved.data.countSubscribersintegerAlways
0on creation.data.allCountSubscribersintegerAlways
0on creation.data.countTransitionsintegerAlways
0on creation.data.createdAtstring | nullCreation timestamp (RFC 3339).
data.endDatestring | nullnullwhile the campaign is active; set when it is deleted.data.customNamestring | nullFansMetric display-name override.
nullon creation — set it via Update Tracking Link.data.customSourceUrlstring | nullTraffic-source URL stored in FansMetric (the value submitted in
custom_source_url).data.notestring | nullFree-text note.
nullon creation.data.isHiddenbooleanFansMetric hide flag.
falseon creation.data.isRevenueSharedbooleanWhether an enabled share exposes revenue.
falseon creation.data.lastScannedAtstring | nullWhen the scraper last refreshed this link.
nulluntil the first pass.data.user.usernamestringCreator username. Empty string if it could not be resolved.
data.tags[]arrayFull tag objects for the IDs passed in
tag_ids. Each element hasid,name,color,created_at— same shape asGET /v1/tags. Resolution is best-effort: if the post-write tag-map fetch fails,tagsis[]rather than failing the create. Tags belonging to a different org are silently filtered out, so a submitted ID may not appear.data.revenue.totalstring"0.00"on creation.data.revenue.spendersCountinteger0on creation.data.revenue.revenuePerSubscriberstring"0"on creation.data.revenue.conversionToSpenderstring"0"on creation.data.costobjectperPromo,perSub,profit,roi— allnulluntil a promo cost is set, which is how you tell "not set" from zero.data.links.related.subscribersstringPath to this link's claimers.
dataobject | arrayEndpoint-specific payload. See the fields below for this route.
_meta._credits.usedintegerCredits consumed by this request (currently always
1)._meta._rate_limits.limit_minuteintegerMaximum requests per minute for the organization.
_meta._rate_limits.remaining_minuteintegerRemaining requests in the current minute window.
_meta._rate_limits.limit_dayintegerMaximum requests per day for the organization.
_meta._rate_limits.remaining_dayintegerRemaining requests in the current day window.
| Field | Type | Description |
|---|---|---|
| data.id | integer | Newly created OnlyFans campaign ID. |
| data.campaignName | string | Campaign name as stored on OnlyFans. |
| data.campaignCode | integer | Numeric code used in the tracking link URL. |
| data.campaignUrl | string | null | Full public tracking-link URL (https://onlyfans.com/{username}/c{campaignCode}). null if the username or code could not be resolved. |
| data.countSubscribers | integer | Always 0 on creation. |
| data.allCountSubscribers | integer | Always 0 on creation. |
| data.countTransitions | integer | Always 0 on creation. |
| data.createdAt | string | null | Creation timestamp (RFC 3339). |
| data.endDate | string | null | null while the campaign is active; set when it is deleted. |
| data.customName | string | null | FansMetric display-name override. null on creation — set it via Update Tracking Link. |
| data.customSourceUrl | string | null | Traffic-source URL stored in FansMetric (the value submitted in custom_source_url). |
| data.note | string | null | Free-text note. null on creation. |
| data.isHidden | boolean | FansMetric hide flag. false on creation. |
| data.isRevenueShared | boolean | Whether an enabled share exposes revenue. false on creation. |
| data.lastScannedAt | string | null | When the scraper last refreshed this link. null until the first pass. |
| data.user.username | string | Creator username. Empty string if it could not be resolved. |
| data.tags[] | array | Full tag objects for the IDs passed in tag_ids. Each element has id, name, color, created_at — same shape as GET /v1/tags. Resolution is best-effort: if the post-write tag-map fetch fails, tags is [] rather than failing the create. Tags belonging to a different org are silently filtered out, so a submitted ID may not appear. |
| data.revenue.total | string | "0.00" on creation. |
| data.revenue.spendersCount | integer | 0 on creation. |
| data.revenue.revenuePerSubscriber | string | "0" on creation. |
| data.revenue.conversionToSpender | string | "0" on creation. |
| data.cost | object | perPromo, perSub, profit, roi — all null until a promo cost is set, which is how you tell "not set" from zero. |
| data.links.related.subscribers | string | Path to this link's claimers. |
| data | object | array | Endpoint-specific payload. See the fields below for this route. |
| _meta._credits.used | integer | Credits consumed by this request (currently always 1). |
| _meta._rate_limits.limit_minute | integer | Maximum requests per minute for the organization. |
| _meta._rate_limits.remaining_minute | integer | Remaining requests in the current minute window. |
| _meta._rate_limits.limit_day | integer | Maximum requests per day for the organization. |
| _meta._rate_limits.remaining_day | integer | Remaining requests in the current day window. |
curl --request POST "https://public-api.fansmetric.com/v1/100000001/tracking-links" \
--header "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"name": "My Campaign",
"tag_ids": [1, 2],
"custom_source_url": "https://reddit.com/r/example"
}'Response
201Behavior
Breaking change: the 201 body is now the same item shape as Get Tracking Link — one canonical camelCase object with nested revenue / cost / tags / links. It previously returned the raw OnlyFans object plus fmTags, fmCustomSourceUrl and fmTrackingLinkUrl; those keys are gone.
A brand-new campaign has no claims, clicks or attributed revenue, so every metric is zero and cost is all-null by definition.
Tag resolution is best-effort: if the post-write tag-map fetch fails, tags returns [] rather than failing the create. Cross-org tag IDs are silently filtered out — pass an ID that isn't in your org and it won't appear.
The new campaign shows up in the live relay list immediately, and in the FansMetric list after the next scraper pass (~30 min).