---
title: "Add Line Numbers"
method: POST
path: "/api/v1/tools/add-line-numbers"
tags: ["tools"]
---

# Add Line Numbers

`POST /api/v1/tools/add-line-numbers`

## Request

- Base URL: `https://toolforte.com`
- URL: `https://toolforte.com/api/v1/tools/add-line-numbers`
- Auth: HTTP bearer

Put a sequential number in front of every line of a text, with a chosen first number, step and separator. Blank lines can keep their place without taking a number, and the numbers can be padded so the text after them lines up. Use it to cite log lines, contract clauses or manuscript lines.

## Request body

- object
  - `text` string
  - `start` integer
  - `step` integer
  - `separator` string
  - `skipEmptyLines` boolean
  - `padNumbers` boolean

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `result` string
    - `lines` integer
    - `numbered` integer
    - `lastNumber` integer

## Other responses

- `400`: Missing or invalid request fields
- `401`: Invalid or missing API key
- `429`: Monthly plan limit reached

---

[API](https://skmtc.dev/toolforte/apis/toolforte-api.md) · [All operations](https://skmtc.dev/toolforte/apis/toolforte-api/llms.txt) · [OpenAPI document](https://skmtc.dev/toolforte/apis/toolforte-api/revisions/4d814d484dfc?raw)
