Update Hyperlinks Annotation
PDF4me → Update Hyperlinks Annotation
The Update Hyperlinks Annotation API updates hyperlink text and URLs in a PDF. You send the PDF (docContent Base64, docName), updatehyperlinkannotationlist (array of hyperlink update objects with SearchOn, SearchValue, IsExpression, TextCurrentValue, TextNewValue, URLCurrentValue, URLNewValue), and optionally async. The API returns the PDF with updated hyperlinks. Use the tester below to try it; more details are in the sections that follow.
Try the Update Hyperlinks Annotation API
Endpoint: POST /api/v2/UpdateHyperlinkAnnotation · Required: api-key, docContent, docName, updatehyperlinkannotationlist
Use the form below to send your API key, PDF (Base64), and array of hyperlink update objects. The response is the PDF with hyperlinks updated. No code required—fill the fields and click Send request.
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Update Hyperlinks Annotation?
This endpoint updates existing hyperlinks in a PDF by changing the display text and/or the URL destination. You provide the PDF (Base64) and updatehyperlinkannotationlist (array of hyperlink update objects). Each object specifies search criteria (SearchOn, SearchValue, IsExpression), current text/URL to find, and new text/URL (TextCurrentValue, TextNewValue, URLCurrentValue, URLNewValue). The API returns the PDF with matching hyperlinks updated.
Hyperlink update object structure
Each object in updatehyperlinkannotationlist should contain:
- SearchOn – Search criteria type (e.g. Text)
- SearchValue – Value to search for
- IsExpression – Whether to use expression matching
- TextCurrentValue – Current hyperlinked text to replace
- TextNewValue – New display text for the hyperlink
- URLCurrentValue – Current URL destination to replace
- URLNewValue – New URL destination
Use when you need to fix or bulk-update hyperlinks in a PDF (e.g. change old URLs to new ones). For webhook integration use Get Document from PDF4me.
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| docContent | base64 | Yes | PDF file content (Base64) containing hyperlinks. |
| docName | string | Yes | Output PDF file name (e.g. output.pdf). |
| updatehyperlinkannotationlist | array | Yes | Array of hyperlink update objects (SearchOn, SearchValue, IsExpression, TextCurrentValue, TextNewValue, URLCurrentValue, URLNewValue). |
| async | boolean | No | Enable asynchronous processing. |
When to use Update Hyperlinks Annotation
- Bulk URL updates – Change old URLs to new ones across many hyperlinks (e.g. domain change, redirects).
- Display text – Update the visible hyperlink text while keeping or changing the URL.
- Broken links – Fix broken or outdated links in PDFs before distribution.
- Template links – Update placeholder or template URLs in generated PDFs.
For request/response schemas and code samples, see Update Hyperlinks Annotation in the PDF4me API docs.
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- A PDF file in Base64 format containing hyperlinks
Response Format
The API returns a PDF file with updated hyperlinks.