---
title: "Add or remove ids on one of a construct's multi-link fields"
method: POST
path: "/api/v2/construct/{id}/links/{field}"
tags: ["Construct"]
---

# Add or remove ids on one of a construct's multi-link fields

`POST /api/v2/construct/{id}/links/{field}`

## Request

- Base URL: `https://www.onlyworlds.com`
- URL: `https://www.onlyworlds.com/api/v2/construct/{id}/links/{field}`
- Auth: API key in header `API-Key` and API key in header `API-Pin`

## Path parameters

- `id` string, uuid, required
- `field` 'characters' | 'objects' | 'locations' | 'species' | 'creatures' | 'institutions' | 'traits' | 'collectives' | 'zones' | 'abilities' | 'phenomena' | 'languages' | 'families' | 'relations' | 'titles' | 'constructs' | 'events' | 'narratives', required

## Headers

- `If-Match` string
- `X-OW-Agent` string

## Request body

- LinkOperation: Atomic add/remove on one multi-link field. Adds dedupe; removes of absent ids are tolerated. Added ids must exist in this world.
  - `add` string[]
  - `remove` string[]

## Response `200`

Updated: the full element.

- Construct: A construct as the API returns it. Single links are an id or null, multi links an array of ids; extension fields appear inline. `?fields=` returns only the named keys, and `?expand=` replaces the named links' ids with ElementStub objects.
  - `type` 'construct', required
  - `id` string, uuid, required
  - `name` string, required: Name of the element.
  - `description` string, required: Any kind of details about the element.
  - `supertype` string, required: The top level category to which the element belongs.
  - `subtype` string, required: The sub level category through which the element is further classified.
  - `image_url` string, required: URL to an image representing the element.
  - `rationale` string, required: The internal reasoning, structure, or justification of how the construct functions or makes sense within the world.
  - `history` string, required: The historical development or ideation of the construct, and its place in wider historical contexts.
  - `status` string, required: The present condition or operational status of the construct.
  - `reach` string, required: The geographic, cultural, or political extent of the construct's influence.
  - `start_date` integer, nullable, required: The point in time when the construct began or was first established (uses world's TIME definition).
  - `end_date` integer, nullable, required: The point in time when the construct ceased to function or lost its meaning.
  - `founder` string, uuid, nullable, required: Character who conceived or initiated the construct. A Character's id.
  - `custodian` string, uuid, nullable, required: Institution maintaining, enforcing, or exploiting the construct. An Institution's id.
  - `characters` string[], required: Characters relevant to the construct. Character ids.
  - `objects` string[], required: Objects relevant to the construct. Object ids.
  - `locations` string[], required: Locations relevant to the construct. Location ids.
  - `species` string[], required: Species relevant to the construct. Species ids.
  - `creatures` string[], required: Creatures relevant to the construct. Creature ids.
  - `institutions` string[], required: Institutions relevant to the construct. Institution ids.
  - `traits` string[], required: Traits relevant to the construct. Trait ids.
  - `collectives` string[], required: Collectives relevant to the construct. Collective ids.
  - `zones` string[], required: Zones relevant to the construct. Zone ids.
  - `abilities` string[], required: Abilities relevant to the construct. Ability ids.
  - `phenomena` string[], required: Phenomena relevant to the construct. Phenomenon ids.
  - `languages` string[], required: Languages relevant to the construct. Language ids.
  - `families` string[], required: Families relevant to the construct. Family ids.
  - `relations` string[], required: Relations relevant to the construct. Relation ids.
  - `titles` string[], required: Titles relevant to the construct. Title ids.
  - `constructs` string[], required: Other constructs relevant to the construct. Construct ids.
  - `events` string[], required: Events relevant to the construct. Event ids.
  - `narratives` string[], required: Narratives relevant to the construct. Narrative ids.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `change_seq` integer, required: The world change sequence at this element's last write.
  - `created_by` string, uuid, nullable, required: The world membership that created this element, or null when the world's owner did.
  - `changed_by` string, uuid, nullable, required: The world membership that last changed this element, or null when the world's owner (or the server) did, or no write has touched it since doors were recorded.
  - `changed_via` 'seat' | 'mcp' | 'declared' | 'api' | 'v1' | 'sync' | 'server' | 'null', nullable, required: The door of the last change: `seat` (an agent seat), `mcp` (the MCP server), `declared` (the request sent an X-OW-Agent header), `api`, `v1`, `sync` (the mobile app's sync) or `server` (the server, on its own behalf). The first three mean an agent made it. Null: no write since doors were recorded.
  - `known_of` true: Present, and true, only on an element this reader knows of but does not see whole: a guest or player reaches it only because its own Character's sheet links to it (one step out). Such a row keeps `id`, `type`, `name`, `description`, `supertype`, `subtype`, `image_url`, `created_at`, `updated_at` and `change_seq`, and its type's public fields (none for a construct); every other field reads as unset (text "", numbers and single links null, multi links [], `created_by`, `changed_by` and `changed_via` null, no extension fields), its files are 404, and search matches only what it keeps. Absent: the element is whole. Any other grant (it names the reader's Character, the reader knows it, it is on the roster, the reader made it) makes it whole; a hidden element is never even a stub, whatever its public fields. Read-only: a write carrying `known_of` is refused (`known_of_not_writable`).

## Other responses

- `400`: A link names an element that does not exist in this world (code invalid_link).
- `401`: Missing, invalid or revoked credential, or a wrong PIN (authentication_error; code key_revoked for a revoked key, invalid_credentials otherwise).
- `403`: The credential is valid but lacks the scope: a read key on a write route (permission_error). Or a contributor or guest key changed, replaced, relinked or deleted an element someone else created (code not_author); those members change only their own, and, for an agent seat the owner gave a Character, that Character (never deleting it).
- `404`: Not found in this world (not_found).
- `412`: If-Match named a change_seq the element has moved past (precondition_failed); nothing was written. The body carries the envelope and, beside it, `current`: the element as it is now.
- `422`: Invalid request: unknown or read-only field, bad value, unknown query parameter, over-long text, extensions over the size cap (invalid_request); `param` names the culprit.
- `429`: Too many failed PIN attempts; see the Retry-After header (rate_limited). Or too many requests: over the request budget (code too_many_requests, type rate_limited): 300 requests a minute per key or account token, 60 a minute per address for a request with neither. Retry after the Retry-After header's seconds.
- `503`: The server is busy: every request slot stayed full for 10 s (code server_busy, type api_error). Retry after the Retry-After header's seconds.

## Changes

- **2026-10-20** `78df39c4c62e`: 8 warning
  - added the new `known_of_not_writable` enum value to the `allOf[subschema #1: Error]/error/code` response property for the response status `412`
  - added the new `known_of_not_writable` enum value to the `error/code` response property for the response status `400`
  - added the new `known_of_not_writable` enum value to the `error/code` response property for the response status `401`
  - added the new `known_of_not_writable` enum value to the `error/code` response property for the response status `403`
  - …4 more
- **2026-10-20** `4dd5b1cd0687`: 16 warning, 2 info
  - added the new `character_taken` enum value to the `allOf[subschema #1: Error]/error/code` response property for the response status `412`
  - added the new `character_taken` enum value to the `error/code` response property for the response status `400`
  - added the new `character_taken` enum value to the `error/code` response property for the response status `401`
  - added the new `character_taken` enum value to the `error/code` response property for the response status `403`
  - …14 more

[Operation history](https://skmtc.dev/onlyworlds/apis/onlyworlds-api/changes/api/v2/construct/:id/links/:field/post.md)

---

[API](https://skmtc.dev/onlyworlds/apis/onlyworlds-api.md) · [All operations](https://skmtc.dev/onlyworlds/apis/onlyworlds-api/llms.txt) · [OpenAPI document](https://skmtc.dev/onlyworlds/apis/onlyworlds-api/revisions/1752622ae8ce?raw)
