New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

buildin-api-sdk

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

buildin-api-sdk

Official TypeScript/JavaScript SDK for Buildin API - Create, manage, and interact with Buildin pages, databases, and blocks

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

Buildin API SDK

Official TypeScript/JavaScript SDK for the Buildin API. Create, manage, and interact with Buildin pages, databases, and blocks programmatically.

Installation

npm install buildin-api-sdk

Quick Start

import { DefaultApi, Configuration } from 'buildin-api-sdk';

// Initialize the API client
const config = new Configuration({
  basePath: 'https://api.buildin.ai',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN'
  }
});

const api = new DefaultApi(config);

// Create a new page
const newPage = await api.createPage({
  parent: {
    type: 'page_id',
    page_id: 'parent-page-id'
  },
  properties: {
    title: {
      type: 'title',
      title: [{
        type: 'text',
        text: { content: 'My New Page' }
      }]
    }
  }
});

console.log('Created page:', newPage.id);

Authentication

To use the Buildin API, you need to obtain an API token:

  • Log in to your Buildin account
  • Go to Settings → Integrations
  • Create a new integration and copy the token
  • Use the token in your API requests

Available Methods

Pages

  • createPage() - Create a new page
  • updatePage() - Update an existing page
  • queryDatabase() - Query a database

Blocks

  • getBlockChildren() - Get child blocks of a page/block
  • appendBlockChildren() - Add child blocks to a page/block
  • updateBlock() - Update a block
  • deleteBlock() - Delete a block

Databases

  • createDatabase() - Create a new database
  • updateDatabase() - Update database properties
  • search() - Search for pages and databases

TypeScript Support

This SDK is written in TypeScript and includes full type definitions for all API methods and response objects.

import { Block, Page, Database } from 'buildin-api-sdk';

// All types are fully typed
const page: Page = await api.getPage('page-id');
const blocks: Block[] = await api.getBlockChildren('block-id');

Error Handling

try {
  const page = await api.createPage(pageData);
  console.log('Page created successfully');
} catch (error) {
  if (error.status === 401) {
    console.error('Invalid API token');
  } else if (error.status === 404) {
    console.error('Resource not found');
  } else {
    console.error('API error:', error.message);
  }
}

Examples

Check out the examples directory for complete usage examples including:

  • Creating and managing pages
  • Working with databases
  • Adding and updating blocks
  • Searching content

API Reference

For detailed API documentation, visit: Buildin API Documentation

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Keywords

buildin

FAQs

Package last updated on 18 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts