Post history import API

Backfill posts that were published outside Siar, optionally with their analytics.

OperationMethod and path
Start a new post history importPOST /api/v1/post-history-import
Get import status listGET /api/v1/post-history-import
Get import by IDGET /api/v1/post-history-import/{importId}
Get imported posts with analytics for a social accountGET /api/v1/post-history-import/posts
Bulk delete imported posts and their analyticsDELETE /api/v1/post-history-import/posts
Retry a failed importPOST /api/v1/post-history-import/{importId}/retry
POST /api/v1/post-history-import

Start a new post history import

postImport.create · requires x-api-key

Request body application/json

  • teamId string required
  • socialAccountType string required
    One of: FACEBOOK INSTAGRAM THREADS TIKTOK YOUTUBE LINKEDIN PINTEREST REDDIT MASTODON BLUESKY TWITTER
  • count integer required ≥ 1
  • withAnalytics boolean default true
  • importCarousels boolean default false
  • surface string default "ALL"
    One of: PROFILE_GRID NON_GRID STORY ALL
  • mediaType string
    One of: VIDEO IMAGE

Example

curl -X POST "https://api.siaran.my/api/v1/post-history-import/" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "socialAccountType": "FACEBOOK",
    "count": 1
  }'

Response 201

18 top-level fields
  • id string required
  • teamId string required
  • socialAccountId string required
  • requestedCount number required
  • withAnalytics boolean required
  • importCarousels boolean required
  • surface string nullable
    One of: PROFILE_GRID NON_GRID STORY ALL
  • mediaType string nullable
    One of: VIDEO IMAGE
  • status string required
    One of: PENDING FETCHING_POSTS FETCHING_ANALYTICS COMPLETED FAILED RATE_LIMITED
  • postsImported number required
  • analyticsImported number required
  • error string nullable
  • rateLimitResetAt string nullable date-time
  • startedAt string nullable date-time
  • completedAt string nullable date-time
  • createdAt string required nullable date-time
  • updatedAt string required nullable date-time
  • deletedAt string nullable date-time

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 409 Conflict · 429 Rate limited · 500 Server error · 502 Network error

GET /api/v1/post-history-import

Get import status list

postImport.getStatus · requires x-api-key

Parameters

NameInTypeNotes
teamId required query string
socialAccountType query string One of FACEBOOK, INSTAGRAM, THREADS, TIKTOK, YOUTUBE, LINKEDIN, PINTEREST, REDDIT, MASTODON, BLUESKY, TWITTER

Example

curl -X GET "https://api.siaran.my/api/v1/post-history-import/?teamId=TEAM_ID" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

1 top-level fields
  • imports object[] required
    18 fields
    • id string required
    • teamId string required
    • socialAccountId string required
    • requestedCount number required
    • withAnalytics boolean required
    • importCarousels boolean required
    • surface string nullable
      One of: PROFILE_GRID NON_GRID STORY ALL
    • mediaType string nullable
      One of: VIDEO IMAGE
    • status string required
      One of: PENDING FETCHING_POSTS FETCHING_ANALYTICS COMPLETED FAILED RATE_LIMITED
    • postsImported number required
    • analyticsImported number required
    • error string nullable
    • rateLimitResetAt string nullable date-time
    • startedAt string nullable date-time
    • completedAt string nullable date-time
    • createdAt string required nullable date-time
    • updatedAt string required nullable date-time
    • deletedAt string nullable date-time

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

GET /api/v1/post-history-import/{importId}

Get import by ID

postImport.getById · requires x-api-key

Parameters

NameInTypeNotes
importId required path string

Example

curl -X GET "https://api.siaran.my/api/v1/post-history-import/IMPORTID" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

18 top-level fields
  • id string required
  • teamId string required
  • socialAccountId string required
  • requestedCount number required
  • withAnalytics boolean required
  • importCarousels boolean required
  • surface string nullable
    One of: PROFILE_GRID NON_GRID STORY ALL
  • mediaType string nullable
    One of: VIDEO IMAGE
  • status string required
    One of: PENDING FETCHING_POSTS FETCHING_ANALYTICS COMPLETED FAILED RATE_LIMITED
  • postsImported number required
  • analyticsImported number required
  • error string nullable
  • rateLimitResetAt string nullable date-time
  • startedAt string nullable date-time
  • completedAt string nullable date-time
  • createdAt string required nullable date-time
  • updatedAt string required nullable date-time
  • deletedAt string nullable date-time

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

GET /api/v1/post-history-import/posts

Get imported posts with analytics for a social account

postImport.getImportedPosts · requires x-api-key

Parameters

NameInTypeNotes
teamId required query string
socialAccountType required query string One of FACEBOOK, INSTAGRAM, THREADS, TIKTOK, YOUTUBE, LINKEDIN, PINTEREST, REDDIT, MASTODON, BLUESKY, TWITTER
limit query number default 50
offset query number default 0 · nullable

Example

curl -X GET "https://api.siaran.my/api/v1/post-history-import/posts?teamId=TEAM_ID&socialAccountType=FACEBOOK" \
  -H "x-api-key: $SIAR_API_KEY"

Response 200

4 top-level fields
  • posts object[] required
    20 fields
    • id string required
    • socialAccountId string required
    • postId string nullable
    • externalId string nullable
    • title string nullable
    • description string nullable
    • smallThumbnail string nullable
    • thumbnail string nullable
    • permalink string nullable
    • extraData any nullable
    • subreddit string nullable
    • publishedAt string nullable date-time
    • type string required
      One of: POST REEL STORY VIDEO IMAGE
    • internal boolean required
    • importedAt string nullable date-time
    • externallyDeletedAt string nullable date-time
    • createdAt string required nullable date-time
    • updatedAt string required nullable date-time
    • deletedAt string nullable date-time
    • analytics object[] required
      16 fields
      • id string required
      • profilePostId string required
      • impressions number required
      • impressionsUnique number required
      • views number required
      • viewsUnique number required
      • likes number required
      • dislikes number required
      • comments number required
      • shares number required
      • saves number required
      • raw any nullable
      • forced boolean required
      • createdAt string required nullable date-time
      • updatedAt string required nullable date-time
      • deletedAt string nullable date-time
  • total number required
  • limit number required
  • remainingCapacity number required

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

DELETE /api/v1/post-history-import/posts

Bulk delete imported posts and their analytics

postImport.deleteImportedPosts · requires x-api-key

Request body application/json

  • teamId string required
  • postIds string[] required min 1 itemsmax 100 items

Example

curl -X DELETE "https://api.siaran.my/api/v1/post-history-import/posts" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID",
    "postIds": [
      "POST_ID"
    ]
  }'

Response 200

1 top-level fields
  • deletedCount number required

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error

POST /api/v1/post-history-import/{importId}/retry

Retry a failed import

postImport.retryImport · requires x-api-key

Parameters

NameInTypeNotes
importId required path string

Request body application/json

  • teamId string required

Example

curl -X POST "https://api.siaran.my/api/v1/post-history-import/IMPORTID/retry" \
  -H "x-api-key: $SIAR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "teamId": "TEAM_ID"
  }'

Response 200

18 top-level fields
  • id string required
  • teamId string required
  • socialAccountId string required
  • requestedCount number required
  • withAnalytics boolean required
  • importCarousels boolean required
  • surface string nullable
    One of: PROFILE_GRID NON_GRID STORY ALL
  • mediaType string nullable
    One of: VIDEO IMAGE
  • status string required
    One of: PENDING FETCHING_POSTS FETCHING_ANALYTICS COMPLETED FAILED RATE_LIMITED
  • postsImported number required
  • analyticsImported number required
  • error string nullable
  • rateLimitResetAt string nullable date-time
  • startedAt string nullable date-time
  • completedAt string nullable date-time
  • createdAt string required nullable date-time
  • updatedAt string required nullable date-time
  • deletedAt string nullable date-time

Errors: 400 Validation failed · 401 Missing or invalid API key · 403 Plan limit or permission · 404 Not found · 429 Rate limited · 500 Server error · 502 Network error