# linkContactAsRelatedPerson

Connect linkedContactId to parentContactId as a related person, with an optional relation label. A pair already connected is refused ("already linked"). Writes the connection only.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "linkContactAsRelatedPerson", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `parentContactId`: `ID!` (required)
- `linkedContactId`: `ID!` (required)
- `relation`: `String`

## Response (data, an example)

```json
{
  "contactMutation": {
    "linkContactAsRelatedPerson": {
      "id": "<ID>",
      "parentContactId": "<ID>",
      "linkedContactId": "<ID>",
      "relation": "…"
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "linkContactAsRelatedPerson",
    "variables": {
      "parentContactId": "<parentContactId>",
      "linkedContactId": "<linkedContactId>"
    }
  }'
```
