attach_operator_channel
Attach a notification/dispatch channel to an operator so PCC knows how to ping them when a job lands. The operator's onboarding agent calls this AFTER the conversation that produced the channel record. Transport is a small stable enum (webhook|email|sms|voice|push|mqtt|file|manual) — vendor specifics live in the free-form describe field, written by the operator's agent. PCC the substrate stays neutral. Returns the channel record with a generated id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Operator slug (typically the operator's address or unique identifier). | |
| label | Yes | Short human label shown to the operator and in admin UIs: 'Front counter printer', 'Owner's phone'. | |
| enabled | No | Whether the channel is live (defaults to true). | |
| describe | Yes | Plain-English instructions for how PCC should talk to whatever is on the other end. Written by the operator's onboarding agent. Required, ≥4 chars. Example: 'POST JSON with keys order_id, line_items[], deadline_iso. I will POST back {order_id, status} to your reply URL.' | |
| endpoint | No | Transport-specific routing payload. webhook→{url}, email→{address}, sms/voice→{phoneE164}, push→{token,platform}, mqtt→{brokerUrl,topic}, file→{scheme,path}, manual→{}. | |
| direction | No | out=PCC pushes only; in-out=operator's system also replies; in=operator pushes unsolicited. | |
| transport | Yes | Which wire does the message go over. `manual` = no machine endpoint (dashboard-only). | |
| credentialRef | No | Reference to a secret in the credential vault (not the secret itself). PCC resolves it at dispatch time. | |
| replyContract | No | Optional operator-authored contract describing how the operator's system will respond to evidence requests, status pings, etc. |