sayintel
Endpoint

Import style reference

POST/api/public/v1/campaigns/{campaign_id}/style-referencewrite

Load a per-campaign style reference of approved first messages (exported from a sheet as CSV, or passed as messages[]). Stored on campaign_config.style_reference as data, not hardcoded. Optionally set allow flags (links, Hi greeting, ASCII smileys, exclamation) and m1_no_product_pitch. Scoring uses closeness to this corpus. dry_run previews with no write. Nothing is spent, drafted or sent.

Request

curl -X POST "https://sayintel.com/api/public/v1/campaigns/<campaign_id>/style-reference" \
  -H "Authorization: Bearer $SAYINTEL_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'

Try it out

Try it outPOST/api/public/v1/campaigns/{campaign_id}/style-referencewrite

Sent as a bearer token to this site only, and kept in this tab's session storage. It is never written to disk or sent anywhere else.

Paste an API key to run.

Path parameters

NameInTypeRequiredDescription
campaign_idpathstringyes—

Body

NameInTypeRequiredDescription
csvbodystringno—
messagesbodyarrayno—
sourcebodystringno—
allow_linksbodybooleanno—
allow_hi_greetingbodybooleanno—
allow_ascii_smileysbodybooleanno—
allow_exclamationbodybooleanno—
m1_no_product_pitchbodybooleanno—
score_closenessbodybooleanno—
dry_runbodybooleanno—
workspacebodystringnoOptional. Make this change on another account where you hold an ADMIN seat on the whole account: pass the workspace_id that list_workspaces returns. Omit to use your own account. Refused for viewer and member seats and for client or conference seats. Never sends.
acting_accountbodystringnoWhich sayintel login this call acts on: an account_id or email from list_accounts. Required once logins are linked to this connection.

Response

{
  "ok": true,
  "tool": "import_style_reference",
  "kind": "write",
  "data": { ... },
  "error": null
}

Notes

  • Scope required: write. How scopes work.
  • Accepts Idempotency-Key. A retry with the same key replays the first result instead of repeating the work.
  • Accepts dry_run: true and always returns cost_preview before spending anything.
  • Same capability over MCP as the tool import_style_reference. MCP setup.