> For the complete documentation index, see [llms.txt](https://sevenheaven.gitbook.io/sevenheaven/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sevenheaven.gitbook.io/sevenheaven/rewards-and-campaings/campaign.md).

# Campaign

\
Sevenheaven **Campaign Management API**

Sevenheaven provides a set of API endpoints to effectively manage your campaigns. These endpoints allow you to transition between different campaign states, enabling dynamic control over your campaigns.

#### Campaign States

* **Draft:** The initial state after creating a campaign. Not yet active.
* **Active:** The campaign is ready to distribute rewards to users who meet the specified conditions.
* **Paused:** The campaign is temporarily halted. Users cannot claim rewards from a paused campaign.
* **Canceled:** The campaign is completely canceled. The cancellation state is an irreversible terminal condition.
* **Completed:** The campaign has fulfilled the specified duration or conditions and has ended.

#### Pause a Campaign

To pause a specific campaign, you can use the following request:

```bash
bashCopy codecurl --request POST \
     --url https://api.7777.wtf/alpha/campaign/{campaign_id}/pause \
     --header 'Authorization: Bearer <YOUR_API_KEY>' \
     --header 'accept: application/json'
```

This request temporarily pauses the campaign, and users cannot claim rewards from a paused campaign. The campaign data remains intact and can be resumed at any time.

#### Resume a Campaign

To resume a paused campaign, use the following request:

```bash
bashCopy codecurl --request POST \
     --url https://api.7777.wtf/alpha/campaign/{campaign_id}/resume \
     --header 'Authorization: Bearer <YOUR_API_KEY>' \
     --header 'accept: application/json'
```

This request activates the paused campaign, allowing users to participate again and claim rewards.

#### Cancel a Campaign

To cancel a specific campaign, you can use the following request:

```bash
bashCopy codecurl --request POST \
     --url https://api.7777.wtf/alpha/campaign/{campaign_id}/cancel \
     --header 'Authorization: Bearer <YOUR_API_KEY>' \
     --header 'accept: application/json'
```

The cancellation request stops the campaign, and the campaign data is preserved until you decide to delete the campaign. Canceled campaigns cannot be restarted.

These API endpoints empower you to dynamically manage your Sevenheaven campaigns. Each action allows you to change the state of a specific campaign and intervene in your campaigns as needed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://sevenheaven.gitbook.io/sevenheaven/rewards-and-campaings/campaign.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.
