{
  "openapi": "3.1.0",
  "info": {
    "title": "Linkjar API",
    "version": "1.0.0",
    "description": "Publish documents as tracked links and read who opened them. Docs: https://linkjar.com/docs/api/"
  },
  "servers": [
    {
      "url": "https://linkjar.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key (lj_\u2026) or an OAuth access token."
      }
    }
  },
  "paths": {
    "/api/v1/me": {
      "get": {
        "operationId": "me",
        "summary": "Who the token belongs to",
        "description": "The signed-in user and the workspace the API acts on. A quick way to check a key works.",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "bearer": [
              "read"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Who the token belongs to",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user": {
                      "type": "object",
                      "properties": {
                        "email": {
                          "type": "string"
                        }
                      }
                    },
                    "workspace": {
                      "type": "object",
                      "properties": {
                        "uuid": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "plan": {
                          "type": "string"
                        }
                      }
                    },
                    "app_url": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "user": {
                    "email": "you@acme.com"
                  },
                  "workspace": {
                    "uuid": "0b5f\u2026",
                    "name": "Acme",
                    "plan": "Pro"
                  },
                  "app_url": "{base}"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/documents": {
      "get": {
        "operationId": "list_documents",
        "summary": "List documents",
        "description": "Published documents in the workspace, newest first.",
        "tags": [
          "Documents"
        ],
        "security": [
          {
            "bearer": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Only titles containing this text.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1\u2013100, default 20.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List documents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "documents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "link": {
                            "type": "string"
                          },
                          "slug": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "views": {
                            "type": "integer"
                          },
                          "created": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "documents": [
                    {
                      "title": "Acme proposal",
                      "link": "https://pdflink.to/acme-proposal/",
                      "slug": "acme-proposal",
                      "kind": "html",
                      "views": 3,
                      "created": "2026-10-15"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "limit is not a number.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "publish",
        "summary": "Publish a document",
        "description": "Publishes a file or an HTML page and returns its link. Send either JSON with `html` (one complete, self-contained HTML document) or multipart/form-data with a `file`: PDF, Word, PowerPoint, Excel, .html/.htm, or a .zip of a website with index.html at its top. Office files are converted to PDF first (`status` is `Converting` for a minute or two; the link works once it's done). Every upload is scanned; a page held for review has `review_status: \"held\"` until approved. Settings that need a paid plan are checked before anything is created.",
        "tags": [
          "Documents"
        ],
        "security": [
          {
            "bearer": [
              "write"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Publish a document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "link": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "uuid": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "review_status": {},
                    "views": {
                      "type": "integer"
                    },
                    "created": {
                      "type": "string"
                    },
                    "settings_url": {
                      "type": "string"
                    },
                    "settings": {
                      "type": "object",
                      "properties": {
                        "password": {
                          "type": "boolean"
                        },
                        "require_email": {
                          "type": "boolean"
                        },
                        "allowed_email_domains": {
                          "type": "string"
                        },
                        "expires_at": {},
                        "cta_label": {
                          "type": "string"
                        },
                        "cta_url": {
                          "type": "string"
                        }
                      }
                    },
                    "warnings": {
                      "type": "array",
                      "items": {}
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "title": "Acme proposal",
                  "link": "https://pdflink.to/acme-proposal/",
                  "slug": "acme-proposal",
                  "uuid": "6f1c2d9e-8a7b-4c3d-9e2f-1a2b3c4d5e6f",
                  "kind": "html",
                  "status": "Published",
                  "review_status": null,
                  "views": 3,
                  "created": "2026-10-15T09:00:00+00:00",
                  "settings_url": "{base}/document/6f1c2d9e-8a7b-4c3d-9e2f-1a2b3c4d5e6f/update/",
                  "settings": {
                    "password": false,
                    "require_email": false,
                    "allowed_email_domains": "",
                    "expires_at": null,
                    "cta_label": "Book a call",
                    "cta_url": "https://cal.com/you/intro"
                  },
                  "warnings": [],
                  "message": "Published \"Acme proposal\": https://pdflink.to/acme-proposal/"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "No html or file, an unsupported file type, or a bad setting.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Document limit reached, or a setting needs a paid plan (`upgrade_url` included).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "More than 30 publishes in an hour.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Title shown to viewers."
                  },
                  "html": {
                    "type": "string",
                    "description": "The page (JSON only), up to 5 MB."
                  },
                  "password": {
                    "type": "string",
                    "description": "Visitors need this password to open the link (4+ characters)."
                  },
                  "require_email": {
                    "type": "boolean",
                    "description": "Ask viewers for their email first (Pro)."
                  },
                  "allowed_email_domains": {
                    "type": "string",
                    "description": "Only accept emails at these comma-separated domains, e.g. \"acme.com, acme.co.uk\"."
                  },
                  "expires_on": {
                    "type": "string",
                    "description": "YYYY-MM-DD after which the link stops working (paid plans)."
                  },
                  "cta_label": {
                    "type": "string",
                    "description": "Call-to-action button text, e.g. \"Book a call\"."
                  },
                  "cta_url": {
                    "type": "string",
                    "description": "Where the button goes (full https:// URL)."
                  }
                }
              },
              "example": {
                "title": "Acme proposal",
                "html": "<!doctype html><html><head><title>Acme proposal</title></head><body>\u2026</body></html>",
                "cta_label": "Book a call",
                "cta_url": "https://cal.com/you/intro"
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The file to publish."
                  },
                  "title": {
                    "type": "string",
                    "description": "Optional. Defaults to the page <title> or the file name."
                  },
                  "password": {
                    "type": "string",
                    "description": "Visitors need this password to open the link (4+ characters)."
                  },
                  "require_email": {
                    "type": "string",
                    "description": "Ask viewers for their email first (Pro)."
                  },
                  "allowed_email_domains": {
                    "type": "string",
                    "description": "Only accept emails at these comma-separated domains, e.g. \"acme.com, acme.co.uk\"."
                  },
                  "expires_on": {
                    "type": "string",
                    "description": "YYYY-MM-DD after which the link stops working (paid plans)."
                  },
                  "cta_label": {
                    "type": "string",
                    "description": "Call-to-action button text, e.g. \"Book a call\"."
                  },
                  "cta_url": {
                    "type": "string",
                    "description": "Where the button goes (full https:// URL)."
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/documents/{ref}": {
      "get": {
        "operationId": "get_document",
        "summary": "Get a document",
        "description": "A document with its link, status, view count and link settings.",
        "tags": [
          "Documents"
        ],
        "security": [
          {
            "bearer": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The document: its link, slug (the part after the domain) or id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Get a document",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "link": {
                      "type": "string"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "uuid": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "review_status": {},
                    "views": {
                      "type": "integer"
                    },
                    "created": {
                      "type": "string"
                    },
                    "settings_url": {
                      "type": "string"
                    },
                    "settings": {
                      "type": "object",
                      "properties": {
                        "password": {
                          "type": "boolean"
                        },
                        "require_email": {
                          "type": "boolean"
                        },
                        "allowed_email_domains": {
                          "type": "string"
                        },
                        "expires_at": {},
                        "cta_label": {
                          "type": "string"
                        },
                        "cta_url": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "title": "Acme proposal",
                  "link": "https://pdflink.to/acme-proposal/",
                  "slug": "acme-proposal",
                  "uuid": "6f1c2d9e-8a7b-4c3d-9e2f-1a2b3c4d5e6f",
                  "kind": "html",
                  "status": "Published",
                  "review_status": null,
                  "views": 3,
                  "created": "2026-10-15T09:00:00+00:00",
                  "settings_url": "{base}/document/6f1c2d9e-8a7b-4c3d-9e2f-1a2b3c4d5e6f/update/",
                  "settings": {
                    "password": false,
                    "require_email": false,
                    "allowed_email_domains": "",
                    "expires_at": null,
                    "cta_label": "Book a call",
                    "cta_url": "https://cal.com/you/intro"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such document in your workspace.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "update_settings",
        "summary": "Change link settings",
        "description": "Only the fields you send change. Use the `remove_*` flags to turn a setting off.",
        "tags": [
          "Documents"
        ],
        "security": [
          {
            "bearer": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The document: its link, slug (the part after the domain) or id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Change link settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "link": {
                      "type": "string"
                    },
                    "changed": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "link": "https://pdflink.to/acme-proposal/",
                  "changed": [
                    "password",
                    "expiry"
                  ],
                  "message": "Updated https://pdflink.to/acme-proposal/: password, expiry."
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A bad value, e.g. expires_on not a date.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The setting needs a paid plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "New title."
                  },
                  "password": {
                    "type": "string",
                    "description": "Visitors need this password to open the link (4+ characters)."
                  },
                  "require_email": {
                    "type": "boolean",
                    "description": "Ask viewers for their email first (Pro)."
                  },
                  "allowed_email_domains": {
                    "type": "string",
                    "description": "Only accept emails at these comma-separated domains, e.g. \"acme.com, acme.co.uk\"."
                  },
                  "expires_on": {
                    "type": "string",
                    "description": "YYYY-MM-DD after which the link stops working (paid plans)."
                  },
                  "cta_label": {
                    "type": "string",
                    "description": "Call-to-action button text, e.g. \"Book a call\"."
                  },
                  "cta_url": {
                    "type": "string",
                    "description": "Where the button goes (full https:// URL)."
                  },
                  "remove_password": {
                    "type": "boolean",
                    "description": "Turn password protection off."
                  },
                  "remove_expiry": {
                    "type": "boolean",
                    "description": "Remove the expiry date."
                  },
                  "remove_cta": {
                    "type": "boolean",
                    "description": "Remove the button."
                  }
                }
              },
              "example": {
                "password": "hunter22",
                "expires_on": "2026-12-31"
              }
            }
          }
        }
      }
    },
    "/api/v1/documents/{ref}/content": {
      "put": {
        "operationId": "replace_content",
        "summary": "Replace what a link shows",
        "description": "Swaps in a new version and keeps the same link, so everyone who has it sees the update. Send JSON `html` for web pages, or a multipart `file` of the same kind (a PDF for a PDF, HTML/zip for a page).",
        "tags": [
          "Documents"
        ],
        "security": [
          {
            "bearer": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The document: its link, slug (the part after the domain) or id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Replace what a link shows",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "link": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "warnings": {
                      "type": "array",
                      "items": {}
                    }
                  }
                },
                "example": {
                  "link": "https://pdflink.to/acme-proposal/",
                  "message": "Updated https://pdflink.to/acme-proposal/ (same link).",
                  "warnings": []
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "A different kind of file than the original.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Update limit reached on the free plan.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Too many updates in an hour.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "html": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "html": "<!doctype html>\u2026",
                "title": "Acme proposal v2"
              }
            },
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "The new version."
                  },
                  "title": {
                    "type": "string",
                    "description": "Optional new title."
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        }
      }
    },
    "/api/v1/documents/{ref}/activity": {
      "get": {
        "operationId": "activity",
        "summary": "Who opened it",
        "description": "Recent views: who (when they used a personal link or the email gate), when, where and on what device. On Pro also time spent, how far they got (`completion_pct`), clicks (`engagement`) and, for web pages, the headings they scrolled to (`sections`).",
        "tags": [
          "Tracking"
        ],
        "security": [
          {
            "bearer": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The document: its link, slug (the part after the domain) or id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "Look back this many days (default 90).",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Most recent views to return, 1\u201350 (default 20).",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Who opened it",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "total_views": {
                      "type": "integer"
                    },
                    "views": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "when": {
                            "type": "string"
                          },
                          "who": {
                            "type": "string"
                          },
                          "where": {
                            "type": "string"
                          },
                          "device": {
                            "type": "string"
                          },
                          "time": {
                            "type": "string"
                          },
                          "completion_pct": {
                            "type": "integer"
                          },
                          "engagement": {
                            "type": "string"
                          },
                          "sections": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "title": "Acme proposal",
                  "total_views": 3,
                  "views": [
                    {
                      "when": "2026-10-15T09:14:00+00:00",
                      "who": "Sam Lee",
                      "where": "Chicago, Illinois, United States",
                      "device": "Chrome, Mac",
                      "time": "3m 10s",
                      "completion_pct": 94,
                      "engagement": "read 94% of the page; clicked Book a call",
                      "sections": [
                        "Summary",
                        "Pricing"
                      ]
                    }
                  ],
                  "message": "\"Acme proposal\": 3 views in total.\n- 2026-10-15 09:14: Sam Lee (Chicago, \u2026)"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/documents/{ref}/responses": {
      "get": {
        "operationId": "responses",
        "summary": "Form responses and signatures",
        "description": "What people filled in and submitted on a fillable PDF, newest first. `answers` lists them in the PDF's order with readable labels (the owner's names for the fields, else ones read from the PDF); `fields` has the same answers keyed by the PDF's own field names. Signed responses have `signed: true`, the signer, an audit trail (time, IP, location, device, consent, document hashes) and a `signed_pdf` download URL. Taking submissions is on paid plans; past responses stay readable.",
        "tags": [
          "Tracking"
        ],
        "security": [
          {
            "bearer": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The document: its link, slug (the part after the domain) or id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1\u2013200, default 50.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Form responses and signatures",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "type": "string"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "responses": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "when": {
                            "type": "string"
                          },
                          "who": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "fields": {
                            "type": "object",
                            "properties": {
                              "full_name": {
                                "type": "string"
                              },
                              "agree": {
                                "type": "string"
                              },
                              "signature": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string"
                                  },
                                  "signer_name": {
                                    "type": "string"
                                  },
                                  "method": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          },
                          "answers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string"
                                },
                                "label": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              }
                            }
                          },
                          "signed": {
                            "type": "boolean"
                          },
                          "signer_name": {
                            "type": "string"
                          },
                          "signed_pdf_ready": {
                            "type": "boolean"
                          },
                          "audit": {
                            "type": "object",
                            "properties": {
                              "signed_at": {
                                "type": "string"
                              },
                              "ip": {
                                "type": "string"
                              },
                              "location": {
                                "type": "string"
                              }
                            }
                          },
                          "signed_pdf": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "title": "Service agreement",
                  "total": 1,
                  "responses": [
                    {
                      "id": "0d6c2b1e-6a1f-4f0e-9a51-1e2b8c7d9f00",
                      "when": "2026-10-15T18:00:00+00:00",
                      "who": "Sam Lee",
                      "email": "sam@acme.com",
                      "fields": {
                        "full_name": "Sam Lee",
                        "agree": "Yes",
                        "signature": {
                          "type": "signature",
                          "signer_name": "Sam Lee",
                          "method": "draw"
                        }
                      },
                      "answers": [
                        {
                          "name": "full_name",
                          "label": "Full name",
                          "value": "Sam Lee"
                        },
                        {
                          "name": "agree",
                          "label": "I agree to the terms",
                          "value": "Yes"
                        },
                        {
                          "name": "signature",
                          "label": "Signature",
                          "value": {
                            "type": "signature",
                            "signer_name": "Sam Lee",
                            "method": "draw"
                          }
                        }
                      ],
                      "signed": true,
                      "signer_name": "Sam Lee",
                      "signed_pdf_ready": true,
                      "audit": {
                        "signed_at": "2026-10-15T18:00:00+00:00",
                        "ip": "203.0.113.9",
                        "location": "Chicago, Illinois, United States"
                      },
                      "signed_pdf": "{base}/api/v1/documents/service-agreement/responses/0d6c2b1e-6a1f-4f0e-9a51-1e2b8c7d9f00/signed.pdf"
                    }
                  ],
                  "message": "\"Service agreement\": 1 response."
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/documents/{ref}/responses/{response_uuid}/signed.pdf": {
      "get": {
        "operationId": "signed_pdf",
        "summary": "Download a signed PDF",
        "description": "The signed copy of a response: the answers and signature drawn in, plus a signature certificate page.",
        "tags": [
          "Tracking"
        ],
        "security": [
          {
            "bearer": [
              "read"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The document: its link, slug (the part after the domain) or id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "response_uuid",
            "in": "path",
            "required": true,
            "description": "The response `id` from the responses endpoint.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The file",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No signed response with that id.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "409": {
            "description": "The signed copy is still being made; try again in a minute.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/documents/{ref}/recipients": {
      "post": {
        "operationId": "recipients",
        "summary": "Make a personal link",
        "description": "A link for one person, so their views (and form responses) show up under their name.",
        "tags": [
          "Sharing"
        ],
        "security": [
          {
            "bearer": [
              "write"
            ]
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "description": "The document: its link, slug (the part after the domain) or id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Make a personal link",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "link": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "link": "https://pdflink.to/acme-proposal/?r=6r3cpddgxy",
                  "message": "Link for Sam Lee: https://pdflink.to/acme-proposal/?r=6r3cpddgxy"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Neither name nor email.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "No such document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Their name."
                  },
                  "email": {
                    "type": "string",
                    "description": "Their email. Give a name, an email or both."
                  }
                }
              },
              "example": {
                "name": "Sam Lee",
                "email": "sam@acme.com"
              }
            }
          }
        }
      }
    },
    "/api/v1/rooms": {
      "post": {
        "operationId": "rooms",
        "summary": "Create a room",
        "description": "Several documents behind one link, e.g. a deal room. Pro.",
        "tags": [
          "Sharing"
        ],
        "security": [
          {
            "bearer": [
              "write"
            ]
          }
        ],
        "parameters": [],
        "responses": {
          "201": {
            "description": "Create a room",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "link": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "link": "https://pdflink.to/r/acme-deal-room/",
                  "message": "Room \"Acme deal room\" with 2 documents: https://pdflink.to/r/acme-deal-room/"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "`documents` is not a list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Rooms need Pro.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "One of the documents is not yours.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "upgrade_url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Room title."
                  },
                  "documents": {
                    "type": "array",
                    "description": "Links or slugs, in display order (up to 50)."
                  },
                  "description": {
                    "type": "string",
                    "description": "Optional text shown at the top."
                  },
                  "require_email": {
                    "type": "boolean",
                    "description": "Ask visitors for their email once."
                  }
                }
              },
              "example": {
                "title": "Acme deal room",
                "documents": [
                  "acme-proposal",
                  "case-study"
                ],
                "require_email": true
              }
            }
          }
        }
      }
    }
  }
}