---
title: "APIs, SDK & MCP | Owlie"
description: "Reach Owlie from your code through a GraphQL API or an MCP endpoint for agents, with a typed TypeScript SDK in preparation. Every API key is a service account that can do only what its roles allow."
canonical: "https://owlie.com/integrations/apis"
---

APIs, SDK & MCP

# Your code can do what its roles allow.

Every API key is a service account that starts with no roles. Code reaches Owlie through GraphQL, MCP or, once it is published, a typed TypeScript SDK, and each call can do only what that account’s roles allow.

[Sign Up Free](https://owlie.com/signup) [Read the API and agents guide](https://owlie.com/docs/developers/connectors/api-and-agents)

Access

## An API key is a service account with roles.

Creating an API key creates a service account and its key together, and the new account starts with no roles.

### Roles set what a key can do.

You assign roles to the key’s service account, the key can do exactly what they allow, and a call outside them fails as an authorization error.

### Shown once.

A key is shown once when it is created, can carry an expiry date, and stops working when it is revoked or expires.

### Keys don’t act as people.

A key can’t act on behalf of a person. Acting as someone means signing in as them.

### In the header.

Send the key as `Authorization: Owlie` followed by the key, or as a Bearer token for clients that only send Bearer.

A key can do whatever its roles permit, including deciding a review or an approval, so give a key only the roles its job needs.

Ways in

## Code reaches Owlie through GraphQL or MCP, with a typed SDK on the way.

GraphQL and MCP reach the same authenticated API the dashboard uses, and every call is authorized as the key’s service account.

### GraphQL

Send queries and mutations to `https://<your Owlie domain>/api/graphql`, where your Owlie domain is the host you sign in at. The API covers most of the product’s operations, and a few stay in the dashboard. Most lists page with cursors and return no total; counts are separate queries.

This query lists active people, a page at a time:

```graphql
query Identities($first: Int, $after: String, $filter: JSONObject) {
  identities(first: $first, after: $after, filter: $filter) {
    data { id email display_name status lifecycle_state }
    pageInfo { hasNextPage nextCursor }
  }
}
```

Variables: `{ "first": 100, "filter": { "status": "ACTIVE" } }`. Send it as JSON with the key in the Authorization header.

[Browse the GraphQL schema](https://owlie.com/docs/api/graphql-schema)

### MCP for agents

An MCP client connects to `https://<your Owlie domain>/api/mcp` with an API key, and the agent works as that key’s service account. The endpoint speaks JSON-RPC over HTTP POST, one message per request.

Each request carries these headers:

```http
POST https://<your Owlie domain>/api/mcp
Authorization: Owlie <API key>
Content-Type: application/json
```

A client’s first three calls initialize, list the tools, and ask who the agent is running as:

```json
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"my-client","version":"0.0.0"}}}

{"jsonrpc":"2.0","id":4,"method":"tools/list"}

{"jsonrpc":"2.0","id":5,"method":"tools/call","params":{"name":"owlie_whoami","arguments":{}}}
```

Send each line as the body of its own POST.

The last call returns the identity of the service account the agent runs as.

### TypeScript SDK

A typed SDK wraps the same API in the product’s own words, as `sdk.area.verb()` calls with typed inputs and results. The SDK package isn’t published yet; this is how a call will look.

```typescript
import { OwlieSDK } from "@owlieapp/sdk";

const sdk = new OwlieSDK({
  apiKey: process.env.OWLIE_API_KEY!,
  tenantDomain: "<your Owlie domain>",
});

for await (const identity of sdk.identities.list({
  filter: { status: "ACTIVE" },
})) {
  console.log(identity.email);
}
```

Errors come back as one typed error with a code you can check, the SDK doesn’t retry for you, and `sdk.raw_query()` sends any GraphQL document the typed methods don’t cover.

## An agent has no special status.

An agent connected over MCP works as its key’s service account, and its calls run at once under that account’s roles, with no per-call confirmation.

### Give it only what it needs.

Because nothing pauses an MCP call for approval, an agent’s key should hold only the roles its job needs.

### Decisions stay with people.

Over MCP, an agent can read review and ticket queues and reassign work, but it can’t decide a review, a ticket or a policy exception.

### Code without the key.

For work across many records, an agent writes a short TypeScript program that runs in a sandbox with no network access and can’t read the key.

### Counts are separate queries.

Lists come back one bounded page at a time with no total, and counts come from separate queries, so an agent doesn’t count from one page.

In the dashboard, the assistant asks before sensitive changes. [AI & Agents](https://owlie.com/platform/ai)

Inside Owlie

## Your code can also run inside Owlie.

Functions are your own TypeScript, run by Owlie in a sandbox at points such as an approval, a fulfillment or a reaction.

### No webhooks; a reaction instead.

Owlie has no webhooks or event feed. To tell your system something happened, a reaction runs a Function that calls a host you’ve allowed.

### Owlie access without a key.

A Function given roles calls Owlie through a client Owlie provides at run time, with no API key to store or copy.

[Functions & OXL](https://owlie.com/platform/extensibility)

Related pages:

- [AI & Agents](https://owlie.com/platform/ai)
- [Functions & OXL](https://owlie.com/platform/extensibility)
- [Build your own connector](https://owlie.com/integrations/custom)
- [Security](https://owlie.com/security)

## Make one call.

Sign up free, create an API key, give its service account one role, and ask over MCP who it’s running as.

[Sign Up Free](https://owlie.com/signup) [Read the API and agents guide](https://owlie.com/docs/developers/connectors/api-and-agents)
