> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/web/annotation/annotation-state.md).

# PDF Annotation Statuses

Enhance your PDF workflow with annotation statuses like Accepted, Rejected, and Completed. Learn how to customize and update states programmatically on web. The Apryse Web SDK streamlines secure, serv

The annotation statuses/states provide a built-in way to create review and approval workflows. The default states are: `Accepted`, `Rejected`, `Cancelled`, `Completed`, and `None`. These statuses are part of PDF specification which is why they are included as the default. However, it is possible to customize this list.

![](https://3532544125-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX9YnTSKIHvV7m0A36LbO%2Fuploads%2Fgit-blob-d39ddc857708506483dc971ba2568e235018a2c0%2F6cac478beed4d9768a3c37da8456e3e38dc461f6-572x1042.gif?alt=media)

## Programmatically update annotation state

We can set the annotation state programmatically by calling [updateAnnotationState](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#updateAnnotationState__anchor).

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
WebViewer(...)
  .then(instance => {
    const { documentViewer, annotationManager, Annotations } = instance.Core;

    documentViewer.addEventListener('annotationsLoaded', () => {
      const annotList = annotationManager.getAnnotationsList();
      const annot = annotList[0];
      annotationManager.updateAnnotationState(annot, 'Completed');
    });
  });
```

{% endcode %}
{% endtab %}
{% endtabs %}

[annotationManager.getAnnotationsList](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#getAnnotationsList__anchor) [annotationManager.updateAnnotationState](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#updateAnnotationState__anchor)

## Customizing states

With WebViewer 11.13+, you can customize which annotation statuses appear in the Notes Panel status filter by using the [setStatusList](https://sdk.apryse.com/api/web/UI.NotesPanel.html#.setStatusList__anchor) API. Pass an array of statuses from `UI.NotesPanel.StatusList` to control which options are shown.

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
WebViewer(...)
  .then(instance => {
    const { StatusList } = instance.UI.NotesPanel;
    instance.UI.NotesPanel.setStatusList([
      StatusList.ACCEPTED,
      StatusList.REJECTED,
    ]);
  });
```

{% endcode %}
{% endtab %}
{% endtabs %}

To reset the status list and show all available statuses, pass all values from `UI.NotesPanel.StatusList`.

{% tabs %}
{% tab title="JavaScript" %}
{% code lineNumbers="true" %}

```js
WebViewer(...)
  .then(instance => {
    const { StatusList } = instance.UI.NotesPanel;
    instance.UI.NotesPanel.setStatusList(Object.values(StatusList));
  });
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Relevant APIs

[updateAnnotationState](https://sdk.apryse.com/api/web/Core.AnnotationManager.html#updateAnnotationState__anchor) To update annotation state.

[getState](https://sdk.apryse.com/api/web/Core.Annotations.StickyAnnotation.html#getState__anchor) To get annotation state.

[getStateModel](https://sdk.apryse.com/api/web/Core.Annotations.StickyAnnotation.html#getStateModel__anchor) To get annotation state model.

[setState](https://sdk.apryse.com/api/web/Core.Annotations.StickyAnnotation.html#setState__anchor) To set annotation state.

[setStateModel](https://sdk.apryse.com/api/web/Core.Annotations.StickyAnnotation.html#setStateModel__anchor) To set annotation stateModel.

[setStatusList](https://sdk.apryse.com/api/web/UI.NotesPanel.html#.setStatusList__anchor) To customize the available annotation statuses.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/web/annotation/annotation-state.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
