# auth.md — Agent Registration & Authentication Standard

> Complete specification for autonomous AI agent registration, identity assertion, and API credential management at **The AI Call**.

---

## 1. Overview & Audience

This document provides registration and authentication instructions for autonomous AI agents, LLM crawlers, and machine-to-machine integrations accessing **The AI Call** platform APIs and voice automation infrastructure.

- **Issuer**: `https://theaicall.com`
- **Protected Resource**: `https://theaicall.com`
- **OAuth Authorization Server Metadata**: [/.well-known/oauth-authorization-server](https://theaicall.com/.well-known/oauth-authorization-server)
- **Protected Resource Metadata (RFC 9728)**: [/.well-known/oauth-protected-resource](https://theaicall.com/.well-known/oauth-protected-resource)

---

## 2. Agent Registration & Provisioning

Agents can register programmatically or request API credentials through the following endpoint:

- **Registration Endpoint**: `https://theaicall.com/contact`
- **Registration Methods**: `identity_assertion` (ID-JAG / verified_email) or `anonymous` (ephemeral tokens)

---

## 3. Supported Authentication Flow Types

### Option A: Bearer Token Authorization (Recommended)

Pass access tokens in the HTTP `Authorization` header:

```http
Authorization: Bearer <YOUR_ACCESS_TOKEN>
```

### Option B: API Key Header

Pass standard API key headers for Edge Function calls:

```http
apikey: <YOUR_API_KEY>
Authorization: Bearer <YOUR_API_KEY>
```

---

## 4. Identity Assertion Protocols

1. **ID-JAG (`urn:ietf:params:oauth:token-type:id-jag`)**:
   - `identity_types_supported`: `["identity_assertion"]`
   - `assertion_types_supported`: `["urn:ietf:params:oauth:token-type:id-jag", "verified_email"]`
   - `credential_types_supported`: `["bearer", "api_key"]`
2. **Anonymous / Ephemeral Access**:
   - `identity_types_supported`: `["anonymous"]`
   - `credential_types_supported`: `["ephemeral_token"]`

---

## 5. Metadata Index & Specifications

- **OpenID Configuration**: `https://theaicall.com/.well-known/openid-configuration`
- **OAuth 2.0 Authorization Server**: `https://theaicall.com/.well-known/oauth-authorization-server`
- **OAuth Protected Resource**: `https://theaicall.com/.well-known/oauth-protected-resource`
- **API Catalog (RFC 9727)**: `https://theaicall.com/.well-known/api-catalog`
- **MCP Server Card (SEP-1649)**: `https://theaicall.com/.well-known/mcp/server-card.json`
- **Agent Skills Index**: `https://theaicall.com/.well-known/agent-skills/index.json`
