# Listar campanhas

Listagem das campanhas já cadastradas na plataforma. É possível paginar os resultados ou filtrar pelo nome da campanha.

`GET https://apigw.wavy.global/api/v1/campaigns`

#### Parâmetros da QueryString <a href="#par-metros-da-querystring" id="par-metros-da-querystring"></a>

\* Campo obrigatório

| Campo      | Detalhes                                         | Tipo    |
| ---------- | ------------------------------------------------ | ------- |
| name       | Nome de uma campanha como filtro para a listagem | String  |
| page       | Página a ser listada                             | Integer |
| page\_size | Total de campanhas por página                    | Integer |

> Exemplo de listagem de campanhas

{% tabs %}
{% tab title="cURL" %}

```
curl -X GET \
 'https://apigw.wavy.global/api/v1/campaigns?name=MyCampaign&page=1&page_size=10' \
 -H 'Content-Type: application/json' \
 -H 'authenticationToken: <authentication_token>' \
 -H 'userName: <e-mail>'
```

{% endtab %}
{% endtabs %}

> Resposta

{% tabs %}
{% tab title="cURL" %}

```
HEADERS:
page-number: 1
per-page: 10
total: 2
total-pages: 1
```

```
{
    "status": {
        "error": false
    },
    "campaigns": [
        {
            "name": "My first campaign",
            "id": 1,
            "alias": "first"
        },
        {
            "name": "My second campaign",
            "id": 2,
            "alias": "second"
        }
    ]
}
```

{% endtab %}

{% tab title="Ruby" %}

```
HEADERS:
page-number: 1
per-page: 10
total: 2
total-pages: 1
```

```
{
    "status": {
        "error": false
    },
    "campaigns": [
        {
            "name": "My first campaign",
            "id": 1,
            "alias": "first"
        },
        {
            "name": "My second campaign",
            "id": 2,
            "alias": "second"
        }
    ]
}
```

{% endtab %}

{% tab title="Python" %}

```
HEADERS:
page-number: 1
per-page: 10
total: 2
total-pages: 1
{
    "status": {
        "error": false
    },
    "campaigns": [
        {
            "name": "My first campaign",
            "id": 1,
            "alias": "first"
        },
        {
            "name": "My second campaign",
            "id": 2,
            "alias": "second"
        }
    ]
}
```

{% endtab %}

{% tab title="PHP" %}

```
HEADERS:
page-number: 1
per-page: 10
total: 2
total-pages: 1

{
    "status": {
        "error": false
    },
    "campaigns": [
        {
            "name": "My first campaign",
            "id": 1,
            "alias": "first"
        },
        {
            "name": "My second campaign",
            "id": 2,
            "alias": "second"
        }
    ]
}
```

{% endtab %}

{% tab title="Java" %}

```
HEADERS:
page-number: 1
per-page: 10
total: 2
total-pages: 1

{
    "status": {
        "error": false
    },
    "campaigns": [
        {
            "name": "My first campaign",
            "id": 1,
            "alias": "first"
        },
        {
            "name": "My second campaign",
            "id": 2,
            "alias": "second"
        }
    ]
}
```

{% endtab %}
{% endtabs %}


---

# 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-pt.sinch.com/apidecampanhas/instrucoes-e-boas-praticas/listar-campanhas.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.
