# copySpaceItem

Copy a FILE into a folder or root you can edit. The copy is yours and starts with no sharing; copying somewhere with a different audience needs MANAGER on the source unless it was already open to the whole team, and an AI agent can never make that kind of copy. Folders cannot be copied yet.

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

## Variables

- `input`: `CopySpaceItemInput!` (required)
  - `itemId`: `ID!` (required)
  - `destination`: `SpaceDestinationInput!` (required)
    - `spaceId`: `ID!` (required)
    - `folderId`: `ID`. Null for the space root.

## Response (data, an example)

```json
{
  "spacesMutation": {
    "copy": {
      "id": "<ID>",
      "spaceId": "<ID>",
      "spaceName": "…",
      "parentId": "<ID>",
      "kind": "FOLDER",
      "name": "…",
      "description": "…",
      "fileType": "…",
      "sizeBytes": 0,
      "accessMode": "INHERIT",
      "systemLocked": true,
      "viewerRole": "VIEWER",
      "abilities": {
        "addChildren": true,
        "edit": true,
        "move": true,
        "trash": true,
        "share": true
      },
      "owner": {
        "id": "<ID>",
        "name": "…"
      },
      "createdBy": {
        "kind": "PERSON",
        "label": "…"
      },
      "childCount": 0,
      "shareCount": 0,
      "currentVersion": {
        "id": "<ID>",
        "versionNumber": 0
      },
      "path": [
        {
          "id": "<ID>",
          "name": "…"
        }
      ],
      "updatedAt": "2026-01-01T00:00:00.000Z",
      "trashedAt": "2026-01-01T00:00:00.000Z"
    }
  }
}
```

## 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": "copySpaceItem",
    "variables": {
      "input": {
        "itemId": "<itemId>",
        "destination": {
          "spaceId": "<spaceId>"
        }
      }
    }
  }'
```
