Skip to content
HookDeploy
On this page

Members API

Manage organization members programmatically — invite, deactivate, and reactivate members via the HookDeploy REST API.

The Members API lets you manage your HookDeploy organization members programmatically. All endpoints require an API key created by an admin or super_admin.

Authentication

All requests require a bearer token:

Authorization: Bearer hd_live_xxxx

API keys are created in your HookDeploy dashboard under Settings → API Keys. Only keys created by admins or super_admins can manage members.

Common use cases

Employee onboarding

When a new developer joins, automatically add them to HookDeploy:

curl -X POST https://api.hookdeploy.dev/v1/members/invite \
  -H "Authorization: Bearer hd_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "newdev@yourcompany.com",
    "role": "developer"
  }'

Response:

{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "newdev@yourcompany.com",
    "role": "developer",
    "expires_at": "2026-06-01T00:00:00Z",
    "accept_url": "https://app.hookdeploy.dev/accept-invite/a1b2c3d4e5f6"
  }
}

The invitee receives an email with a link to accept. You can use the accept_url in your own onboarding email if preferred.

Employee offboarding

When a team member leaves, immediately revoke their access:

curl -X POST https://api.hookdeploy.dev/v1/members/deactivate \
  -H "Authorization: Bearer hd_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"email": "departed@yourcompany.com"}'

Access is revoked immediately. Their webhook history and audit log entries are preserved. The member can be reactivated at any time without a new invitation.

Reactivating a returning employee

When a team member returns, restore their access instantly:

curl -X POST https://api.hookdeploy.dev/v1/members/reactivate \
  -H "Authorization: Bearer hd_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"email": "returning@yourcompany.com"}'

They regain access immediately with their original role — no new invitation or email required.

Error handling

All errors follow this shape:

{
  "error": {
    "code": "error_code",
    "message": "Human-readable description"
  }
}

Handle idempotency in your integrations:

const response = await fetch('https://api.hookdeploy.dev/v1/members/invite', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ email, role }),
})

const data = await response.json()

if (!response.ok) {
  if (data.error.code === 'already_member') {
    // Already in the org — treat as success
    return
  }
  if (data.error.code === 'invite_pending') {
    // Already invited — treat as success or resend
    return
  }
  if (data.error.code === 'plan_limit') {
    // Upgrade required
    throw new Error('Member limit reached. Upgrade your HookDeploy plan.')
  }
  throw new Error(data.error.message)
}

Zapier integration

All three member management endpoints are available as Zapier actions. See the Zapier integration for setup instructions.

Example onboarding Zap

Trigger: New row in Google Sheets (employee tracker)
Action 1: HookDeploy — Invite Member
  • Email: {{Email column}}
  • Role: developer
Action 2: Gmail — Send Email
  • To: {{Email column}}
  • Body: Your HookDeploy invite: {{accept_url from Action 1}}

Example offboarding Zap

Trigger: Row updated in Google Sheets (status → "Departed")
Action: HookDeploy — Deactivate Member
  • Email: {{Email column}}

Example returning employee Zap

Trigger: Row updated in Google Sheets (status → "Active")
Action: HookDeploy — Reactivate Member
  • Email: {{Email column}}

See also