# Targets

Manage target enrollment and per-target operations inside a campaign.

Use these endpoints to bulk-enroll existing customers, create-and-enroll a single customer, restore targets, or inspect target-specific state.

## GET /campaigns/{campaign\_id}/targets

> List Campaign Targets

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaign-targets","description":"Manage target enrollment and per-target operations inside a campaign.\n\nUse these endpoints to bulk-enroll existing customers, create-and-enroll a single customer, restore targets, or inspect target-specific state."}],"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_CampaignTargetWithCustomerOut_":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CampaignTargetWithCustomerOut"},"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[CampaignTargetWithCustomerOut]"},"CampaignTargetWithCustomerOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"campaign_id":{"type":"string","format":"uuid","title":"Campaign Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"assigned_agent_id":{"title":"Assigned Agent Id","type":"string","format":"uuid"},"stage":{"type":"string","title":"Stage"},"calls_made":{"type":"integer","title":"Calls Made"},"whatsapp_sent":{"type":"integer","title":"Whatsapp Sent"},"email_sent":{"type":"integer","title":"Email Sent"},"ai_label":{"type":"string","enum":["positive","negative","neutral","unknown"],"title":"Ai Label"},"ai_score":{"title":"Ai Score","type":"number"},"ai_reason":{"title":"Ai Reason","type":"string"},"goal_analysis":{"title":"Goal Analysis","additionalProperties":true,"type":"object"},"analysis_source":{"title":"Analysis Source","type":"string"},"call_successful":{"title":"Call Successful","type":"string"},"call_summary_title":{"title":"Call Summary Title","type":"string"},"transcript_summary":{"title":"Transcript Summary","type":"string"},"agent_goal_result":{"title":"Agent Goal Result","type":"string"},"agent_goal_rationale":{"title":"Agent Goal Rationale","type":"string"},"customer_sentiment":{"title":"Customer Sentiment","type":"string"},"customer_sentiment_rationale":{"title":"Customer Sentiment Rationale","type":"string"},"follow_up_required":{"title":"Follow Up Required","type":"boolean"},"follow_up_required_rationale":{"title":"Follow Up Required Rationale","type":"string"},"escalation_required":{"title":"Escalation Required","type":"boolean"},"escalation_required_rationale":{"title":"Escalation Required Rationale","type":"string"},"campaign_goal_result":{"title":"Campaign Goal Result","type":"string"},"campaign_goal_score":{"title":"Campaign Goal Score","type":"number"},"campaign_goal_rationale":{"title":"Campaign Goal Rationale","type":"string"},"campaign_sentiment":{"title":"Campaign Sentiment","type":"string"},"campaign_sentiment_rationale":{"title":"Campaign Sentiment Rationale","type":"string"},"callback_requested":{"title":"Callback Requested","type":"boolean"},"callback_requested_rationale":{"title":"Callback Requested Rationale","type":"string"},"campaign_next_best_action":{"title":"Campaign Next Best Action","type":"string"},"campaign_analysis_updated_at":{"title":"Campaign Analysis Updated At","type":"string"},"analysis_updated_at":{"title":"Analysis Updated At","type":"string"},"last_contacted_at":{"title":"Last Contacted At","type":"string","format":"date-time"},"last_email_at":{"title":"Last Email At","type":"string","format":"date-time"},"last_conv_id":{"title":"Last Conv Id","type":"string"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"customer":{"$ref":"#/components/schemas/CustomerOut"}},"type":"object","required":["id","campaign_id","customer_id","stage","calls_made","whatsapp_sent","email_sent","ai_label","created_at","updated_at","customer"],"title":"CampaignTargetWithCustomerOut"},"CustomerOut":{"properties":{"customer_id":{"title":"Customer Id","type":"string","maxLength":255},"name":{"title":"Name","type":"string","maxLength":255},"surname":{"title":"Surname","type":"string","maxLength":255},"email":{"title":"Email","type":"string","format":"email"},"phone":{"title":"Phone","type":"string","maxLength":50},"status":{"title":"Status","type":"string","maxLength":50},"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"title":"Agent Id","type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","created_at","updated_at"],"title":"CustomerOut"},"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/{campaign_id}/targets":{"get":{"tags":["campaign-targets"],"summary":"List Campaign Targets","operationId":"list_campaign_targets_campaigns__campaign_id__targets_get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"stage","in":"query","required":false,"schema":{"title":"Stage","type":"string"}},{"name":"ai_label","in":"query","required":false,"schema":{"title":"Ai Label","type":"string"}},{"name":"action_required","in":"query","required":false,"schema":{"title":"Action Required","type":"string","pattern":"^(follow_up|callback|escalation|missed_goal|negative_sentiment)$"}},{"name":"assigned_agent_id","in":"query","required":false,"schema":{"title":"Assigned Agent Id","type":"string","format":"uuid"}},{"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":"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_CampaignTargetWithCustomerOut_"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## DELETE /campaigns/{campaign\_id}/targets/{target\_id}

> Delete Campaign Target

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaign-targets","description":"Manage target enrollment and per-target operations inside a campaign.\n\nUse these endpoints to bulk-enroll existing customers, create-and-enroll a single customer, restore targets, or inspect target-specific state."}],"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}/targets/{target_id}":{"delete":{"tags":["campaign-targets"],"summary":"Delete Campaign Target","operationId":"delete_campaign_target_campaigns__campaign_id__targets__target_id__delete","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}},{"name":"purge","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Purge"}},{"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"}}}}}}}}}
```

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

> Restore Campaign Target

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaign-targets","description":"Manage target enrollment and per-target operations inside a campaign.\n\nUse these endpoints to bulk-enroll existing customers, create-and-enroll a single customer, restore targets, or inspect target-specific state."}],"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":{"CampaignTargetWithCustomerOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"campaign_id":{"type":"string","format":"uuid","title":"Campaign Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"assigned_agent_id":{"title":"Assigned Agent Id","type":"string","format":"uuid"},"stage":{"type":"string","title":"Stage"},"calls_made":{"type":"integer","title":"Calls Made"},"whatsapp_sent":{"type":"integer","title":"Whatsapp Sent"},"email_sent":{"type":"integer","title":"Email Sent"},"ai_label":{"type":"string","enum":["positive","negative","neutral","unknown"],"title":"Ai Label"},"ai_score":{"title":"Ai Score","type":"number"},"ai_reason":{"title":"Ai Reason","type":"string"},"goal_analysis":{"title":"Goal Analysis","additionalProperties":true,"type":"object"},"analysis_source":{"title":"Analysis Source","type":"string"},"call_successful":{"title":"Call Successful","type":"string"},"call_summary_title":{"title":"Call Summary Title","type":"string"},"transcript_summary":{"title":"Transcript Summary","type":"string"},"agent_goal_result":{"title":"Agent Goal Result","type":"string"},"agent_goal_rationale":{"title":"Agent Goal Rationale","type":"string"},"customer_sentiment":{"title":"Customer Sentiment","type":"string"},"customer_sentiment_rationale":{"title":"Customer Sentiment Rationale","type":"string"},"follow_up_required":{"title":"Follow Up Required","type":"boolean"},"follow_up_required_rationale":{"title":"Follow Up Required Rationale","type":"string"},"escalation_required":{"title":"Escalation Required","type":"boolean"},"escalation_required_rationale":{"title":"Escalation Required Rationale","type":"string"},"campaign_goal_result":{"title":"Campaign Goal Result","type":"string"},"campaign_goal_score":{"title":"Campaign Goal Score","type":"number"},"campaign_goal_rationale":{"title":"Campaign Goal Rationale","type":"string"},"campaign_sentiment":{"title":"Campaign Sentiment","type":"string"},"campaign_sentiment_rationale":{"title":"Campaign Sentiment Rationale","type":"string"},"callback_requested":{"title":"Callback Requested","type":"boolean"},"callback_requested_rationale":{"title":"Callback Requested Rationale","type":"string"},"campaign_next_best_action":{"title":"Campaign Next Best Action","type":"string"},"campaign_analysis_updated_at":{"title":"Campaign Analysis Updated At","type":"string"},"analysis_updated_at":{"title":"Analysis Updated At","type":"string"},"last_contacted_at":{"title":"Last Contacted At","type":"string","format":"date-time"},"last_email_at":{"title":"Last Email At","type":"string","format":"date-time"},"last_conv_id":{"title":"Last Conv Id","type":"string"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"customer":{"$ref":"#/components/schemas/CustomerOut"}},"type":"object","required":["id","campaign_id","customer_id","stage","calls_made","whatsapp_sent","email_sent","ai_label","created_at","updated_at","customer"],"title":"CampaignTargetWithCustomerOut"},"CustomerOut":{"properties":{"customer_id":{"title":"Customer Id","type":"string","maxLength":255},"name":{"title":"Name","type":"string","maxLength":255},"surname":{"title":"Surname","type":"string","maxLength":255},"email":{"title":"Email","type":"string","format":"email"},"phone":{"title":"Phone","type":"string","maxLength":50},"status":{"title":"Status","type":"string","maxLength":50},"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"title":"Agent Id","type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","created_at","updated_at"],"title":"CustomerOut"},"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}/targets/{target_id}/restore":{"post":{"tags":["campaign-targets"],"summary":"Restore Campaign Target","operationId":"restore_campaign_target_campaigns__campaign_id__targets__target_id__restore_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Campaign Id"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target 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/CampaignTargetWithCustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## PATCH /campaigns/{campaign\_id}/targets/{target\_id}/stage

> Update Campaign Target Stage

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaign-targets","description":"Manage target enrollment and per-target operations inside a campaign.\n\nUse these endpoints to bulk-enroll existing customers, create-and-enroll a single customer, restore targets, or inspect target-specific state."}],"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":{"CampaignTargetStageUpdate":{"properties":{"stage":{"type":"string","maxLength":64,"minLength":1,"title":"Stage"}},"type":"object","required":["stage"],"title":"CampaignTargetStageUpdate"},"CampaignTargetWithCustomerOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"campaign_id":{"type":"string","format":"uuid","title":"Campaign Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"assigned_agent_id":{"title":"Assigned Agent Id","type":"string","format":"uuid"},"stage":{"type":"string","title":"Stage"},"calls_made":{"type":"integer","title":"Calls Made"},"whatsapp_sent":{"type":"integer","title":"Whatsapp Sent"},"email_sent":{"type":"integer","title":"Email Sent"},"ai_label":{"type":"string","enum":["positive","negative","neutral","unknown"],"title":"Ai Label"},"ai_score":{"title":"Ai Score","type":"number"},"ai_reason":{"title":"Ai Reason","type":"string"},"goal_analysis":{"title":"Goal Analysis","additionalProperties":true,"type":"object"},"analysis_source":{"title":"Analysis Source","type":"string"},"call_successful":{"title":"Call Successful","type":"string"},"call_summary_title":{"title":"Call Summary Title","type":"string"},"transcript_summary":{"title":"Transcript Summary","type":"string"},"agent_goal_result":{"title":"Agent Goal Result","type":"string"},"agent_goal_rationale":{"title":"Agent Goal Rationale","type":"string"},"customer_sentiment":{"title":"Customer Sentiment","type":"string"},"customer_sentiment_rationale":{"title":"Customer Sentiment Rationale","type":"string"},"follow_up_required":{"title":"Follow Up Required","type":"boolean"},"follow_up_required_rationale":{"title":"Follow Up Required Rationale","type":"string"},"escalation_required":{"title":"Escalation Required","type":"boolean"},"escalation_required_rationale":{"title":"Escalation Required Rationale","type":"string"},"campaign_goal_result":{"title":"Campaign Goal Result","type":"string"},"campaign_goal_score":{"title":"Campaign Goal Score","type":"number"},"campaign_goal_rationale":{"title":"Campaign Goal Rationale","type":"string"},"campaign_sentiment":{"title":"Campaign Sentiment","type":"string"},"campaign_sentiment_rationale":{"title":"Campaign Sentiment Rationale","type":"string"},"callback_requested":{"title":"Callback Requested","type":"boolean"},"callback_requested_rationale":{"title":"Callback Requested Rationale","type":"string"},"campaign_next_best_action":{"title":"Campaign Next Best Action","type":"string"},"campaign_analysis_updated_at":{"title":"Campaign Analysis Updated At","type":"string"},"analysis_updated_at":{"title":"Analysis Updated At","type":"string"},"last_contacted_at":{"title":"Last Contacted At","type":"string","format":"date-time"},"last_email_at":{"title":"Last Email At","type":"string","format":"date-time"},"last_conv_id":{"title":"Last Conv Id","type":"string"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"customer":{"$ref":"#/components/schemas/CustomerOut"}},"type":"object","required":["id","campaign_id","customer_id","stage","calls_made","whatsapp_sent","email_sent","ai_label","created_at","updated_at","customer"],"title":"CampaignTargetWithCustomerOut"},"CustomerOut":{"properties":{"customer_id":{"title":"Customer Id","type":"string","maxLength":255},"name":{"title":"Name","type":"string","maxLength":255},"surname":{"title":"Surname","type":"string","maxLength":255},"email":{"title":"Email","type":"string","format":"email"},"phone":{"title":"Phone","type":"string","maxLength":50},"status":{"title":"Status","type":"string","maxLength":50},"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"title":"Agent Id","type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","created_at","updated_at"],"title":"CustomerOut"},"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}/targets/{target_id}/stage":{"patch":{"tags":["campaign-targets"],"summary":"Update Campaign Target Stage","operationId":"update_campaign_target_stage_campaigns__campaign_id__targets__target_id__stage_patch","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"title":"Campaign Id","type":"string","format":"uuid"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}},{"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/CampaignTargetStageUpdate"}}}},"responses":{"200":{"description":"Request completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignTargetWithCustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Verify Goal For Target

> Trigger manual goal verification for a campaign target.\
> \
> \- Collects formatted conversations from completed call attempts for the target's customer\
> &#x20; (persisted by ElevenLabs webhook under meta.elevenlabs.conversation\_formatted),\
> &#x20; ordered from oldest to newest, and concatenates them.\
> \- Sends the campaign goal + conversation to the campaign goal analyzer.\
> \- Updates campaign analysis on the target and recomputes its stage.

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaign-targets","description":"Manage target enrollment and per-target operations inside a campaign.\n\nUse these endpoints to bulk-enroll existing customers, create-and-enroll a single customer, restore targets, or inspect target-specific state."}],"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":{"CampaignTargetWithCustomerOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"campaign_id":{"type":"string","format":"uuid","title":"Campaign Id"},"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"assigned_agent_id":{"title":"Assigned Agent Id","type":"string","format":"uuid"},"stage":{"type":"string","title":"Stage"},"calls_made":{"type":"integer","title":"Calls Made"},"whatsapp_sent":{"type":"integer","title":"Whatsapp Sent"},"email_sent":{"type":"integer","title":"Email Sent"},"ai_label":{"type":"string","enum":["positive","negative","neutral","unknown"],"title":"Ai Label"},"ai_score":{"title":"Ai Score","type":"number"},"ai_reason":{"title":"Ai Reason","type":"string"},"goal_analysis":{"title":"Goal Analysis","additionalProperties":true,"type":"object"},"analysis_source":{"title":"Analysis Source","type":"string"},"call_successful":{"title":"Call Successful","type":"string"},"call_summary_title":{"title":"Call Summary Title","type":"string"},"transcript_summary":{"title":"Transcript Summary","type":"string"},"agent_goal_result":{"title":"Agent Goal Result","type":"string"},"agent_goal_rationale":{"title":"Agent Goal Rationale","type":"string"},"customer_sentiment":{"title":"Customer Sentiment","type":"string"},"customer_sentiment_rationale":{"title":"Customer Sentiment Rationale","type":"string"},"follow_up_required":{"title":"Follow Up Required","type":"boolean"},"follow_up_required_rationale":{"title":"Follow Up Required Rationale","type":"string"},"escalation_required":{"title":"Escalation Required","type":"boolean"},"escalation_required_rationale":{"title":"Escalation Required Rationale","type":"string"},"campaign_goal_result":{"title":"Campaign Goal Result","type":"string"},"campaign_goal_score":{"title":"Campaign Goal Score","type":"number"},"campaign_goal_rationale":{"title":"Campaign Goal Rationale","type":"string"},"campaign_sentiment":{"title":"Campaign Sentiment","type":"string"},"campaign_sentiment_rationale":{"title":"Campaign Sentiment Rationale","type":"string"},"callback_requested":{"title":"Callback Requested","type":"boolean"},"callback_requested_rationale":{"title":"Callback Requested Rationale","type":"string"},"campaign_next_best_action":{"title":"Campaign Next Best Action","type":"string"},"campaign_analysis_updated_at":{"title":"Campaign Analysis Updated At","type":"string"},"analysis_updated_at":{"title":"Analysis Updated At","type":"string"},"last_contacted_at":{"title":"Last Contacted At","type":"string","format":"date-time"},"last_email_at":{"title":"Last Email At","type":"string","format":"date-time"},"last_conv_id":{"title":"Last Conv Id","type":"string"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"customer":{"$ref":"#/components/schemas/CustomerOut"}},"type":"object","required":["id","campaign_id","customer_id","stage","calls_made","whatsapp_sent","email_sent","ai_label","created_at","updated_at","customer"],"title":"CampaignTargetWithCustomerOut"},"CustomerOut":{"properties":{"customer_id":{"title":"Customer Id","type":"string","maxLength":255},"name":{"title":"Name","type":"string","maxLength":255},"surname":{"title":"Surname","type":"string","maxLength":255},"email":{"title":"Email","type":"string","format":"email"},"phone":{"title":"Phone","type":"string","maxLength":50},"status":{"title":"Status","type":"string","maxLength":50},"id":{"type":"string","format":"uuid","title":"Id"},"agent_id":{"title":"Agent Id","type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","created_at","updated_at"],"title":"CustomerOut"},"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}/targets/{target_id}/verify-goal":{"post":{"tags":["campaign-targets"],"summary":"Verify Goal For Target","description":"Trigger manual goal verification for a campaign target.\n\n- Collects formatted conversations from completed call attempts for the target's customer\n  (persisted by ElevenLabs webhook under meta.elevenlabs.conversation_formatted),\n  ordered from oldest to newest, and concatenates them.\n- Sends the campaign goal + conversation to the campaign goal analyzer.\n- Updates campaign analysis on the target and recomputes its stage.","operationId":"verify_goal_for_target_campaigns__campaign_id__targets__target_id__verify_goal_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"title":"Campaign Id","type":"string","format":"uuid"}},{"name":"target_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Target Id"}},{"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/CampaignTargetWithCustomerOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## POST /campaigns/{campaign\_id}/targets:bulk

> Enroll Targets Bulk

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaign-targets","description":"Manage target enrollment and per-target operations inside a campaign.\n\nUse these endpoints to bulk-enroll existing customers, create-and-enroll a single customer, restore targets, or inspect target-specific state."}],"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":{"CampaignTargetsBulkRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CampaignTargetsBulkItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"CampaignTargetsBulkRequest"},"CampaignTargetsBulkItem":{"properties":{"customer_id":{"type":"string","format":"uuid","title":"Customer Id"},"assigned_agent_id":{"title":"Assigned Agent Id","type":"string","format":"uuid"}},"type":"object","required":["customer_id"],"title":"CampaignTargetsBulkItem"},"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}/targets:bulk":{"post":{"tags":["campaign-targets"],"summary":"Enroll Targets Bulk","operationId":"enroll_targets_bulk_campaigns__campaign_id__targets_bulk_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"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignTargetsBulkRequest"}}}},"responses":{"200":{"description":"Request completed successfully.","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Create Customer And Enroll

> Create a Customer and enroll into the Campaign if not already enrolled by email/phone.\
> \
> \- Requires at least one of \`email\` or \`phone\` to check duplicates; if neither is provided, returns 400.\
> \- If a customer with same email or phone is already a target in this campaign, skip (created=false, skipped=true).\
> \- Otherwise, create the Customer and CampaignTarget, and trigger first contact according to campaign settings.

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"campaign-targets","description":"Manage target enrollment and per-target operations inside a campaign.\n\nUse these endpoints to bulk-enroll existing customers, create-and-enroll a single customer, restore targets, or inspect target-specific state."}],"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":{"CampaignCreateCustomerRequest":{"properties":{"customer_id":{"type":"string","title":"Customer Id"},"name":{"title":"Name","type":"string"},"surname":{"title":"Surname","type":"string"},"email":{"title":"Email","type":"string"},"phone":{"title":"Phone","type":"string"},"status":{"title":"Status","type":"string"},"customer_agent_id":{"title":"Customer Agent Id","type":"string","format":"uuid"},"assigned_agent_id":{"title":"Assigned Agent Id","type":"string","format":"uuid"}},"type":"object","required":["customer_id"],"title":"CampaignCreateCustomerRequest"},"CampaignEnrollSingleResult":{"properties":{"created":{"type":"boolean","title":"Created"},"skipped":{"type":"boolean","title":"Skipped"},"reason":{"title":"Reason","type":"string"}},"type":"object","required":["created","skipped"],"title":"CampaignEnrollSingleResult"},"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}/targets:create-customer":{"post":{"tags":["campaign-targets"],"summary":"Create Customer And Enroll","description":"Create a Customer and enroll into the Campaign if not already enrolled by email/phone.\n\n- Requires at least one of `email` or `phone` to check duplicates; if neither is provided, returns 400.\n- If a customer with same email or phone is already a target in this campaign, skip (created=false, skipped=true).\n- Otherwise, create the Customer and CampaignTarget, and trigger first contact according to campaign settings.","operationId":"create_customer_and_enroll_campaigns__campaign_id__targets_create_customer_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"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreateCustomerRequest"}}}},"responses":{"200":{"description":"Request completed successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignEnrollSingleResult"}}}},"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/targets.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.
