# Callback

When you create a Bulk API job, you can optionally include a callback URL in the request body. Cornerstone will send a notification to this endpoint when the job completes. This way you don't have to poll Cornerstone frequently for updates. When you are setting up your callback endpoint, keep the following in mind:

  • The URL must be an HTTPS endpoint. Including an HTTP endpoint in the callback field within the create job request body will result in a validation error.
  • When all the imports in a job complete, Cornerstone will send a POST request to the callback URL.
// Callback Request Body
{
    "job_id": "c8352637-bb1a-4960-ab91-e4794bdd7bea",
    "job_status": "Completed"
}
  • When you receive the callback notification, you can use the job_id included in the request body to query the /services/api/x/bulk-api/v1/jobs/{job_id} endpoint to get the full job status.
  • Cornerstone does not support any authentication on the callback URL. However, we recommend that you embed a single-use token within the URL for each job request. This way you will know that the POST request is coming from Cornerstone.
  • Note that if for some reason the callback request from Cornerstone fails, Cornerstone does not retry the request. We log the response we received from your endpoint.
    • If you need to troubleshoot any issues with your endpoint, we recommend relying on logs on your end. You can also see the response your endpoint sent in the Bulk API History page within Cornerstone. Please see Bulk API History Page for more details.

PostBin

If you are not familiar with callbacks or if you want to avoid the complexity of setting up a callback endpoint while designing or sandboxing your integration, we recommend using a tool like postb.in. PostBin provides you the ability to quickly create a webhook endpoint and visually see the requests coming from Cornerstone.