PDF.co Web API (Application Programming Interface)

Get Your Free API Key

Supported Formats

json

Errors

Code Description
401 unauthorized
404 record not found

Examples

POST /api/v1/templates/726b835a/use
{
  "roles": [
    {
      "role": "Client",
      "name": "Super Company, Inc.",
      "email": "contracts@example.com"
    },
    {
      "role": "Contractor",
      "name": "Alyssa French",
      "email": "alyssa@example.com"
    }
  ],
  "fields": [
    {
      "s1_t1": "Brett Wheeler (CEO)"
    }
  ]
}
200
{
  "document": {
    "id": "bd2a126ae563e95827045a5faf040595cb09791db49400b125",
    "title": "Information_Technology_Professional_Services_Agreement.pdf",
    "created_at": "2017-12-02T15:44:26.463Z",
    "updated_at": "2017-12-02T15:44:26.537Z",
    "executed_document_url": null,
    "executed_document_hash": null,
    "fields": [
      {
        "role": "Client",
        "height": 63.33262935586062,
        "width": 130.5427666314678,
        "x": 46.853220696937704,
        "y": 725.4171066525871,
        "page": 1,
        "type": "signature",
        "name": "s1_s1",
        "transparent": true,
        "user_id": null
      },
      {
        "role": "Contractor",
        "height": 63.33262935586062,
        "width": 130.5427666314678,
        "x": 416.5089757127772,
        "y": 717.9852164730729,
        "page": 1,
        "type": "signature",
        "name": "s2_s1",
        "transparent": true,
        "user_id": null
      },
      {
        "role": "Client",
        "height": 21.972544878563887,
        "width": 344.4519535374868,
        "x": 75.28827877507919,
        "y": 179.3347412882788,
        "page": 0,
        "type": "text",
        "name": "s1_t1",
        "transparent": true,
        "prefilled": "Brett Wheeler (CEO)",
        "user_id": null
      },
      {
        "role": "Contractor",
        "height": 10.986272439281944,
        "width": 355.4382259767687,
        "x": 77.22703273495249,
        "y": 202.92291446673707,
        "page": 0,
        "type": "text",
        "name": "s2_t1",
        "transparent": true,
        "user_id": null
      },
      {
        "role": "Client",
        "height": 10.986272439281944,
        "width": 102.75395987328406,
        "x": 342.8363252375924,
        "y": 402.2914466737065,
        "page": 0,
        "type": "date",
        "name": "s1_d1",
        "transparent": true,
        "user_id": null
      },
      {
        "role": "Client",
        "height": 10.986272439281944,
        "width": 113.74023231256601,
        "x": 68.17951425554382,
        "y": 414.24709609292506,
        "page": 0,
        "type": "date",
        "name": "s1_d2",
        "transparent": true,
        "user_id": null
      }
    ],
    "include_certificate": true,
    "created_from": "api",
    "executed_at": null,
    "created_from_id": null,
    "sender": {
      "id": "6b4de21ebd4db5cd",
      "name": "Brett Wheeler",
      "email": "contracts@example.com"
    },
    "recipients": [
      {
        "name": "Super Company, Inc.",
        "email": "contracts@example.com",
        "invitation_url": "http://pdf.co/invite/2b12ad972c5238d6f9705d80f03131e38aa4572adcc4473cca",
        "status": "pending",
        "id": null
      },
      {
        "name": "Alyssa French",
        "email": "alyssa@example.com",
        "invitation_url": "http://pdf.co/invite/71b90355552d29bc332f0bf2e24c90c32f54a6c1f9605dcfe2",
        "status": "pending",
        "id": null
      }
    ],
    "status": "pending"
  }
}

Params

Param name Description
id
required

Document template id

  • Must be a String

title
optional

New document title

  • Must be a String

roles
required

Roles data

  • Must be an Array of nested elements

roles[role]
required

Role name

  • Must be a String

roles[name]
required

Signer name

  • Must be a String

roles[email]
required

Signer email

  • Must be a String