---
schema_version: "1"
id: 9d8f0876786b0a96ec2dd20961a15d496c8c620169045919aa09a6dc3aabbde7
title: POST /platform/v1/ens-verify
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/guides/mc-apis/verifyCallback.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_event_notification/verifyCallback.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2261066852e038d0462b777a3c09f2c0a463387c780a8d1c671322eebfb4c8d9
products:
  - Marketing Cloud Engagement APIs and Programmatic Languages
  - Marketing Cloud
---
# POST /platform/v1/ens-verify

Verifies a callback so that it can receive notifications.

## JSON Parameters

| Name              | Type   | Description                                                                                                                                         |
| ----------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `callbackId`      | string | Required. A unique identifier of the callback.                                                                                                      |
| `verificationKey` | string | Required. A unique, single-use verification code for the callback. This value is returned as a response to a [creation](https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_event_notification/createCallback.md) request. |

## Usage

The Event Notification Service requires a two-step verification process for registering a callback. Two-step verification ensures that the stream of event notifications can’t be used to attack an external URL endpoint. To achieve this security, the URL endpoint must have a critical role in the verification process. Therefore, it’s the only receiver of the single-use verification key needed to complete callback verification.

In callback verification, a unique, single-use verification key is generated when you create a callback and is sent to the callback URL that you registered using the create callback route. The payload that is posted to the callback URL is the same payload used to call the verify callback route.

```json
{
  "callbackId": "CALLBACK_ID_STRING",
  "verificationKey": "VERIFICATION_KEY_STRING"
}
```

The URL endpoint must capture verification details, including the verification key, and immediately return them by calling the verify callback route.
Alternatively, you can capture the verification details so that developers can manually call the verify callback route.

To log the verification details in a request that uses manual verification, use this code in your callback implementation.

```java
JSONObject req = new JSONObject(<httprequest>);

if (req.getString("verificationKey") != null) {
   // Return HTTP 200 code
  System.out.println("Verification details: " + <httprequest>);
} else {
   // Insert notification processing code here.
}
```

To manually verify the callback, use the logged verification details to invoke the verify callback route.

```
curl -X POST \
 https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com/platform/v1/ens-verify \
 -H 'Authorization: Bearer BEARER_TOKEN' \
 -H 'Content-Type: application/json' \
 -d '{
   "callbackId": "<callbackIDString>",
   "verificationKey": "<verificationKeyString>"
}'
```

Ensure that your callback completes verification within four hours.

### Example Request

```json
Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
POST /platform/v1/ens-verify
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN

{
  "callbackId": "65b885ab-c2b4-46fe-85d0-d6cb8be8057d",
  "verificationKey": "CZwJw4XATH6LK1fPWFeMDkIyVbro6T3ijXK8CrzQe2s="
}
```

### HTTP Responses

| Response         | Reason                                            |
| ---------------- | ------------------------------------------------- |
| 200 OK           | The callback was verified.                        |
| 400 Bad Request  | The server was unable to process the request.     |
| 403 Forbidden    | The server was unable to authorize the request.   |
| 404 Not Found    | Incorrect callback ID, verification key, or both. |
| 500 Server Error | An internal error occurred.                       |

## See Also

- [Event Notification Service](/docs/marketing/marketing-cloud/guide/ens.html)
