> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vsyble.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Save campaign

Create a draft campaign or update a draft or paused campaign at its current revision.

**Tool:** `campaign_write` · **Method:** `save_campaign`

Hosted OAuth MCP, local MCP, and REST API.

For a new campaign, omit campaignId and set expectedRevision to 0. For an update, read the current revision first. Replace senderIds with connected sending mailbox IDs from list\_campaigns. Weekdays use 1–7; startMinute and endMinute are minutes after midnight in the campaign timezone. Keep startMinute before endMinute. Saving a draft never activates it.

## Example

All IDs, addresses and revisions below are illustrative. Replace them with values read from your workspace.

> [tab] MCP
>
> ```json theme={null}
> {
>   "name": "campaign_write",
>   "arguments": {
>     "method": "save_campaign",
>     "expectedRevision": 0,
>     "name": "Selected prospects",
>     "status": "draft",
>     "config": {
>       "deliveryProvider": "native",
>       "mode": "review",
>       "timezone": "America/Los_Angeles",
>       "weekdays": [
>         1,
>         2,
>         3,
>         4,
>         5
>       ],
>       "startMinute": 540,
>       "endMinute": 1020,
>       "dailyLimit": 10,
>       "senderIds": [
>         "11111111-1111-4111-8111-111111111111"
>       ],
>       "sequence": [
>         {
>           "delayHours": 0,
>           "subject": "A question about your expansion",
>           "body": "Write and review the recipient-specific message before approving it."
>         }
>       ],
>       "excludePreviousOutreach": true,
>       "excludeCustomers": true,
>       "excludeActiveOpportunities": true,
>       "cooldownDays": 90,
>       "stopOnReply": true,
>       "stopCompanyOnReply": true
>     }
>   }
> }
> ```

> [tab] REST
>
> ```bash theme={null}
> curl https://api.vsyble.com/v1/outreach \
>   --request POST \
>   --header "Content-Type: application/json" \
>   --header "X-Vsyble-Api-Key: $VSYBLE_API_KEY" \
>   --data '{
>   "action": "save",
>   "expectedRevision": 0,
>   "name": "Selected prospects",
>   "status": "draft",
>   "config": {
>     "deliveryProvider": "native",
>     "mode": "review",
>     "timezone": "America/Los_Angeles",
>     "weekdays": [
>       1,
>       2,
>       3,
>       4,
>       5
>     ],
>     "startMinute": 540,
>     "endMinute": 1020,
>     "dailyLimit": 10,
>     "senderIds": [
>       "11111111-1111-4111-8111-111111111111"
>     ],
>     "sequence": [
>       {
>         "delayHours": 0,
>         "subject": "A question about your expansion",
>         "body": "Write and review the recipient-specific message before approving it."
>       }
>     ],
>     "excludePreviousOutreach": true,
>     "excludeCustomers": true,
>     "excludeActiveOpportunities": true,
>     "cooldownDays": 90,
>     "stopOnReply": true,
>     "stopCompanyOnReply": true
>   }
> }'
> ```

## Inputs

| Field | Type | Requirement | Details |
| - | - | - | - |
| `organizationId` | string | Optional | Workspace ID. Omit to use your current workspace. Format: uuid. |
| `campaignId` | string or null | Optional | |
| `expectedRevision` | integer | Required | Minimum: 0. Maximum: 2147483647. |
| `name` | string | Required | Minimum length: 1. Maximum length: 120. |
| `status` | draft / paused | Required | |
| `config` | object | Required | |
| `config.deliveryProvider` | native / instantly | Optional | Default: "native". |
| `config.instantlyConnectionId` | string or null | Optional | |
| `config.mode` | "review" | Required | |
| `config.timezone` | string | Required | Minimum length: 1. Maximum length: 100. |
| `config.weekdays` | integer\[] | Required | Minimum items: 1. Maximum items: 7. |
| `config.startMinute` | integer | Required | Minimum: 0. Maximum: 1439. |
| `config.endMinute` | integer | Required | Minimum: 1. Maximum: 1440. |
| `config.dailyLimit` | integer | Required | Minimum: 1. Maximum: 1000. |
| `config.totalSendLimit` | integer or null | Optional | |
| `config.senderIds` | string\[] | Required | Maximum items: 200. |
| `config.sequence` | object\[] | Required | Minimum items: 1. Maximum items: 5. |
| `config.sequence[].delayHours` | integer | Required | Minimum: 0. Maximum: 2160. |
| `config.sequence[].subject` | string | Required | Maximum length: 998. |
| `config.sequence[].body` | string | Required | Maximum length: 100000. |
| `config.sequence[].agentDraftSource` | draft / template | Optional | |
| `config.sequence[].attachmentIds` | string\[] | Optional | Maximum items: 5. |
| `config.sequence[].writingGuide` | object | Optional | |
| `config.sequence[].writingGuide.researchMode` | "customer\_account" | Optional | |
| `config.sequence[].writingGuide.id` | string | Optional | Minimum length: 1. Maximum length: 120. |
| `config.sequence[].writingGuide.name` | string | Optional | Minimum length: 1. Maximum length: 120. |
| `config.sequence[].writingGuide.subject` | string | Optional | Maximum length: 200. |
| `config.sequence[].writingGuide.content` | string | Optional | Minimum length: 1. Maximum length: 12000. |
| `config.excludePreviousOutreach` | boolean | Required | |
| `config.excludeCustomers` | boolean | Optional | Default: true. |
| `config.excludeActiveOpportunities` | boolean | Optional | Default: true. |
| `config.cooldownDays` | integer | Required | Minimum: 0. Maximum: 3650. |
| `config.stopOnReply` | boolean | Required | |
| `config.stopCompanyOnReply` | boolean | Required | |
| `config.includeMailingAddress` | boolean | Optional | Default: false. |
| `config.icpId` | string or null | Optional | |
| `config.signatureMode` | first\_touch / full / none | Optional | Default: "first\_touch". |
| `config.openTrackingEnabled` | boolean | Optional | Default: false. |

For MCP, add `method: save_campaign` alongside these fields. For REST, use `action: save` instead of method.

Fields inside an optional object are required only when that object is provided. Do not send fields from a different method.

## Result

MCP returns the following projected schema as structured content and JSON text. The REST response may contain additional fields; do not rely on undocumented fields.

> [accordion] Response schema
>
> ```json theme={null}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "type": "object",
>   "properties": {
>     "campaign": {
>       "type": "object",
>       "properties": {
>         "id": {
>           "type": [
>             "string",
>             "null"
>           ]
>         },
>         "name": {
>           "type": [
>             "string",
>             "null"
>           ]
>         },
>         "status": {
>           "type": [
>             "string",
>             "null"
>           ]
>         },
>         "mode": {
>           "type": [
>             "string",
>             "null"
>           ]
>         },
>         "timezone": {
>           "type": [
>             "string",
>             "null"
>           ]
>         },
>         "delivery_provider": {
>           "type": [
>             "string",
>             "null"
>           ]
>         },
>         "current_revision": {
>           "type": [
>             "number",
>             "null"
>           ]
>         },
>         "daily_limit": {
>           "type": [
>             "number",
>             "null"
>           ]
>         },
>         "total_send_limit": {
>           "type": [
>             "number",
>             "null"
>           ]
>         },
>         "can_manage": {
>           "type": [
>             "boolean",
>             "null"
>           ]
>         },
>         "stats": {
>           "type": "object",
>           "properties": {
>             "leads": {
>               "type": [
>                 "number",
>                 "null"
>               ]
>             },
>             "replied": {
>               "type": [
>                 "number",
>                 "null"
>               ]
>             },
>             "needs_review": {
>               "type": [
>                 "number",
>                 "null"
>               ]
>             },
>             "scheduled": {
>               "type": [
>                 "number",
>                 "null"
>               ]
>             },
>             "sent": {
>               "type": [
>                 "number",
>                 "null"
>               ]
>             },
>             "bounced": {
>               "type": [
>                 "number",
>                 "null"
>               ]
>             },
>             "unsubscribed": {
>               "type": [
>                 "number",
>                 "null"
>               ]
>             },
>             "blocked": {
>               "type": [
>                 "number",
>                 "null"
>               ]
>             },
>             "failed": {
>               "type": [
>                 "number",
>                 "null"
>               ]
>             },
>             "delivered": {
>               "type": [
>                 "number",
>                 "null"
>               ]
>             }
>           },
>           "additionalProperties": false
>         }
>       },
>       "additionalProperties": false
>     },
>     "version": {
>       "type": "object",
>       "properties": {
>         "mode": {
>           "type": [
>             "string",
>             "null"
>           ]
>         },
>         "timezone": {
>           "type": [
>             "string",
>             "null"
>           ]
>         },
>         "delivery_provider": {
>           "type": [
>             "string",
>             "null"
>           ]
>         },
>         "instantly_connection_id": {
>           "type": [
>             "string",
>             "null"
>           ]
>         },
>         "icp_id": {
>           "type": [
>             "string",
>             "null"
>           ]
>         },
>         "signature_mode": {
>           "type": [
>             "string",
>             "null"
>           ]
>         },
>         "revision": {
>           "type": [
>             "number",
>             "null"
>           ]
>         },
>         "start_minute": {
>           "type": [
>             "number",
>             "null"
>           ]
>         },
>         "end_minute": {
>           "type": [
>             "number",
>             "null"
>           ]
>         },
>         "daily_limit": {
>           "type": [
>             "number",
>             "null"
>           ]
>         },
>         "cooldown_days": {
>           "type": [
>             "number",
>             "null"
>           ]
>         },
>         "total_send_limit": {
>           "type": [
>             "number",
>             "null"
>           ]
>         },
>         "weekdays": {
>           "anyOf": [
>             {
>               "type": "array",
>               "items": {
>                 "type": "number"
>               }
>             },
>             {
>               "type": "null"
>             }
>           ]
>         },
>         "sender_ids": {
>           "anyOf": [
>             {
>               "type": "array",
>               "items": {
>                 "type": "string"
>               }
>             },
>             {
>               "type": "null"
>             }
>           ]
>         },
>         "sequence": {
>           "anyOf": [
>             {
>               "type": "array",
>               "items": {
>                 "type": "object",
>                 "properties": {
>                   "subject": {
>                     "type": [
>                       "string",
>                       "null"
>                     ]
>                   },
>                   "body": {
>                     "type": [
>                       "string",
>                       "null"
>                     ]
>                   },
>                   "agentDraftSource": {
>                     "type": [
>                       "string",
>                       "null"
>                     ]
>                   },
>                   "agent_draft_source": {
>                     "type": [
>                       "string",
>                       "null"
>                     ]
>                   },
>                   "delayHours": {
>                     "type": [
>                       "number",
>                       "null"
>                     ]
>                   },
>                   "attachmentIds": {
>                     "anyOf": [
>                       {
>                         "type": "array",
>                         "items": {
>                           "type": "string"
>                         }
>                       },
>                       {
>                         "type": "null"
>                       }
>                     ]
>                   },
>                   "writingGuide": {
>                     "type": "object",
>                     "properties": {
>                       "id": {
>                         "type": [
>                           "string",
>                           "null"
>                         ]
>                       },
>                       "name": {
>                         "type": [
>                           "string",
>                           "null"
>                         ]
>                       },
>                       "subject": {
>                         "type": [
>                           "string",
>                           "null"
>                         ]
>                       },
>                       "content": {
>                         "type": [
>                           "string",
>                           "null"
>                         ]
>                       },
>                       "mode": {
>                         "type": [
>                           "string",
>                           "null"
>                         ]
>                       }
>                     },
>                     "additionalProperties": false
>                   }
>                 },
>                 "additionalProperties": false
>               }
>             },
>             {
>               "type": "null"
>             }
>           ]
>         },
>         "exclude_previous_outreach": {
>           "type": [
>             "boolean",
>             "null"
>           ]
>         },
>         "exclude_customers": {
>           "type": [
>             "boolean",
>             "null"
>           ]
>         },
>         "exclude_active_opportunities": {
>           "type": [
>             "boolean",
>             "null"
>           ]
>         },
>         "stop_on_reply": {
>           "type": [
>             "boolean",
>             "null"
>           ]
>         },
>         "stop_company_on_reply": {
>           "type": [
>             "boolean",
>             "null"
>           ]
>         },
>         "include_mailing_address": {
>           "type": [
>             "boolean",
>             "null"
>           ]
>         },
>         "open_tracking_enabled": {
>           "type": [
>             "boolean",
>             "null"
>           ]
>         }
>       },
>       "additionalProperties": false
>     }
>   },
>   "additionalProperties": false
> }
> ```

[Download input schema](https://docs.vsyble.com/schemas/save_campaign.input.json) · [Download MCP response schema](https://docs.vsyble.com/schemas/save_campaign.output.json)

See [permissions](https://docs.vsyble.com/security/permissions.md), [errors and recovery](https://docs.vsyble.com/api/errors.md), and [sending approval](https://docs.vsyble.com/security/sending.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.