Skip to main content

OpenAI

Receive webhook events from OpenAI for background jobs such as Responses API completions, Batch jobs, Fine-Tuning, and Evals.

Connect OpenAI​

OpenAI webhooks require manual setup — there is no OAuth integration. You register the Dispatch endpoint URL directly in your OpenAI Dashboard.

Steps​

  1. In Dispatch, go to Sources → Add Source → OpenAI and click Generate webhook URL.
  2. Copy the generated URL.
  3. In the OpenAI Dashboard, go to Settings → Webhooks → Add endpoint.
  4. Paste the URL and select the events you want to receive.
  5. Copy the Signing secret shown for the endpoint (starts with whsec_).
  6. Paste the signing secret into Dispatch. Dispatch checks it as you type (it must be the complete whsec_ secret) and saves it as soon as you leave the field.
  7. Click Done, or press Enter in the field. Done is available once the signing secret is complete. If the secret can't be saved, the setup stays open and tells you why, so you can try again — unless you closed the dialog while it was saving, in which case the dialog closes and the unfinished source is removed.

Supported Events​

CategoryEventDescription
Responses APIresponse.completedBackground response finished successfully
Responses APIresponse.failedBackground response failed
Responses APIresponse.incompleteResponse stopped before completion (e.g. token limit)
Responses APIresponse.cancelledResponse was cancelled
Batch Jobsbatch.completedBatch job finished
Batch Jobsbatch.failedBatch job failed
Batch Jobsbatch.cancelledBatch job was cancelled
Batch Jobsbatch.expiredBatch job expired before completion
Fine-Tuningfine_tuning.job.succeededFine-tuning job completed successfully
Fine-Tuningfine_tuning.job.failedFine-tuning job failed
Fine-Tuningfine_tuning.job.cancelledFine-tuning job was cancelled
Evalseval.run.succeededEval run completed successfully
Evalseval.run.failedEval run failed
Evalseval.run.cancelledEval run was cancelled

Signature Verification​

Dispatch automatically verifies every incoming OpenAI webhook using the signing secret you provide. OpenAI uses the Standard Webhooks specification:

  • Headers: webhook-id, webhook-timestamp, webhook-signature
  • Algorithm: HMAC-SHA256 over {webhook-id}.{webhook-timestamp}.{body}
  • Secret format: whsec_ followed by a base64-encoded key

Requests with missing or invalid signatures are rejected with 401 Unauthorized. Requests with a timestamp more than 5 minutes old are also rejected.

If the signing secret changes​

If you rotate the endpoint's signing secret in OpenAI, or deliveries are rejected because the saved secret doesn't match, you don't need a new source:

  1. On the Sources page, open Edit Source on the OpenAI source
  2. Paste the current signing secret from OpenAI into OpenAI signing secret
  3. Click Save

Deliveries verify against the new secret from then on, and your webhook URL stays the same.

Disconnect​

To stop receiving events, delete the endpoint from your OpenAI Dashboard under Settings → Webhooks, then archive or delete the source in Dispatch.