---
title: "Estimate play"
method: POST
path: "/api/plays/{sid}/estimate"
tags: ["plays"]
---

# Estimate play

`POST /api/plays/{sid}/estimate`

## Request

- Base URL: `https://beta.getsales.io/playtables/v1`
- URL: `https://beta.getsales.io/playtables/v1/api/plays/{sid}/estimate`
- Auth: HTTP bearer and API key in header `Team-SID`

What a run now would do, nothing changed: result.matched (the audience as of now), result.acted (what the action would take within the queue's room and the day's ceiling), result.skipped, result.credits (one per account for find_people, 0 for add_to_workflow). The number for the approval card before run_play or before switching a daily play on. A people play with no workflow yet is 422: pick it with update_play first.

Contract:
- MCP tool `estimate_play`, registry package `mcp.playtables/plays`, mount `playtables.pipeline`.
- Operation `action`, response envelope `action`.
- Flags: read only.

## Path parameters

- `sid` string, required: Play sid (pt_pl_…).

## Response `200`

`action` success envelope.

- EstimatePlayResponse
  - `success` true, required
  - `operation` 'action', required
  - `action` string, required: kebab-case verb; matches the route segment.
  - `item` object, nullable, required
    - `sid` string, required: Play sid (pt_pl_…).
    - `team_sid` string, required: Owning team (ts_tm_…).
    - `playtable_sid` string, required: The table the play lives in (pt_tb_…): its tab, and the scope of its audience.
    - `catalog_key` 'keep_fresh' | 'congratulate' | 'on_job_change' | 'engage_posts' | 'on_website_visit' | 'find_people_empty' | 'top_up_thin' | 'top_up_silent' | 'top_up_no_reply' | 'top_up_exhausted' | 'find_decision_maker' | 'reengage_dormant' | 'reach_untouched', nullable, required: The playbook entry the row was born from; null = a play saved from a view's filter.
    - `name` string, required: The play's name, 1..255.
    - `object_type` 'people' | 'company', required: What the audience selects: people, or company (accounts).
    - `action_type` 'find_people' | 'add_to_workflow' | 'refresh' | 'congratulate' | 'on_job_change' | 'engage_posts' | 'on_website_visit', required: find_people (a company audience); every other kind runs on a people audience: add_to_workflow, refresh (Keep data fresh), congratulate, on_job_change, engage_posts, on_website_visit.
    - `action` union, required: The action's parameters, the shape of its action_type: the sids of the sources a find_people or add_to_workflow play owns; the moments of a congratulate play; the Do of on_job_change and on_website_visit; the like, the comment and the weekly cap of engage_posts; {} for refresh.
      - object
        - `prompt` string, nullable, required: Who to find at each account ("owner, founder, VP and up"); planned once into a Sales Navigator filter by the play's source. null = everyone the page gives.
        - `per_company_limit` integer, nullable, required: People taken per account, 1..25; null = the whole first page.
        - `data_source_sid` string, nullable, required: The play's own find_people source (ds_sc_…), born at the first run that had accounts; its queue and funnel are read with get_data_source. null until then.
      - object
        - `workflow_sid` string, nullable, required: The workflow the audience enters (wf_wf_…); null while the play waits for one (picked once, with update_play), and fixed from then on.
        - `workflow_source_sid` string, nullable, required: The play's own manual source in that workflow (wf_sr_…), born when the workflow is picked; its entry counters are read with search_workflow_sources.
      - object
        - `moments` object, required: A switch per moment with its own Do under it; a kind absent is off.
          - `birthday` object
            - `on` boolean, required: The moment's switch.
            - `do` 'send_message' | 'add_to_workflow', required: While on: a message (the template, sent as the person's connected sender profile) or the workflow the person enters.
            - `template` string, nullable, required: The message, in the workflow template grammar ({{people.first_name}}).
            - `workflow_sid` string, nullable, required: wf_wf_…: the workflow, when the Do is a workflow.
          - `work_anniversary` object
            - `on` boolean, required: The moment's switch.
            - `do` 'send_message' | 'add_to_workflow', required: While on: a message (the template, sent as the person's connected sender profile) or the workflow the person enters.
            - `template` string, nullable, required: The message, in the workflow template grammar ({{people.first_name}}).
            - `workflow_sid` string, nullable, required: wf_wf_…: the workflow, when the Do is a workflow.
          - `job_change` object
            - `on` boolean, required: The moment's switch.
            - `do` 'send_message' | 'add_to_workflow', required: While on: a message (the template, sent as the person's connected sender profile) or the workflow the person enters.
            - `template` string, nullable, required: The message, in the workflow template grammar ({{people.first_name}}).
            - `workflow_sid` string, nullable, required: wf_wf_…: the workflow, when the Do is a workflow.
      - object
        - `do` 'pause_and_ask' | 'remove_from_workflows' | 'move_to_workflow', required: For a person in a workflow whose title or company moved.
        - `workflow_sid` string, nullable, required: wf_wf_…: where move_to_workflow moves the person (required then).
      - object
        - `like` object, required
          - `on` boolean, required
          - `reaction` 'ai' | 'like' | 'celebrate' | 'support' | 'love' | 'insightful' | 'funny', required: ai = the AI reads the post and picks one of the six; else always this one. One reaction a post, never changed later.
        - `comment` object, required
          - `on` boolean, required
          - `brief` string, nullable, required: What the AI writes the comment from; required while on.
        - `per_person_weekly_cap` integer, required: At most this many acts a week per person.
        - `sender_profile_sid` string, nullable, required: ub_sp_…: who acts on a person connected to no sender profile (the connected one acts otherwise; the social workspace is the team's); null = the team's first that can.
      - object
        - `do` 'pause_and_ask' | 'add_to_workflow', required: On a visit of a key page or a form: pause the journey and ask, or the workflow named.
        - `workflow_sid` string, nullable, required: wf_wf_…: required when the Do is a workflow.
        - `pages` string[], nullable, required: Path prefixes of the team's site (/pricing) that count; null = every visit the snippet reports.
      - object: Keep data fresh acts on nothing: the refresh of what it watches is the deed.
    - `audience` unknown
    - `watch` object, nullable, required: What the play keeps refreshed and how often; null = nothing (2026-10-13).
      - `profile_days` union, required: The LinkedIn profile every N days: 7 | 14 | 30 | 90; null = not watched.
        - 7
        - 14
        - 30
        - 90
        - unknown
      - `company_days` union, required: The company page every N days: 30 | 90; null = not watched.
        - 30
        - 90
        - unknown
      - `posts_days` union, required: The person's posts every N days: 1 | 3 | 7; null = not watched.
        - 1
        - 3
        - 7
        - unknown
      - `moments` boolean, required: The network's moments (birthdays, work anniversaries, job changes) through the sender profiles' catch-up feed, daily, free.
    - `cadence` 'manual' | 'daily', required: manual: runs on run_play; daily: runs by itself every day while enabled.
    - `mode` 'ask_me' | 'automatic', required: ask_me: the act waits for approval as a task in the Signals feed; automatic: it goes out by itself. The plays that act are born asking (2026-10-13).
    - `enabled` boolean, required: The switch of a daily play; a manual play is always false.
    - `enabled_by` object, nullable, required: Who gave the consent (switched the play on).
      - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
      - `actor_sid` string, nullable, required
      - `team_sid` string, required
      - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
      - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
      - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
      - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
      - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
      - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
    - `enabled_at` string, nullable, required: ISO 8601 UTC: when.
    - `daily_credit_limit` integer, nullable, required: The plays that spend (find_people, and a watching play's reads): the credits one day may spend; null = no ceiling (the queue's room and the 500-row cap still bound a run). 422 on add_to_workflow.
    - `last_run_at` string, nullable, required: ISO 8601 UTC.
    - `last_run_counts` object, nullable, required: What the last run did; null before the first run.
      - `matched` integer, required: Rows the audience matched at the run (the tab's count under the filter).
      - `acted` integer, required: Accounts appended to the queue, or people entered or re-entered.
      - `skipped` integer, required: Left alone: already queued or searched, in flight, held at the door, past the ceiling or the 500-row cap.
      - `credits` integer, required: What the run committed: the walk's estimate for the accounts appended (one credit per account); 0 for an add_to_workflow play.
    - `next_run_at` string, nullable, required: ISO 8601 UTC: when the daily sweep runs it next; null on a manual or switched-off play.
    - `created_by` object, required
      - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
      - `actor_sid` string, nullable, required
      - `team_sid` string, required
      - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
      - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
      - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
      - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
      - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
      - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
    - `deleted_by` object, nullable, required
      - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
      - `actor_sid` string, nullable, required
      - `team_sid` string, required
      - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
      - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
      - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
      - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
      - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
      - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
    - `created_at` string, required: ISO 8601 UTC.
    - `updated_at` string, required: ISO 8601 UTC.
    - `deleted_at` string, nullable, required: ISO 8601 UTC; null = live.
  - `result` object, required
    - `matched` integer, required: Rows the audience matched at the run (the tab's count under the filter).
    - `acted` integer, required: Accounts appended to the queue, or people entered or re-entered.
    - `skipped` integer, required: Left alone: already queued or searched, in flight, held at the door, past the ceiling or the 500-row cap.
    - `credits` integer, required: What the run committed: the walk's estimate for the accounts appended (one credit per account); 0 for an add_to_workflow play.
    - `ceiling_applies` boolean, required: true when a daily_credit_limit bounds the run counted here.
    - `credits_month` number, nullable, required: What the play costs a month over the audience: per kind, the rows times the reads a month at the cadence times the kind's price per row (the table's columns of the kind), and for Engage with posts the AI's comments at the weekly cap (2026-10-16); null when the play reads nothing on a cadence and writes no comment (2026-10-13).
    - `credits_month_parts` object[], required: The month part by part, so the number can be said whole: "59 people: about 253 profile reads at 5 each and 11 company page reads at 2 each". A kind the play does not use yet is listed at no cost with its rows and its price (2026-10-16).
      - `kind` string, required: profile, company or posts (a read the table can make), or ai_comment (Engage with posts' AI comments).
      - `object_type` string, required: people or company: the tab the part runs over.
      - `rows` integer, required: The rows of the audience the part runs over.
      - `days` integer, nullable, required: The cadence the count is at; null while the play does not read this kind on one (the count and the credits are 0 then).
      - `count` integer, required: Reads, or comments, a month.
      - `price` number, required: Credits for one.
      - `credits` number, required: What the part comes to a month.
  - `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)
