Skip to main content

Overview

Subscribe to webhook events to receive instant notifications when projects are created in your workspace. This endpoint enables Zapier’s “New Project” trigger integration, automatically forwarding project 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": ["PROJECT_CREATED"],
    "description": "Zapier webhook for new projects"
  }'

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:
  • PROJECT_CREATED - Triggered when a new project is added
Example: ["PROJECT_CREATED"]
description
string
Optional description to identify this webhook in your dashboard.Example: "Zapier integration for project notifications"

Response

Success Response

{
  "success": true,
  "webhook": {
    "id": "wh_1234567890abcdef",
    "url": "https://hooks.zapier.com/hooks/catch/123456/abcdef/",
    "events": ["PROJECT_CREATED"],
    "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 project is created, your webhook endpoint receives a POST request with this payload:
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "New Mobile App Project",
  "description": "Development of a new mobile application",
  "status": "active",
  "workspace": {
    "id": "345e6789-e89b-12d3-a456-426614174004",
    "name": "Development Team"
  },
  "client": {
    "id": "456e7890-e89b-12d3-a456-426614174001",
    "name": "Tech Startup Inc.",
    "email": "[email protected]",
    "phone": "+1-555-0123",
    "status": "active",
    "type": "company"
  },
  "defaultBillable": true,
  "defaultBillableRate": 75.0,
  "estimatedHours": 200.0,
  "estimatedBudget": 15000.0,
  "isPrivate": false,
  "createdAt": "2024-01-15T10:00:00.000Z",
  "updatedAt": "2024-01-15T10:00:00.000Z"
}

Payload Fields

id
string
Unique project identifier
name
string
Project name
description
string
Project description
status
string
Project status (active, inactive, completed, etc.)
workspace
object
Associated workspace information
client
object
Associated client information
defaultBillable
boolean
Whether time entries are billable by default
defaultBillableRate
number
Default hourly rate for billable time
estimatedHours
number
Estimated total hours for the project
estimatedBudget
number
Estimated total budget for the project
isPrivate
boolean
Whether the project is private
createdAt
string
ISO 8601 timestamp of project 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 “New Project” trigger
  2. Event Subscription: The integration subscribes to PROJECT_CREATED events
  3. Data Flow: New project 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 project data format used across all project 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