Developer Documentation

Build on LineAI

Complete API reference, SDKs, and technical documentation for building custom applications on LineAI's operational memory infrastructure.

Quick Start

Get up and running in minutes with our REST API or official SDKs.

1. Get API Credentials

# From LineAI dashboard
Settings → API Keys → Generate

2. Install SDK

# npm
npm install @lineai/sdk
# Python
pip install lineai

3. Make First Call

const
client = new LineAI()
const data = await
  client.memory.query()

Complete Example

import { LineAI } from '@lineai/sdk';
const client = new LineAI({
  apiKey: process.env.LINEAI_API_KEY
});
// Query operational memory
const response = await client.memory.query({
  query: "What projects are blocked?",
  context: "active_projects"
});
console.log(response.results);

API Reference

Authentication

Base URL: https://api.getline.ai/v1

Auth Header: Authorization: Bearer YOUR_API_KEY

Rate Limits

  • • Standard: 1000 requests/hour
  • • Burst: 100 requests/minute
  • • High-Volume: 10,000 requests/hour (contact us)

Example Request

curl -X POST https://api.getline.ai/v1/memory/query \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "What's blocked?"}'

Projects Endpoint

GET /v1/projects

List all projects with status, progress, team, and blockers.

{
  "data": [
    {
      "id": "proj_abc123",
      "name": "Henderson Renovation",
      "status": "active",
      "progress": 0.67
    }
  ]
}

POST /v1/projects

Create a new project with name, budget, timeline, and team members.

{
  "name": "New Project",
  "description": "Description",
  "budget": 500000,
  "start_date": "2025-02-01",
  "team_members": ["user_123"]
}

Operational Memory

POST /v1/memory/query

Query operational memory using natural language. Returns contextualized results with recommendations.

Request

{
  "query": "What projects are
    currently blocked?",
  "context": "active_projects",
  "max_results": 10
}

Response

{
  "results": [
    {
      "project": "Henderson",
      "blockers": [...]
    }
  ],
  "summary": "2 projects blocked"
}

Memory Cards API

Portable units of operational context that work with any LLM or AI system (ChatGPT, Claude, MCP-compatible).

GET /v1/memory/cards/{card_id}

{
  "card_id": "card_henderson_project",
  "contents": {
    "project_overview": {...},
    "current_status": {...},
    "team_members": [...],
    "blockers": [...]
  }
}

Webhooks

Setup

Receive real-time notifications for project updates, blockers, memory snapshots, and more.

POST /v1/webhooks
{
  "url": "https://yourapp.com/webhook",
  "events": [
    "project.updated",
    "project.blocker.added",
    "memory.snapshot.completed"
  ]
}

Payload Example

{
  "event": "project.blocker.added",
  "timestamp": "2025-01-20T14:30:00Z",
  "data": {
    "project_id": "proj_abc123",
    "blocker": {
      "description": "Awaiting approval",
      "priority": "medium"
    }
  }
}

Event Types

Project Events

  • • project.created
  • • project.updated
  • • project.blocker.added
  • • project.blocker.resolved

Memory Events

  • • memory.snapshot.completed
  • • memory.card.updated
  • • integration.sync.completed

Official SDKs

JavaScript / TypeScript

// Installation
npm install @lineai/sdk
// Usage
import { LineAI } from '@lineai/sdk';
const client = new LineAI({
  apiKey: process.env.LINEAI_API_KEY
});
// Query memory
const response = await client.memory.query({
  query: "What's blocked?"
});

Python

# Installation
pip install lineai
# Usage
from lineai import LineAI
client = LineAI(
  api_key=os.environ['LINEAI_API_KEY']
)
# Query memory
response = client.memory.query(
  query="What's blocked?"
)

Security Best Practices

DO

  • • Store API keys in environment variables
  • • Use separate keys for dev/staging/production
  • • Rotate keys periodically
  • • Scope keys to minimum required permissions
  • • Always verify permissions in your backend

DON'T

  • • Commit API keys to version control
  • • Share API keys across teams
  • • Use production keys in development
  • • Hardcode keys in application code
  • • Expose API keys in frontend code

Resources & Support

Documentation

  • • API Reference
  • • SDK Documentation
  • • Guides & Tutorials
  • • Example Projects

Community

  • • Discord Community
  • • GitHub Discussions
  • • Stack Overflow
  • • Example Code Repos

Support

  • • Email: developers@getline.ai
  • • Response: <24 hours
  • • Priority for enterprise
  • • API Status Page