GET
/
v1
/
teams
/
{teamId}
/
tracking
/
content-usage
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.tracking.getContentUsage({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  query: {
    "kind": process.env.OCTOSPARK_KIND ?? "kind",
    "id": process.env.OCTOSPARK_ID ?? "id",
  },
})
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "title": "<string>",
  "useCount": 123,
  "draftCount": 123,
  "firstUsedAt": "<string>",
  "lastUsedAt": "<string>",
  "channels": [
    {
      "socialAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "history": [
    {
      "scheduledPostId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "postId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "socialAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "scheduledAt": "<string>",
      "selectedAt": "<string>",
      "agentRunId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "agentScheduleId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    }
  ],
  "historyTruncated": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

teamId
string
required

Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.

Query Parameters

kind
enum<string>
required

What the usage is about: asset (a media library asset) or post (a content item).

Available options:
asset,
post
id
string<uuid>
required

Asset id when kind is asset, post id when kind is post.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

Response

Success

kind
enum<string>
required

What the usage is about: asset (a media library asset) or post (a content item).

Available options:
asset,
post
id
string<uuid>
required

The asset or post id that was asked about.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
title
string | null
required

Post title, or the asset AI title falling back to its filename.

useCount
integer
required

All-time number of scheduled or published legs that used the content.

draftCount
integer
required

For an asset, draft posts it is attached to with no scheduled or published leg; for a post, 1 while it is such a draft, else 0.

firstUsedAt
string | null
required

First selection for a counted leg (ISO 8601), or null when never used.

lastUsedAt
string | null
required

Most recent selection for a counted leg (ISO 8601), or null when never used.

channels
object[]
required

Distinct channels the content was used on.

history
object[]
required

The newest counted legs, newest first.

historyTruncated
boolean
required

true when useCount exceeds the legs returned in history.