# LineHQ for developers

LineHQ answers your business calls. With its Public API, webhooks and MCP server, your own systems can use what happens on those calls: who rang, what they wanted and what to do next.

## What you can build

- **Call logging in your own tools.** Pull every call, with its AI summary, transcript and recording, into a CRM, helpdesk or spreadsheet LineHQ doesn't connect to.
- **Caller names from your records.** Keep LineHQ's contact directory in step with your own system, so calls and notifications name the caller.
- **Follow-ups that start themselves.** React the moment a call ends, a voicemail arrives or a transcript is ready.
- **Your own reporting.** Read call totals, the prepaid balance and receipts for your dashboards and accounts.

## Ways in

### Public API

Read the account, its numbers, calls, transcripts, text messages and inbox, and keep its contacts in step. Read the [API reference](https://linehq.co.uk/developers/reference), or download [openapi.json](https://linehq.co.uk/developers/openapi.json) for Postman, a code generator or an AI agent.

### Webhooks

LineHQ posts `call.ended`, `voicemail.received` and `transcript.ready` events to your HTTPS endpoint, each signed so you can check it came from LineHQ. Add endpoints on the Integrations page in the LineHQ portal, or through the API.

### MCP

An AI assistant such as Claude or ChatGPT can connect to a LineHQ account at `https://linehq.co.uk/mcp/account`, signing in with the account's own LineHQ login, to answer questions about it and make safe changes. [How to connect an AI assistant](https://linehq.co.uk/developers/mcp).

## Guides

- [Authentication](https://linehq.co.uk/developers/authentication): How to call the LineHQ Public API: API keys and their permissions, account roles, rate limits, errors, ids and pagination.
- [API reference](https://linehq.co.uk/developers/reference): Every LineHQ Public API endpoint: what it does, the API key permission it needs, its parameters, examples in curl, JavaScript and Python, and an example response.
- [Webhooks](https://linehq.co.uk/developers/webhooks): Receive LineHQ call events at your own HTTPS endpoint: the events, headers, signature check, retries and an example of each payload.
- [Connect an AI assistant (MCP)](https://linehq.co.uk/developers/mcp): Connect Claude or ChatGPT to a LineHQ account over MCP: how to connect, what it can and can't do, and what it costs.
- [Changelog](https://linehq.co.uk/developers/changelog): What has changed in the LineHQ Public API, with dates, and the promise about breaking changes.

## Get started

1. **Get an API key.** The account owner, or a member the owner allows, creates one in the LineHQ portal. Give it only the permissions your integration needs.
2. **Make your first request.** Send the key in the `Authorization` header of every request:

   ```bash
   curl "https://app.linehq.co.uk/api/v1/me" -H "Authorization: Bearer $LINEHQ_API_KEY" -H "Accept: application/json"
   ```

   It answers with the account and user the key belongs to, and the permissions the key holds.
3. **Build against the [reference](https://linehq.co.uk/developers/reference).** Every documented endpoint is tested against its documentation before each release.

## Raw data, or CRM Sync?

The API gives you raw data: calls, summaries, contacts and events, to use however you like. CRM Sync is LineHQ's managed alternative for supported CRMs: it matches each caller to a contact, creates contacts and writes a formatted note for every call, with nothing for you to build or keep running. If your CRM is supported, CRM Sync is usually the quicker route.
