# Campaign Membership

Inspect which campaigns a customer belongs to and retrieve campaign-level context from the customer perspective.

## List Customer Campaigns

> List campaigns this customer is enrolled in (via CampaignTarget).\
> \
> Enforces ownership: non-admins can only access their own customers and campaigns.

```json
{"openapi":"3.1.0","info":{"title":"Umanize API","version":"0.1.0"},"tags":[{"name":"customer-campaigns","description":"Inspect which campaigns a customer belongs to and retrieve campaign-level context from the customer perspective."}],"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":{"/customers/{customer_id}/campaigns":{"get":{"tags":["customer-campaigns"],"summary":"List Customer Campaigns","description":"List campaigns this customer is enrolled in (via CampaignTarget).\n\nEnforces ownership: non-admins can only access their own customers and campaigns.","operationId":"list_customer_campaigns_customers__customer_id__campaigns_get","parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Customer Id"}},{"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_CampaignListItemOut_"}}}},"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/customers/campaign-membership.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.
