GET
/
v1
/
teams
/
{teamId}
/
posts
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

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

const response = await client.socialListPosts({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  query: {},
})
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "title": "<string>",
      "text": "<string>",
      "assetIds": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "contentPayloadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "latestScheduledPost": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "contentItemId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "socialAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "scheduledAt": "<string>",
        "timezone": "<string>",
        "platformPostId": "<string>",
        "platformSettings": {},
        "publishResults": {},
        "providerPublishState": {
          "requiresPolling": true,
          "publishId": "<string>",
          "platformPostId": "<string>",
          "providerStatus": "<string>",
          "pollingReason": "<string>",
          "uploadProgress": {
            "nextByteStart": 123,
            "uploadSize": 123
          },
          "failureCode": "<string>"
        },
        "errorCode": "<string>",
        "errorMessage": "<string>",
        "workflowId": "<string>",
        "workflowRunId": "<string>",
        "createdAt": "<string>",
        "updatedAt": "<string>"
      },
      "createdAt": "<string>",
      "updatedAt": "<string>",
      "postInput": {
        "text": "<string>",
        "attachments": [
          {
            "asset": {
              "assetId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "mimeType": "<string>",
              "byteSize": 123,
              "width": 123,
              "height": 123,
              "durationSeconds": 123,
              "thumbnailUrl": "<string>",
              "altText": "<string>"
            },
            "altText": "<string>"
          }
        ]
      },
      "postPublishActions": {
        "firstComment": {
          "text": "<string>",
          "mediaIds": [
            "3c90c3cc-0d44-4b50-8888-8dd25736052a"
          ]
        },
        "engagementCommentTrigger": {
          "likeThreshold": 2,
          "windowHours": 360,
          "comment": {
            "text": "<string>",
            "mediaIds": [
              "3c90c3cc-0d44-4b50-8888-8dd25736052a"
            ]
          }
        },
        "repostAfter": {
          "offsetDays": 15,
          "text": "<string>"
        },
        "recurrenceIntervalDays": 183,
        "recurrenceEndsAt": "<string>"
      }
    }
  ],
  "total": 123,
  "nextCursor": "<string>",
  "prevCursor": "<string>"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

teamId
string
required

Query Parameters

cursor
string
limit
string
sortBy
string
sortOrder
enum<string>
Available options:
asc,
desc
status
enum<string>
Available options:
idea,
proposed_render,
draft,
approved,
rejected,
archived,
deleted
provider
enum<string>
Available options:
x,
tiktok,
instagram,
facebook,
youtube,
linkedin,
threads
scheduledFrom
string
scheduledTo
string

Response

Success

data
object[]
required
total
number
required
nextCursor
string | null
required
prevCursor
string | null
required