---
title: "Mark document as favorite"
url: "https://docs.signnow.com/docs/favorites/operations/post-v2-documents-document_id-favorites"
type: "endpoint"
section: "favorites"
slug: "favorites/operations/post-v2-documents-document_id-favorites"
method: "POST"
path: "/v2/documents/{document_id}/favorites"
operation_id: "post-v2-documents-document_id-favorites"
authorization: "bearer"
---

# Mark document as favorite

`POST /v2/documents/{document_id}/favorites`

The endpoint is used to add the document to favorites.

## Authorization

bearer

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `document_id` | string | Yes | The ID of the document (40 characters). |

## Responses

### 201

Valid document unique id. 

### 400

* Invalid request with {document_unique_id} where user is not owner of document (The user did not upload the document)
* Request with Incorrect or missing token
* Invalid request with {document_unique_id} when Document placed not in the Documents folder(s)(Archive, Trash or Shared folders)

**Example** (`Request with Incorrect or missing token`)

```json
{
  "code": 1537,
  "error": "invalid_token"
}
```

**Example** (`Invalid request with {document_unique_id} where user is not owner of document (The user did not upload the document)`)

```json
{
  "errors": [
    {
      "code": 13044002,
      "message": "The user does not have access to the document."
    }
  ]
}
```

**Example** (`Invalid request with {document_unique_id} when Document placed not in the Documents folder(s)(Archive, Trash or Shared folders)`)

```json
{
  "errors": [
    {
      "code": 13044004,
      "message": "The document must be in the Documents folder or its sub-folder."
    }
  ]
}
```

### 403

Invalid request with {document_unique_id} when user does not have access to the Document

**Example** (`Invalid request with {document_unique_id} when user does not have access to the Document`)

```json
{
  "errors": [
    {
      "code": 13044003,
      "message": "The user does not have permission to the document."
    }
  ]
}
```

### 404

Invalid request with non-existent document unique id.

**Example** (`Invalid request with non-existent document unique id.`)

```json
{
  "errors": [
    {
      "code": 13047001,
      "message": "Document `bd54c722946d4361a1818ae8964867189f29ced1` is not found."
    }
  ]
}
```

## Code Examples

> Replace `$SIGNNOW_ACCESS_TOKEN` and any `{placeholder}` values before running.

### cURL

```bash
curl -X POST \
  "https://api.signnow.com/v2/documents/{document_id}/favorites" \
  -H "Authorization: Bearer $SIGNNOW_ACCESS_TOKEN" \
  -H "Content-Type: application/json"
```

---
*Full reference: https://docs.signnow.com/docs/favorites/operations/post-v2-documents-document_id-favorites*
