Developer API

Push Leads & Appointments
Directly Into PocketBoss

Connect your lead providers, scheduling tools, and CRM platforms to PocketBoss with our REST API. Simple API key authentication, JSON payloads, instant results.

Instant Delivery

Leads and appointments appear in your dashboard immediately

API Key Auth

Secure Bearer token authentication on every request

Smart Dedup

Duplicate leads are merged automatically by email or phone

Quick Start

Three steps to your first integration.

1

Generate an API Key

In your PocketBoss dashboard, go to Profile → scroll to API Keys → click Generate Key. Choose which permissions to grant (Push Leads, Push Appointments, Read Appointments).

Keep your key safe. It's shown once at creation. If lost, delete it and generate a new one.

2

Authenticate Your Requests

Include your API key in every request as a Bearer token:

Authorization: Bearer YOUR_API_KEY
3

Send Your First Request

Push a lead or appointment using the endpoints below. All requests use JSON bodies with Content-Type: application/json.

Base URL

https://api.thepocketboss.com/api/v1

Push Leads

Create a new lead in the business CRM. Duplicates are automatically merged by email or phone.

POST/api/v1/leads

Request Body

{
  "firstName": "John",
  "lastName": "Smith",
  "email": "[email protected]",
  "phone": "5551234567",
  "source": "HomeAdvisor",
  "serviceRequested": "Kitchen Remodel",
  "notes": "Budget around 25k",
  "address": "123 Main St",
  "city": "Cleveland",
  "state": "TN",
  "zip": "37311",
  "urgency": "high",
  "externalId": "LEAD-12345"
}
  • *Required: firstName (or name) + at least one of email or phone
  • *All other fields are optional
  • *urgency: "low", "medium", "high", or "emergency"
  • *externalId: your system's ID for this lead, stored for reference
  • *If a lead with the same email or phone exists, their record is updated (not duplicated)

Response

POSTResponse

201 Created (or 200 Updated if duplicate)

{
  "success": true,
  "action": "created",
  "lead": {
    "id": "6a0698c96c24caa71a452d0a",
    "externalId": "LEAD-12345",
    "firstName": "John",
    "lastName": "Smith",
    "email": "[email protected]",
    "phone": "5551234567",
    "type": "lead",
    "status": "new",
    "source": "HomeAdvisor",
    "createdAt": "2026-05-15T03:53:45.108Z"
  }
}

All Supported Fields

FieldTypeDescription
firstName*stringFirst name (or use name for full name)
lastNamestringLast name
email*stringEmail (required if no phone)
phone*stringPhone (required if no email)
sourcestringLead provider name (e.g. "HomeAdvisor", "Thumbtack")
serviceRequestedstringWhat the customer needs
notesstringFree-text notes
address, city, state, zipstringCustomer address
urgencystringlow, medium, high, or emergency
propertyTypestringresidential, commercial, or business
preferredContactMethodstringcall, text, or email
externalIdstringYour system's ID for tracking
metadataobjectArbitrary key/value pairs stored on the contact

* At minimum: firstName (or name) + email or phone

Push Appointments

Create an appointment on the business calendar. A CRM contact is automatically matched or created by email/phone.

POST/api/v1/appointments

Request Body

{
  "title": "HVAC quarterly maintenance",
  "startDate": "2026-05-15T14:00:00Z",
  "duration": 90,
  "clientName": "Sarah Johnson",
  "clientEmail": "[email protected]",
  "clientPhone": "5551234567",
  "location": "123 Main St, NYC",
  "notes": "Pushed via Google Calendar sync",
  "category": "Maintenance",
  "externalId": "calendar-event-99887"
}
  • *Required: title, startDate (ISO 8601 datetime), clientName
  • *All other fields are optional
  • *duration is in minutes (default: 60). Alternatively send endDate
  • *Categories: Maintenance, Repair, Consultation, Installation, Service, Remodeling, Projects
  • *externalId: your system's ID for this event, stored for reference

Response

POSTResponse

201 Created

{
  "success": true,
  "action": "created",
  "appointment": {
    "id": "6a0698ed6c24caa71a453323",
    "externalId": "calendar-event-99887",
    "title": "HVAC quarterly maintenance",
    "startDate": "2026-05-15T14:00:00.000Z",
    "endDate": "2026-05-15T15:30:00.000Z",
    "duration": 90,
    "status": "Scheduled",
    "clientName": "Sarah Johnson",
    "clientEmail": "[email protected]",
    "category": "Maintenance",
    "source": "api",
    "createdAt": "2026-05-15T03:54:21.854Z"
  }
}

All Supported Fields

FieldTypeDescription
title*stringAppointment title / service name
startDate*stringISO 8601 datetime (e.g. 2026-05-15T14:00:00Z)
clientName*stringCustomer full name
endDatestringISO 8601 end time (or use duration)
durationnumberMinutes (default: 60)
clientEmailstringCustomer email
clientPhonestringCustomer phone
locationstringJob location address
notesstringFree-text notes
categorystringMaintenance, Repair, Consultation, Installation, Service, Remodeling, Projects
externalIdstringYour system's event ID for tracking
metadataobjectArbitrary key/value pairs

* Required fields

Error Handling

All errors return a JSON object with an error code and human-readable message.

StatusError CodeMeaning
400validation_errorMissing or invalid field. Check the field property for which one.
401unauthorizedMissing or invalid API key.
403forbiddenAPI key doesn't have permission for this endpoint.
409duplicate_leadExact duplicate (rare, usually dedup merges instead).
429rate_limitedToo many requests. Back off and retry.
500internal_errorSomething went wrong on our end. Retry or contact support.

Good to Know

Rate Limits

Requests are rate-limited per API key. If you hit a 429, back off for a few seconds and retry. Normal integrations won't hit limits.

Email Notifications

Business owners receive an email notification for each new lead and appointment pushed via the API. This can be toggled per API key.

Deduplication

Leads are matched by email first, then phone. If a match is found, the existing contact is updated with new info instead of creating a duplicate.

CRM Integration

Appointments auto-create or match a CRM contact by email/phone. Every API action is logged in the customer's CRM timeline.

Ready to Integrate?

Log in to your PocketBoss account, generate an API key, and start pushing leads in minutes.