---
title: "POST /topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:reject"
method: POST
path: "/topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:reject"
---

# POST /topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:reject

`POST /topics/{topicName}/eventsubscriptions/{eventSubscriptionName}:reject`

Reject a batch of Cloud Events. The response will include the set of successfully rejected lock tokens, along with other failed lock tokens with their corresponding error information. Successfully rejected events will be dead-lettered and can no longer be received by a consumer.

## Path parameters

- `topicName` string, required
- `eventSubscriptionName` string, required

## Query parameters

- `api-version` string, required

## Request body

- object
  - `lockTokens` string[], required — Array of lock tokens.

## Response `200`

The request has succeeded.

- RejectResult — The result of the Reject operation.
  - `failedLockTokens` FailedLockToken[], required — Array of FailedLockToken for failed cloud events. Each FailedLockToken includes the lock token along with the related error information (namely, the error code and description).
    - `lockToken` string, required — The lock token of an entry in the request.
    - `error` AzureCoreFoundationsError, required — The error object.
      - `code` string, required — One of a server-defined set of error codes.
      - `message` string, required — A human-readable representation of the error.
      - `target` string — The target of the error.
      - `details` AzureCoreFoundationsError[] — An array of details about specific errors that led to this reported error.
      - `innererror` AzureCoreFoundationsInnerError — An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.
        - `code` string — One of a server-defined set of error codes.
        - `innererror` AzureCoreFoundationsInnerError — recursive
  - `succeededLockTokens` string[], required — Array of lock tokens for the successfully rejected cloud events.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.dev/azure/apis/eventgrid-eventgridnamespace.md) · [All operations](https://skmtc.dev/azure/apis/eventgrid-eventgridnamespace/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/eventgrid-eventgridnamespace/revisions/fa0c2b9f87c0/schema)
