Skip to main content
Complete reference for all methods available in the buena-sdk package.

Installation & Setup

Core API Methods

All API methods are accessed through the DefaultApi instance.

Lead Management

list_leads(limit=None, offset=None, sort=None, order=None, search=None, company=None, status=None)

List all leads with optional filtering and pagination. Parameters:
Returns:
Example:
Errors:
  • ApiException(401) - Invalid API key
  • ApiException(403) - Insufficient permissions
  • ApiException(429) - Rate limit exceeded
  • ApiException(500) - Server error

create_lead(create_lead_request)

Create a new lead in your database. Parameters:
Returns:
Example:
Errors:
  • ApiException(400) - Invalid lead data (missing required fields)
  • ApiException(401) - Invalid API key
  • ApiException(409) - Lead with email already exists
  • ApiException(422) - Validation error (invalid email/phone format)
  • ApiException(429) - Rate limit exceeded
  • ApiException(500) - Server error

get_lead(lead_id)

Retrieve a specific lead by ID. Parameters:
Returns:
Example:
Errors:
  • ApiException(401) - Invalid API key
  • ApiException(404) - Lead not found
  • ApiException(500) - Server error

update_lead(lead_id, update_lead_request)

Update an existing lead’s information. Parameters:
Returns:
Example:
Errors:
  • ApiException(400) - Invalid update data
  • ApiException(401) - Invalid API key
  • ApiException(404) - Lead not found
  • ApiException(409) - Email already exists (if updating email)
  • ApiException(422) - Validation error
  • ApiException(500) - Server error

delete_lead(lead_id)

Permanently delete a lead from your database. Parameters:
Returns:
Example:
Errors:
  • ApiException(401) - Invalid API key
  • ApiException(404) - Lead not found
  • ApiException(500) - Server error

API Key Management

list_api_keys()

List all API keys for your account. Parameters: None Returns:
Example:
Errors:
  • ApiException(401) - Invalid API key
  • ApiException(403) - Insufficient permissions
  • ApiException(500) - Server error

create_api_key(create_api_key_request)

Create a new API key for your account. Parameters:
Returns:
Example:
Errors:
  • ApiException(400) - Invalid key data (missing name, invalid permissions)
  • ApiException(401) - Invalid API key
  • ApiException(403) - Insufficient permissions
  • ApiException(422) - Validation error
  • ApiException(500) - Server error

System Health

health_check()

Check the API system status and your connection. Parameters: None Returns:
Example:
Errors:
  • ApiException(500) - Server error
  • ApiException(503) - Service unavailable

Async Support

The SDK supports async/await patterns:

Error Handling

Comprehensive error handling patterns:

Pagination Helper

Configuration Options