Setting up webhook via API

Manage webhooks programmatically using the Webhook API.

Available Endpoints

MethodEndpointDescription
POST/settings/v1/webhooksCreate a webhook
GET/settings/v1/webhooksList all webhooks
GET/settings/v1/webhooks/{webhookId}Get a specific webhook
PUT/settings/v1/webhooks/{webhookId}Update a webhook
DELETE/settings/v1/webhooks/{webhookId}Delete a webhook

Authentication

  • API Key (X-API-KEY header), or
  • OAuth 2.0
ScopeOperations
settings.readList and get webhooks
settings.writeCreate and update webhooks
settings.deleteDelete webhooks

The account must include Webhooks, and the caller needs access to Settings.


Create Webhook

Request Body

FieldTypeRequiredDescription
namestringYesDescriptive name for the webhook
urlstringYesHTTPS endpoint URL
featureTypestringYesusers, forms, time_activity, shift_scheduler, tasks, or chat
entityIdstringNoPreferred scope ID. For Time Activity, use the Time Clock ID as a string, for example "67". Omit it for a broadcast subscription
objectIdintegerNoDeprecated. Legacy numeric scope ID. Use entityId
eventTypesarrayYesAt least one event type to subscribe to
webhookVersionintegerNoPayload schema version. Defaults to 1
isDisabledbooleanNoSet to true to create the webhook disabled. Defaults to false
secretKeystringNoShared value sent unchanged in the x-webhook-secret request header. This is not an HMAC signature

Example: Create Users Webhook

curl --request POST \
  --url https://api.connecteam.com/settings/v1/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '{
    "name": "User Sync Webhook",
    "url": "https://your-endpoint.com/webhooks/users",
    "featureType": "users",
    "eventTypes": ["user_created", "user_updated", "user_deleted"]
  }'

Example: Create Time Activity Webhook

curl --request POST \
  --url https://api.connecteam.com/settings/v1/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '{
    "name": "Time Clock Events",
    "url": "https://your-endpoint.com/webhooks/timeclock",
    "featureType": "time_activity",
    "entityId": "12345678",
    "eventTypes": ["clock_in", "clock_out", "admin_add", "admin_edit", "user_add_request", "admin_day_locked", "user_timesheet_approved"]
  }'

Update Webhook

Update any field of an existing webhook. Only include fields you want to change.

curl --request PUT \
  --url https://api.connecteam.com/settings/v1/webhooks/493 \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '{
    "url": "https://new-endpoint.com/webhooks",
    "isDisabled": true
  }'

Example: Add Time Activity events to an existing webhook

GET the webhook first, then PUT the previous eventTypes plus the new names. Events you omit are no longer delivered.

curl --request PUT \
  --url https://api.connecteam.com/settings/v1/webhooks/493 \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: YOUR_API_KEY' \
  --data '{
    "eventTypes": [
      "clock_in",
      "clock_out",
      "admin_add",
      "user_add_request",
      "user_edit_request",
      "user_delete_request",
      "admin_declined_add_request",
      "admin_declined_edit_request",
      "admin_declined_delete_request",
      "admin_day_locked",
      "admin_day_unlocked",
      "user_timesheet_submitted",
      "user_timesheet_unsubmitted",
      "user_timesheet_approved",
      "user_timesheet_reopened"
    ]
  }'

Get Webhook

Response

{
  "requestId": "42q3457b-z12c-1136-aeve-e0d433524457",
  "id": 493,
  "name": "Test users webhook",
  "userId": 9170357,
  "timeCreated": 1734074315,
  "url": "https://webhook.site/test",
  "isDisabled": false,
  "featureType": "users",
  "entityId": null,
  "objectId": null,
  "retryLimit": 3,
  "webhookVersion": 1,
  "eventTypes": [
    "user_created",
    "user_updated",
    "user_deleted"
  ]
}

Response Fields

FieldTypeDescription
idintegerUnique webhook identifier
namestringWebhook name
userIdintegerID of user who created the webhook
timeCreatedintegerUnix timestamp of creation
urlstringWebhook endpoint URL
isDisabledbooleanWhether webhook is disabled
featureTypestringFeature type
entityIdstringPreferred scope ID. null for a broadcast subscription
objectIdintegerDeprecated legacy numeric scope ID
retryLimitintegerMaximum retry count. The default is 3 after the initial attempt
webhookVersionintegerPayload schema version
eventTypesarraySubscribed event types

Scope and delivery security

For a webhook scoped to one Time Clock, set entityId to that Time Clock ID as a string. Omit both entityId and the deprecated objectId to receive matching events from all supported entities in the company.

When secretKey is set, Connecteam sends that exact value in the x-webhook-secret header. It does not sign or hash the request body. Compare the received header to your stored secret with a constant-time comparison.

import { timingSafeEqual } from 'node:crypto';

function hasValidWebhookSecret(request) {
  const received = Buffer.from(request.headers['x-webhook-secret'] || '');
  const expected = Buffer.from(process.env.CONNECTEAM_WEBHOOK_SECRET);
  return received.length === expected.length && timingSafeEqual(received, expected);
}
📝

Receiver checklist

  • Return any 2xx response within 10 seconds, then process the event asynchronously.
  • Retries resend the same JSON and may arrive without a fixed delay.
  • 404 is treated as permanent and is not retried. Other failures may be retried up to 3 times.
  • requestId is a correlation ID, not a globally unique event ID. Different events caused by one action can share it.
  • For idempotency, combine requestId with eventType and the affected entity or date range.

Event Types by Feature

users

EventDescription
user_createdNew user added
user_updatedUser profile modified
user_deletedUser permanently deleted
user_archivedUser archived
user_restoredUser unarchived
user_promotedUser promoted to admin
user_demotedAdmin demoted to user

forms

EventDescription
form_submissionNew form submitted
form_submission_editedSubmission edited by user
manager_field_updatedManager fields updated

time_activity

EventDescription
clock_inUser clocked in
clock_outUser clocked out
auto_clock_outAutomatic clock out
admin_addAdmin added time entry
admin_editAdmin edited time entry
admin_deleteAdmin deleted time entry
admin_approved_add_requestAdmin approved add request
admin_approved_edit_requestAdmin approved edit request
admin_approved_delete_requestAdmin approved delete request
admin_declined_requestGeneric decline (kept for existing subscriptions). Prefer the three specific decline events below
auto_approved_add_requestAuto-approved add request
auto_approved_edit_requestAuto-approved edit request
auto_approved_delete_requestAuto-approved delete request
admin_approved_clock_out_outside_geo_fence_requestAdmin approved geo-fence override
auto_approved_clock_out_outside_geo_fence_requestAuto-approved geo-fence override
admin_approved_clock_out_without_nfc_requestAdmin approved NFC override
auto_approved_clock_out_without_nfc_requestAuto-approved NFC override
user_add_requestUser submitted an add request (pending)
user_edit_requestUser submitted an edit request (pending)
user_delete_requestUser submitted a delete request (pending)
admin_declined_add_requestAdmin declined a user add request
admin_declined_edit_requestAdmin declined a user edit request
admin_declined_delete_requestAdmin declined a user delete request
admin_day_lockedAdmin locked a day or period for a user
admin_day_unlockedAdmin unlocked a day or period for a user
user_timesheet_submittedUser submitted a timesheet for approval
user_timesheet_unsubmittedUser withdrew a submitted timesheet
user_timesheet_approvedAdmin approved a user's timesheet
user_timesheet_reopenedAdmin reopened a user's timesheet

See the Time activity webhook guide for payload examples, including request lifecycle and timesheet period events.

shift_scheduler

EventDescription
shift_createdNew shift created
shift_updatedShift modified
shift_deletedShift deleted
availability_status_createdAvailability added
availability_status_deletedAvailability removed

tasks

EventDescription
task_publishedTask published
task_completedTask marked complete

chat

📘

See also

See the Chat webhook guide for payloads and examples.

EventDescription
message_createdNew message posted
message_updatedMessage content edited
message_deletedMessage deleted
conversation_createdConversation created
conversation_updatedConversation edited, locked/unlocked, or renamed
conversation_deletedConversation deleted

API Reference


Did this page help you?