# POST /scheduling/bookings/:booking_id/link-opportunity

**Resource:** [SCHEDULING](./scheduling.md)  
**MCP tool:** `link_booking_to_opportunity`  
**Scopes:** `scheduling:write`  
**Write operation:** yes

Attach an existing booking to an opportunity — repairs a mis-linked booking (e.g. deal_id came back null) without cancelling and recreating it, which would re-fire client-facing confirmations. Only sets deal_id; contact_id/customer_id are backfilled from the opportunity only when the booking is missing them.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `booking_id` | path | string | yes | Booking UUID to attach (required). |
| `opportunity_id` | body | string | yes | Opportunity UUID to attach the booking to (required). |
| `require_approval` | body | boolean | no | Optional. Set true to route this write into the approval queue for human review instead of executing it immediately (returns 202 + an approval_id). Works even when your key/token has permission to execute directly. |

## Request example

```bash
curl -X POST   "https://api.trustpager.com/functions/v1/api/v1/scheduling/bookings/:booking_id/link-opportunity"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"opportunity_id":"..."}'
```

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`