# List all campaigns

## List campaigns

> List all campaigns for a given brand. The list can be filtered by campaign status. This result is paginated. To learn more about the pagination, please refer to the pagination section on API Access Common API Usage section.<br>

```json
{"openapi":"3.0.3","info":{"title":"Numbers","version":"v1"},"tags":[{"description":"TCR Campaigns","name":"number_campaigns"}],"servers":[{"url":"https://api.bird.com","description":"Production API"}],"security":[{"accessKey":[]}],"components":{"securitySchemes":{"accessKey":{"description":"Uses the Authorization header: 'AccessKey ' followed by your access key token (e.g., 'Authorization: AccessKey AbCdEfGhIjKlMnOpQrStUvWxYzAbCdEfGhIj')","scheme":"AccessKey","type":"http"}},"parameters":{"queryLimit":{"description":"Limits the number of results to return per page. The default value is 10 and maximum is 99. If the nextPageToken is defined on response, you can use it to get remaining numbers. To know more, refer to the pagination section.\n","in":"query","name":"limit","schema":{"default":10,"maximum":99,"minimum":1,"type":"integer"}},"queryCursor":{"description":"Pagination token that keeps of track of the current position in the list. Use it to query remaining results. If not provided, the first page is returned. To learn more about the pagination, please refer to the pagination section on API Access Common API Usage section.","in":"query","name":"pageToken","schema":{"maxLength":8000,"type":"string"}},"queryDirection":{"description":"Order in which to retrieve the results. By default, the orders are in ascending order date. To get the results in descending order, set this parameter to true.","in":"query","name":"reverse","schema":{"default":false,"type":"boolean"}}},"schemas":{"CampaignList":{"type":"object","required":["results"],"properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Campaign"}}}},"Campaign":{"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","description":"UUID of the campaign.","format":"uuid"},"name":{"type":"string","description":"Campaign name"},"subscription":{"$ref":"#/components/schemas/CampaignSubscription"},"status":{"type":"string","description":"Campaign status","enum":["DRAFT","FAILED","PENDING","REJECTED","APPROVED","DECLINED","SUSPENDED","DELETED","EXPIRED"]},"usecase":{"type":"string","description":"A use case that best matches the purpose of the campaign."},"subUsecases":{"type":"array","description":"If use case is MIXED or LOW_VOLUME mixed an array of 2-5 use cases.","items":{"type":"string"},"nullable":true},"description":{"type":"string","description":"A detailed description of what the campaign is for."},"embeddedLink":{"type":"boolean","description":"Whether messages will contain links. Provide at least one sample containing a link."},"embeddedPhone":{"type":"boolean","description":"Whether messages will contain phone number. Provide at least one sample containing a phone number."},"numberPool":{"type":"boolean","description":"Whether a campaign will be associated with more than 50 numbers e.g. customer service use case."},"ageGated":{"type":"boolean","description":"Whether a campaign contains age-gated content based on carrier/ctia guidelines."},"directLending":{"type":"boolean","description":"Whether a campaign includes content related to direct lending or loan arrangements."},"subscriberOptin":{"type":"boolean","description":"Confirm customer opt in is collected and processed."},"subscriberOptout":{"type":"boolean","description":"Confirm customer opt out is collected and processed."},"subscriberHelp":{"type":"boolean","description":"Confirm an info message is returned if a customer sends \"HELP\"."},"samples":{"type":"array","description":"Between 1-5 sample messages. If directLending, embeddedPhone, embeddedLink is true provide relevant examples.","items":{"type":"string","minItems":1,"maxItems":5}},"messageFlow":{"type":"string","description":"Provide details of how the customer will opt into this campaign. If you have a live web opt-in provide the URL and ensure the page has details on the T&Cs/data collection for opting in, and how to opt out."},"helpMessage":{"type":"string","description":"Help message of the campaign. A help message shall state the name of the service, contact (email or call centre), OPT IN and OPT OUT keywords."},"helpKeywords":{"type":"string","description":"A comma separated list of keywords. Support of the word HELP is the minimum requirement for requesting help/info."},"optoutKeywords":{"type":"string","description":"A comma separated list of keywords. Support of the word STOP is the minimum requirement for OPT OUT."},"optinKeywords":{"type":"string","description":"A comma separated list of keywords. Support of the word START is the minimum requirement for OPT OUT."},"optinMessage":{"type":"string","description":"Provide an example of the message that will be sent after a customer has opted in."},"optoutMessage":{"type":"string","description":"Provide an example of the message that will be sent after a customer has opted out."},"termsAndConditions":{"type":"boolean","description":"Indicates the campaign follows CTIA messaging principles and best practices."},"brandId":{"type":"string","description":"UUID of the brand associated with this campaign. The specified brand MUST be APPROVED.","format":"uuid"},"resellerId":{"type":"string","description":"UUID of the reseller associated with this campaign. The specified reseller MUST be ACTIVE.","nullable":true},"rejection":{"type":"object","description":"Rejection details","required":["description"],"properties":{"description":{"type":"string","description":"Rejection description"},"code":{"type":"string","description":"Rejection code"}}},"attachments":{"type":"array","description":"Attachments associated with this campaign.","items":{"$ref":"#/components/schemas/Attachment"}},"createdAt":{"type":"string","description":"Timestamp (UTC) when the campaign was created.","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp (UTC) when the campaign was last updated.","format":"date-time"}}},"CampaignSubscription":{"type":"object","title":"CampaignSubscription","additionalProperties":false,"description":"Describes status of Campaign Subscription","nullable":true,"properties":{"status":{"type":"string","enum":["active","inactive","canceling"]},"subscribedAt":{"type":"string","description":"Timestamp (UTC) when the subscription became active.","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp (UTC) when the subscription was last updated.","nullable":true,"format":"date-time"},"cancelledAt":{"type":"string","description":"Timestamp (UTC) when the subscription was cancelled.","nullable":true,"format":"date-time"}}},"Attachment":{"type":"object","additionalProperties":false,"required":["id","status","filename","contentType","createdAt","updatedAt"],"properties":{"id":{"type":"string","description":"The ID of the attachment.","format":"uuid"},"status":{"$ref":"#/components/schemas/AttachmentStatus"},"createdAt":{"type":"string","description":"Timestamp (UTC) when the attachment was created.","format":"date-time"},"updatedAt":{"type":"string","description":"Timestamp (UTC) when the attachment was last updated.","nullable":true,"format":"date-time"},"filename":{"type":"string","description":"The original name of the file when it was uploaded."},"mediaUrl":{"type":"string","description":"The URL to download the attachment."},"contentType":{"type":"string","description":"The detected MIME type of the file."}}},"AttachmentStatus":{"type":"string","description":"Attachment status","enum":["PENDING","ACTIVE","PENDING_DELETION","DELETED","FAILED","FAILED_DELETION"]},"pagination":{"properties":{"nextPageToken":{"description":"The token that can be passed as pageToken in URL to retrieve the next set of results. If missing, no more results to display. To know more, refer to the pagination section.","type":"string"}},"type":"object"},"Error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","description":"A unique code that identifies the error. This code can be used to programmatically identify the error.\n","minLength":5},"message":{"type":"string","minLength":5,"description":"A human-readable message that describes the error. An example is 'The request body is missing the required field `service`.'\n"},"details":{"type":"object","additionalProperties":true,"description":"Additional details about the error. This object can contain any additional information that may be useful for debugging.\n"}}}}},"paths":{"/workspaces/{workspaceId}/tcr-brands/{brandId}/campaigns":{"get":{"description":"List all campaigns for a given brand. The list can be filtered by campaign status. This result is paginated. To learn more about the pagination, please refer to the pagination section on API Access Common API Usage section.\n","operationId":"listTCRCampaigns","parameters":[{"$ref":"#/components/parameters/queryLimit"},{"$ref":"#/components/parameters/queryCursor"},{"$ref":"#/components/parameters/queryDirection"}],"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/CampaignList"},{"$ref":"#/components/schemas/pagination"}]}}},"description":"OK"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Brand not found"}},"summary":"List campaigns","tags":["number_campaigns"]}}}}
```

| Type                                                                                                                                     | Description                                            |
| ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| array<[CampaignReponse](https://docs.bird.com/api/numbers-api/api-reference/10dlc-compliance/create-a-campaign#campaignresponse-object)> | CampaignResponse object describes a submitted campaign |
