> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bizbionic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# A2A RPC

> Agent Card, provision, and first skill call.

# A2A RPC quick start

## Prerequisites

* HTTPS client (`curl`, SDK, or agent runtime)

## Steps

### 1. Discover

```bash theme={null}
curl -s https://app.bizbionic.com/.well-known/agent.json | head -c 800
```

### 2. Provision (optional if you already have a key)

```bash theme={null}
curl -s -X POST https://app.bizbionic.com/rpc \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"agent.provision","params":{"name":"Docs Demo","source":"curl","permissions":"full"}}'
```

Store `api_key` immediately.

### 3. Authenticated call

```bash theme={null}
export BB_API_KEY='bb_…'

curl -s -X POST https://app.bizbionic.com/rpc \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $BB_API_KEY" \
  -d '{"jsonrpc":"2.0","id":2,"method":"billing.balance","params":{}}'
```

### TypeScript

```ts theme={null}
const res = await fetch('https://app.bizbionic.com/rpc', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    Authorization: `Bearer ${process.env.BB_API_KEY}`,
  },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'billing.balance',
    params: {},
  }),
});
const body = await res.json();
```

### 4. First send (minimal)

After provision, a real SMS needs a **consented contact**, a **sender**, and (for marketing) **outside quiet hours** (9pm–8am recipient local):

```bash theme={null}
# Contact + consent
curl -s -X POST https://app.bizbionic.com/rpc \
  -H "Authorization: Bearer $BB_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":3,"method":"contacts.create","params":{"phone_e164":"+14155550100","name":"Jamie","consent_status":"express","consent_method":"web_form","consent_source":"api"}}'

# Sender (auto from messaging profile when available)
curl -s -X POST https://app.bizbionic.com/rpc \
  -H "Authorization: Bearer $BB_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":4,"method":"phone-numbers.ensureDefault","params":{}}'

# Send — use message_intent notifications|otp|delivery for essential traffic (skips marketing quiet hours)
curl -s -X POST https://app.bizbionic.com/rpc \
  -H "Authorization: Bearer $BB_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":5,"method":"messages.send","params":{"to":"+14155550100","message":"Hello from BizBionic. Reply STOP to opt out.","message_intent":"notifications"}}'
```

Complete [Trust Setup](/compliance/trust-setup) (brand / 10DLC) for reliable US deliverability. Sends may succeed with a compliance **warning** until brand is approved.

## Common failures

* **401** — missing key → [Authentication](/authentication). `agent.provision` and `partner.register` are the only skills that work without a key.
* **QUIET\_HOURS** — marketing blocked 9pm–8am local; use essential `message_intent` or wait / schedule.
* **NO\_CONSENT / Contact not found** — create contact + opt-in first.
* **No sender** — call `phone-numbers.ensureDefault` or assign a number.
* **-32601** — wrong method name → Agent Card / [API Reference](/api-reference)

## Next steps

* [Trust Setup](/compliance/trust-setup) before production marketing volume
* [Partner](/connect/partner-platform) if multi-tenant
