> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.v2.rasen.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.v2.rasen.ai/_mcp/server.

# Start an admitted campaign

POST https://api.v2.rasen.ai/v1/campaigns/{campaign_id}/start

Start an admitted campaign.

Reference: https://docs.v2.rasen.ai/api-reference/campaigns/start-campaign

## Authentication

- `Authorization` header (bearer token, required) — Create and manage workspace-owned keys through the existing app session routes, outside this public API. Creator and manager identities are audit actors only. Key validity follows workspace policy, expiry and explicit revocation, independently of creator membership. Do not include a workspace-selection header.

## Request

### Path parameters

- `campaign_id` (string, required) — Campaign identity within the authenticated workspace.

### Headers

- `If-Match` (string, required) — Strong ETag from the resource being changed. Draft/tool/variable/publication operations use the complete agent draft ETag; number operations use the number ETag; MCP update uses its own ETag. Never retry a stale edit by blindly using a fresh ETag. Agent identity edits use the identity ETag; knowledge-source reingest uses the source ETag. A stale revision returns 409: draft_conflict for agent, draft, variable, tool, MCP server and publication-token checks; conflict with details.reason=stale_revision for phone numbers and knowledge sources. A missing header returns 428 revision_required. Same-intent replay uses the original If-Match and returns its receipt before checking current revision.
- `Idempotency-Key` (string, required) — Stable key per logical intent, 1–255 printable characters. Persist it before sending. Retry the same key/body after an uncertain result for 24 hours. A changed body conflicts. Beyond retention, reconcile the resource before retrying; this is not permanent deduplication. Current authorization is rechecked on replay. Evaluation order: authenticate and check current authorization; look up intent; replay its stored receipt before checking the current revision; only a new intent evaluates If-Match and executes. Fingerprint includes method, path, body and original If-Match. A changed request returns idempotency_key_reused. The server stores only a keyed (HMAC) fingerprint, and no error or response ever returns a fingerprint or hash of a request. In-flight intent returns 409 idempotency_in_progress with Retry-After; retry the same intent after reconciliation. Receipts describe that attempt, not current resource state. A replay returns the original status code and body, with the response header Idempotent-Replayed: true.

## Response

### 200

Start an admitted campaign.

- `id` (string, required)
- `revision` (string, required)
- `agent_id` (string, required)
- `name` (string, required)
- `state` (string, required)
- `recipient_count` (integer, required)
- `max_attempts_per_recipient` (integer, required)
- `retry_backoff_ms` (integer, required)
- `max_concurrent_calls` (integer, required)
- `dialing_time_zone` (string, required)
- `created_at` (datetime, required)
- `updated_at` (datetime, required)
- `progress` (CampaignProgress, required)
- `ringing_timeout_seconds` (integer, optional, nullable)
- `from_phone_number_id` (string, optional, nullable)
- `window_start_at` (datetime, optional, nullable)
- `window_end_at` (datetime, optional, nullable)
- `daily_opens_minute` (integer, optional, nullable)
- `daily_closes_minute` (integer, optional, nullable)
- `quota_checked_at` (datetime, optional, nullable)
- `failure_reason` (string, optional, nullable)
- `started_at` (datetime, optional, nullable)
- `ended_at` (datetime, optional, nullable)

## Errors

### 400 Bad Request Error

Invalid input or cursor. Correct the request.

- `error` (ErrorResponseError, required) — Only code and message are required. Rasen sends details, request_id and retry on every error, but clients must parse an error that lacks them, so a typed error is never lost to a parsing failure.

### 401 Unauthorized Error

Invalid, expired or revoked API key. Creator departure or membership changes do not invalidate a workspace key.

- `error` (ErrorResponseError, required) — Only code and message are required. Rasen sends details, request_id and retry on every error, but clients must parse an error that lacks them, so a typed error is never lost to a parsing failure.

### 403 Forbidden Error

Operation not allowed by current credential or workspace access.

- `error` (ErrorResponseError, required) — Only code and message are required. Rasen sends details, request_id and retry on every error, but clients must parse an error that lacks them, so a typed error is never lost to a parsing failure.

### 404 Not Found Error

Resource absent or not visible in this workspace.

- `error` (ErrorResponseError, required) — Only code and message are required. Rasen sends details, request_id and retry on every error, but clients must parse an error that lacks them, so a typed error is never lost to a parsing failure.

### 409 Conflict Error

Conflict. Not retryable: read the current state, fix the request and send a new request. The one exception is idempotency_in_progress, which carries Retry-After: wait, then resend the identical request with the same Idempotency-Key. The operation lists its codes in x-error-codes; branch on error.code and, for conflict, error.details.reason.

- `error` (ErrorResponseError, required) — Only code and message are required. Rasen sends details, request_id and retry on every error, but clients must parse an error that lacks them, so a typed error is never lost to a parsing failure.

### 413 Content Too Large Error

Body or upload exceeds its allowed limit.

- `error` (ErrorResponseError, required) — Only code and message are required. Rasen sends details, request_id and retry on every error, but clients must parse an error that lacks them, so a typed error is never lost to a parsing failure.

### 422 Unprocessable Entity Error

The request is well formed but refused, for example a destination that is not a permitted public address.

- `error` (ErrorResponseError, required) — Only code and message are required. Rasen sends details, request_id and retry on every error, but clients must parse an error that lacks them, so a typed error is never lost to a parsing failure.

### 428 Precondition Error

Required If-Match revision is absent.

- `error` (ErrorResponseError, required) — Only code and message are required. Rasen sends details, request_id and retry on every error, but clients must parse an error that lacks them, so a typed error is never lost to a parsing failure.

### 429 Too Many Requests Error

Rate limited. Respect Retry-After and retry the same intent where permitted.

- `error` (ErrorResponseError, required) — Only code and message are required. Rasen sends details, request_id and retry on every error, but clients must parse an error that lacks them, so a typed error is never lost to a parsing failure.

### 500 Internal Server Error

Internal error. The effect may have happened. Retry the same request with the same Idempotency-Key; read the resource before creating a new intent. For an operation that takes an Idempotency-Key, a client retry with the same key is safe: the server replays the stored outcome if the first attempt took effect; if the first attempt had no effect, the retry performs the operation once. Never retry with a new key.

- `error` (ErrorResponseError, required) — Only code and message are required. Rasen sends details, request_id and retry on every error, but clients must parse an error that lacks them, so a typed error is never lost to a parsing failure.

### 503 Service Unavailable Error

Service unavailable. Respect Retry-After where present. For an operation that takes an Idempotency-Key, a client retry with the same key is safe: the server replays the stored outcome if the first attempt took effect; if the first attempt had no effect, the retry performs the operation once. Never retry with a new key.

- `error` (ErrorResponseError, required) — Only code and message are required. Rasen sends details, request_id and retry on every error, but clients must parse an error that lacks them, so a typed error is never lost to a parsing failure.

## Types

### CampaignProgress

- `recipients` (map from string to integer, required)
- `attempts` (map from string to integer, required)
- `terminal` (integer, required)
- `remaining` (integer, required)
- `percent_complete` (integer, required)
- `complete` (boolean, required)
- `held` (integer, required)
- `attempted` (integer, required)
- `pickup_rate` (integer, optional, nullable)
- `average_answered_ms` (integer, optional, nullable)
- `talk_time_ms` (integer, optional, nullable)

### ErrorResponseError

Only code and message are required. Rasen sends details, request_id and retry on every error, but clients must parse an error that lacks them, so a typed error is never lost to a parsing failure.

- `code` (string, required) — Stable code. Branch on code (and details.reason for conflict), never on message. Each code has one HTTP status; see components.x-error-catalog.
- `message` (string, required) — Safe description; no provider payload or submitted secrets.
- `details` (map from string to any, optional) — Safe code-specific details. The public fields for each code are listed in components.x-error-catalog. Details never contain a request fingerprint, a hash of a request, secret material or another tenant's data. forbidden may include required_capabilities (a list).
- `request_id` (string, optional) — Same value as the X-Request-Id header. Quote it to support.
- `retry` (string, optional) — Retry class of this code: no (fix the request or state first), yes (retry the same request and the same Idempotency-Key), retry_after (wait for Retry-After, then retry the same request). Open response vocabulary. Preserve unknown values; never assume they mean success.

## Examples

**Response**

```json
{
  "id": "string",
  "revision": "string",
  "agent_id": "string",
  "name": "string",
  "state": "string",
  "recipient_count": 1,
  "max_attempts_per_recipient": 1,
  "retry_backoff_ms": 1,
  "max_concurrent_calls": 1,
  "dialing_time_zone": "string",
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-01-15T09:30:00Z",
  "progress": {
    "recipients": {},
    "attempts": {},
    "terminal": 1,
    "remaining": 1,
    "percent_complete": 1,
    "complete": true,
    "held": 1,
    "attempted": 1,
    "pickup_rate": 1,
    "average_answered_ms": 1,
    "talk_time_ms": 1
  },
  "ringing_timeout_seconds": 1,
  "from_phone_number_id": "string",
  "window_start_at": "2024-01-15T09:30:00Z",
  "window_end_at": "2024-01-15T09:30:00Z",
  "daily_opens_minute": 1,
  "daily_closes_minute": 1,
  "quota_checked_at": "2024-01-15T09:30:00Z",
  "failure_reason": "string",
  "started_at": "2024-01-15T09:30:00Z",
  "ended_at": "2024-01-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.v2.rasen.ai/v1/campaigns/campaign_id/start"

headers = {
    "Idempotency-Key": "intent-appointment-001",
    "If-Match": "\"draft-17\"",
    "Authorization": "Bearer <api_key>"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.v2.rasen.ai/v1/campaigns/campaign_id/start';
const options = {
  method: 'POST',
  headers: {
    'Idempotency-Key': 'intent-appointment-001',
    'If-Match': '"draft-17"',
    Authorization: 'Bearer <api_key>'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.v2.rasen.ai/v1/campaigns/campaign_id/start")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = 'intent-appointment-001'
request["If-Match"] = '"draft-17"'
request["Authorization"] = 'Bearer <api_key>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.v2.rasen.ai/v1/campaigns/campaign_id/start")
  .header("Idempotency-Key", "intent-appointment-001")
  .header("If-Match", "\"draft-17\"")
  .header("Authorization", "Bearer <api_key>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.v2.rasen.ai/v1/campaigns/campaign_id/start', [
  'headers' => [
    'Authorization' => 'Bearer <api_key>',
    'Idempotency-Key' => 'intent-appointment-001',
    'If-Match' => '"draft-17"',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.v2.rasen.ai/v1/campaigns/campaign_id/start");
var request = new RestRequest(Method.POST);
request.AddHeader("Idempotency-Key", "intent-appointment-001");
request.AddHeader("If-Match", "\"draft-17\"");
request.AddHeader("Authorization", "Bearer <api_key>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Idempotency-Key": "intent-appointment-001",
  "If-Match": "\"draft-17\"",
  "Authorization": "Bearer <api_key>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.v2.rasen.ai/v1/campaigns/campaign_id/start")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```