The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.

POST /platform/v1/ens-callbacks

Registers a new callback to receive event notifications. You must register and verify your callback before you use it in a subscription.

NameTypeDescription
callbackNamestringRequired. The name of the callback.
urlstringRequired. The URL of the customer callback that receives event notifications in the format https://host[/path]. Ports and query string aren’t supported. The URL must be syntactically correct and not already registered as a callback URL.
maxBatchSizeintegerThe maximum number of events that this callback can receive in a single call. The default value is 1,000. For the minimum and maximum batch sizes, see API Limits and Guidelines.

Your URL endpoint must be online and reachable before you create a callback. The Event Notification Service immediately attempts to post verification details to the endpoint.

If your callback doesn’t respond within 30 seconds or returns an HTTP response other than 200 OK, the callback creation request fails with a 400 Bad Request status. In this situation, the response includes a description of the failure, similar to this example.

ResponseReason
201 CreatedThe callback was created.
304 No ChangeThe callback already exists on the server.
400 Bad RequestThe server was unable to process the request.
403 ForbiddenThe server was unable to authorize the request.
500 Server ErrorAn internal error occurred.