Skip to main content

Overview

Subscribe to webhook events to receive instant notifications when timers are stopped in your workspace. This endpoint enables Zapier’s “Timer Stopped” trigger integration, automatically forwarding completed time entry data to your connected workflows.
This endpoint is primarily designed for Zapier integrations but can be used with any webhook service that follows the same pattern.

Authentication

All requests require a valid API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Subscribe to Events

curl -X POST 'https://app.timetracker.in/api/integrations/zapier/webhooks/subscribe' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -d '{
    "url": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",
    "events": ["TIMER_STOPPED"],
    "description": "Zapier webhook for timer stopped"
  }'

Request Body

url
string
required
The destination URL for webhook notifications. Must be a valid HTTPS URL format.Example: https://hooks.zapier.com/hooks/catch/123456/abcdef/
events
string[]
required
Array of event types to monitor. Currently supports:
  • TIMER_STOPPED - Triggered when a timer is stopped
Example: ["TIMER_STOPPED"]
description
string
Optional description to identify this webhook in your dashboard.Example: "Zapier integration for timer stop notifications"

Response

Success Response

{
  "success": true,
  "webhook": {
    "id": "wh_1234567890abcdef",
    "url": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",
    "events": ["TIMER_STOPPED"],
    "status": "ACTIVE"
  }
}
success
boolean
Confirms successful webhook creation.
webhook
object
The created webhook subscription details.

Error Responses

{
  "error": "Invalid URL format"
}
The provided URL doesn’t meet the required format standards.
{
  "error": "URL and events array are required"
}
Required parameters url or events are missing from the request.
{
  "error": "Unauthorized"
}
Invalid or missing API key in the Authorization header.
{
  "error": "Internal server error"
}
An unexpected server error occurred. Try again or contact support.

Webhook Payload Structure

When a timer is stopped, your webhook endpoint receives a POST request with this payload:
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "description": "Working on user authentication implementation",
  "date": "2024-01-15T00:00:00.000Z",
  "startTime": "2024-01-15T10:00:00.000Z",
  "endTime": "2024-01-15T12:30:00.000Z",
  "duration": 9000,
  "billable": true,
  "action": "stop_timer",
  "workspace": {
    "id": "abc12345-e89b-12d3-a456-426614174003",
    "name": "Development Team"
  },
  "teamMember": {
    "id": "def67890-e89b-12d3-a456-426614174004",
    "name": "John Doe"
  },
  "project": {
    "id": "456e7890-e89b-12d3-a456-426614174001",
    "name": "Mobile App Development"
  },
  "task": {
    "id": "789e0123-e89b-12d3-a456-426614174002",
    "name": "Implement user authentication"
  },
  "tags": [
    {
      "id": "ghi11111-e89b-12d3-a456-426614174005",
      "name": "authentication"
    },
    {
      "id": "jkl22222-e89b-12d3-a456-426614174006",
      "name": "mobile"
    }
  ],
  "createdAt": "2024-01-15T10:00:00.000Z",
  "updatedAt": "2024-01-15T12:30:00.000Z"
}

Payload Fields

id
string
Unique time entry identifier
description
string
Time entry description
date
string
Date of the time entry in ISO 8601 format
startTime
string
Timer start time in ISO 8601 format
endTime
string
Timer stop time in ISO 8601 format
duration
integer
Total duration in seconds (e.g., 9000 = 2.5 hours)
billable
boolean
Whether the time entry is billable
action
string
Action type - always "stop_timer" for this trigger
workspace
object
Associated workspace information
teamMember
object
Team member who stopped the timer
project
object
Associated project information
task
object
Associated task information
tags
array
Array of tags associated with the time entry
createdAt
string
ISO 8601 timestamp of time entry creation
updatedAt
string
ISO 8601 timestamp of last update

Zapier Integration Guide

Setting Up the Trigger

  1. Automatic Setup: Zapier automatically calls this endpoint when you configure a “Timer Stopped” trigger
  2. Event Subscription: The integration subscribes to TIMER_STOPPED events
  3. Data Flow: Timer stop data is instantly sent to your Zap workflow
Zapier automatically provides the webhook URL via bundle.targetUrl when setting up the trigger. You don’t need to manually generate URLs.

Important Notes

Workspace Scope: Webhook subscriptions are tied to your specific API key and workspace. Ensure you’re using the correct credentials for your intended workspace.
Data Format: The webhook payload structure matches the standard time entry data format used across all time tracking API endpoints, ensuring consistency in your integrations.
Best Practices:
  • Validate webhook signatures if implementing custom security
  • Implement proper error handling for webhook delivery failures
  • Use HTTPS endpoints only for security
  • Test your webhook endpoint before subscribing