workflow_sources

Add people to workflow source

Add specific people to a workflow through a manual source - THE "add selected to campaign" surface (valid on type=manual sources only; create one first if none exists). Runs the full entry pipeline synchronously per person, reading MySQL (never ES): person exists → not stoplisted (stoplist_entries + people.status) → within active_limit / coworkers_limit (over-cap people WAIT). A NEW person gets a workflow_records row pinned to the published version, sender pinned by rotation_strategy; a person ALREADY in the workflow is RE-ENTERED (existing record reused + reset to the top - deliberate re-run). Requires a published version (422 invalid_transition) and a non-archived workflow (409 conflict).

All-or-nothing input: any unknown people_sid → 422 relation_not_found and nobody is enrolled - resolve sids via people search first. NOT idempotent for already-enrolled people: each call re-runs them. result = THIS call's counts (entered / re_entered / blocked_stoplisted / blocked_limit / blocked_other) - relay them ("4 entered, 1 re-run, 1 blocked: stoplisted"); item = the source row after the call.

When NOT: a living audience that keeps growing (create a view/filter source with auto_add:true); removing an enrolled person (workflow-records exit); importing new contacts into the CRM (data-sources).

Contract:

  • MCP tool add_workflow_source_people, registry package mcp.playtables/workflow_sources, mount playtables.workflows.
  • Operation action, response envelope action.
  • Flags: none.
post/api/workflow-sources/{sid}/add-people

Request

  • Base URL
    https://beta.getsales.io/playtables/v1
  • Auth
    HTTP bearer and API key in header Team-SID

Path parameters

sidstring required

Manual source (wf_sr_…, type=manual) - any other type → 422 validation_failed.

Request body

people_sidsstring[] required

1..500 people (cr_pp_…). Any unknown sid → 422 relation_not_found and the WHOLE call is rejected (nothing partial).

restart'from_start' | 'from_current' nullable

People ALREADY in the workflow. Omitted: a terminal record restarts from_start, an in-flight one is skipped (skipped_in_flight_count). from_start | from_current also re-run in-flight records (from_current: the pinned step); terminal ones restart anyway.

Response

action success envelope.

successtrue required
operation'action' required
actionstring required

kebab-case verb; matches the route segment.

Changes

No recorded changes to this operation across all 1 revision of this API.