apyhub
FILE CONVERSION · FILE MANIPULATION

Apply Headers and Footers on DOCX API

Hosted on ApyHub

What it does

DOCX Header Footer adds headers, footers, and optional table-of-contents support to a DOCX file. Send a DOCX by upload or by public URL, choose text or PNG images for the header and footer, and get back either a modified file or a downloadable URL.

Use header_text and footer_text when you want running labels such as CONFIDENTIAL or Page {page}. If you prefer branded documents, provide header_image or footer_image on upload, or header_image_url and footer_image_url for URL-based requests. You can also set header_alignment and footer_alignment to left, center, or right to control placement.

The service supports two input modes: file upload or publicly accessible DOCX URL. Depending on the endpoint, the output is either a binary DOCX download or an object containing a url to the generated document. That makes it useful for report generation, contract assembly, or internal document workflows where every file needs consistent branding and page labels.

If your document needs an index, set include_table_of_content to insert a table of contents at the beginning before the file is returned.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.