---
title: "Creates a coupon deletion job"
method: POST
path: "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs"
tags: ["Coupons"]
---

# Creates a coupon deletion job

`POST /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs`

## Request

- Base URL: `https://yourbaseurl.talon.one`
- URL: `https://yourbaseurl.talon.one/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_deletion_jobs`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `Authorization`

> [!note] Management API endpoints are **not** meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.

This endpoint handles creating a job to delete coupons asynchronously.

## Path parameters

- `applicationId` integer, required
- `campaignId` integer, required

## Request body

- NewCouponDeletionJob
  - `filters` CouponDeletionFilters, required
    - `createdBefore` string, date-time: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
    - `createdAfter` string, date-time: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
    - `startsAfter` string, date-time: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
    - `startsBefore` string, date-time: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
    - `valid` 'expired' | 'validNow' | 'validFuture': - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which the start date is null or in the past and the expiration date is null or in the future. - `validFuture`: Matches coupons in which the start date is set and in the future.
    - `usable` boolean: - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. - This field cannot be used in conjunction with the `usable` query parameter.
    - `redeemed` boolean: - `true`: only coupons where `usageCounter > 0` will be returned. - `false`: only coupons where `usageCounter = 0` will be returned. **Note:** This field cannot be used in conjunction with the `usable` query parameter.
    - `recipientIntegrationId` string: Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field.
    - `exactMatch` boolean: Filter results to an exact case-insensitive matching against the coupon code
    - `value` string: Filter results by the coupon code
    - `batchId` string: Filter results by batches of coupons
    - `referralId` integer: Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code.
    - `expiresAfter` string, date-time: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.
    - `expiresBefore` string, date-time: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally.

## Response `202`

The deletion request has been accepted and will be processed asynchronously

- AsyncCouponDeletionJobResponse
  - `id` integer, required: Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints.

---

[API](https://skmtc.dev/talon/apis/management-api.md) - [All operations](https://skmtc.dev/talon/apis/management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talon/apis/management-api/revisions/193c799ffe0e?raw)
