# convertSubContactToLinkedRelationship

Promote a relative (getContactConnections subContacts id) to its own contact, linked back as a related person; returns the link with `linkedContactId`. linkToExisting: true links the org's existing contact for the same person instead, and is refused when there is none.

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

## Variables

- `subContactId`: `String!` (required)
- `linkToExisting`: `Boolean`

## Response (data, an example)

```json
{
  "contactMutation": {
    "convertSubContactToLinkedRelationship": {
      "id": "<ID>",
      "linkedContactId": "<ID>"
    }
  }
}
```

## 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": "convertSubContactToLinkedRelationship",
    "variables": {
      "subContactId": "<String>"
    }
  }'
```
