# Creando campañas

Creando una nueva campaña con nombre y alias . El alias de la campaña debe ser un nombre simple para que sea más fácil de usar con la API. Se recomienda ser corto y no usar caracteres especiales.

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

#### JSON Object <a href="#json-object" id="json-object"></a>

\* Campos requeridos

| Campo  | Detalles                     | Tipo de dato |
| ------ | ---------------------------- | ------------ |
| name\* | Nombre de la campaña         | String       |
| alias  | Identificador de la campaña. | String       |

> Ejemplo de creación de campaña:

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

```
curl -X POST \
  https://apigw.wavy.global/api/v1/campaigns \
  -H 'Content-Type: application/json' \
  -H 'authenticationToken: <authentication_token>' \
  -H 'userName: <e-mail>' \
  -d '{
        "campaign" : {
          "name": "My Campaign",
          "alias": "mycampaign"
        }
      }'
```

{% endtab %}

{% tab title="Second Tab" %}

{% endtab %}
{% endtabs %}

> Respuesta

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

```
{
    "status": {
        "error": false
    },
    "campaign": {
        "name": "My Campaign",
        "id": 1234,
        "alias": "mycampaign"
    }
}
```

{% endtab %}

{% tab title="Ruby" %}

```
{
    "status": {
        "error": false
    },
    "campaign": {
        "name": "My Campaign",
        "id": 1234,
        "alias": "mycampaign"
    }
}
```

{% endtab %}

{% tab title="Python" %}

```
{
    "status": {
        "error": false
    },
    "campaign": {
        "name": "My Campaign",
        "id": 1234,
        "alias": "mycampaign"
    }
}
```

{% endtab %}

{% tab title="PHP" %}

```
{
    "status": {
        "error": false
    },
    "campaign": {
        "name": "My Campaign",
        "id": 1234,
        "alias": "mycampaign"
    }
}
```

{% endtab %}

{% tab title="Java" %}

```
{
    "status": {
        "error": false
    },
    "campaign": {
        "name": "My Campaign",
        "id": 1234,
        "alias": "mycampaign"
    }
}
```

{% 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-es.sinch.com/apidecampanas/creando-campanas.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.
