---
title: Apply Headers and Footers on DOCX API
slug: add-header-footer-to-docx
url: https://apyhub.com/apyhub/service/add-header-footer-to-docx
provider: ApyHub
categories: [File Conversion, File Manipulation]
tags: [docx, headers, footers, table-of-contents, document-processing, word-processing]
auth: api_key
---

# Apply Headers and Footers on DOCX API

Add text or PNG headers and footers to DOCX files, from upload or URL. Return a modified document or a downloadable URL.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/stamp/docx/footers/file` | What it does Uploads a DOCX file, adds the requested header/footer content to it, and returns the m… | 100 |
| POST | `/stamp/docx/footers/file/url` | What it does Uploads a DOCX file, adds header and/or footer content to it, and returns a URL to the… | 100 |
| POST | `/stamp/docx/footers/url/file` | What it does Adds a header and/or footer to a DOCX file fetched from a public URL, then returns the… | 100 |
| POST | `/stamp/docx/footers/url` | What it does Adds a header and/or footer to a DOCX file provided by URL, then returns a JSON object… | 100 |

## About

## 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.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/add-header-footer-to-docx
