BlogTravis CI Webhooks

How to Test Travis CI Webhooks

Travis CI sends webhook notifications when builds finish, providing build status, duration, and commit details.

Travis CI Official Webhook Docs

1. Travis CI Webhook Events

Travis CI can send the following webhook events to your endpoint:

build.started
build.finished
build.errored

2. Set Up a Test Endpoint with HookRay

Follow these steps to start receiving Travis CI webhooks for testing:

  1. Go to HookRay and click "Start Testing — Free" to get your unique webhook URL.
  2. Copy the URL (e.g., https://h.hookray.com/abc123).
  3. In your Travis CI dashboard, navigate to the webhook settings and paste the HookRay URL as your endpoint.
  4. Select the events you want to receive (see list above).
  5. Trigger a test event — HookRay will show the incoming webhook in real-time.

3. Sample Travis CI Webhook Payload

Here's an example of what a Travis CI webhook payload looks like:

payload.json
{
  "id": 289765,
  "number": "412",
  "type": "push",
  "state": "passed",
  "result": 0,
  "status": 0,
  "started_at": "2026-03-20T13:20:00Z",
  "finished_at": "2026-03-20T13:25:00Z",
  "duration": 300,
  "repository": {
    "name": "hookray",
    "owner_name": "acme"
  },
  "branch": "main",
  "commit": "abc123def456"
}

4. Common Issues & Troubleshooting

Webhook not arriving?

Check that your endpoint URL is correct and publicly accessible. Travis CI cannot reach localhost URLs — use HookRay's cloud URL instead.

Getting 400 or 500 errors?

HookRay accepts any payload and returns 200 OK by default, so the issue is likely on Travis CI's side. Check your webhook configuration and event selection.

Need to verify webhook signatures?

Travis CI signs webhook requests for security. Use HookRay to capture the raw headers and body, then implement signature verification in your application code.

5. Next Steps

  • Use HookRay's webhook replay feature to re-send captured webhooks while building your handler
  • Enable smart parsing (Pro plan) to see Travis CI-specific fields highlighted automatically
  • Check the Travis CI webhook documentation for the complete event reference

Ready to test Travis CI webhooks?

Get a free webhook URL in 5 seconds. No signup required.

Start Testing Travis CI Webhooks — Free