Common API Examples

This page provides unified examples showing how to perform common operations across all three Buzzy API approaches:

  • BuzzyFrameAPI (Async) - Client-side JavaScript API for Code Widgets

  • REST API - Direct HTTP API calls for external integrations

  • Node.js API Client - Convenience wrapper for Node.js applications

Each example shows the same operation implemented in all three formats, making it easy to choose the right approach for your use case.

Authentication Setup

Before using any of the APIs, you need to authenticate and obtain the necessary credentials.

BuzzyFrameAPI (Async)

const buzzyFrameAPI = new BuzzyFrameAPI();
await buzzyFrameAPI.initialise();

REST API

// Login to get auth credentials
const loginResponse = await fetch('https://your-buzzy-instance.com/api/login', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    email: '[email protected]',
    password: 'password'
  })
});
const { authToken, userId } = await loginResponse.json();

Node.js API Client

Contact Management CRUD Operations

Create a New Contact

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Read/Fetch Contacts

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Update a Contact

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Delete a Contact

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Data Filtering and Pagination

Filter Contacts by Company

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Paginated Results

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Organization and Team Management

Create an Organization

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Create a Team

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Add Team Members

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Linked Table Field Operations

Create Record with Linked Table Fields

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Error Handling Patterns

Handling Authentication Errors

BuzzyFrameAPI (Async)

REST API

Node.js API Client

File and Image Management (MicroAppChild)

Create File Attachment

BuzzyFrameAPI (Async)

REST API

Node.js API Client

List File Attachments

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Update File Attachment

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Delete File Attachment

BuzzyFrameAPI (Async)

REST API

Node.js API Client

Session Management

Logout User

BuzzyFrameAPI (Async) - for Code Widgets:

REST API - for direct HTTP calls:

Node.js API Client:

Advanced Team Management

Enforce Team Membership

BuzzyFrameAPI (Async) - for Code Widgets:

REST API - for direct HTTP calls:

Node.js API Client:

Get Team Members

BuzzyFrameAPI (Async) - for Code Widgets:

REST API - for direct HTTP calls:

Node.js API Client:

AI-Powered App Creation

Create App with Prompt

BuzzyFrameAPI (Async) - for Code Widgets:

REST API - for direct HTTP calls:

Node.js API Client:

S3 File Operations

Copy S3 File

BuzzyFrameAPI (Async) - for Code Widgets:

REST API - for direct HTTP calls:

Node.js API Client:

Upload File to S3

BuzzyFrameAPI (Async) - for Code Widgets:

REST API - for direct HTTP calls:

Node.js API Client:

See Also

Last updated