Skip to main content
GET
/
api
/
v1
/
operations
/
crm
/
settings
curl -X GET "https://app.lance.so/api/v1/operations/crm/settings" \
  -H "Authorization: Bearer <token>"
{
  "connected": true,
  "provider": "bullhorn",
  "connectedAt": "2024-01-15T10:30:00.000Z",
  "apiKeyMasked": "********************abc1"
}
This endpoint allows you to manage CRM integration settings for your organization. You can retrieve current settings, connect a new CRM provider, or disconnect an existing CRM integration.

Authentication

All endpoints require authentication. The orgId must be present in the authenticated session.
Requests without valid authentication will receive a 400 Bad Request response with the message “Organization ID required”.

Get CRM Settings

Retrieve the current CRM settings for your organization. Returns connection status, provider type, and a masked API key for security.

Response

connected
boolean
required
Indicates whether a CRM is currently connected and enabled for the organization.
provider
string | null
required
The CRM provider currently configured. Returns null if no CRM is connected.Allowed values:
  • close - Close CRM
  • bullhorn - Bullhorn CRM
  • null - No CRM connected
connectedAt
string
ISO-8601 timestamp of when the CRM was connected. Only present if a CRM is connected. Example: 2024-01-15T10:30:00.000Z
apiKeyMasked
string | null
A masked version of the API key showing only the last 4 characters for verification purposes. Returns null if no API key is configured. Example: ********************abc1
curl -X GET "https://app.lance.so/api/v1/operations/crm/settings" \
  -H "Authorization: Bearer <token>"
{
  "connected": true,
  "provider": "bullhorn",
  "connectedAt": "2024-01-15T10:30:00.000Z",
  "apiKeyMasked": "********************abc1"
}

Save CRM Settings

Connect a CRM provider to your organization by saving the provider type and API credentials.

Request

provider
string
required
The CRM provider to connect. Allowed values: - close - Close CRM - bullhorn - Bullhorn CRM
apiKey
string
required
The API key or authentication token for the CRM provider. Must be a non-empty string.
Store API keys securely. They are stored in Clerk organization metadata and only the masked version is returned in GET responses.

Response

success
boolean
required
Indicates the settings were saved successfully. Always true for successful responses.
provider
string
required
The CRM provider that was configured. Allowed values: close, bullhorn
connectedAt
string
required
ISO-8601 timestamp of when the CRM was connected. Example: 2024-01-15T10:30:00.000Z
curl -X POST "https://app.lance.so/api/v1/operations/crm/settings" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "provider": "bullhorn",
    "apiKey": "your-api-key-here"
  }'
{
  "success": true,
  "provider": "bullhorn",
  "connectedAt": "2024-01-15T10:30:00.000Z"
}

Disconnect CRM

Disconnect the CRM integration from your organization. This removes all CRM settings including the stored API key.

Response

success
boolean
required
Indicates the CRM was successfully disconnected. Always true for successful responses.
disconnected
boolean
required
Confirms the CRM has been disconnected. Always true for successful responses.
curl -X DELETE "https://app.lance.so/api/v1/operations/crm/settings" \
  -H "Authorization: Bearer <token>"
{
  "success": true,
  "disconnected": true
}

Error Codes

Status CodeError CodeDescription
400VALIDATION_ERRORInvalid request body, missing required fields, or missing authentication
500INTERNAL_ERRORServer error while processing the request

Supported CRM Providers

ProviderValueDescription
ClosecloseClose CRM - Sales communication platform
BullhornbullhornBullhorn CRM - Staffing and recruiting software

Notes

  • CRM settings are stored in Clerk organization private metadata
  • API keys are never returned in full - only masked versions are available via the GET endpoint
  • Disconnecting a CRM removes all settings; you’ll need to reconfigure if reconnecting
  • Each organization can only have one CRM provider connected at a time