PacteryDevelopers

파일 업로드

POST /v1/files

PDF를 업로드하고, 반환된 url문서 생성file_url로 넘기면 그 PDF가 문서 본문이 됩니다. 본문 HTML 대신 완성된 PDF로 서명을 받을 때 사용합니다.

요청

multipart/form-datafile 파트에 PDF를 담아 보냅니다.

curl https://api.pactery.com/v1/files \
  -H "Authorization: Bearer sk_live_..." \
  -F "file=@contract.pdf;type=application/pdf"

응답 (201)

{
  "id": "file_2m...",
  "object": "file",
  "url": "https://files.pactery.com/file_2m...",
  "byte_size": 184223,
  "expires_at": "2026-06-06T09:30:00+09:00"
}

url은 한시적으로 유효합니다. 만료 전에 문서 생성에 사용하세요.

제한

항목
형식 application/pdf
최대 크기 20MB

에러

code 의미
unsupported_file_type PDF가 아님
file_too_large 20MB 초과