# Campaigns API

## createCampaign

`POST` `https://api.pushwoosh.com/json/1.3/createCampaign`

ऐप के भीतर एक पुश अभियान (campaign) बनाता है।

#### Request Body

| Name | Type | Description |
| --- | --- | --- |
| auth\* | string | Pushwoosh कंट्रोल पैनल से [API access token](/hi/developer/api-reference/api-identifiers/#api-access-token)। |
| application\* | string | [Pushwoosh application code](/hi/developer/api-reference/api-identifiers/#application-code) |
| name\* | string | अभियान का नाम। |
| description | string | अभियान का विवरण। |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "campaign": "XXXXX-XXXXX"
  }
}
```
</TabItem>
</Tabs>

```text
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H",       // आवश्यक। Pushwoosh कंट्रोल पैनल से API एक्सेस टोकन
    "application": "XXXXX-XXXXX",         // आवश्यक। Pushwoosh एप्लिकेशन कोड
    "name": "CAMPAIGN_NAME",              // आवश्यक।
    "description": "CAMPAIGN_DESCRIPTION" // वैकल्पिक।
  }
}
```

## deleteCampaign

`POST` `https://api.pushwoosh.com/json/1.3/deleteCampaign`

एक विशेष अभियान को हटाता है।

#### Request Body

| Name | Type | Description |
| --- | --- | --- |
| auth\* | string | Pushwoosh कंट्रोल पैनल से [API access token](/hi/developer/api-reference/api-identifiers/#api-access-token)। |
| campaign\* | string | हटाने के लिए [अभियान का कोड (Code of a campaign)](/hi/developer/api-reference/api-identifiers/#campaign-code)। |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": null
}
```
</TabItem>
</Tabs>

```text title="Example"
{
  "request": {
    "auth": "yxoPUlwqm…………pIyEX4H", // आवश्यक। Pushwoosh कंट्रोल पैनल से API एक्सेस टोकन
    "campaign": "XXXXX-XXXXX"       // आवश्यक। हटाने के लिए अभियान की ID
  }
}
```

## getCampaigns

`POST` `https://api.pushwoosh.com/json/1.3/getCampaigns`

ऐप के लिए अभियानों की सूची प्राप्त करता है।

#### Request Body

| Name | Type | Description |
| --- | --- | --- |
| auth\* | string | Pushwoosh कंट्रोल पैनल से [API access token](/hi/developer/api-reference/api-identifiers/#api-access-token)। |
| application\* | string | [Pushwoosh application code](/hi/developer/api-reference/api-identifiers/#application-code) |
| cursor | string | पिछले अनुरोध में प्राप्त अंतिम अभियान को इंगित करता है। |
| limit | integer | एकल प्रतिक्रिया (single response) के लिए अभियानों की अधिकतम संख्या। |

<Tabs>
<TabItem label="200">
```json
{
  "status_code": 200,
  "status_message": "OK",
  "response": {
    "campaigns": [{
      "code": "7CFF3-63A7B",
      "name": "CAMPAIGN_NAME_1",
      "description": "DESCRIPTION1"
    }, {
      "code": "C284C-33DD3",
      "name": "CAMPAIGN_NAME_2",
      "description": "DESCRIPTION2"
    }],
    "limit": 100,
    "cursor": "+4PxJPhhwITD4PFsiKui1BA=="
  }
}
```
</TabItem>
</Tabs>

```text title="Example"
{
  "request": {
    "auth": "jLbec2UW........ztFSOf5Za",   // आवश्यक। Pushwoosh कंट्रोल पैनल से API एक्सेस टोकन
    "application": "XXXXX-XXXXX",          // आवश्यक। Pushwoosh एप्लिकेशन कोड
    "cursor": "+4PxJPhhwITD4PFsiKui1BA==", // वैकल्पिक। पिछले अनुरोध में प्राप्त अंतिम अभियान को इंगित करता है।
    "limit": 100                           // वैकल्पिक। एकल प्रतिक्रिया (single response) के लिए
                                           //           अभियानों की अधिकतम संख्या।
  }
}
```