# Campaigns

Create, update, inspect, delete, and restore campaign records.

This section covers the main campaign resource lifecycle.

Related areas:

* Manage targets and enrollments
* Control execution and lifecycle transitions
* Inspect analytics and activity timelines
* Import contacts directly into a campaign

## GET /campaigns

> List Campaigns

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaigns","description":"Create, update, inspect, delete, and restore campaign records.\n\nThis section covers the main campaign resource lifecycle.\n\nRelated areas:\n\n- Manage targets and enrollments\n- Control execution and lifecycle transitions\n- Inspect analytics and activity timelines\n- Import contacts directly into a campaign"}],"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":{"PaginatedResponse_CampaignListItemOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CampaignListItemOut"},"type":"array","title":"Data"},"meta":{"$ref":"#/components/schemas/MetaOut"},"query":{"$ref":"#/components/schemas/QueryOut"},"aggregations":{"$ref":"#/components/schemas/AggregationsOut"}},"type":"object","required":["data","meta","query"],"title":"PaginatedResponse[CampaignListItemOut]"},"CampaignListItemOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["draft","running","paused","done"],"title":"Status"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"agent_name":{"title":"Agent Name","type":"string"},"phone_number_id":{"title":"Phone Number Id","type":"string","format":"uuid"},"phone_number":{"title":"Phone Number","type":"string"},"whatsapp_channel_id":{"title":"Whatsapp Channel Id","type":"string","format":"uuid"},"goal":{"title":"Goal","type":"string"},"goal_spec":{"$ref":"#/components/schemas/CampaignGoalSpec"},"first_contact_channel":{"type":"string","enum":["call","whatsapp"],"title":"First Contact Channel"},"call_opening_message":{"title":"Call Opening Message","type":"string"},"whatsapp_first_message":{"title":"Whatsapp First Message","type":"string"},"whatsapp_after_attempts":{"type":"integer","title":"Whatsapp After Attempts"},"call_attempt_delays":{"items":{"type":"integer"},"type":"array","title":"Call Attempt Delays"},"call_working_hours":{"$ref":"#/components/schemas/CampaignCallWindow"},"contacts_total":{"type":"integer","title":"Contacts Total","default":0},"contacts_contacted":{"type":"integer","title":"Contacts Contacted","default":0},"contacts_remaining":{"type":"integer","title":"Contacts Remaining","default":0},"contacts_to_recall":{"type":"integer","title":"Contacts To Recall","default":0},"contacts_failed":{"type":"integer","title":"Contacts Failed","default":0},"contacts_succeeded":{"type":"integer","title":"Contacts Succeeded","default":0},"progress":{"type":"number","title":"Progress","default":0},"stages":{"items":{"$ref":"#/components/schemas/CampaignStageOut"},"type":"array","title":"Stages"}},"type":"object","required":["id","name","status","agent_id","first_contact_channel","whatsapp_after_attempts"],"title":"CampaignListItemOut"},"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"},"CampaignStageOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"campaign_id":{"type":"string","format":"uuid","title":"Campaign Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"position":{"type":"integer","title":"Position"},"semantic_type":{"type":"string","enum":["new","active","won","lost"],"title":"Semantic Type"},"color":{"title":"Color","type":"string"},"is_system":{"type":"boolean","title":"Is System","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","campaign_id","key","name","position","semantic_type","created_at","updated_at"],"title":"CampaignStageOut"},"MetaOut":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"sort":{"$ref":"#/components/schemas/SortOut"}},"type":"object","required":["total","limit","offset"],"title":"MetaOut"},"SortOut":{"properties":{"field":{"type":"string","title":"Field"},"direction":{"type":"string","enum":["asc","desc"],"title":"Direction"}},"type":"object","required":["field","direction"],"title":"SortOut"},"QueryOut":{"properties":{"q":{"title":"Q","type":"string"},"filters":{"additionalProperties":true,"type":"object","title":"Filters"},"date_from":{"title":"Date From","type":"string","format":"date-time"},"date_to":{"title":"Date To","type":"string","format":"date-time"},"sort":{"$ref":"#/components/schemas/SortOut"}},"type":"object","title":"QueryOut"},"AggregationsOut":{"properties":{"quick_filters":{"title":"Quick Filters","additionalProperties":{"type":"integer"},"type":"object"},"extra":{"title":"Extra","additionalProperties":true,"type":"object"}},"type":"object","title":"AggregationsOut"},"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":{"get":{"tags":["campaigns"],"summary":"List Campaigns","operationId":"list_campaigns_campaigns_get","parameters":[{"name":"include_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Deleted"}},{"name":"only_deleted","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Only Deleted"}},{"name":"include_stages","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Stages"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":10,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"q","in":"query","required":false,"schema":{"title":"Q","type":"string"}},{"name":"sort_field","in":"query","required":false,"schema":{"title":"Sort Field","type":"string"}},{"name":"sort_dir","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Sort Dir"}},{"name":"include_aggregations","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Aggregations"}},{"name":"date_from","in":"query","required":false,"schema":{"title":"Date From","type":"string"}},{"name":"date_to","in":"query","required":false,"schema":{"title":"Date To","type":"string"}},{"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/PaginatedResponse_CampaignListItemOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /campaigns

> Create Campaign

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaigns","description":"Create, update, inspect, delete, and restore campaign records.\n\nThis section covers the main campaign resource lifecycle.\n\nRelated areas:\n\n- Manage targets and enrollments\n- Control execution and lifecycle transitions\n- Inspect analytics and activity timelines\n- Import contacts directly into a campaign"}],"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":{"CampaignCreate":{"properties":{"name":{"type":"string","title":"Name"},"agent_id":{"type":"string","format":"uuid","title":"Agent Id"},"phone_number_id":{"type":"string","format":"uuid","title":"Phone Number Id"},"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"},"status":{"title":"Status","type":"string","enum":["draft","running","paused","done"]}},"type":"object","required":["name","agent_id","phone_number_id"],"title":"CampaignCreate"},"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"},"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"},"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":{"post":{"tags":["campaigns"],"summary":"Create Campaign","operationId":"create_campaign_campaigns_post","parameters":[{"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/CampaignCreate"}}}},"responses":{"201":{"description":"Resource created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## GET /campaigns/{campaign\_id}

> Get Campaign Detail

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaigns","description":"Create, update, inspect, delete, and restore campaign records.\n\nThis section covers the main campaign resource lifecycle.\n\nRelated areas:\n\n- Manage targets and enrollments\n- Control execution and lifecycle transitions\n- Inspect analytics and activity timelines\n- Import contacts directly into a campaign"}],"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":{"CampaignDetailOut":{"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"},"targets_total":{"type":"integer","title":"Targets Total","default":0},"targets_contacted":{"type":"integer","title":"Targets Contacted","default":0},"targets_succeeded":{"type":"integer","title":"Targets Succeeded","default":0},"progress":{"type":"number","title":"Progress","default":0},"metrics":{"$ref":"#/components/schemas/CampaignMetricsOut"},"readiness":{"$ref":"#/components/schemas/CampaignReadinessOut"},"stages":{"items":{"$ref":"#/components/schemas/CampaignStageOut"},"type":"array","title":"Stages"}},"type":"object","required":["name","agent_id","id","status","created_at","updated_at"],"title":"CampaignDetailOut"},"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"},"CampaignMetricsOut":{"properties":{"contacts_total":{"type":"integer","title":"Contacts Total","default":0},"contacts_contacted":{"type":"integer","title":"Contacts Contacted","default":0},"contacts_not_contacted":{"type":"integer","title":"Contacts Not Contacted","default":0},"contacts_remaining":{"type":"integer","title":"Contacts Remaining","default":0},"contacts_to_recall":{"type":"integer","title":"Contacts To Recall","default":0},"contacts_failed":{"type":"integer","title":"Contacts Failed","default":0},"contacts_succeeded":{"type":"integer","title":"Contacts Succeeded","default":0},"appointments_booked":{"type":"integer","title":"Appointments Booked","default":0},"appointments_upcoming":{"type":"integer","title":"Appointments Upcoming","default":0},"calls_total":{"type":"integer","title":"Calls Total","default":0},"calls_pending":{"type":"integer","title":"Calls Pending","default":0},"calls_in_progress":{"type":"integer","title":"Calls In Progress","default":0},"calls_answered":{"type":"integer","title":"Calls Answered","default":0},"calls_busy":{"type":"integer","title":"Calls Busy","default":0},"calls_no_answer":{"type":"integer","title":"Calls No Answer","default":0},"calls_voicemail":{"type":"integer","title":"Calls Voicemail","default":0},"calls_failed":{"type":"integer","title":"Calls Failed","default":0},"next_call_at":{"title":"Next Call At","type":"string","format":"date-time"},"active_work_items":{"type":"integer","title":"Active Work Items","default":0},"outbox_pending_total":{"type":"integer","title":"Outbox Pending Total","default":0},"whatsapp_pending":{"type":"integer","title":"Whatsapp Pending","default":0},"email_pending":{"type":"integer","title":"Email Pending","default":0},"action_required_total":{"type":"integer","title":"Action Required Total","default":0},"follow_up_required_total":{"type":"integer","title":"Follow Up Required Total","default":0},"callback_requested_total":{"type":"integer","title":"Callback Requested Total","default":0},"escalation_required_total":{"type":"integer","title":"Escalation Required Total","default":0},"campaign_goal_missed_total":{"type":"integer","title":"Campaign Goal Missed Total","default":0},"negative_sentiment_total":{"type":"integer","title":"Negative Sentiment Total","default":0},"whatsapp_sent_total":{"type":"integer","title":"Whatsapp Sent Total","default":0},"email_sent_total":{"type":"integer","title":"Email Sent Total","default":0},"contact_rate":{"type":"number","title":"Contact Rate","default":0},"success_rate":{"type":"number","title":"Success Rate","default":0},"appointment_rate":{"type":"number","title":"Appointment Rate","default":0}},"type":"object","title":"CampaignMetricsOut"},"CampaignReadinessOut":{"properties":{"can_start":{"type":"boolean","title":"Can Start","default":false},"ready_count":{"type":"integer","title":"Ready Count","default":0},"total_count":{"type":"integer","title":"Total Count","default":0},"checks":{"items":{"$ref":"#/components/schemas/CampaignReadinessCheckOut"},"type":"array","title":"Checks"}},"type":"object","title":"CampaignReadinessOut"},"CampaignReadinessCheckOut":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"status":{"type":"string","enum":["ready","missing","warning"],"title":"Status","default":"ready"},"detail":{"type":"string","title":"Detail"},"action":{"title":"Action","type":"string"}},"type":"object","required":["key","label","detail"],"title":"CampaignReadinessCheckOut"},"CampaignStageOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"campaign_id":{"type":"string","format":"uuid","title":"Campaign Id"},"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"position":{"type":"integer","title":"Position"},"semantic_type":{"type":"string","enum":["new","active","won","lost"],"title":"Semantic Type"},"color":{"title":"Color","type":"string"},"is_system":{"type":"boolean","title":"Is System","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","campaign_id","key","name","position","semantic_type","created_at","updated_at"],"title":"CampaignStageOut"},"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}":{"get":{"tags":["campaigns"],"summary":"Get Campaign Detail","operationId":"get_campaign_detail_campaigns__campaign_id__get","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/CampaignDetailOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## DELETE /campaigns/{campaign\_id}

> Delete Campaign

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaigns","description":"Create, update, inspect, delete, and restore campaign records.\n\nThis section covers the main campaign resource lifecycle.\n\nRelated areas:\n\n- Manage targets and enrollments\n- Control execution and lifecycle transitions\n- Inspect analytics and activity timelines\n- Import contacts directly into a campaign"}],"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":{"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}":{"delete":{"tags":["campaigns"],"summary":"Delete Campaign","operationId":"delete_campaign_campaigns__campaign_id__delete","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"title":"Campaign Id","type":"string","format":"uuid"}},{"name":"purge","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Purge"}},{"name":"delete_attempts","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Delete Attempts"}},{"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":{"204":{"description":"Request completed successfully with no response body."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Update Campaign

> Edit a campaign fields.\
> \
> \- Validates \`agent\_id\` ownership when changed\
> \- If \`goal\_spec\` or \`goal\_logic\` change, re-evaluates all targets' stage

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaigns","description":"Create, update, inspect, delete, and restore campaign records.\n\nThis section covers the main campaign resource lifecycle.\n\nRelated areas:\n\n- Manage targets and enrollments\n- Control execution and lifecycle transitions\n- Inspect analytics and activity timelines\n- Import contacts directly into a campaign"}],"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":{"CampaignUpdate":{"properties":{"name":{"title":"Name","type":"string"},"agent_id":{"title":"Agent Id","type":"string","format":"uuid"},"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":{"title":"Goal Logic","type":"string","enum":["all","any"]},"status":{"title":"Status","type":"string","enum":["draft","running","paused","done"]},"first_contact_channel":{"title":"First Contact Channel","type":"string","enum":["call","whatsapp"]},"call_opening_message":{"title":"Call Opening Message","type":"string"},"whatsapp_first_message":{"title":"Whatsapp First Message","type":"string"},"whatsapp_after_attempts":{"title":"Whatsapp After Attempts","type":"integer","minimum":1},"call_attempt_delays":{"title":"Call Attempt Delays","items":{"type":"integer"},"type":"array"},"call_working_hours":{"$ref":"#/components/schemas/CampaignCallWindow"}},"type":"object","title":"CampaignUpdate"},"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"},"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"},"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}":{"patch":{"tags":["campaigns"],"summary":"Update Campaign","description":"Edit a campaign fields.\n\n- Validates `agent_id` ownership when changed\n- If `goal_spec` or `goal_logic` change, re-evaluates all targets' stage","operationId":"update_campaign_campaigns__campaign_id__patch","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/CampaignUpdate"}}}},"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"}}}}}}}}}
```

## PATCH /campaigns/{campaign\_id}/goal

> Update Campaign Goal

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaigns","description":"Create, update, inspect, delete, and restore campaign records.\n\nThis section covers the main campaign resource lifecycle.\n\nRelated areas:\n\n- Manage targets and enrollments\n- Control execution and lifecycle transitions\n- Inspect analytics and activity timelines\n- Import contacts directly into a campaign"}],"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":{"CampaignGoalUpdate":{"properties":{"goal_spec":{"$ref":"#/components/schemas/CampaignGoalSpec"},"goal_logic":{"title":"Goal Logic","type":"string","enum":["all","any"]}},"type":"object","title":"CampaignGoalUpdate"},"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"},"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"},"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}/goal":{"patch":{"tags":["campaigns"],"summary":"Update Campaign Goal","operationId":"update_campaign_goal_campaigns__campaign_id__goal_patch","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/CampaignGoalUpdate"}}}},"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"}}}}}}}}}
```

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

> Restore Campaign

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaigns","description":"Create, update, inspect, delete, and restore campaign records.\n\nThis section covers the main campaign resource lifecycle.\n\nRelated areas:\n\n- Manage targets and enrollments\n- Control execution and lifecycle transitions\n- Inspect analytics and activity timelines\n- Import contacts directly into a campaign"}],"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}/restore":{"post":{"tags":["campaigns"],"summary":"Restore Campaign","operationId":"restore_campaign_campaigns__campaign_id__restore_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"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.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.
