> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.ragieai.core.PatchDocumentMetadata

- Component: `appmixer.ragieai.core.PatchDocumentMetadata`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.ragieai 1.1.4](https://connectors.appmixer.com/connector/appmixer.ragieai/1.1.4.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.ragieai/1.1.4/component/appmixer.ragieai.core.PatchDocumentMetadata>

Update metadata on a document. Performs a partial update of the document's metadata. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Keys set to null are deleted. Maximum 1000 total values allowed, inclusive of existing metadata.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Document Id (`documentId`) | text | The ID of the document to update |
| Metadata (`metadata`) | textarea | The metadata to update on the document. Performs a partial update of the document's metadata. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. Keys set to null are deleted. 1000 total values are allowed, inclusive of existing metadata. Each item in an array counts towards the total. The following keys are reserved for internal use: document_id, document_type, document_source, document_name, document_uploaded_at. If the document is managed by a connection, this operation will extend a metadata overlay which is applied to the document any time the connection syncs the document. |
| Async (`async`) | toggle | Whether to run the metadata update asynchronously. If true, the metadata update will be run in the background and the response will be 202. If false, the metadata update will be run synchronously and the response will be 200. |

## Output ports

### Port `out`

_No fields defined for this port._

## Full metadata (component.json)

```json
{
  "name": "appmixer.ragieai.core.PatchDocumentMetadata",
  "author": "Appmixer <info@appmixer.com>",
  "description": "Update metadata on a document. Performs a partial update of the document's metadata. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Keys set to null are deleted. Maximum 1000 total values allowed, inclusive of existing metadata.",
  "version": "1.0.0",
  "private": false,
  "auth": {
    "service": "appmixer:ragieai"
  },
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string"
          },
          "metadata": {
            "type": "string"
          },
          "async": {
            "type": "boolean"
          }
        },
        "required": [
          "documentId",
          "metadata"
        ]
      },
      "inspector": {
        "inputs": {
          "documentId": {
            "type": "text",
            "tooltip": "The ID of the document to update",
            "label": "Document Id",
            "index": 0
          },
          "metadata": {
            "type": "textarea",
            "tooltip": "The metadata to update on the document. Performs a partial update of the document's metadata. Keys must be strings. Values may be strings, numbers, booleans, or lists of strings. Numbers may be integers or floating point and will be converted to 64 bit floating point. Keys set to null are deleted. 1000 total values are allowed, inclusive of existing metadata. Each item in an array counts towards the total. The following keys are reserved for internal use: document_id, document_type, document_source, document_name, document_uploaded_at. If the document is managed by a connection, this operation will extend a metadata overlay which is applied to the document any time the connection syncs the document.",
            "label": "Metadata",
            "index": 1
          },
          "async": {
            "type": "toggle",
            "tooltip": "Whether to run the metadata update asynchronously. If true, the metadata update will be run in the background and the response will be 202. If false, the metadata update will be run synchronously and the response will be 200.",
            "label": "Async",
            "index": 2
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out"
    }
  ],
  "icon": "(data URI omitted)"
}
```
