curl --request POST \
--url https://www.genviral.io/api/partner/v1/analytics/targets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"platform": "tiktok",
"identifier": "@brand",
"alias": "Brand HQ"
}'
{
"ok": true,
"code": 201,
"message": "Analytics target created",
"data": {
"target": {
"id": "e7a7f417-56db-4320-9e9a-fd6fdabda09d",
"user_id": "7f026314-7657-4b0f-bb45-8fd4c0b95fd7",
"workspace_id": "4cb5d3fd-8c8f-4ed7-a17c-4ffb52c7e6ac",
"platform": "tiktok",
"identifier": "@brand",
"normalized_identifier": "brand",
"display_name": "Brand HQ",
"last_refreshed_at": null
},
"created": true
}
}
Analytics
Create Analytics Target
Add a tracked analytics account
POST
/
api
/
partner
/
v1
/
analytics
/
targets
curl --request POST \
--url https://www.genviral.io/api/partner/v1/analytics/targets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"platform": "tiktok",
"identifier": "@brand",
"alias": "Brand HQ"
}'
{
"ok": true,
"code": 201,
"message": "Analytics target created",
"data": {
"target": {
"id": "e7a7f417-56db-4320-9e9a-fd6fdabda09d",
"user_id": "7f026314-7657-4b0f-bb45-8fd4c0b95fd7",
"workspace_id": "4cb5d3fd-8c8f-4ed7-a17c-4ffb52c7e6ac",
"platform": "tiktok",
"identifier": "@brand",
"normalized_identifier": "brand",
"display_name": "Brand HQ",
"last_refreshed_at": null
},
"created": true
}
}
Creates a tracked analytics target in the authenticated key scope.
Body Parameters
string
required
Supported values:
tiktok, instagram, youtube.string
required
Account identifier/handle to track (for example
@brand).string
Optional display name override.
curl --request POST \
--url https://www.genviral.io/api/partner/v1/analytics/targets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"platform": "tiktok",
"identifier": "@brand",
"alias": "Brand HQ"
}'
{
"ok": true,
"code": 201,
"message": "Analytics target created",
"data": {
"target": {
"id": "e7a7f417-56db-4320-9e9a-fd6fdabda09d",
"user_id": "7f026314-7657-4b0f-bb45-8fd4c0b95fd7",
"workspace_id": "4cb5d3fd-8c8f-4ed7-a17c-4ffb52c7e6ac",
"platform": "tiktok",
"identifier": "@brand",
"normalized_identifier": "brand",
"display_name": "Brand HQ",
"last_refreshed_at": null
},
"created": true
}
}
Error Responses
400 invalid_json- request body is not valid JSON400 invalid_payload- body must be a JSON object400- unsupported platform or missing identifier401/403- authentication failed or key lacks workspace access500- unexpected database/analytics service error
error_code field.
When seat billing requires credits, the endpoint returns 402 insufficient_credits with
action_url: https://www.genviral.io/billing?tab=credits.