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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| campaign_id | path | string | yes | — |
Body
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| csv | body | string | no | — |
| messages | body | array | no | — |
| source | body | string | no | — |
| allow_links | body | boolean | no | — |
| allow_hi_greeting | body | boolean | no | — |
| allow_ascii_smileys | body | boolean | no | — |
| allow_exclamation | body | boolean | no | — |
| m1_no_product_pitch | body | boolean | no | — |
| score_closeness | body | boolean | no | — |
| dry_run | body | boolean | no | — |
| workspace | body | string | no | Optional. 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_account | body | string | no | Which 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.