---
title: "Add metadata to a document"
method: PUT
path: "/document/{document_id}/metadata"
---

# Add metadata to a document

`PUT /document/{document_id}/metadata`

## Request

- Base URL: `https://api.signnow.com`
- URL: `https://api.signnow.com/document/{document_id}/metadata`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/signnow/apis/signnow-api/docs/document/:document_id/metadata/put.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint allows API users to add metadata to the selected document. All added metadata will be linked to the document during the [invite to sign](/docs/document-field-invite/operations/post-document-doc-id-invite). Also, if you'd like to use this metadata in any event subscription, you can add upon [creating a webhook](/docs/basic-auth/operations/create-event-subscription).

## Request body

- object
  - `key` string: Any type of metadata that should be added to the document. For example,`signer_id`.
  - `key1` string: Any type of metadata that should be added to the document. For example, `timestamp`.
  - `key2` string: Any type of metadata that should be added to the document. For example, `document_owner_id`.
  - `source` string, required: The object that uses this metadata. Allowed values: `webhook`.

## Response `200`

The metadata was added to the document.

- object
  - `success` boolean: Result of the request. Always `true`.

## Other responses

- `400`: * Incorrect or missing token. * Request with bearer token from another user. * Request without `source` key. * `source` is not a string.

---

[API](https://skmtc.dev/signnow/apis/signnow-api.md) - [All operations](https://skmtc.dev/signnow/apis/signnow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/signnow/apis/signnow-api/revisions/1c9c30a6142b?raw)
