# POST /component-instances

**Resource:** [COMPONENTS](./components.md)  
**MCP tool:** `create_component_instance`  
**Scopes:** `products:write`  
**Write operation:** yes

Create a component instance (a unit / lab sample) for a job. REQUIRES both product_id and opportunity_id — an instance always belongs to a product and a specific opportunity. Carry result data in attributes.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `product_id` | body | string | yes |  |
| `opportunity_id` | body | string | yes |  |
| `label` | body | string | no |  |
| `status` | body | string | no |  |
| `attributes` | body | object | no |  |
| `external_ref` | body | string | no |  |
| `source` | body | string | no |  |

## Request example

```bash
curl -X POST   "https://api.trustpager.com/functions/v1/api/v1/component-instances"   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"product_id":"...","opportunity_id":"...","label":"..."}'
```

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