Developer API

Integrate nly.kr PDF saving into your service.
The API doc_type=html or textonly, and depending on the type, html_content or text_contentis required.

01 Endpoint

POST https://nly.kr/api/pdf_save
Content-Type: application/x-www-form-urlencoded

02 Authentication

For authentication, send the API key using one of the following methods.

  • Header (recommended): X-API-Key: your_API_KEY
  • Header (Alternative): Authorization: Bearer your_API_KEY
  • Form Field: api_key=your_API_KEY
  • Common Header: Accept: application/json

Tip: Your API Key is available on My Dashboardand can be regenerated there.

03 Parameters

Field Type Required Description
api_key String Optional* API Key (can also be sent in a header)
doc_type String Yes Document type: html or text (The API accepts only these two)
doc_title String Optional Document title (default used if omitted)
html_content String Required if html doc_type=htmlrequired when selected
text_content String Required if text doc_type=textrequired when selected
is_private 0|1 Optional Visibility (default 0=public, 1=private)
password String Required if private is_private=1required when private (password)

* api_key can be sent in a header (recommended) or POST field.

04 Responses

Success (200 OK)

{
  "status": "success",
  "message": "Document saved.",
  "share_url": "https://nly.kr/pdf/view/Ab3XkQ9Z",
  "code": "Ab3XkQ9Z"
}

Error (4xx, 5xx)

{
  "status": "error",
  "message": "The API allows only html or text for doc_type."
}
400 : Bad Request (missing/invalid parameter)
401 : Unauthorized (missing/invalid API Key)
405 : Method Not Allowed
500 : Server Error

Code Examples v1.0

# ========================= # 1) Save HTML (default: public) # - For doc_type=html, use html_content # - is_private default: 0 (public) # ========================= curl -sS -X POST "https://nly.kr/api/pdf_save" \\ -d "api_key=your_API_KEY" \\ -d "doc_type=html" \\ -d "doc_title=API HTML Test" \\ -d "is_private=0" \\ -d "password=" \\ --data-urlencode 'html_content=<h1>Hello</h1><p>API save test</p>' # ========================= # 2) Save TEXT (default: public) # - For doc_type=text, use text_content # ========================= curl -sS -X POST "https://nly.kr/api/pdf_save" \\ -d "api_key=your_API_KEY" \\ -d "doc_type=text" \\ -d "doc_title=API TEXT Test" \\ -d "is_private=0" \\ -d "password=" \\ --data-urlencode 'text_content=Hello.\nThis text will be saved as a PDF.' # ========================= # 3) Private (password-protected) example # - password is required when is_private=1 # ========================= curl -sS -X POST "https://nly.kr/api/pdf_save" \\ -d "api_key=your_API_KEY" \\ -d "doc_type=html" \\ -d "doc_title=Private document" \\ -d "is_private=1" \\ -d "password=1234" \\ --data-urlencode 'html_content=<h1>Private</h1><p>Private document</p>'

Need help?

Contact us anytime if you have trouble integrating the API.

Contact us →