---
title: "Preview post engagement"
method: POST
path: "/api/data-sources/post-engagement-preview"
tags: ["data_sources"]
---

# Preview post engagement

`POST /api/data-sources/post-engagement-preview`

## Request

- Base URL: `https://beta.getsales.io/playtables/v1`
- URL: `https://beta.getsales.io/playtables/v1/api/data-sources/post-engagement-preview`
- Auth: HTTP bearer and API key in header `Team-SID`

A post, profile or company page link read back before a post_engagement source exists: the post's card and counts, or the person or page with 20 recent posts' dates. Nothing created.

Contract:
- MCP tool `preview_post_engagement`, registry package `mcp.playtables/data_sources`, mount `playtables.sources`.
- Operation `action`, response envelope `action`.
- Flags: read only.

## Request body

- PreviewPostEngagementRequest: Request body of `preview_post_engagement`.
  - `url` string, uri, required: A post link (/posts/…, /feed/update/…, a lnkd.in shortlink), a profile link (/in/{slug}) or a company page link (/company/{slug}); any other link is 422 link_not_recognized.
  - `sender_profile_sid` string, required: The sender profile whose LinkedIn account reads the link (ub_sp_), the one the source will run on; one that cannot read LinkedIn now is 422 with gtm's reason. A busy seat is 409 preview_unavailable (context.retry_after_seconds): create still works.

## Response `200`

`action` success envelope.

- PreviewPostEngagementResponse
  - `success` true, required
  - `operation` 'action', required
  - `action` string, required: kebab-case verb; matches the route segment.
  - `item` unknown, required
  - `result` object, required
    - `target` 'post' | 'person' | 'company', required: What the link is: post | person | company. Pass it as payload.target to create_data_source, or leave it to the link.
    - `post` object, nullable: target=post: the post's card; null when it could not be read (deleted, private): the source would fail post_unavailable, so do not create it.
      - `urn` string, required
      - `author` object, required
        - `name` string
        - `ln_nickname` string
        - `headline` string
        - `picture_url` string
      - `text` string, required: The post's text, cut to 600 characters.
      - `published_at` string, nullable, required
      - `counts` object, required: What each collect switch would read.
        - `reactions` integer, required
        - `comments` integer, required
        - `reposts` integer, required
    - `person` object: target=person: who the profile link is, from their feed (the lite profile names a person with no posts).
      - `name` string
      - `ln_nickname` string, required
      - `headline` string
      - `picture_url` string
    - `company` object: target=company: the page behind the link, by slug and numeric id; headline is the line LinkedIn shows under the page's name on its own posts (its followers), when a post was read.
      - `ln_nickname` string, required
      - `ln_id` string
      - `name` string
      - `logo_url` string
      - `headline` string
    - `posts` object[]: target=person | company: up to 20 recent posts with their dates and counts, so a caller can count how many fall in a window, and how much engagement, before creating the source.
      - `urn` string, required: urn:li:activity:… - the post the walk would address.
      - `published_at` string, nullable, required: ISO 8601 UTC; null when the feed gave no date.
      - `title` string, required: The first line of the post, cut to 120 characters.
      - `counts` object: The post's three counts: sum them over the posts in the window for what each collect switch would read.
        - `reactions` integer, required
        - `comments` integer, required
        - `reposts` integer, required
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-playtables/revisions/aa394506515d?raw)
