POST
/
pdf
/
markdown
curl --request POST \
  --url https://www.refile.co/api/v1/pdf/markdown \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "markdown": "<string>",
  "output": "binary",
  "theme": "modern",
  "pageNumeration": "center",
  "pageSize": "A4"
}'
{
  "url": "https://files.refile.co/pdf/a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6.pdf"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Markdown content and formatting options
markdown
string
required

The markdown content to convert to PDF.

Minimum length: 1
output
enum<string>
default:binary

The format of the output. URL will return a direct link to the PDF, binary returns the PDF directly.

Available options:
binary,
url
theme
enum<string>
default:modern

The theme to use for the PDF.

Available options:
basic,
modern
pageNumeration
enum<string>
default:center

The position of the page numeration.

Available options:
none,
center,
left,
right
pageSize
enum<string>
default:A4

The size of the page to use for the PDF.

Available options:
A0,
A1,
A2,
A3,
A4,
A5,
A6,
A7,
A8,
A9,
Letter,
B1,
B2,
B3,
B4,
B5,
B6,
Ledger,
Legal,
Executive,
Folio,
Tabloid

Response

200
application/pdf
PDF generated successfully

Generated PDF file (when output=binary)