# Execution

Control lifecycle transitions for campaign execution, such as starting a campaign once its configuration is ready.

## POST /campaigns/{campaign\_id}/complete

> Complete Campaign

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaign-execution","description":"Control lifecycle transitions for campaign execution, such as starting a campaign once its configuration is ready."}],"servers":[{"url":"https://api.aurorasuite.ai","description":"Production"}],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Use a JWT bearer token in the Authorization header."},"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Use an API key for server-to-server integrations."}},"schemas":{"CampaignOut":{"properties":{"name":{"type":"string","title":"Name"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"phone_number_id":{"title":"Phone Number Id","type":"string","format":"uuid"},"email_channel_id":{"title":"Email Channel Id","type":"string","format":"uuid"},"whatsapp_channel_id":{"title":"Whatsapp Channel Id","type":"string","format":"uuid"},"goal":{"title":"Goal","type":"string"},"goal_spec":{"$ref":"#/components/schemas/CampaignGoalSpec"},"goal_logic":{"type":"string","enum":["all","any"],"title":"Goal Logic","default":"all"},"first_contact_channel":{"type":"string","enum":["call","whatsapp"],"title":"First Contact Channel","default":"call"},"call_opening_message":{"title":"Call Opening Message","type":"string"},"whatsapp_first_message":{"title":"Whatsapp First Message","type":"string"},"whatsapp_after_attempts":{"type":"integer","minimum":1,"title":"Whatsapp After Attempts","default":3},"call_attempt_delays":{"items":{"type":"integer"},"type":"array","title":"Call Attempt Delays"},"call_working_hours":{"$ref":"#/components/schemas/CampaignCallWindow"},"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["draft","running","paused","done"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","agent_id","id","status","created_at","updated_at"],"title":"CampaignOut"},"CampaignGoalSpec":{"properties":{"objectives":{"items":{"anyOf":[{"$ref":"#/components/schemas/ContactObjective"},{"$ref":"#/components/schemas/EmailObjective"},{"$ref":"#/components/schemas/AiObjective"}]},"type":"array","title":"Objectives"}},"type":"object","title":"CampaignGoalSpec"},"ContactObjective":{"properties":{"type":{"type":"string","const":"contact","title":"Type","default":"contact"},"channels":{"items":{"type":"string","enum":["call","whatsapp"]},"type":"array","title":"Channels"},"min_count":{"type":"integer","title":"Min Count","default":1}},"type":"object","title":"ContactObjective"},"EmailObjective":{"properties":{"type":{"type":"string","const":"email","title":"Type","default":"email"},"min_count":{"type":"integer","title":"Min Count","default":1}},"type":"object","title":"EmailObjective"},"AiObjective":{"properties":{"type":{"type":"string","const":"ai","title":"Type","default":"ai"},"label_in":{"items":{"type":"string","enum":["positive","negative","neutral"]},"type":"array","title":"Label In"},"min_score":{"type":"number","title":"Min Score","default":0}},"type":"object","title":"AiObjective"},"CampaignCallWindow":{"properties":{"start":{"type":"string","format":"time","title":"Start","default":"09:00:00"},"end":{"type":"string","format":"time","title":"End","default":"19:00:00"},"weekdays":{"items":{"type":"integer"},"type":"array","title":"Weekdays"}},"type":"object","title":"CampaignCallWindow"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/campaigns/{campaign_id}/complete":{"post":{"tags":["campaign-execution"],"summary":"Complete Campaign","operationId":"complete_campaign_campaigns__campaign_id__complete_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"title":"Campaign Id","type":"string","format":"uuid"}},{"name":"obj_id","in":"query","required":false,"schema":{"title":"Obj Id","type":"string","format":"uuid"}},{"name":"agent_id","in":"query","required":false,"schema":{"title":"Agent Id","type":"string","format":"uuid"}},{"name":"customer_id","in":"query","required":false,"schema":{"title":"Customer Id","type":"string","format":"uuid"}},{"name":"knowledge_base_id","in":"query","required":false,"schema":{"title":"Knowledge Base Id","type":"string","format":"uuid"}},{"name":"id","in":"query","required":false,"schema":{"title":"Id","type":"string","format":"uuid"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"title":"X-Api-Key","type":"string"}}],"responses":{"200":{"description":"Request completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Resume Campaign

> Resume a completed or paused campaign for a practical target segment.

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaign-execution","description":"Control lifecycle transitions for campaign execution, such as starting a campaign once its configuration is ready."}],"servers":[{"url":"https://api.aurorasuite.ai","description":"Production"}],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Use a JWT bearer token in the Authorization header."},"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Use an API key for server-to-server integrations."}},"schemas":{"CampaignResumeRequest":{"properties":{"segment":{"type":"string","enum":["not_answered","not_contacted","failed","unresolved"],"title":"Segment","default":"not_answered"}},"type":"object","title":"CampaignResumeRequest"},"CampaignResumeResult":{"properties":{"campaign":{"$ref":"#/components/schemas/CampaignOut"},"segment":{"type":"string","enum":["not_answered","not_contacted","failed","unresolved"],"title":"Segment"},"selected_targets":{"type":"integer","title":"Selected Targets","default":0},"scheduled_calls":{"type":"integer","title":"Scheduled Calls","default":0},"queued_whatsapp":{"type":"integer","title":"Queued Whatsapp","default":0},"skipped_existing_pending":{"type":"integer","title":"Skipped Existing Pending","default":0},"skipped_missing_contact":{"type":"integer","title":"Skipped Missing Contact","default":0}},"type":"object","required":["campaign","segment"],"title":"CampaignResumeResult"},"CampaignOut":{"properties":{"name":{"type":"string","title":"Name"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"phone_number_id":{"title":"Phone Number Id","type":"string","format":"uuid"},"email_channel_id":{"title":"Email Channel Id","type":"string","format":"uuid"},"whatsapp_channel_id":{"title":"Whatsapp Channel Id","type":"string","format":"uuid"},"goal":{"title":"Goal","type":"string"},"goal_spec":{"$ref":"#/components/schemas/CampaignGoalSpec"},"goal_logic":{"type":"string","enum":["all","any"],"title":"Goal Logic","default":"all"},"first_contact_channel":{"type":"string","enum":["call","whatsapp"],"title":"First Contact Channel","default":"call"},"call_opening_message":{"title":"Call Opening Message","type":"string"},"whatsapp_first_message":{"title":"Whatsapp First Message","type":"string"},"whatsapp_after_attempts":{"type":"integer","minimum":1,"title":"Whatsapp After Attempts","default":3},"call_attempt_delays":{"items":{"type":"integer"},"type":"array","title":"Call Attempt Delays"},"call_working_hours":{"$ref":"#/components/schemas/CampaignCallWindow"},"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["draft","running","paused","done"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","agent_id","id","status","created_at","updated_at"],"title":"CampaignOut"},"CampaignGoalSpec":{"properties":{"objectives":{"items":{"anyOf":[{"$ref":"#/components/schemas/ContactObjective"},{"$ref":"#/components/schemas/EmailObjective"},{"$ref":"#/components/schemas/AiObjective"}]},"type":"array","title":"Objectives"}},"type":"object","title":"CampaignGoalSpec"},"ContactObjective":{"properties":{"type":{"type":"string","const":"contact","title":"Type","default":"contact"},"channels":{"items":{"type":"string","enum":["call","whatsapp"]},"type":"array","title":"Channels"},"min_count":{"type":"integer","title":"Min Count","default":1}},"type":"object","title":"ContactObjective"},"EmailObjective":{"properties":{"type":{"type":"string","const":"email","title":"Type","default":"email"},"min_count":{"type":"integer","title":"Min Count","default":1}},"type":"object","title":"EmailObjective"},"AiObjective":{"properties":{"type":{"type":"string","const":"ai","title":"Type","default":"ai"},"label_in":{"items":{"type":"string","enum":["positive","negative","neutral"]},"type":"array","title":"Label In"},"min_score":{"type":"number","title":"Min Score","default":0}},"type":"object","title":"AiObjective"},"CampaignCallWindow":{"properties":{"start":{"type":"string","format":"time","title":"Start","default":"09:00:00"},"end":{"type":"string","format":"time","title":"End","default":"19:00:00"},"weekdays":{"items":{"type":"integer"},"type":"array","title":"Weekdays"}},"type":"object","title":"CampaignCallWindow"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/campaigns/{campaign_id}/resume":{"post":{"tags":["campaign-execution"],"summary":"Resume Campaign","description":"Resume a completed or paused campaign for a practical target segment.","operationId":"resume_campaign_campaigns__campaign_id__resume_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"title":"Campaign Id","type":"string","format":"uuid"}},{"name":"obj_id","in":"query","required":false,"schema":{"title":"Obj Id","type":"string","format":"uuid"}},{"name":"agent_id","in":"query","required":false,"schema":{"title":"Agent Id","type":"string","format":"uuid"}},{"name":"customer_id","in":"query","required":false,"schema":{"title":"Customer Id","type":"string","format":"uuid"}},{"name":"knowledge_base_id","in":"query","required":false,"schema":{"title":"Knowledge Base Id","type":"string","format":"uuid"}},{"name":"id","in":"query","required":false,"schema":{"title":"Id","type":"string","format":"uuid"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"title":"X-Api-Key","type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResumeRequest"}}}},"responses":{"200":{"description":"Request completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResumeResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Start Campaign

> Set campaign status to 'running' if allowed.\
> \
> Rules:\
> \- from draft/paused -> running\
> \- if already running -> idempotent\
> \- if done -> 400 (cannot restart)

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaign-execution","description":"Control lifecycle transitions for campaign execution, such as starting a campaign once its configuration is ready."}],"servers":[{"url":"https://api.aurorasuite.ai","description":"Production"}],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Use a JWT bearer token in the Authorization header."},"apiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Use an API key for server-to-server integrations."}},"schemas":{"CampaignOut":{"properties":{"name":{"type":"string","title":"Name"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"phone_number_id":{"title":"Phone Number Id","type":"string","format":"uuid"},"email_channel_id":{"title":"Email Channel Id","type":"string","format":"uuid"},"whatsapp_channel_id":{"title":"Whatsapp Channel Id","type":"string","format":"uuid"},"goal":{"title":"Goal","type":"string"},"goal_spec":{"$ref":"#/components/schemas/CampaignGoalSpec"},"goal_logic":{"type":"string","enum":["all","any"],"title":"Goal Logic","default":"all"},"first_contact_channel":{"type":"string","enum":["call","whatsapp"],"title":"First Contact Channel","default":"call"},"call_opening_message":{"title":"Call Opening Message","type":"string"},"whatsapp_first_message":{"title":"Whatsapp First Message","type":"string"},"whatsapp_after_attempts":{"type":"integer","minimum":1,"title":"Whatsapp After Attempts","default":3},"call_attempt_delays":{"items":{"type":"integer"},"type":"array","title":"Call Attempt Delays"},"call_working_hours":{"$ref":"#/components/schemas/CampaignCallWindow"},"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["draft","running","paused","done"],"title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","agent_id","id","status","created_at","updated_at"],"title":"CampaignOut"},"CampaignGoalSpec":{"properties":{"objectives":{"items":{"anyOf":[{"$ref":"#/components/schemas/ContactObjective"},{"$ref":"#/components/schemas/EmailObjective"},{"$ref":"#/components/schemas/AiObjective"}]},"type":"array","title":"Objectives"}},"type":"object","title":"CampaignGoalSpec"},"ContactObjective":{"properties":{"type":{"type":"string","const":"contact","title":"Type","default":"contact"},"channels":{"items":{"type":"string","enum":["call","whatsapp"]},"type":"array","title":"Channels"},"min_count":{"type":"integer","title":"Min Count","default":1}},"type":"object","title":"ContactObjective"},"EmailObjective":{"properties":{"type":{"type":"string","const":"email","title":"Type","default":"email"},"min_count":{"type":"integer","title":"Min Count","default":1}},"type":"object","title":"EmailObjective"},"AiObjective":{"properties":{"type":{"type":"string","const":"ai","title":"Type","default":"ai"},"label_in":{"items":{"type":"string","enum":["positive","negative","neutral"]},"type":"array","title":"Label In"},"min_score":{"type":"number","title":"Min Score","default":0}},"type":"object","title":"AiObjective"},"CampaignCallWindow":{"properties":{"start":{"type":"string","format":"time","title":"Start","default":"09:00:00"},"end":{"type":"string","format":"time","title":"End","default":"19:00:00"},"weekdays":{"items":{"type":"integer"},"type":"array","title":"Weekdays"}},"type":"object","title":"CampaignCallWindow"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/campaigns/{campaign_id}/start":{"post":{"tags":["campaign-execution"],"summary":"Start Campaign","description":"Set campaign status to 'running' if allowed.\n\nRules:\n- from draft/paused -> running\n- if already running -> idempotent\n- if done -> 400 (cannot restart)","operationId":"start_campaign_campaigns__campaign_id__start_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"title":"Campaign Id","type":"string","format":"uuid"}},{"name":"obj_id","in":"query","required":false,"schema":{"title":"Obj Id","type":"string","format":"uuid"}},{"name":"agent_id","in":"query","required":false,"schema":{"title":"Agent Id","type":"string","format":"uuid"}},{"name":"customer_id","in":"query","required":false,"schema":{"title":"Customer Id","type":"string","format":"uuid"}},{"name":"knowledge_base_id","in":"query","required":false,"schema":{"title":"Knowledge Base Id","type":"string","format":"uuid"}},{"name":"id","in":"query","required":false,"schema":{"title":"Id","type":"string","format":"uuid"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"title":"X-Api-Key","type":"string"}}],"responses":{"200":{"description":"Request completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aurorasuite.ai/api-reference/campaigns/execution.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
