---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.2
alternate:
  - https://yandex.ru/dev/direct/doc/dg-v4/en/tasks/HowToCreateCampaign.md
  - https://yandex.ru/dev/direct/doc/dg-v4/ru/tasks/HowToCreateCampaign.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/direct/doc/dg-v4/en/llms.txt

# Conducting advertising campaigns

## Creation and review

1. Form an [input data](https://yandex.ru/dev/direct/doc/dg-v4/reference/CreateOrUpdateCampaign.html) structure and set campaign parameters.</cmd><info >

   In the StartDate parameter, you may specify a future date. Impressions start automatically when this date takes effect, provided the moderator has approved the ad and funds have been transferred to the campaign balance.

1. Call the [CreateOrUpdateCampaign](https://yandex.ru/dev/direct/doc/dg-v4/reference/CreateOrUpdateCampaign.html) method and input the prepared structure.</cmd><info >

   The method returns the ID of the new campaign. With this ID, use the [GetCampaignsParams](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/GetCampaignsParams.md) method to get campaign parameters.

   A new campaign has the “Draft” status (the StatusModerate parameter has the value “New”). The status changes after moderation.

1. Use the [CreateOrUpdateBanners](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateOrUpdateBanners.md) method to create ads (banners).

1. Use the [ModerateBanners](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/ModerateBanners.md) method to submit ads for moderation.

   If the moderator approved at least one ad, the campaign parameter StatusModerate takes the value “Yes”. After this, funds can be transferred to the campaign balance.

1. There are two ways to make deposits to the campaign balance:
   - Use the [CreateInvoice](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateInvoice.md) method to generate an invoice for bank transfer.
   - Use the [PayCampaigns](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/PayCampaigns.md) method to make payments using credit or overdraft.

After moderator approval and payment, the campaign is activated automatically (the StatusShow and IsActive parameters take the value “Yes”) and ad impressions begin.

## Stopping and restarting

1. To stop displaying a particular ad, call the [StopBanners](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/StopBanners.md) method.

   The StatusShow ad parameter takes the value “No”. Impressions may continue for some time. The IsActive parameter indicates when impressions have actually stopped.

1. To stop displaying all the ads in a campaign, call the [StopCampaign](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/StopCampaign.md) method.

   The StatusShow campaign parameter takes the value “No” (the ad parameters of the same name do not change). The IsActive parameter indicates when impressions have actually stopped.

1. To start displaying an ad again, call the [ResumeBanners](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/ResumeBanners.md) method.

1. To restart a campaign, call the [ResumeCampaign](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/ResumeCampaign.md) method.

1. To stop and restart displays for separate keywords, call the [Keyword (Live)](https://yandex.ru/dev/direct/doc/dg-v4/en/live/Keyword.md) method.

## Archiving and unarchiving

Campaigns and ads can be moved to the archive, after they have been stopped. If they are needed again in the future, they can be extracted from the archive.

{% note alert %}

A campaign can be archived no sooner than one hour after the last impression.

{% endnote %}

1. To archive a campaign, stop it and call the [ArchiveCampaign](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/ArchiveCampaign.md) method.

   It may take several minutes to move it to the archive. During this time, the StatusArchive parameter has the value “Pending”, and when the transfer is complete, the value is “Yes”.

1. To unarchive a campaign, call the [UnArchiveCampaign](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/UnArchiveCampaign.md) method.

   It may take several minutes to extract it from the archive. During this time, the StatusArchive parameter has the value “Pending”. When the parameter takes the “No” value, the campaign can be launched using the [ResumeCampaign](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/ResumeCampaign.md) method.

You can perform similar actions on ads using the [ArchiveBanners](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/ArchiveBanners.md) and [UnArchiveBanners](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/UnArchiveBanners.md) methods.
