# Listing Popup Campaigns

You can use the JS API to list all the popup campaigns. This may be handy in situations when you would like to fetch all the campaigns and iterate through them to decide whether they should be shown or not.

```javascript
nostojs(api => {
  console.log(api.popupCampaigns());
});
```

## Fields

| Field | Type   | Reason                                 |
| ----- | ------ | -------------------------------------- |
| id    | String | The identifier of the popup campaign   |
| name  | String | The name of the popup campaign         |
| type  | String | The trigger-type of the popup campaign |


---

# 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.nosto.com/techdocs/apis/frontend/js-apis/popups/listing-popup-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.
