Logo
Accusoft API Documentation

Find and Replace Text (Beta)

POST {{editor_base_url}}/api/v1/documents/{{documentId}}/actions/findAndReplace

https://api.accusoft.com/editor/docs/#api-Documents-findAndReplace

This endpoint is intended to be used by a server-side process that has exclusive access to a document. It is typically used to prepare a document before creating a session for an end user to edit it, or to finalize a document before downloading it into your application.

Note: This endpoint changes the document and assumes that nothing else (like an editing session or another call to this endpoint) will be making changes to the document at the same time.

  • DO NOT call this endpoint if an end user is actively editing the document.
  • DO NOT make concurrent calls to this endpoint for the same document.

If you do these things, changes to the document may not be applied correctly.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string




RESPONSES

status





Curl
curl -X POST 'editor_base_url/api/v1/documents/documentId/actions/findAndReplace' -H 'Content-Type: application/json' -d '{"rules":[{"find":{"text":"\u003c\u003cfirst_name\u003e\u003e"},"replaceWith":{"text":"John"}},{"find":{"text":"\u003c\u003clast_name\u003e\u003e"},"replaceWith":{"text":"Doe"}}]}'

ENDPOINTS