signedly 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {signedly-0.1.0 → signedly-0.1.2}/PKG-INFO +2 -2
- {signedly-0.1.0 → signedly-0.1.2}/README.md +14 -26
- {signedly-0.1.0 → signedly-0.1.2}/pyproject.toml +2 -2
- {signedly-0.1.0 → signedly-0.1.2}/setup.py +3 -3
- {signedly-0.1.0 → signedly-0.1.2}/signedly/__init__.py +2 -2
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api/api_request_logs_api.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api/authentication_api.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api/bulk_sending_api.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api/documents_api.py +1 -3
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api/downloads_api.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api/fields_api.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api/sending_api.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api/signatories_api.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api/templates_api.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api/webhooks_api.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api_client.py +2 -2
- {signedly-0.1.0 → signedly-0.1.2}/signedly/configuration.py +2 -2
- {signedly-0.1.0 → signedly-0.1.2}/signedly/exceptions.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/helpers.py +3 -0
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/__init__.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/create_bulk_send202_response.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/create_bulk_send_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/create_document_fields_request_inner.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/create_document_from_template200_response.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/create_document_from_template_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/create_document_from_template_request_recipients_inner.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/create_signatories_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/create_signatories_request_signatories_inner.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/create_signatory_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/create_template_fields_request_inner.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/create_webhook_endpoint_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/delete_field_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/document.py +2 -3
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/document_page.py +4 -5
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/document_status_page.py +4 -5
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/document_status_row.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/fill_and_send_document_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/fill_and_send_document_request_elements_inner.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/get_access_token_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/get_audit_trail_link200_response.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/get_download_status200_response.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/list_bulk_send_columns200_response_inner.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/model_field.py +8 -9
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/page.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/refresh_access_token200_response.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/refresh_access_token_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/request_count_page.py +4 -5
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/request_hit.py +4 -5
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/request_log.py +6 -7
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/request_log_page.py +4 -5
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/send_document200_response.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/send_document_by_link200_response.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/send_document_by_link_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/send_document_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/signatory.py +3 -4
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/template.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/template_field.py +8 -9
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/template_page.py +4 -5
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/update_document_field_by_body_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/update_document_field_by_body_request_items_inner.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/update_webhook_endpoint_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/upload.py +4 -5
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/upload_document_for_one_signer200_response.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/upload_document_for_one_signer_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/upload_document_request.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/webhook_delivery.py +5 -6
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/webhook_delivery_page.py +4 -5
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/webhook_endpoint.py +3 -4
- {signedly-0.1.0 → signedly-0.1.2}/signedly/models/webhook_endpoint_with_secret.py +4 -5
- {signedly-0.1.0 → signedly-0.1.2}/signedly/rest.py +1 -1
- {signedly-0.1.0 → signedly-0.1.2}/signedly.egg-info/PKG-INFO +2 -2
- {signedly-0.1.0 → signedly-0.1.2}/test/test_helpers.py +23 -0
- {signedly-0.1.0 → signedly-0.1.2}/LICENSE +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/setup.cfg +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api/__init__.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/signedly/api_response.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/signedly/py.typed +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/signedly.egg-info/SOURCES.txt +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/signedly.egg-info/dependency_links.txt +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/signedly.egg-info/requires.txt +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/signedly.egg-info/top_level.txt +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_api_request_logs_api.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_authentication_api.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_bulk_sending_api.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_create_bulk_send202_response.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_create_bulk_send_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_create_document_fields_request_inner.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_create_document_from_template200_response.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_create_document_from_template_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_create_document_from_template_request_recipients_inner.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_create_signatories_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_create_signatories_request_signatories_inner.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_create_signatory_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_create_template_fields_request_inner.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_create_webhook_endpoint_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_delete_field_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_document.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_document_page.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_document_status_page.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_document_status_row.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_documents_api.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_downloads_api.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_fields_api.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_fill_and_send_document_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_fill_and_send_document_request_elements_inner.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_get_access_token_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_get_audit_trail_link200_response.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_get_download_status200_response.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_list_bulk_send_columns200_response_inner.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_model_field.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_page.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_refresh_access_token200_response.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_refresh_access_token_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_request_count_page.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_request_hit.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_request_log.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_request_log_page.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_send_document200_response.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_send_document_by_link200_response.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_send_document_by_link_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_send_document_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_sending_api.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_signatories_api.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_signatory.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_template.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_template_field.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_template_page.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_templates_api.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_update_document_field_by_body_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_update_document_field_by_body_request_items_inner.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_update_webhook_endpoint_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_upload.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_upload_document_for_one_signer200_response.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_upload_document_for_one_signer_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_upload_document_request.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_webhook_delivery.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_webhook_delivery_page.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_webhook_endpoint.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_webhook_endpoint_with_secret.py +0 -0
- {signedly-0.1.0 → signedly-0.1.2}/test/test_webhooks_api.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: signedly
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Signedly API
|
|
5
5
|
Home-page: https://github.com/signedly/signedly-sdks
|
|
6
6
|
Author: Signedly
|
|
7
|
-
Author-email:
|
|
7
|
+
Author-email: support@signedly.com
|
|
8
8
|
License: MIT
|
|
9
9
|
Keywords: OpenAPI,OpenAPI-Generator,Signedly API
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
@@ -236,51 +236,39 @@ whenever you need it.
|
|
|
236
236
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
237
237
|
|
|
238
238
|
- API version: v1
|
|
239
|
-
- Package version: 0.1.
|
|
239
|
+
- Package version: 0.1.2
|
|
240
240
|
- Generator version: 7.10.0
|
|
241
241
|
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
242
242
|
For more information, please visit [https://signedly.com](https://signedly.com)
|
|
243
243
|
|
|
244
|
-
## Requirements
|
|
244
|
+
## Requirements
|
|
245
245
|
|
|
246
246
|
Python 3.8+
|
|
247
247
|
|
|
248
248
|
## Installation & Usage
|
|
249
|
-
### pip install
|
|
250
|
-
|
|
251
|
-
If the python package is hosted on a repository, you can install directly using:
|
|
252
249
|
|
|
253
250
|
```sh
|
|
254
|
-
pip install
|
|
255
|
-
```
|
|
256
|
-
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/signedly/signedly-sdks.git`)
|
|
257
|
-
|
|
258
|
-
Then import the package:
|
|
259
|
-
```python
|
|
260
|
-
import signedly
|
|
251
|
+
pip install signedly
|
|
261
252
|
```
|
|
262
253
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
254
|
+
Generate a client ID and secret in Signedly under **Account & Settings → API** (test keys for the sandbox, live keys for real documents). The helper fetches the access token on the first call and renews it before it expires.
|
|
266
255
|
|
|
267
|
-
```sh
|
|
268
|
-
python setup.py install --user
|
|
269
|
-
```
|
|
270
|
-
(or `sudo python setup.py install` to install the package for all users)
|
|
271
|
-
|
|
272
|
-
Then import the package:
|
|
273
256
|
```python
|
|
274
|
-
import
|
|
257
|
+
from signedly.helpers import SignedlyClient
|
|
258
|
+
from signedly.api.documents_api import DocumentsApi
|
|
259
|
+
|
|
260
|
+
client = SignedlyClient(CLIENT_ID, CLIENT_SECRET)
|
|
261
|
+
for document in DocumentsApi(client.api_client).list_documents().results:
|
|
262
|
+
print(document.id, document.status)
|
|
275
263
|
```
|
|
276
264
|
|
|
277
|
-
|
|
265
|
+
Check every webhook event with `signedly.helpers.verify_webhook_signature(secret, header, raw_body)`, passing the raw request body.
|
|
278
266
|
|
|
279
|
-
|
|
267
|
+
The whole API (every endpoint, field and status) is documented at https://l0ads.signedly.com/swaggerap1/. The [repository README](https://github.com/signedly/signedly-sdks#readme) covers the usual flow, webhooks and the sandbox.
|
|
280
268
|
|
|
281
269
|
## Getting Started
|
|
282
270
|
|
|
283
|
-
|
|
271
|
+
Calling an endpoint with the generated client and an access token you manage yourself:
|
|
284
272
|
|
|
285
273
|
```python
|
|
286
274
|
|
|
@@ -448,6 +436,6 @@ Authentication schemes defined for the API:
|
|
|
448
436
|
|
|
449
437
|
## Author
|
|
450
438
|
|
|
451
|
-
|
|
439
|
+
support@signedly.com
|
|
452
440
|
|
|
453
441
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "signedly"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.2"
|
|
4
4
|
description = "Signedly API"
|
|
5
|
-
authors = ["Signedly <
|
|
5
|
+
authors = ["Signedly <support@signedly.com>"]
|
|
6
6
|
license = "MIT"
|
|
7
7
|
readme = "README.md"
|
|
8
8
|
repository = "https://github.com/signedly/signedly-sdks"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The Signedly REST API lets your system upload documents, add signatories and fields, send them for signing and download the signed result. Every path starts with `/ap1/`, and every request and response body is JSON unless an endpoint says otherwise (the uploads are `multipart/form-data`). ## Authentication 1. In the Signedly web app, open **Account & Settings → API** and generate a **client ID** and **client secret** for your organisation. 2. `POST /ap1/token/` with them. You get an `access_token` (valid **2 hours**) and a `refresh_token` (valid **7 days**). While both are still valid, calling `/ap1/token/` again returns the same pair. 3. Send the access token on every other call: `Authorization: Bearer <access_token>`. 4. When the access token expires, `POST /ap1/refreshtoken/` with the refresh token for a new access token. When the refresh token has expired too, call `/ap1/token/` again. `/ap1/token/` and `/ap1/refreshtoken/` allow 60 calls a minute per IP address; more answer 429. A missing, unknown or expired access token answers 403 (`\"Client not found\"` or `\"Access token expired\"`). The API acts for your **organisation's admin account**: documents you upload belong to it and appear in its Signedly web app, and you can reach only that account's documents, templates, signatories and fields. Another organisation's IDs answer 404, as if they didn't exist. ## Plans What the API allows depends on the Signedly plan of your **organisation's admin account** (Account & Settings → Account & Plan). The same rules apply to live and test keys. | What | Free | Personal Pro | Business Pro | Teams | |---|---|---|---|---| | Generate live and test keys (Account & Settings → API) | – | ✓ | ✓ | ✓ | | Every endpoint, `/ap1/token/` and `/ap1/refreshtoken/` included | – | ✓ | ✓ | ✓ | | `require_email_otp` on `POST /ap1/signatories/` and `POST /ap1/signatories/bulk/` | – | ✓ | ✓ | ✓ | | Bulk send: `GET /ap1/bulk-sends/columns/` and `POST /ap1/bulk-sends/` | – | – | – | ✓ | The API is part of the paid plans. On Free (or with no plan) every call answers 403 `\"... Your plan doesn't include API access.\"`, with live or test keys, also with a token or keys made earlier; they work again once the plan is paid. On a paid plan, a feature it doesn't include answers 400 with `\"Your plan doesn't include ...\"` and changes nothing, and `GET /ap1/bulk-sends/{id}/` still reports bulk sends already made. Live documents also need an API contract with Signedly. Without one, or with an unpaid API invoice, `POST /ap1/upload/` (except templates), `/ap1/upload_app/`, `/ap1/documents/fromtemplate/` and `/ap1/bulk-sends/` answer 402 with live keys. Test keys work without a contract (see Sandbox). ## Sending a document for signing 1. `POST /ap1/upload/` a PDF or DOCX (`type` 2). The document is prepared in the background: find it in `GET /ap1/documents/?name=<name>` (its `upload.id` is the upload's `id`), and wait until `GET /ap1/documents/{id}/pages/` lists its pages. 2. `POST /ap1/signatories/` (one) or `POST /ap1/signatories/bulk/` (several) to add the people who sign. 3. `POST /ap1/documents/fields/` to place the fields each signatory fills in. 4. Send it: - `POST /ap1/document/send/` emails every signatory a signing link (with ordered signing, only the first; each next one is emailed in turn), or - `POST /ap1/document/send_url/` sends no email and returns the first signatory's signing link, for you to show or send yourself. 5. Poll `GET /ap1/documents-status-list/` (or `GET /ap1/documents/`) until the status is 6 (Completed), then `GET /ap1/document/download-link/` for the signed PDF and `GET /ap1/document/download-audit-link/` for its audit trail. **From a template:** upload with `type` 4 and a `template_name` (or make the template in the web app), place its fields with `POST /ap1/templates/fields/`, then for each signing make a document with `POST /ap1/documents/fromtemplate/`, add its signatory, and send it. **One signer, one call:** `POST /ap1/upload_app/` uploads a PDF or DOCX for one signer and returns their signing link in `redirect_url`; the signer places their own signature. After signing they go to the `redirect_url` you sent, and the signed PDF and its audit trail are emailed to `final_email` (otherwise to your organisation's admin). ## Quick start with curl Each step uses an ID from the step before. `$API` is this server, e.g. `https://l0ads.signedly.com`. ```bash # 1. Token curl -X POST $API/ap1/token/ -H 'Content-Type: application/json' \\ -d '{\"client_id\": \"<client id>\", \"client_secret\": \"<client secret>\"}' TOKEN=<access_token from the answer> # 2. Upload a PDF (answers with the upload's id) curl -X POST $API/ap1/upload/ -H \"Authorization: Bearer $TOKEN\" \\ -F file=@nda.pdf -F name=nda-ann-lee -F type=2 # 3. Find the document, then wait until it has pages curl \"$API/ap1/documents/?name=nda-ann-lee\" -H \"Authorization: Bearer $TOKEN\" DOC=<results[0].id> curl $API/ap1/documents/$DOC/pages/ -H \"Authorization: Bearer $TOKEN\" PAGE=<[0].id> # 4. Add the signatory curl -X POST $API/ap1/signatories/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"name\": \"Ann Lee\", \"email\": \"ann@example.com\"}' SIGNER=<id from the answer> # 5. Place her signature: 150 × 40 points, 72 points from the left, 640 from the top curl -X POST $API/ap1/documents/fields/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '[{\"document_id\": \"'$DOC'\", \"signatory_id\": \"'$SIGNER'\", \"kind\": 2, \"label\": \"Signature\", \"placeholder\": \"Sign here\", \"page\": \"'$PAGE'\", \"page_number\": 0, \"x\": 72, \"y\": 640, \"width\": 150, \"height\": 40}]' # 6. Send it (Ann gets the signing email) curl -X POST $API/ap1/document/send/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"subject\": \"Please sign the NDA\", \"message\": \"Hi Ann, please sign by Friday.\", \"expiry_date\": \"2026-12-31\"}' # 7. Poll until status is 6 (Completed), then get the signed PDF curl \"$API/ap1/documents-status-list/?document_ids=$DOC\" -H \"Authorization: Bearer $TOKEN\" curl \"$API/ap1/document/download-link/?id=$DOC\" -H \"Authorization: Bearer $TOKEN\" ``` ## Postman Import the whole API into Postman with **Import → Link** and `<this server>/swaggerap1/postman.json`. Set `client_id` and `client_secret` in the collection's **Variables**, run **Get an access token** (it saves the token for every other request), and set `document_id` when a request needs one. ## Webhooks Instead of polling, add an endpoint with `POST /ap1/webhooks/` (or in **Account & Settings → API**) and Signedly posts your organisation's document events to it: `document.sent`, `document.viewed`, `document.signed`, `document.approved`, `document.completed`, `document.rejected` and `document.expired` (all of them, or the `events` you choose). Each is a JSON `POST`: ```json {\"id\": \"5b7f…\", \"type\": \"document.signed\", \"created_at\": \"2026-10-27T09:12:00+00:00\", \"test\": false, \"data\": {\"document\": {\"id\": \"6f0c…\", \"name\": \"nda.pdf\", \"status\": 5}, \"recipient\": {\"id\": \"0b6e…\", \"email\": \"ann@example.com\", \"name\": \"Ann Lee\", \"role\": \"signer\"}}} ``` `recipient` is null for events no recipient caused (sent, completed, expired); `test` is true for documents made with your test keys. Fetch anything else, such as download links, with your access token: events never carry links. **Check every event is from Signedly.** The `Signedly-Signature` header is `t=<unix seconds>,v1=<signature>`, where the signature is the hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret. Refuse an event whose signature doesn't match or whose `t` is more than 5 minutes off: ```python import hashlib, hmac, time def is_from_signedly(secret, header, raw_body): parts = dict(item.split(\"=\", 1) for item in header.split(\",\")) signed = f\"{parts['t']}.{raw_body.decode()}\".encode() expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() fresh = abs(time.time() - int(parts[\"t\"])) <= 300 return fresh and hmac.compare_digest(parts[\"v1\"], expected) ``` **Answer 2xx within 10 seconds**, then do the work. Anything else is retried after 1 and 5 minutes, then 30 minutes and 2, 5 and 10 hours (7 tries in about 18 hours). `Signedly-Event-Id` is the same on every try of an event: use it to ignore repeats. After 20 events in a row fail for good, Signedly switches the endpoint off and emails your organisation's admin; switch it on again with `PUT /ap1/webhooks/{id}/` and `\"is_active\": true`. Each endpoint's deliveries and their last answers are at `GET /ap1/webhooks/{id}/deliveries/`, and any can be sent again. ## Sandbox Build and test against the API without paying for documents: in **Account & Settings → API**, generate your **test keys**, and get a token with them at `/ap1/token/` as usual. Everything works the same, except that what you upload or make from a template with a test token is a **test document** (`is_test` on its upload): - every page of its PDF and of its audit trail says **TEST – NOT LEGALLY BINDING**; - its emails are real, with `[TEST]` at the start of the subject; - it isn't billed or counted toward your plan; - your organisation can make 50 a calendar month (templates don't count); the next upload answers 429. ## Fields Positions and sizes are in **PDF points** (1/72 inch), measured from the **top-left corner** of the page as it is displayed (rotation applied). `page_number` counts pages from 0. A field must sit wholly on its page (1 point of tolerance); otherwise it is refused with 400. A field's page and signatory can't be changed later: delete the field and add it again. ## Status values **Document `status`:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent · 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired. Signatories, fields and sends are only accepted while a document is 1–3 (not yet sent). **Signatory `status`:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected. ## Lists `GET /ap1/documents/`, `/ap1/documents-status-list/`, `/ap1/templates/`, `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10) and `offset`, and read `count`, `next`, `previous` and `results` from the response. ## Errors | Status | Meaning | |---|---| | 400 | The request was refused, also when your plan doesn't include it (see Plans); the body says why (`{\"error\": \"...\"}`, or the name of each bad field with its messages). Nothing was changed. | | 403 | The access token is missing, unknown or expired; the client ID and secret or the refresh token were refused; the organisation's plan has no API access (Free, see Plans); or an `expiry_date` isn't in the future (`\"Invalid Date Entered\"`). | | 402 | No API contract, or an unpaid API invoice: live documents are refused (test keys keep working). | | 404 | The document, template, signatory or field doesn't exist or isn't yours. | | 429 | Too many token requests (wait a minute), or this month's 50 test documents are used. | | 5xx | Our side failed; retry later. | A send that times out may still have worked: check the document's status before sending again (a second send of a sent document answers 400). Download, view and audit links are valid for about 7 days; ask for a new one whenever you need it.
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v1
|
|
9
|
-
Contact:
|
|
9
|
+
Contact: support@signedly.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
@@ -22,7 +22,7 @@ from setuptools import setup, find_packages # noqa: H301
|
|
|
22
22
|
# prerequisite: setuptools
|
|
23
23
|
# http://pypi.python.org/pypi/setuptools
|
|
24
24
|
NAME = "signedly"
|
|
25
|
-
VERSION = "0.1.
|
|
25
|
+
VERSION = "0.1.2"
|
|
26
26
|
PYTHON_REQUIRES = ">= 3.8"
|
|
27
27
|
REQUIRES = [
|
|
28
28
|
"urllib3 >= 1.25.3, < 3.0.0",
|
|
@@ -36,7 +36,7 @@ setup(
|
|
|
36
36
|
version=VERSION,
|
|
37
37
|
description="Signedly API",
|
|
38
38
|
author="Signedly",
|
|
39
|
-
author_email="
|
|
39
|
+
author_email="support@signedly.com",
|
|
40
40
|
url="https://github.com/signedly/signedly-sdks",
|
|
41
41
|
keywords=["OpenAPI", "OpenAPI-Generator", "Signedly API"],
|
|
42
42
|
install_requires=REQUIRES,
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
The Signedly REST API lets your system upload documents, add signatories and fields, send them for signing and download the signed result. Every path starts with `/ap1/`, and every request and response body is JSON unless an endpoint says otherwise (the uploads are `multipart/form-data`). ## Authentication 1. In the Signedly web app, open **Account & Settings → API** and generate a **client ID** and **client secret** for your organisation. 2. `POST /ap1/token/` with them. You get an `access_token` (valid **2 hours**) and a `refresh_token` (valid **7 days**). While both are still valid, calling `/ap1/token/` again returns the same pair. 3. Send the access token on every other call: `Authorization: Bearer <access_token>`. 4. When the access token expires, `POST /ap1/refreshtoken/` with the refresh token for a new access token. When the refresh token has expired too, call `/ap1/token/` again. `/ap1/token/` and `/ap1/refreshtoken/` allow 60 calls a minute per IP address; more answer 429. A missing, unknown or expired access token answers 403 (`\"Client not found\"` or `\"Access token expired\"`). The API acts for your **organisation's admin account**: documents you upload belong to it and appear in its Signedly web app, and you can reach only that account's documents, templates, signatories and fields. Another organisation's IDs answer 404, as if they didn't exist. ## Plans What the API allows depends on the Signedly plan of your **organisation's admin account** (Account & Settings → Account & Plan). The same rules apply to live and test keys. | What | Free | Personal Pro | Business Pro | Teams | |---|---|---|---|---| | Generate live and test keys (Account & Settings → API) | – | ✓ | ✓ | ✓ | | Every endpoint, `/ap1/token/` and `/ap1/refreshtoken/` included | – | ✓ | ✓ | ✓ | | `require_email_otp` on `POST /ap1/signatories/` and `POST /ap1/signatories/bulk/` | – | ✓ | ✓ | ✓ | | Bulk send: `GET /ap1/bulk-sends/columns/` and `POST /ap1/bulk-sends/` | – | – | – | ✓ | The API is part of the paid plans. On Free (or with no plan) every call answers 403 `\"... Your plan doesn't include API access.\"`, with live or test keys, also with a token or keys made earlier; they work again once the plan is paid. On a paid plan, a feature it doesn't include answers 400 with `\"Your plan doesn't include ...\"` and changes nothing, and `GET /ap1/bulk-sends/{id}/` still reports bulk sends already made. Live documents also need an API contract with Signedly. Without one, or with an unpaid API invoice, `POST /ap1/upload/` (except templates), `/ap1/upload_app/`, `/ap1/documents/fromtemplate/` and `/ap1/bulk-sends/` answer 402 with live keys. Test keys work without a contract (see Sandbox). ## Sending a document for signing 1. `POST /ap1/upload/` a PDF or DOCX (`type` 2). The document is prepared in the background: find it in `GET /ap1/documents/?name=<name>` (its `upload.id` is the upload's `id`), and wait until `GET /ap1/documents/{id}/pages/` lists its pages. 2. `POST /ap1/signatories/` (one) or `POST /ap1/signatories/bulk/` (several) to add the people who sign. 3. `POST /ap1/documents/fields/` to place the fields each signatory fills in. 4. Send it: - `POST /ap1/document/send/` emails every signatory a signing link (with ordered signing, only the first; each next one is emailed in turn), or - `POST /ap1/document/send_url/` sends no email and returns the first signatory's signing link, for you to show or send yourself. 5. Poll `GET /ap1/documents-status-list/` (or `GET /ap1/documents/`) until the status is 6 (Completed), then `GET /ap1/document/download-link/` for the signed PDF and `GET /ap1/document/download-audit-link/` for its audit trail. **From a template:** upload with `type` 4 and a `template_name` (or make the template in the web app), place its fields with `POST /ap1/templates/fields/`, then for each signing make a document with `POST /ap1/documents/fromtemplate/`, add its signatory, and send it. **One signer, one call:** `POST /ap1/upload_app/` uploads a PDF or DOCX for one signer and returns their signing link in `redirect_url`; the signer places their own signature. After signing they go to the `redirect_url` you sent, and the signed PDF and its audit trail are emailed to `final_email` (otherwise to your organisation's admin). ## Quick start with curl Each step uses an ID from the step before. `$API` is this server, e.g. `https://l0ads.signedly.com`. ```bash # 1. Token curl -X POST $API/ap1/token/ -H 'Content-Type: application/json' \\ -d '{\"client_id\": \"<client id>\", \"client_secret\": \"<client secret>\"}' TOKEN=<access_token from the answer> # 2. Upload a PDF (answers with the upload's id) curl -X POST $API/ap1/upload/ -H \"Authorization: Bearer $TOKEN\" \\ -F file=@nda.pdf -F name=nda-ann-lee -F type=2 # 3. Find the document, then wait until it has pages curl \"$API/ap1/documents/?name=nda-ann-lee\" -H \"Authorization: Bearer $TOKEN\" DOC=<results[0].id> curl $API/ap1/documents/$DOC/pages/ -H \"Authorization: Bearer $TOKEN\" PAGE=<[0].id> # 4. Add the signatory curl -X POST $API/ap1/signatories/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"name\": \"Ann Lee\", \"email\": \"ann@example.com\"}' SIGNER=<id from the answer> # 5. Place her signature: 150 × 40 points, 72 points from the left, 640 from the top curl -X POST $API/ap1/documents/fields/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '[{\"document_id\": \"'$DOC'\", \"signatory_id\": \"'$SIGNER'\", \"kind\": 2, \"label\": \"Signature\", \"placeholder\": \"Sign here\", \"page\": \"'$PAGE'\", \"page_number\": 0, \"x\": 72, \"y\": 640, \"width\": 150, \"height\": 40}]' # 6. Send it (Ann gets the signing email) curl -X POST $API/ap1/document/send/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"subject\": \"Please sign the NDA\", \"message\": \"Hi Ann, please sign by Friday.\", \"expiry_date\": \"2026-12-31\"}' # 7. Poll until status is 6 (Completed), then get the signed PDF curl \"$API/ap1/documents-status-list/?document_ids=$DOC\" -H \"Authorization: Bearer $TOKEN\" curl \"$API/ap1/document/download-link/?id=$DOC\" -H \"Authorization: Bearer $TOKEN\" ``` ## Postman Import the whole API into Postman with **Import → Link** and `<this server>/swaggerap1/postman.json`. Set `client_id` and `client_secret` in the collection's **Variables**, run **Get an access token** (it saves the token for every other request), and set `document_id` when a request needs one. ## Webhooks Instead of polling, add an endpoint with `POST /ap1/webhooks/` (or in **Account & Settings → API**) and Signedly posts your organisation's document events to it: `document.sent`, `document.viewed`, `document.signed`, `document.approved`, `document.completed`, `document.rejected` and `document.expired` (all of them, or the `events` you choose). Each is a JSON `POST`: ```json {\"id\": \"5b7f…\", \"type\": \"document.signed\", \"created_at\": \"2026-10-27T09:12:00+00:00\", \"test\": false, \"data\": {\"document\": {\"id\": \"6f0c…\", \"name\": \"nda.pdf\", \"status\": 5}, \"recipient\": {\"id\": \"0b6e…\", \"email\": \"ann@example.com\", \"name\": \"Ann Lee\", \"role\": \"signer\"}}} ``` `recipient` is null for events no recipient caused (sent, completed, expired); `test` is true for documents made with your test keys. Fetch anything else, such as download links, with your access token: events never carry links. **Check every event is from Signedly.** The `Signedly-Signature` header is `t=<unix seconds>,v1=<signature>`, where the signature is the hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret. Refuse an event whose signature doesn't match or whose `t` is more than 5 minutes off: ```python import hashlib, hmac, time def is_from_signedly(secret, header, raw_body): parts = dict(item.split(\"=\", 1) for item in header.split(\",\")) signed = f\"{parts['t']}.{raw_body.decode()}\".encode() expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() fresh = abs(time.time() - int(parts[\"t\"])) <= 300 return fresh and hmac.compare_digest(parts[\"v1\"], expected) ``` **Answer 2xx within 10 seconds**, then do the work. Anything else is retried after 1 and 5 minutes, then 30 minutes and 2, 5 and 10 hours (7 tries in about 18 hours). `Signedly-Event-Id` is the same on every try of an event: use it to ignore repeats. After 20 events in a row fail for good, Signedly switches the endpoint off and emails your organisation's admin; switch it on again with `PUT /ap1/webhooks/{id}/` and `\"is_active\": true`. Each endpoint's deliveries and their last answers are at `GET /ap1/webhooks/{id}/deliveries/`, and any can be sent again. ## Sandbox Build and test against the API without paying for documents: in **Account & Settings → API**, generate your **test keys**, and get a token with them at `/ap1/token/` as usual. Everything works the same, except that what you upload or make from a template with a test token is a **test document** (`is_test` on its upload): - every page of its PDF and of its audit trail says **TEST – NOT LEGALLY BINDING**; - its emails are real, with `[TEST]` at the start of the subject; - it isn't billed or counted toward your plan; - your organisation can make 50 a calendar month (templates don't count); the next upload answers 429. ## Fields Positions and sizes are in **PDF points** (1/72 inch), measured from the **top-left corner** of the page as it is displayed (rotation applied). `page_number` counts pages from 0. A field must sit wholly on its page (1 point of tolerance); otherwise it is refused with 400. A field's page and signatory can't be changed later: delete the field and add it again. ## Status values **Document `status`:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent · 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired. Signatories, fields and sends are only accepted while a document is 1–3 (not yet sent). **Signatory `status`:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected. ## Lists `GET /ap1/documents/`, `/ap1/documents-status-list/`, `/ap1/templates/`, `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10) and `offset`, and read `count`, `next`, `previous` and `results` from the response. ## Errors | Status | Meaning | |---|---| | 400 | The request was refused, also when your plan doesn't include it (see Plans); the body says why (`{\"error\": \"...\"}`, or the name of each bad field with its messages). Nothing was changed. | | 403 | The access token is missing, unknown or expired; the client ID and secret or the refresh token were refused; the organisation's plan has no API access (Free, see Plans); or an `expiry_date` isn't in the future (`\"Invalid Date Entered\"`). | | 402 | No API contract, or an unpaid API invoice: live documents are refused (test keys keep working). | | 404 | The document, template, signatory or field doesn't exist or isn't yours. | | 429 | Too many token requests (wait a minute), or this month's 50 test documents are used. | | 5xx | Our side failed; retry later. | A send that times out may still have worked: check the document's status before sending again (a second send of a sent document answers 400). Download, view and audit links are valid for about 7 days; ask for a new one whenever you need it.
|
|
9
9
|
|
|
10
10
|
The version of the OpenAPI document: v1
|
|
11
|
-
Contact:
|
|
11
|
+
Contact: support@signedly.com
|
|
12
12
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
13
13
|
|
|
14
14
|
Do not edit the class manually.
|
|
15
15
|
""" # noqa: E501
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
__version__ = "0.1.
|
|
18
|
+
__version__ = "0.1.2"
|
|
19
19
|
|
|
20
20
|
# import apis into sdk package
|
|
21
21
|
from signedly.api.api_request_logs_api import APIRequestLogsApi
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The Signedly REST API lets your system upload documents, add signatories and fields, send them for signing and download the signed result. Every path starts with `/ap1/`, and every request and response body is JSON unless an endpoint says otherwise (the uploads are `multipart/form-data`). ## Authentication 1. In the Signedly web app, open **Account & Settings → API** and generate a **client ID** and **client secret** for your organisation. 2. `POST /ap1/token/` with them. You get an `access_token` (valid **2 hours**) and a `refresh_token` (valid **7 days**). While both are still valid, calling `/ap1/token/` again returns the same pair. 3. Send the access token on every other call: `Authorization: Bearer <access_token>`. 4. When the access token expires, `POST /ap1/refreshtoken/` with the refresh token for a new access token. When the refresh token has expired too, call `/ap1/token/` again. `/ap1/token/` and `/ap1/refreshtoken/` allow 60 calls a minute per IP address; more answer 429. A missing, unknown or expired access token answers 403 (`\"Client not found\"` or `\"Access token expired\"`). The API acts for your **organisation's admin account**: documents you upload belong to it and appear in its Signedly web app, and you can reach only that account's documents, templates, signatories and fields. Another organisation's IDs answer 404, as if they didn't exist. ## Plans What the API allows depends on the Signedly plan of your **organisation's admin account** (Account & Settings → Account & Plan). The same rules apply to live and test keys. | What | Free | Personal Pro | Business Pro | Teams | |---|---|---|---|---| | Generate live and test keys (Account & Settings → API) | – | ✓ | ✓ | ✓ | | Every endpoint, `/ap1/token/` and `/ap1/refreshtoken/` included | – | ✓ | ✓ | ✓ | | `require_email_otp` on `POST /ap1/signatories/` and `POST /ap1/signatories/bulk/` | – | ✓ | ✓ | ✓ | | Bulk send: `GET /ap1/bulk-sends/columns/` and `POST /ap1/bulk-sends/` | – | – | – | ✓ | The API is part of the paid plans. On Free (or with no plan) every call answers 403 `\"... Your plan doesn't include API access.\"`, with live or test keys, also with a token or keys made earlier; they work again once the plan is paid. On a paid plan, a feature it doesn't include answers 400 with `\"Your plan doesn't include ...\"` and changes nothing, and `GET /ap1/bulk-sends/{id}/` still reports bulk sends already made. Live documents also need an API contract with Signedly. Without one, or with an unpaid API invoice, `POST /ap1/upload/` (except templates), `/ap1/upload_app/`, `/ap1/documents/fromtemplate/` and `/ap1/bulk-sends/` answer 402 with live keys. Test keys work without a contract (see Sandbox). ## Sending a document for signing 1. `POST /ap1/upload/` a PDF or DOCX (`type` 2). The document is prepared in the background: find it in `GET /ap1/documents/?name=<name>` (its `upload.id` is the upload's `id`), and wait until `GET /ap1/documents/{id}/pages/` lists its pages. 2. `POST /ap1/signatories/` (one) or `POST /ap1/signatories/bulk/` (several) to add the people who sign. 3. `POST /ap1/documents/fields/` to place the fields each signatory fills in. 4. Send it: - `POST /ap1/document/send/` emails every signatory a signing link (with ordered signing, only the first; each next one is emailed in turn), or - `POST /ap1/document/send_url/` sends no email and returns the first signatory's signing link, for you to show or send yourself. 5. Poll `GET /ap1/documents-status-list/` (or `GET /ap1/documents/`) until the status is 6 (Completed), then `GET /ap1/document/download-link/` for the signed PDF and `GET /ap1/document/download-audit-link/` for its audit trail. **From a template:** upload with `type` 4 and a `template_name` (or make the template in the web app), place its fields with `POST /ap1/templates/fields/`, then for each signing make a document with `POST /ap1/documents/fromtemplate/`, add its signatory, and send it. **One signer, one call:** `POST /ap1/upload_app/` uploads a PDF or DOCX for one signer and returns their signing link in `redirect_url`; the signer places their own signature. After signing they go to the `redirect_url` you sent, and the signed PDF and its audit trail are emailed to `final_email` (otherwise to your organisation's admin). ## Quick start with curl Each step uses an ID from the step before. `$API` is this server, e.g. `https://l0ads.signedly.com`. ```bash # 1. Token curl -X POST $API/ap1/token/ -H 'Content-Type: application/json' \\ -d '{\"client_id\": \"<client id>\", \"client_secret\": \"<client secret>\"}' TOKEN=<access_token from the answer> # 2. Upload a PDF (answers with the upload's id) curl -X POST $API/ap1/upload/ -H \"Authorization: Bearer $TOKEN\" \\ -F file=@nda.pdf -F name=nda-ann-lee -F type=2 # 3. Find the document, then wait until it has pages curl \"$API/ap1/documents/?name=nda-ann-lee\" -H \"Authorization: Bearer $TOKEN\" DOC=<results[0].id> curl $API/ap1/documents/$DOC/pages/ -H \"Authorization: Bearer $TOKEN\" PAGE=<[0].id> # 4. Add the signatory curl -X POST $API/ap1/signatories/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"name\": \"Ann Lee\", \"email\": \"ann@example.com\"}' SIGNER=<id from the answer> # 5. Place her signature: 150 × 40 points, 72 points from the left, 640 from the top curl -X POST $API/ap1/documents/fields/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '[{\"document_id\": \"'$DOC'\", \"signatory_id\": \"'$SIGNER'\", \"kind\": 2, \"label\": \"Signature\", \"placeholder\": \"Sign here\", \"page\": \"'$PAGE'\", \"page_number\": 0, \"x\": 72, \"y\": 640, \"width\": 150, \"height\": 40}]' # 6. Send it (Ann gets the signing email) curl -X POST $API/ap1/document/send/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"subject\": \"Please sign the NDA\", \"message\": \"Hi Ann, please sign by Friday.\", \"expiry_date\": \"2026-12-31\"}' # 7. Poll until status is 6 (Completed), then get the signed PDF curl \"$API/ap1/documents-status-list/?document_ids=$DOC\" -H \"Authorization: Bearer $TOKEN\" curl \"$API/ap1/document/download-link/?id=$DOC\" -H \"Authorization: Bearer $TOKEN\" ``` ## Postman Import the whole API into Postman with **Import → Link** and `<this server>/swaggerap1/postman.json`. Set `client_id` and `client_secret` in the collection's **Variables**, run **Get an access token** (it saves the token for every other request), and set `document_id` when a request needs one. ## Webhooks Instead of polling, add an endpoint with `POST /ap1/webhooks/` (or in **Account & Settings → API**) and Signedly posts your organisation's document events to it: `document.sent`, `document.viewed`, `document.signed`, `document.approved`, `document.completed`, `document.rejected` and `document.expired` (all of them, or the `events` you choose). Each is a JSON `POST`: ```json {\"id\": \"5b7f…\", \"type\": \"document.signed\", \"created_at\": \"2026-10-27T09:12:00+00:00\", \"test\": false, \"data\": {\"document\": {\"id\": \"6f0c…\", \"name\": \"nda.pdf\", \"status\": 5}, \"recipient\": {\"id\": \"0b6e…\", \"email\": \"ann@example.com\", \"name\": \"Ann Lee\", \"role\": \"signer\"}}} ``` `recipient` is null for events no recipient caused (sent, completed, expired); `test` is true for documents made with your test keys. Fetch anything else, such as download links, with your access token: events never carry links. **Check every event is from Signedly.** The `Signedly-Signature` header is `t=<unix seconds>,v1=<signature>`, where the signature is the hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret. Refuse an event whose signature doesn't match or whose `t` is more than 5 minutes off: ```python import hashlib, hmac, time def is_from_signedly(secret, header, raw_body): parts = dict(item.split(\"=\", 1) for item in header.split(\",\")) signed = f\"{parts['t']}.{raw_body.decode()}\".encode() expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() fresh = abs(time.time() - int(parts[\"t\"])) <= 300 return fresh and hmac.compare_digest(parts[\"v1\"], expected) ``` **Answer 2xx within 10 seconds**, then do the work. Anything else is retried after 1 and 5 minutes, then 30 minutes and 2, 5 and 10 hours (7 tries in about 18 hours). `Signedly-Event-Id` is the same on every try of an event: use it to ignore repeats. After 20 events in a row fail for good, Signedly switches the endpoint off and emails your organisation's admin; switch it on again with `PUT /ap1/webhooks/{id}/` and `\"is_active\": true`. Each endpoint's deliveries and their last answers are at `GET /ap1/webhooks/{id}/deliveries/`, and any can be sent again. ## Sandbox Build and test against the API without paying for documents: in **Account & Settings → API**, generate your **test keys**, and get a token with them at `/ap1/token/` as usual. Everything works the same, except that what you upload or make from a template with a test token is a **test document** (`is_test` on its upload): - every page of its PDF and of its audit trail says **TEST – NOT LEGALLY BINDING**; - its emails are real, with `[TEST]` at the start of the subject; - it isn't billed or counted toward your plan; - your organisation can make 50 a calendar month (templates don't count); the next upload answers 429. ## Fields Positions and sizes are in **PDF points** (1/72 inch), measured from the **top-left corner** of the page as it is displayed (rotation applied). `page_number` counts pages from 0. A field must sit wholly on its page (1 point of tolerance); otherwise it is refused with 400. A field's page and signatory can't be changed later: delete the field and add it again. ## Status values **Document `status`:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent · 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired. Signatories, fields and sends are only accepted while a document is 1–3 (not yet sent). **Signatory `status`:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected. ## Lists `GET /ap1/documents/`, `/ap1/documents-status-list/`, `/ap1/templates/`, `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10) and `offset`, and read `count`, `next`, `previous` and `results` from the response. ## Errors | Status | Meaning | |---|---| | 400 | The request was refused, also when your plan doesn't include it (see Plans); the body says why (`{\"error\": \"...\"}`, or the name of each bad field with its messages). Nothing was changed. | | 403 | The access token is missing, unknown or expired; the client ID and secret or the refresh token were refused; the organisation's plan has no API access (Free, see Plans); or an `expiry_date` isn't in the future (`\"Invalid Date Entered\"`). | | 402 | No API contract, or an unpaid API invoice: live documents are refused (test keys keep working). | | 404 | The document, template, signatory or field doesn't exist or isn't yours. | | 429 | Too many token requests (wait a minute), or this month's 50 test documents are used. | | 5xx | Our side failed; retry later. | A send that times out may still have worked: check the document's status before sending again (a second send of a sent document answers 400). Download, view and audit links are valid for about 7 days; ask for a new one whenever you need it.
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v1
|
|
9
|
-
Contact:
|
|
9
|
+
Contact: support@signedly.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The Signedly REST API lets your system upload documents, add signatories and fields, send them for signing and download the signed result. Every path starts with `/ap1/`, and every request and response body is JSON unless an endpoint says otherwise (the uploads are `multipart/form-data`). ## Authentication 1. In the Signedly web app, open **Account & Settings → API** and generate a **client ID** and **client secret** for your organisation. 2. `POST /ap1/token/` with them. You get an `access_token` (valid **2 hours**) and a `refresh_token` (valid **7 days**). While both are still valid, calling `/ap1/token/` again returns the same pair. 3. Send the access token on every other call: `Authorization: Bearer <access_token>`. 4. When the access token expires, `POST /ap1/refreshtoken/` with the refresh token for a new access token. When the refresh token has expired too, call `/ap1/token/` again. `/ap1/token/` and `/ap1/refreshtoken/` allow 60 calls a minute per IP address; more answer 429. A missing, unknown or expired access token answers 403 (`\"Client not found\"` or `\"Access token expired\"`). The API acts for your **organisation's admin account**: documents you upload belong to it and appear in its Signedly web app, and you can reach only that account's documents, templates, signatories and fields. Another organisation's IDs answer 404, as if they didn't exist. ## Plans What the API allows depends on the Signedly plan of your **organisation's admin account** (Account & Settings → Account & Plan). The same rules apply to live and test keys. | What | Free | Personal Pro | Business Pro | Teams | |---|---|---|---|---| | Generate live and test keys (Account & Settings → API) | – | ✓ | ✓ | ✓ | | Every endpoint, `/ap1/token/` and `/ap1/refreshtoken/` included | – | ✓ | ✓ | ✓ | | `require_email_otp` on `POST /ap1/signatories/` and `POST /ap1/signatories/bulk/` | – | ✓ | ✓ | ✓ | | Bulk send: `GET /ap1/bulk-sends/columns/` and `POST /ap1/bulk-sends/` | – | – | – | ✓ | The API is part of the paid plans. On Free (or with no plan) every call answers 403 `\"... Your plan doesn't include API access.\"`, with live or test keys, also with a token or keys made earlier; they work again once the plan is paid. On a paid plan, a feature it doesn't include answers 400 with `\"Your plan doesn't include ...\"` and changes nothing, and `GET /ap1/bulk-sends/{id}/` still reports bulk sends already made. Live documents also need an API contract with Signedly. Without one, or with an unpaid API invoice, `POST /ap1/upload/` (except templates), `/ap1/upload_app/`, `/ap1/documents/fromtemplate/` and `/ap1/bulk-sends/` answer 402 with live keys. Test keys work without a contract (see Sandbox). ## Sending a document for signing 1. `POST /ap1/upload/` a PDF or DOCX (`type` 2). The document is prepared in the background: find it in `GET /ap1/documents/?name=<name>` (its `upload.id` is the upload's `id`), and wait until `GET /ap1/documents/{id}/pages/` lists its pages. 2. `POST /ap1/signatories/` (one) or `POST /ap1/signatories/bulk/` (several) to add the people who sign. 3. `POST /ap1/documents/fields/` to place the fields each signatory fills in. 4. Send it: - `POST /ap1/document/send/` emails every signatory a signing link (with ordered signing, only the first; each next one is emailed in turn), or - `POST /ap1/document/send_url/` sends no email and returns the first signatory's signing link, for you to show or send yourself. 5. Poll `GET /ap1/documents-status-list/` (or `GET /ap1/documents/`) until the status is 6 (Completed), then `GET /ap1/document/download-link/` for the signed PDF and `GET /ap1/document/download-audit-link/` for its audit trail. **From a template:** upload with `type` 4 and a `template_name` (or make the template in the web app), place its fields with `POST /ap1/templates/fields/`, then for each signing make a document with `POST /ap1/documents/fromtemplate/`, add its signatory, and send it. **One signer, one call:** `POST /ap1/upload_app/` uploads a PDF or DOCX for one signer and returns their signing link in `redirect_url`; the signer places their own signature. After signing they go to the `redirect_url` you sent, and the signed PDF and its audit trail are emailed to `final_email` (otherwise to your organisation's admin). ## Quick start with curl Each step uses an ID from the step before. `$API` is this server, e.g. `https://l0ads.signedly.com`. ```bash # 1. Token curl -X POST $API/ap1/token/ -H 'Content-Type: application/json' \\ -d '{\"client_id\": \"<client id>\", \"client_secret\": \"<client secret>\"}' TOKEN=<access_token from the answer> # 2. Upload a PDF (answers with the upload's id) curl -X POST $API/ap1/upload/ -H \"Authorization: Bearer $TOKEN\" \\ -F file=@nda.pdf -F name=nda-ann-lee -F type=2 # 3. Find the document, then wait until it has pages curl \"$API/ap1/documents/?name=nda-ann-lee\" -H \"Authorization: Bearer $TOKEN\" DOC=<results[0].id> curl $API/ap1/documents/$DOC/pages/ -H \"Authorization: Bearer $TOKEN\" PAGE=<[0].id> # 4. Add the signatory curl -X POST $API/ap1/signatories/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"name\": \"Ann Lee\", \"email\": \"ann@example.com\"}' SIGNER=<id from the answer> # 5. Place her signature: 150 × 40 points, 72 points from the left, 640 from the top curl -X POST $API/ap1/documents/fields/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '[{\"document_id\": \"'$DOC'\", \"signatory_id\": \"'$SIGNER'\", \"kind\": 2, \"label\": \"Signature\", \"placeholder\": \"Sign here\", \"page\": \"'$PAGE'\", \"page_number\": 0, \"x\": 72, \"y\": 640, \"width\": 150, \"height\": 40}]' # 6. Send it (Ann gets the signing email) curl -X POST $API/ap1/document/send/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"subject\": \"Please sign the NDA\", \"message\": \"Hi Ann, please sign by Friday.\", \"expiry_date\": \"2026-12-31\"}' # 7. Poll until status is 6 (Completed), then get the signed PDF curl \"$API/ap1/documents-status-list/?document_ids=$DOC\" -H \"Authorization: Bearer $TOKEN\" curl \"$API/ap1/document/download-link/?id=$DOC\" -H \"Authorization: Bearer $TOKEN\" ``` ## Postman Import the whole API into Postman with **Import → Link** and `<this server>/swaggerap1/postman.json`. Set `client_id` and `client_secret` in the collection's **Variables**, run **Get an access token** (it saves the token for every other request), and set `document_id` when a request needs one. ## Webhooks Instead of polling, add an endpoint with `POST /ap1/webhooks/` (or in **Account & Settings → API**) and Signedly posts your organisation's document events to it: `document.sent`, `document.viewed`, `document.signed`, `document.approved`, `document.completed`, `document.rejected` and `document.expired` (all of them, or the `events` you choose). Each is a JSON `POST`: ```json {\"id\": \"5b7f…\", \"type\": \"document.signed\", \"created_at\": \"2026-10-27T09:12:00+00:00\", \"test\": false, \"data\": {\"document\": {\"id\": \"6f0c…\", \"name\": \"nda.pdf\", \"status\": 5}, \"recipient\": {\"id\": \"0b6e…\", \"email\": \"ann@example.com\", \"name\": \"Ann Lee\", \"role\": \"signer\"}}} ``` `recipient` is null for events no recipient caused (sent, completed, expired); `test` is true for documents made with your test keys. Fetch anything else, such as download links, with your access token: events never carry links. **Check every event is from Signedly.** The `Signedly-Signature` header is `t=<unix seconds>,v1=<signature>`, where the signature is the hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret. Refuse an event whose signature doesn't match or whose `t` is more than 5 minutes off: ```python import hashlib, hmac, time def is_from_signedly(secret, header, raw_body): parts = dict(item.split(\"=\", 1) for item in header.split(\",\")) signed = f\"{parts['t']}.{raw_body.decode()}\".encode() expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() fresh = abs(time.time() - int(parts[\"t\"])) <= 300 return fresh and hmac.compare_digest(parts[\"v1\"], expected) ``` **Answer 2xx within 10 seconds**, then do the work. Anything else is retried after 1 and 5 minutes, then 30 minutes and 2, 5 and 10 hours (7 tries in about 18 hours). `Signedly-Event-Id` is the same on every try of an event: use it to ignore repeats. After 20 events in a row fail for good, Signedly switches the endpoint off and emails your organisation's admin; switch it on again with `PUT /ap1/webhooks/{id}/` and `\"is_active\": true`. Each endpoint's deliveries and their last answers are at `GET /ap1/webhooks/{id}/deliveries/`, and any can be sent again. ## Sandbox Build and test against the API without paying for documents: in **Account & Settings → API**, generate your **test keys**, and get a token with them at `/ap1/token/` as usual. Everything works the same, except that what you upload or make from a template with a test token is a **test document** (`is_test` on its upload): - every page of its PDF and of its audit trail says **TEST – NOT LEGALLY BINDING**; - its emails are real, with `[TEST]` at the start of the subject; - it isn't billed or counted toward your plan; - your organisation can make 50 a calendar month (templates don't count); the next upload answers 429. ## Fields Positions and sizes are in **PDF points** (1/72 inch), measured from the **top-left corner** of the page as it is displayed (rotation applied). `page_number` counts pages from 0. A field must sit wholly on its page (1 point of tolerance); otherwise it is refused with 400. A field's page and signatory can't be changed later: delete the field and add it again. ## Status values **Document `status`:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent · 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired. Signatories, fields and sends are only accepted while a document is 1–3 (not yet sent). **Signatory `status`:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected. ## Lists `GET /ap1/documents/`, `/ap1/documents-status-list/`, `/ap1/templates/`, `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10) and `offset`, and read `count`, `next`, `previous` and `results` from the response. ## Errors | Status | Meaning | |---|---| | 400 | The request was refused, also when your plan doesn't include it (see Plans); the body says why (`{\"error\": \"...\"}`, or the name of each bad field with its messages). Nothing was changed. | | 403 | The access token is missing, unknown or expired; the client ID and secret or the refresh token were refused; the organisation's plan has no API access (Free, see Plans); or an `expiry_date` isn't in the future (`\"Invalid Date Entered\"`). | | 402 | No API contract, or an unpaid API invoice: live documents are refused (test keys keep working). | | 404 | The document, template, signatory or field doesn't exist or isn't yours. | | 429 | Too many token requests (wait a minute), or this month's 50 test documents are used. | | 5xx | Our side failed; retry later. | A send that times out may still have worked: check the document's status before sending again (a second send of a sent document answers 400). Download, view and audit links are valid for about 7 days; ask for a new one whenever you need it.
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v1
|
|
9
|
-
Contact:
|
|
9
|
+
Contact: support@signedly.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The Signedly REST API lets your system upload documents, add signatories and fields, send them for signing and download the signed result. Every path starts with `/ap1/`, and every request and response body is JSON unless an endpoint says otherwise (the uploads are `multipart/form-data`). ## Authentication 1. In the Signedly web app, open **Account & Settings → API** and generate a **client ID** and **client secret** for your organisation. 2. `POST /ap1/token/` with them. You get an `access_token` (valid **2 hours**) and a `refresh_token` (valid **7 days**). While both are still valid, calling `/ap1/token/` again returns the same pair. 3. Send the access token on every other call: `Authorization: Bearer <access_token>`. 4. When the access token expires, `POST /ap1/refreshtoken/` with the refresh token for a new access token. When the refresh token has expired too, call `/ap1/token/` again. `/ap1/token/` and `/ap1/refreshtoken/` allow 60 calls a minute per IP address; more answer 429. A missing, unknown or expired access token answers 403 (`\"Client not found\"` or `\"Access token expired\"`). The API acts for your **organisation's admin account**: documents you upload belong to it and appear in its Signedly web app, and you can reach only that account's documents, templates, signatories and fields. Another organisation's IDs answer 404, as if they didn't exist. ## Plans What the API allows depends on the Signedly plan of your **organisation's admin account** (Account & Settings → Account & Plan). The same rules apply to live and test keys. | What | Free | Personal Pro | Business Pro | Teams | |---|---|---|---|---| | Generate live and test keys (Account & Settings → API) | – | ✓ | ✓ | ✓ | | Every endpoint, `/ap1/token/` and `/ap1/refreshtoken/` included | – | ✓ | ✓ | ✓ | | `require_email_otp` on `POST /ap1/signatories/` and `POST /ap1/signatories/bulk/` | – | ✓ | ✓ | ✓ | | Bulk send: `GET /ap1/bulk-sends/columns/` and `POST /ap1/bulk-sends/` | – | – | – | ✓ | The API is part of the paid plans. On Free (or with no plan) every call answers 403 `\"... Your plan doesn't include API access.\"`, with live or test keys, also with a token or keys made earlier; they work again once the plan is paid. On a paid plan, a feature it doesn't include answers 400 with `\"Your plan doesn't include ...\"` and changes nothing, and `GET /ap1/bulk-sends/{id}/` still reports bulk sends already made. Live documents also need an API contract with Signedly. Without one, or with an unpaid API invoice, `POST /ap1/upload/` (except templates), `/ap1/upload_app/`, `/ap1/documents/fromtemplate/` and `/ap1/bulk-sends/` answer 402 with live keys. Test keys work without a contract (see Sandbox). ## Sending a document for signing 1. `POST /ap1/upload/` a PDF or DOCX (`type` 2). The document is prepared in the background: find it in `GET /ap1/documents/?name=<name>` (its `upload.id` is the upload's `id`), and wait until `GET /ap1/documents/{id}/pages/` lists its pages. 2. `POST /ap1/signatories/` (one) or `POST /ap1/signatories/bulk/` (several) to add the people who sign. 3. `POST /ap1/documents/fields/` to place the fields each signatory fills in. 4. Send it: - `POST /ap1/document/send/` emails every signatory a signing link (with ordered signing, only the first; each next one is emailed in turn), or - `POST /ap1/document/send_url/` sends no email and returns the first signatory's signing link, for you to show or send yourself. 5. Poll `GET /ap1/documents-status-list/` (or `GET /ap1/documents/`) until the status is 6 (Completed), then `GET /ap1/document/download-link/` for the signed PDF and `GET /ap1/document/download-audit-link/` for its audit trail. **From a template:** upload with `type` 4 and a `template_name` (or make the template in the web app), place its fields with `POST /ap1/templates/fields/`, then for each signing make a document with `POST /ap1/documents/fromtemplate/`, add its signatory, and send it. **One signer, one call:** `POST /ap1/upload_app/` uploads a PDF or DOCX for one signer and returns their signing link in `redirect_url`; the signer places their own signature. After signing they go to the `redirect_url` you sent, and the signed PDF and its audit trail are emailed to `final_email` (otherwise to your organisation's admin). ## Quick start with curl Each step uses an ID from the step before. `$API` is this server, e.g. `https://l0ads.signedly.com`. ```bash # 1. Token curl -X POST $API/ap1/token/ -H 'Content-Type: application/json' \\ -d '{\"client_id\": \"<client id>\", \"client_secret\": \"<client secret>\"}' TOKEN=<access_token from the answer> # 2. Upload a PDF (answers with the upload's id) curl -X POST $API/ap1/upload/ -H \"Authorization: Bearer $TOKEN\" \\ -F file=@nda.pdf -F name=nda-ann-lee -F type=2 # 3. Find the document, then wait until it has pages curl \"$API/ap1/documents/?name=nda-ann-lee\" -H \"Authorization: Bearer $TOKEN\" DOC=<results[0].id> curl $API/ap1/documents/$DOC/pages/ -H \"Authorization: Bearer $TOKEN\" PAGE=<[0].id> # 4. Add the signatory curl -X POST $API/ap1/signatories/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"name\": \"Ann Lee\", \"email\": \"ann@example.com\"}' SIGNER=<id from the answer> # 5. Place her signature: 150 × 40 points, 72 points from the left, 640 from the top curl -X POST $API/ap1/documents/fields/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '[{\"document_id\": \"'$DOC'\", \"signatory_id\": \"'$SIGNER'\", \"kind\": 2, \"label\": \"Signature\", \"placeholder\": \"Sign here\", \"page\": \"'$PAGE'\", \"page_number\": 0, \"x\": 72, \"y\": 640, \"width\": 150, \"height\": 40}]' # 6. Send it (Ann gets the signing email) curl -X POST $API/ap1/document/send/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"subject\": \"Please sign the NDA\", \"message\": \"Hi Ann, please sign by Friday.\", \"expiry_date\": \"2026-12-31\"}' # 7. Poll until status is 6 (Completed), then get the signed PDF curl \"$API/ap1/documents-status-list/?document_ids=$DOC\" -H \"Authorization: Bearer $TOKEN\" curl \"$API/ap1/document/download-link/?id=$DOC\" -H \"Authorization: Bearer $TOKEN\" ``` ## Postman Import the whole API into Postman with **Import → Link** and `<this server>/swaggerap1/postman.json`. Set `client_id` and `client_secret` in the collection's **Variables**, run **Get an access token** (it saves the token for every other request), and set `document_id` when a request needs one. ## Webhooks Instead of polling, add an endpoint with `POST /ap1/webhooks/` (or in **Account & Settings → API**) and Signedly posts your organisation's document events to it: `document.sent`, `document.viewed`, `document.signed`, `document.approved`, `document.completed`, `document.rejected` and `document.expired` (all of them, or the `events` you choose). Each is a JSON `POST`: ```json {\"id\": \"5b7f…\", \"type\": \"document.signed\", \"created_at\": \"2026-10-27T09:12:00+00:00\", \"test\": false, \"data\": {\"document\": {\"id\": \"6f0c…\", \"name\": \"nda.pdf\", \"status\": 5}, \"recipient\": {\"id\": \"0b6e…\", \"email\": \"ann@example.com\", \"name\": \"Ann Lee\", \"role\": \"signer\"}}} ``` `recipient` is null for events no recipient caused (sent, completed, expired); `test` is true for documents made with your test keys. Fetch anything else, such as download links, with your access token: events never carry links. **Check every event is from Signedly.** The `Signedly-Signature` header is `t=<unix seconds>,v1=<signature>`, where the signature is the hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret. Refuse an event whose signature doesn't match or whose `t` is more than 5 minutes off: ```python import hashlib, hmac, time def is_from_signedly(secret, header, raw_body): parts = dict(item.split(\"=\", 1) for item in header.split(\",\")) signed = f\"{parts['t']}.{raw_body.decode()}\".encode() expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() fresh = abs(time.time() - int(parts[\"t\"])) <= 300 return fresh and hmac.compare_digest(parts[\"v1\"], expected) ``` **Answer 2xx within 10 seconds**, then do the work. Anything else is retried after 1 and 5 minutes, then 30 minutes and 2, 5 and 10 hours (7 tries in about 18 hours). `Signedly-Event-Id` is the same on every try of an event: use it to ignore repeats. After 20 events in a row fail for good, Signedly switches the endpoint off and emails your organisation's admin; switch it on again with `PUT /ap1/webhooks/{id}/` and `\"is_active\": true`. Each endpoint's deliveries and their last answers are at `GET /ap1/webhooks/{id}/deliveries/`, and any can be sent again. ## Sandbox Build and test against the API without paying for documents: in **Account & Settings → API**, generate your **test keys**, and get a token with them at `/ap1/token/` as usual. Everything works the same, except that what you upload or make from a template with a test token is a **test document** (`is_test` on its upload): - every page of its PDF and of its audit trail says **TEST – NOT LEGALLY BINDING**; - its emails are real, with `[TEST]` at the start of the subject; - it isn't billed or counted toward your plan; - your organisation can make 50 a calendar month (templates don't count); the next upload answers 429. ## Fields Positions and sizes are in **PDF points** (1/72 inch), measured from the **top-left corner** of the page as it is displayed (rotation applied). `page_number` counts pages from 0. A field must sit wholly on its page (1 point of tolerance); otherwise it is refused with 400. A field's page and signatory can't be changed later: delete the field and add it again. ## Status values **Document `status`:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent · 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired. Signatories, fields and sends are only accepted while a document is 1–3 (not yet sent). **Signatory `status`:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected. ## Lists `GET /ap1/documents/`, `/ap1/documents-status-list/`, `/ap1/templates/`, `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10) and `offset`, and read `count`, `next`, `previous` and `results` from the response. ## Errors | Status | Meaning | |---|---| | 400 | The request was refused, also when your plan doesn't include it (see Plans); the body says why (`{\"error\": \"...\"}`, or the name of each bad field with its messages). Nothing was changed. | | 403 | The access token is missing, unknown or expired; the client ID and secret or the refresh token were refused; the organisation's plan has no API access (Free, see Plans); or an `expiry_date` isn't in the future (`\"Invalid Date Entered\"`). | | 402 | No API contract, or an unpaid API invoice: live documents are refused (test keys keep working). | | 404 | The document, template, signatory or field doesn't exist or isn't yours. | | 429 | Too many token requests (wait a minute), or this month's 50 test documents are used. | | 5xx | Our side failed; retry later. | A send that times out may still have worked: check the document's status before sending again (a second send of a sent document answers 400). Download, view and audit links are valid for about 7 days; ask for a new one whenever you need it.
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v1
|
|
9
|
-
Contact:
|
|
9
|
+
Contact: support@signedly.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The Signedly REST API lets your system upload documents, add signatories and fields, send them for signing and download the signed result. Every path starts with `/ap1/`, and every request and response body is JSON unless an endpoint says otherwise (the uploads are `multipart/form-data`). ## Authentication 1. In the Signedly web app, open **Account & Settings → API** and generate a **client ID** and **client secret** for your organisation. 2. `POST /ap1/token/` with them. You get an `access_token` (valid **2 hours**) and a `refresh_token` (valid **7 days**). While both are still valid, calling `/ap1/token/` again returns the same pair. 3. Send the access token on every other call: `Authorization: Bearer <access_token>`. 4. When the access token expires, `POST /ap1/refreshtoken/` with the refresh token for a new access token. When the refresh token has expired too, call `/ap1/token/` again. `/ap1/token/` and `/ap1/refreshtoken/` allow 60 calls a minute per IP address; more answer 429. A missing, unknown or expired access token answers 403 (`\"Client not found\"` or `\"Access token expired\"`). The API acts for your **organisation's admin account**: documents you upload belong to it and appear in its Signedly web app, and you can reach only that account's documents, templates, signatories and fields. Another organisation's IDs answer 404, as if they didn't exist. ## Plans What the API allows depends on the Signedly plan of your **organisation's admin account** (Account & Settings → Account & Plan). The same rules apply to live and test keys. | What | Free | Personal Pro | Business Pro | Teams | |---|---|---|---|---| | Generate live and test keys (Account & Settings → API) | – | ✓ | ✓ | ✓ | | Every endpoint, `/ap1/token/` and `/ap1/refreshtoken/` included | – | ✓ | ✓ | ✓ | | `require_email_otp` on `POST /ap1/signatories/` and `POST /ap1/signatories/bulk/` | – | ✓ | ✓ | ✓ | | Bulk send: `GET /ap1/bulk-sends/columns/` and `POST /ap1/bulk-sends/` | – | – | – | ✓ | The API is part of the paid plans. On Free (or with no plan) every call answers 403 `\"... Your plan doesn't include API access.\"`, with live or test keys, also with a token or keys made earlier; they work again once the plan is paid. On a paid plan, a feature it doesn't include answers 400 with `\"Your plan doesn't include ...\"` and changes nothing, and `GET /ap1/bulk-sends/{id}/` still reports bulk sends already made. Live documents also need an API contract with Signedly. Without one, or with an unpaid API invoice, `POST /ap1/upload/` (except templates), `/ap1/upload_app/`, `/ap1/documents/fromtemplate/` and `/ap1/bulk-sends/` answer 402 with live keys. Test keys work without a contract (see Sandbox). ## Sending a document for signing 1. `POST /ap1/upload/` a PDF or DOCX (`type` 2). The document is prepared in the background: find it in `GET /ap1/documents/?name=<name>` (its `upload.id` is the upload's `id`), and wait until `GET /ap1/documents/{id}/pages/` lists its pages. 2. `POST /ap1/signatories/` (one) or `POST /ap1/signatories/bulk/` (several) to add the people who sign. 3. `POST /ap1/documents/fields/` to place the fields each signatory fills in. 4. Send it: - `POST /ap1/document/send/` emails every signatory a signing link (with ordered signing, only the first; each next one is emailed in turn), or - `POST /ap1/document/send_url/` sends no email and returns the first signatory's signing link, for you to show or send yourself. 5. Poll `GET /ap1/documents-status-list/` (or `GET /ap1/documents/`) until the status is 6 (Completed), then `GET /ap1/document/download-link/` for the signed PDF and `GET /ap1/document/download-audit-link/` for its audit trail. **From a template:** upload with `type` 4 and a `template_name` (or make the template in the web app), place its fields with `POST /ap1/templates/fields/`, then for each signing make a document with `POST /ap1/documents/fromtemplate/`, add its signatory, and send it. **One signer, one call:** `POST /ap1/upload_app/` uploads a PDF or DOCX for one signer and returns their signing link in `redirect_url`; the signer places their own signature. After signing they go to the `redirect_url` you sent, and the signed PDF and its audit trail are emailed to `final_email` (otherwise to your organisation's admin). ## Quick start with curl Each step uses an ID from the step before. `$API` is this server, e.g. `https://l0ads.signedly.com`. ```bash # 1. Token curl -X POST $API/ap1/token/ -H 'Content-Type: application/json' \\ -d '{\"client_id\": \"<client id>\", \"client_secret\": \"<client secret>\"}' TOKEN=<access_token from the answer> # 2. Upload a PDF (answers with the upload's id) curl -X POST $API/ap1/upload/ -H \"Authorization: Bearer $TOKEN\" \\ -F file=@nda.pdf -F name=nda-ann-lee -F type=2 # 3. Find the document, then wait until it has pages curl \"$API/ap1/documents/?name=nda-ann-lee\" -H \"Authorization: Bearer $TOKEN\" DOC=<results[0].id> curl $API/ap1/documents/$DOC/pages/ -H \"Authorization: Bearer $TOKEN\" PAGE=<[0].id> # 4. Add the signatory curl -X POST $API/ap1/signatories/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"name\": \"Ann Lee\", \"email\": \"ann@example.com\"}' SIGNER=<id from the answer> # 5. Place her signature: 150 × 40 points, 72 points from the left, 640 from the top curl -X POST $API/ap1/documents/fields/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '[{\"document_id\": \"'$DOC'\", \"signatory_id\": \"'$SIGNER'\", \"kind\": 2, \"label\": \"Signature\", \"placeholder\": \"Sign here\", \"page\": \"'$PAGE'\", \"page_number\": 0, \"x\": 72, \"y\": 640, \"width\": 150, \"height\": 40}]' # 6. Send it (Ann gets the signing email) curl -X POST $API/ap1/document/send/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"subject\": \"Please sign the NDA\", \"message\": \"Hi Ann, please sign by Friday.\", \"expiry_date\": \"2026-12-31\"}' # 7. Poll until status is 6 (Completed), then get the signed PDF curl \"$API/ap1/documents-status-list/?document_ids=$DOC\" -H \"Authorization: Bearer $TOKEN\" curl \"$API/ap1/document/download-link/?id=$DOC\" -H \"Authorization: Bearer $TOKEN\" ``` ## Postman Import the whole API into Postman with **Import → Link** and `<this server>/swaggerap1/postman.json`. Set `client_id` and `client_secret` in the collection's **Variables**, run **Get an access token** (it saves the token for every other request), and set `document_id` when a request needs one. ## Webhooks Instead of polling, add an endpoint with `POST /ap1/webhooks/` (or in **Account & Settings → API**) and Signedly posts your organisation's document events to it: `document.sent`, `document.viewed`, `document.signed`, `document.approved`, `document.completed`, `document.rejected` and `document.expired` (all of them, or the `events` you choose). Each is a JSON `POST`: ```json {\"id\": \"5b7f…\", \"type\": \"document.signed\", \"created_at\": \"2026-10-27T09:12:00+00:00\", \"test\": false, \"data\": {\"document\": {\"id\": \"6f0c…\", \"name\": \"nda.pdf\", \"status\": 5}, \"recipient\": {\"id\": \"0b6e…\", \"email\": \"ann@example.com\", \"name\": \"Ann Lee\", \"role\": \"signer\"}}} ``` `recipient` is null for events no recipient caused (sent, completed, expired); `test` is true for documents made with your test keys. Fetch anything else, such as download links, with your access token: events never carry links. **Check every event is from Signedly.** The `Signedly-Signature` header is `t=<unix seconds>,v1=<signature>`, where the signature is the hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret. Refuse an event whose signature doesn't match or whose `t` is more than 5 minutes off: ```python import hashlib, hmac, time def is_from_signedly(secret, header, raw_body): parts = dict(item.split(\"=\", 1) for item in header.split(\",\")) signed = f\"{parts['t']}.{raw_body.decode()}\".encode() expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() fresh = abs(time.time() - int(parts[\"t\"])) <= 300 return fresh and hmac.compare_digest(parts[\"v1\"], expected) ``` **Answer 2xx within 10 seconds**, then do the work. Anything else is retried after 1 and 5 minutes, then 30 minutes and 2, 5 and 10 hours (7 tries in about 18 hours). `Signedly-Event-Id` is the same on every try of an event: use it to ignore repeats. After 20 events in a row fail for good, Signedly switches the endpoint off and emails your organisation's admin; switch it on again with `PUT /ap1/webhooks/{id}/` and `\"is_active\": true`. Each endpoint's deliveries and their last answers are at `GET /ap1/webhooks/{id}/deliveries/`, and any can be sent again. ## Sandbox Build and test against the API without paying for documents: in **Account & Settings → API**, generate your **test keys**, and get a token with them at `/ap1/token/` as usual. Everything works the same, except that what you upload or make from a template with a test token is a **test document** (`is_test` on its upload): - every page of its PDF and of its audit trail says **TEST – NOT LEGALLY BINDING**; - its emails are real, with `[TEST]` at the start of the subject; - it isn't billed or counted toward your plan; - your organisation can make 50 a calendar month (templates don't count); the next upload answers 429. ## Fields Positions and sizes are in **PDF points** (1/72 inch), measured from the **top-left corner** of the page as it is displayed (rotation applied). `page_number` counts pages from 0. A field must sit wholly on its page (1 point of tolerance); otherwise it is refused with 400. A field's page and signatory can't be changed later: delete the field and add it again. ## Status values **Document `status`:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent · 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired. Signatories, fields and sends are only accepted while a document is 1–3 (not yet sent). **Signatory `status`:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected. ## Lists `GET /ap1/documents/`, `/ap1/documents-status-list/`, `/ap1/templates/`, `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10) and `offset`, and read `count`, `next`, `previous` and `results` from the response. ## Errors | Status | Meaning | |---|---| | 400 | The request was refused, also when your plan doesn't include it (see Plans); the body says why (`{\"error\": \"...\"}`, or the name of each bad field with its messages). Nothing was changed. | | 403 | The access token is missing, unknown or expired; the client ID and secret or the refresh token were refused; the organisation's plan has no API access (Free, see Plans); or an `expiry_date` isn't in the future (`\"Invalid Date Entered\"`). | | 402 | No API contract, or an unpaid API invoice: live documents are refused (test keys keep working). | | 404 | The document, template, signatory or field doesn't exist or isn't yours. | | 429 | Too many token requests (wait a minute), or this month's 50 test documents are used. | | 5xx | Our side failed; retry later. | A send that times out may still have worked: check the document's status before sending again (a second send of a sent document answers 400). Download, view and audit links are valid for about 7 days; ask for a new one whenever you need it.
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v1
|
|
9
|
-
Contact:
|
|
9
|
+
Contact: support@signedly.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
@@ -2093,7 +2093,6 @@ class DocumentsApi:
|
|
|
2093
2093
|
_default_content_type = (
|
|
2094
2094
|
self.api_client.select_header_content_type(
|
|
2095
2095
|
[
|
|
2096
|
-
'application/x-www-form-urlencoded',
|
|
2097
2096
|
'multipart/form-data'
|
|
2098
2097
|
]
|
|
2099
2098
|
)
|
|
@@ -2434,7 +2433,6 @@ class DocumentsApi:
|
|
|
2434
2433
|
_default_content_type = (
|
|
2435
2434
|
self.api_client.select_header_content_type(
|
|
2436
2435
|
[
|
|
2437
|
-
'application/x-www-form-urlencoded',
|
|
2438
2436
|
'multipart/form-data'
|
|
2439
2437
|
]
|
|
2440
2438
|
)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The Signedly REST API lets your system upload documents, add signatories and fields, send them for signing and download the signed result. Every path starts with `/ap1/`, and every request and response body is JSON unless an endpoint says otherwise (the uploads are `multipart/form-data`). ## Authentication 1. In the Signedly web app, open **Account & Settings → API** and generate a **client ID** and **client secret** for your organisation. 2. `POST /ap1/token/` with them. You get an `access_token` (valid **2 hours**) and a `refresh_token` (valid **7 days**). While both are still valid, calling `/ap1/token/` again returns the same pair. 3. Send the access token on every other call: `Authorization: Bearer <access_token>`. 4. When the access token expires, `POST /ap1/refreshtoken/` with the refresh token for a new access token. When the refresh token has expired too, call `/ap1/token/` again. `/ap1/token/` and `/ap1/refreshtoken/` allow 60 calls a minute per IP address; more answer 429. A missing, unknown or expired access token answers 403 (`\"Client not found\"` or `\"Access token expired\"`). The API acts for your **organisation's admin account**: documents you upload belong to it and appear in its Signedly web app, and you can reach only that account's documents, templates, signatories and fields. Another organisation's IDs answer 404, as if they didn't exist. ## Plans What the API allows depends on the Signedly plan of your **organisation's admin account** (Account & Settings → Account & Plan). The same rules apply to live and test keys. | What | Free | Personal Pro | Business Pro | Teams | |---|---|---|---|---| | Generate live and test keys (Account & Settings → API) | – | ✓ | ✓ | ✓ | | Every endpoint, `/ap1/token/` and `/ap1/refreshtoken/` included | – | ✓ | ✓ | ✓ | | `require_email_otp` on `POST /ap1/signatories/` and `POST /ap1/signatories/bulk/` | – | ✓ | ✓ | ✓ | | Bulk send: `GET /ap1/bulk-sends/columns/` and `POST /ap1/bulk-sends/` | – | – | – | ✓ | The API is part of the paid plans. On Free (or with no plan) every call answers 403 `\"... Your plan doesn't include API access.\"`, with live or test keys, also with a token or keys made earlier; they work again once the plan is paid. On a paid plan, a feature it doesn't include answers 400 with `\"Your plan doesn't include ...\"` and changes nothing, and `GET /ap1/bulk-sends/{id}/` still reports bulk sends already made. Live documents also need an API contract with Signedly. Without one, or with an unpaid API invoice, `POST /ap1/upload/` (except templates), `/ap1/upload_app/`, `/ap1/documents/fromtemplate/` and `/ap1/bulk-sends/` answer 402 with live keys. Test keys work without a contract (see Sandbox). ## Sending a document for signing 1. `POST /ap1/upload/` a PDF or DOCX (`type` 2). The document is prepared in the background: find it in `GET /ap1/documents/?name=<name>` (its `upload.id` is the upload's `id`), and wait until `GET /ap1/documents/{id}/pages/` lists its pages. 2. `POST /ap1/signatories/` (one) or `POST /ap1/signatories/bulk/` (several) to add the people who sign. 3. `POST /ap1/documents/fields/` to place the fields each signatory fills in. 4. Send it: - `POST /ap1/document/send/` emails every signatory a signing link (with ordered signing, only the first; each next one is emailed in turn), or - `POST /ap1/document/send_url/` sends no email and returns the first signatory's signing link, for you to show or send yourself. 5. Poll `GET /ap1/documents-status-list/` (or `GET /ap1/documents/`) until the status is 6 (Completed), then `GET /ap1/document/download-link/` for the signed PDF and `GET /ap1/document/download-audit-link/` for its audit trail. **From a template:** upload with `type` 4 and a `template_name` (or make the template in the web app), place its fields with `POST /ap1/templates/fields/`, then for each signing make a document with `POST /ap1/documents/fromtemplate/`, add its signatory, and send it. **One signer, one call:** `POST /ap1/upload_app/` uploads a PDF or DOCX for one signer and returns their signing link in `redirect_url`; the signer places their own signature. After signing they go to the `redirect_url` you sent, and the signed PDF and its audit trail are emailed to `final_email` (otherwise to your organisation's admin). ## Quick start with curl Each step uses an ID from the step before. `$API` is this server, e.g. `https://l0ads.signedly.com`. ```bash # 1. Token curl -X POST $API/ap1/token/ -H 'Content-Type: application/json' \\ -d '{\"client_id\": \"<client id>\", \"client_secret\": \"<client secret>\"}' TOKEN=<access_token from the answer> # 2. Upload a PDF (answers with the upload's id) curl -X POST $API/ap1/upload/ -H \"Authorization: Bearer $TOKEN\" \\ -F file=@nda.pdf -F name=nda-ann-lee -F type=2 # 3. Find the document, then wait until it has pages curl \"$API/ap1/documents/?name=nda-ann-lee\" -H \"Authorization: Bearer $TOKEN\" DOC=<results[0].id> curl $API/ap1/documents/$DOC/pages/ -H \"Authorization: Bearer $TOKEN\" PAGE=<[0].id> # 4. Add the signatory curl -X POST $API/ap1/signatories/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"name\": \"Ann Lee\", \"email\": \"ann@example.com\"}' SIGNER=<id from the answer> # 5. Place her signature: 150 × 40 points, 72 points from the left, 640 from the top curl -X POST $API/ap1/documents/fields/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '[{\"document_id\": \"'$DOC'\", \"signatory_id\": \"'$SIGNER'\", \"kind\": 2, \"label\": \"Signature\", \"placeholder\": \"Sign here\", \"page\": \"'$PAGE'\", \"page_number\": 0, \"x\": 72, \"y\": 640, \"width\": 150, \"height\": 40}]' # 6. Send it (Ann gets the signing email) curl -X POST $API/ap1/document/send/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"subject\": \"Please sign the NDA\", \"message\": \"Hi Ann, please sign by Friday.\", \"expiry_date\": \"2026-12-31\"}' # 7. Poll until status is 6 (Completed), then get the signed PDF curl \"$API/ap1/documents-status-list/?document_ids=$DOC\" -H \"Authorization: Bearer $TOKEN\" curl \"$API/ap1/document/download-link/?id=$DOC\" -H \"Authorization: Bearer $TOKEN\" ``` ## Postman Import the whole API into Postman with **Import → Link** and `<this server>/swaggerap1/postman.json`. Set `client_id` and `client_secret` in the collection's **Variables**, run **Get an access token** (it saves the token for every other request), and set `document_id` when a request needs one. ## Webhooks Instead of polling, add an endpoint with `POST /ap1/webhooks/` (or in **Account & Settings → API**) and Signedly posts your organisation's document events to it: `document.sent`, `document.viewed`, `document.signed`, `document.approved`, `document.completed`, `document.rejected` and `document.expired` (all of them, or the `events` you choose). Each is a JSON `POST`: ```json {\"id\": \"5b7f…\", \"type\": \"document.signed\", \"created_at\": \"2026-10-27T09:12:00+00:00\", \"test\": false, \"data\": {\"document\": {\"id\": \"6f0c…\", \"name\": \"nda.pdf\", \"status\": 5}, \"recipient\": {\"id\": \"0b6e…\", \"email\": \"ann@example.com\", \"name\": \"Ann Lee\", \"role\": \"signer\"}}} ``` `recipient` is null for events no recipient caused (sent, completed, expired); `test` is true for documents made with your test keys. Fetch anything else, such as download links, with your access token: events never carry links. **Check every event is from Signedly.** The `Signedly-Signature` header is `t=<unix seconds>,v1=<signature>`, where the signature is the hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret. Refuse an event whose signature doesn't match or whose `t` is more than 5 minutes off: ```python import hashlib, hmac, time def is_from_signedly(secret, header, raw_body): parts = dict(item.split(\"=\", 1) for item in header.split(\",\")) signed = f\"{parts['t']}.{raw_body.decode()}\".encode() expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() fresh = abs(time.time() - int(parts[\"t\"])) <= 300 return fresh and hmac.compare_digest(parts[\"v1\"], expected) ``` **Answer 2xx within 10 seconds**, then do the work. Anything else is retried after 1 and 5 minutes, then 30 minutes and 2, 5 and 10 hours (7 tries in about 18 hours). `Signedly-Event-Id` is the same on every try of an event: use it to ignore repeats. After 20 events in a row fail for good, Signedly switches the endpoint off and emails your organisation's admin; switch it on again with `PUT /ap1/webhooks/{id}/` and `\"is_active\": true`. Each endpoint's deliveries and their last answers are at `GET /ap1/webhooks/{id}/deliveries/`, and any can be sent again. ## Sandbox Build and test against the API without paying for documents: in **Account & Settings → API**, generate your **test keys**, and get a token with them at `/ap1/token/` as usual. Everything works the same, except that what you upload or make from a template with a test token is a **test document** (`is_test` on its upload): - every page of its PDF and of its audit trail says **TEST – NOT LEGALLY BINDING**; - its emails are real, with `[TEST]` at the start of the subject; - it isn't billed or counted toward your plan; - your organisation can make 50 a calendar month (templates don't count); the next upload answers 429. ## Fields Positions and sizes are in **PDF points** (1/72 inch), measured from the **top-left corner** of the page as it is displayed (rotation applied). `page_number` counts pages from 0. A field must sit wholly on its page (1 point of tolerance); otherwise it is refused with 400. A field's page and signatory can't be changed later: delete the field and add it again. ## Status values **Document `status`:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent · 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired. Signatories, fields and sends are only accepted while a document is 1–3 (not yet sent). **Signatory `status`:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected. ## Lists `GET /ap1/documents/`, `/ap1/documents-status-list/`, `/ap1/templates/`, `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10) and `offset`, and read `count`, `next`, `previous` and `results` from the response. ## Errors | Status | Meaning | |---|---| | 400 | The request was refused, also when your plan doesn't include it (see Plans); the body says why (`{\"error\": \"...\"}`, or the name of each bad field with its messages). Nothing was changed. | | 403 | The access token is missing, unknown or expired; the client ID and secret or the refresh token were refused; the organisation's plan has no API access (Free, see Plans); or an `expiry_date` isn't in the future (`\"Invalid Date Entered\"`). | | 402 | No API contract, or an unpaid API invoice: live documents are refused (test keys keep working). | | 404 | The document, template, signatory or field doesn't exist or isn't yours. | | 429 | Too many token requests (wait a minute), or this month's 50 test documents are used. | | 5xx | Our side failed; retry later. | A send that times out may still have worked: check the document's status before sending again (a second send of a sent document answers 400). Download, view and audit links are valid for about 7 days; ask for a new one whenever you need it.
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v1
|
|
9
|
-
Contact:
|
|
9
|
+
Contact: support@signedly.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The Signedly REST API lets your system upload documents, add signatories and fields, send them for signing and download the signed result. Every path starts with `/ap1/`, and every request and response body is JSON unless an endpoint says otherwise (the uploads are `multipart/form-data`). ## Authentication 1. In the Signedly web app, open **Account & Settings → API** and generate a **client ID** and **client secret** for your organisation. 2. `POST /ap1/token/` with them. You get an `access_token` (valid **2 hours**) and a `refresh_token` (valid **7 days**). While both are still valid, calling `/ap1/token/` again returns the same pair. 3. Send the access token on every other call: `Authorization: Bearer <access_token>`. 4. When the access token expires, `POST /ap1/refreshtoken/` with the refresh token for a new access token. When the refresh token has expired too, call `/ap1/token/` again. `/ap1/token/` and `/ap1/refreshtoken/` allow 60 calls a minute per IP address; more answer 429. A missing, unknown or expired access token answers 403 (`\"Client not found\"` or `\"Access token expired\"`). The API acts for your **organisation's admin account**: documents you upload belong to it and appear in its Signedly web app, and you can reach only that account's documents, templates, signatories and fields. Another organisation's IDs answer 404, as if they didn't exist. ## Plans What the API allows depends on the Signedly plan of your **organisation's admin account** (Account & Settings → Account & Plan). The same rules apply to live and test keys. | What | Free | Personal Pro | Business Pro | Teams | |---|---|---|---|---| | Generate live and test keys (Account & Settings → API) | – | ✓ | ✓ | ✓ | | Every endpoint, `/ap1/token/` and `/ap1/refreshtoken/` included | – | ✓ | ✓ | ✓ | | `require_email_otp` on `POST /ap1/signatories/` and `POST /ap1/signatories/bulk/` | – | ✓ | ✓ | ✓ | | Bulk send: `GET /ap1/bulk-sends/columns/` and `POST /ap1/bulk-sends/` | – | – | – | ✓ | The API is part of the paid plans. On Free (or with no plan) every call answers 403 `\"... Your plan doesn't include API access.\"`, with live or test keys, also with a token or keys made earlier; they work again once the plan is paid. On a paid plan, a feature it doesn't include answers 400 with `\"Your plan doesn't include ...\"` and changes nothing, and `GET /ap1/bulk-sends/{id}/` still reports bulk sends already made. Live documents also need an API contract with Signedly. Without one, or with an unpaid API invoice, `POST /ap1/upload/` (except templates), `/ap1/upload_app/`, `/ap1/documents/fromtemplate/` and `/ap1/bulk-sends/` answer 402 with live keys. Test keys work without a contract (see Sandbox). ## Sending a document for signing 1. `POST /ap1/upload/` a PDF or DOCX (`type` 2). The document is prepared in the background: find it in `GET /ap1/documents/?name=<name>` (its `upload.id` is the upload's `id`), and wait until `GET /ap1/documents/{id}/pages/` lists its pages. 2. `POST /ap1/signatories/` (one) or `POST /ap1/signatories/bulk/` (several) to add the people who sign. 3. `POST /ap1/documents/fields/` to place the fields each signatory fills in. 4. Send it: - `POST /ap1/document/send/` emails every signatory a signing link (with ordered signing, only the first; each next one is emailed in turn), or - `POST /ap1/document/send_url/` sends no email and returns the first signatory's signing link, for you to show or send yourself. 5. Poll `GET /ap1/documents-status-list/` (or `GET /ap1/documents/`) until the status is 6 (Completed), then `GET /ap1/document/download-link/` for the signed PDF and `GET /ap1/document/download-audit-link/` for its audit trail. **From a template:** upload with `type` 4 and a `template_name` (or make the template in the web app), place its fields with `POST /ap1/templates/fields/`, then for each signing make a document with `POST /ap1/documents/fromtemplate/`, add its signatory, and send it. **One signer, one call:** `POST /ap1/upload_app/` uploads a PDF or DOCX for one signer and returns their signing link in `redirect_url`; the signer places their own signature. After signing they go to the `redirect_url` you sent, and the signed PDF and its audit trail are emailed to `final_email` (otherwise to your organisation's admin). ## Quick start with curl Each step uses an ID from the step before. `$API` is this server, e.g. `https://l0ads.signedly.com`. ```bash # 1. Token curl -X POST $API/ap1/token/ -H 'Content-Type: application/json' \\ -d '{\"client_id\": \"<client id>\", \"client_secret\": \"<client secret>\"}' TOKEN=<access_token from the answer> # 2. Upload a PDF (answers with the upload's id) curl -X POST $API/ap1/upload/ -H \"Authorization: Bearer $TOKEN\" \\ -F file=@nda.pdf -F name=nda-ann-lee -F type=2 # 3. Find the document, then wait until it has pages curl \"$API/ap1/documents/?name=nda-ann-lee\" -H \"Authorization: Bearer $TOKEN\" DOC=<results[0].id> curl $API/ap1/documents/$DOC/pages/ -H \"Authorization: Bearer $TOKEN\" PAGE=<[0].id> # 4. Add the signatory curl -X POST $API/ap1/signatories/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"name\": \"Ann Lee\", \"email\": \"ann@example.com\"}' SIGNER=<id from the answer> # 5. Place her signature: 150 × 40 points, 72 points from the left, 640 from the top curl -X POST $API/ap1/documents/fields/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '[{\"document_id\": \"'$DOC'\", \"signatory_id\": \"'$SIGNER'\", \"kind\": 2, \"label\": \"Signature\", \"placeholder\": \"Sign here\", \"page\": \"'$PAGE'\", \"page_number\": 0, \"x\": 72, \"y\": 640, \"width\": 150, \"height\": 40}]' # 6. Send it (Ann gets the signing email) curl -X POST $API/ap1/document/send/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"subject\": \"Please sign the NDA\", \"message\": \"Hi Ann, please sign by Friday.\", \"expiry_date\": \"2026-12-31\"}' # 7. Poll until status is 6 (Completed), then get the signed PDF curl \"$API/ap1/documents-status-list/?document_ids=$DOC\" -H \"Authorization: Bearer $TOKEN\" curl \"$API/ap1/document/download-link/?id=$DOC\" -H \"Authorization: Bearer $TOKEN\" ``` ## Postman Import the whole API into Postman with **Import → Link** and `<this server>/swaggerap1/postman.json`. Set `client_id` and `client_secret` in the collection's **Variables**, run **Get an access token** (it saves the token for every other request), and set `document_id` when a request needs one. ## Webhooks Instead of polling, add an endpoint with `POST /ap1/webhooks/` (or in **Account & Settings → API**) and Signedly posts your organisation's document events to it: `document.sent`, `document.viewed`, `document.signed`, `document.approved`, `document.completed`, `document.rejected` and `document.expired` (all of them, or the `events` you choose). Each is a JSON `POST`: ```json {\"id\": \"5b7f…\", \"type\": \"document.signed\", \"created_at\": \"2026-10-27T09:12:00+00:00\", \"test\": false, \"data\": {\"document\": {\"id\": \"6f0c…\", \"name\": \"nda.pdf\", \"status\": 5}, \"recipient\": {\"id\": \"0b6e…\", \"email\": \"ann@example.com\", \"name\": \"Ann Lee\", \"role\": \"signer\"}}} ``` `recipient` is null for events no recipient caused (sent, completed, expired); `test` is true for documents made with your test keys. Fetch anything else, such as download links, with your access token: events never carry links. **Check every event is from Signedly.** The `Signedly-Signature` header is `t=<unix seconds>,v1=<signature>`, where the signature is the hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret. Refuse an event whose signature doesn't match or whose `t` is more than 5 minutes off: ```python import hashlib, hmac, time def is_from_signedly(secret, header, raw_body): parts = dict(item.split(\"=\", 1) for item in header.split(\",\")) signed = f\"{parts['t']}.{raw_body.decode()}\".encode() expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() fresh = abs(time.time() - int(parts[\"t\"])) <= 300 return fresh and hmac.compare_digest(parts[\"v1\"], expected) ``` **Answer 2xx within 10 seconds**, then do the work. Anything else is retried after 1 and 5 minutes, then 30 minutes and 2, 5 and 10 hours (7 tries in about 18 hours). `Signedly-Event-Id` is the same on every try of an event: use it to ignore repeats. After 20 events in a row fail for good, Signedly switches the endpoint off and emails your organisation's admin; switch it on again with `PUT /ap1/webhooks/{id}/` and `\"is_active\": true`. Each endpoint's deliveries and their last answers are at `GET /ap1/webhooks/{id}/deliveries/`, and any can be sent again. ## Sandbox Build and test against the API without paying for documents: in **Account & Settings → API**, generate your **test keys**, and get a token with them at `/ap1/token/` as usual. Everything works the same, except that what you upload or make from a template with a test token is a **test document** (`is_test` on its upload): - every page of its PDF and of its audit trail says **TEST – NOT LEGALLY BINDING**; - its emails are real, with `[TEST]` at the start of the subject; - it isn't billed or counted toward your plan; - your organisation can make 50 a calendar month (templates don't count); the next upload answers 429. ## Fields Positions and sizes are in **PDF points** (1/72 inch), measured from the **top-left corner** of the page as it is displayed (rotation applied). `page_number` counts pages from 0. A field must sit wholly on its page (1 point of tolerance); otherwise it is refused with 400. A field's page and signatory can't be changed later: delete the field and add it again. ## Status values **Document `status`:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent · 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired. Signatories, fields and sends are only accepted while a document is 1–3 (not yet sent). **Signatory `status`:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected. ## Lists `GET /ap1/documents/`, `/ap1/documents-status-list/`, `/ap1/templates/`, `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10) and `offset`, and read `count`, `next`, `previous` and `results` from the response. ## Errors | Status | Meaning | |---|---| | 400 | The request was refused, also when your plan doesn't include it (see Plans); the body says why (`{\"error\": \"...\"}`, or the name of each bad field with its messages). Nothing was changed. | | 403 | The access token is missing, unknown or expired; the client ID and secret or the refresh token were refused; the organisation's plan has no API access (Free, see Plans); or an `expiry_date` isn't in the future (`\"Invalid Date Entered\"`). | | 402 | No API contract, or an unpaid API invoice: live documents are refused (test keys keep working). | | 404 | The document, template, signatory or field doesn't exist or isn't yours. | | 429 | Too many token requests (wait a minute), or this month's 50 test documents are used. | | 5xx | Our side failed; retry later. | A send that times out may still have worked: check the document's status before sending again (a second send of a sent document answers 400). Download, view and audit links are valid for about 7 days; ask for a new one whenever you need it.
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v1
|
|
9
|
-
Contact:
|
|
9
|
+
Contact: support@signedly.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The Signedly REST API lets your system upload documents, add signatories and fields, send them for signing and download the signed result. Every path starts with `/ap1/`, and every request and response body is JSON unless an endpoint says otherwise (the uploads are `multipart/form-data`). ## Authentication 1. In the Signedly web app, open **Account & Settings → API** and generate a **client ID** and **client secret** for your organisation. 2. `POST /ap1/token/` with them. You get an `access_token` (valid **2 hours**) and a `refresh_token` (valid **7 days**). While both are still valid, calling `/ap1/token/` again returns the same pair. 3. Send the access token on every other call: `Authorization: Bearer <access_token>`. 4. When the access token expires, `POST /ap1/refreshtoken/` with the refresh token for a new access token. When the refresh token has expired too, call `/ap1/token/` again. `/ap1/token/` and `/ap1/refreshtoken/` allow 60 calls a minute per IP address; more answer 429. A missing, unknown or expired access token answers 403 (`\"Client not found\"` or `\"Access token expired\"`). The API acts for your **organisation's admin account**: documents you upload belong to it and appear in its Signedly web app, and you can reach only that account's documents, templates, signatories and fields. Another organisation's IDs answer 404, as if they didn't exist. ## Plans What the API allows depends on the Signedly plan of your **organisation's admin account** (Account & Settings → Account & Plan). The same rules apply to live and test keys. | What | Free | Personal Pro | Business Pro | Teams | |---|---|---|---|---| | Generate live and test keys (Account & Settings → API) | – | ✓ | ✓ | ✓ | | Every endpoint, `/ap1/token/` and `/ap1/refreshtoken/` included | – | ✓ | ✓ | ✓ | | `require_email_otp` on `POST /ap1/signatories/` and `POST /ap1/signatories/bulk/` | – | ✓ | ✓ | ✓ | | Bulk send: `GET /ap1/bulk-sends/columns/` and `POST /ap1/bulk-sends/` | – | – | – | ✓ | The API is part of the paid plans. On Free (or with no plan) every call answers 403 `\"... Your plan doesn't include API access.\"`, with live or test keys, also with a token or keys made earlier; they work again once the plan is paid. On a paid plan, a feature it doesn't include answers 400 with `\"Your plan doesn't include ...\"` and changes nothing, and `GET /ap1/bulk-sends/{id}/` still reports bulk sends already made. Live documents also need an API contract with Signedly. Without one, or with an unpaid API invoice, `POST /ap1/upload/` (except templates), `/ap1/upload_app/`, `/ap1/documents/fromtemplate/` and `/ap1/bulk-sends/` answer 402 with live keys. Test keys work without a contract (see Sandbox). ## Sending a document for signing 1. `POST /ap1/upload/` a PDF or DOCX (`type` 2). The document is prepared in the background: find it in `GET /ap1/documents/?name=<name>` (its `upload.id` is the upload's `id`), and wait until `GET /ap1/documents/{id}/pages/` lists its pages. 2. `POST /ap1/signatories/` (one) or `POST /ap1/signatories/bulk/` (several) to add the people who sign. 3. `POST /ap1/documents/fields/` to place the fields each signatory fills in. 4. Send it: - `POST /ap1/document/send/` emails every signatory a signing link (with ordered signing, only the first; each next one is emailed in turn), or - `POST /ap1/document/send_url/` sends no email and returns the first signatory's signing link, for you to show or send yourself. 5. Poll `GET /ap1/documents-status-list/` (or `GET /ap1/documents/`) until the status is 6 (Completed), then `GET /ap1/document/download-link/` for the signed PDF and `GET /ap1/document/download-audit-link/` for its audit trail. **From a template:** upload with `type` 4 and a `template_name` (or make the template in the web app), place its fields with `POST /ap1/templates/fields/`, then for each signing make a document with `POST /ap1/documents/fromtemplate/`, add its signatory, and send it. **One signer, one call:** `POST /ap1/upload_app/` uploads a PDF or DOCX for one signer and returns their signing link in `redirect_url`; the signer places their own signature. After signing they go to the `redirect_url` you sent, and the signed PDF and its audit trail are emailed to `final_email` (otherwise to your organisation's admin). ## Quick start with curl Each step uses an ID from the step before. `$API` is this server, e.g. `https://l0ads.signedly.com`. ```bash # 1. Token curl -X POST $API/ap1/token/ -H 'Content-Type: application/json' \\ -d '{\"client_id\": \"<client id>\", \"client_secret\": \"<client secret>\"}' TOKEN=<access_token from the answer> # 2. Upload a PDF (answers with the upload's id) curl -X POST $API/ap1/upload/ -H \"Authorization: Bearer $TOKEN\" \\ -F file=@nda.pdf -F name=nda-ann-lee -F type=2 # 3. Find the document, then wait until it has pages curl \"$API/ap1/documents/?name=nda-ann-lee\" -H \"Authorization: Bearer $TOKEN\" DOC=<results[0].id> curl $API/ap1/documents/$DOC/pages/ -H \"Authorization: Bearer $TOKEN\" PAGE=<[0].id> # 4. Add the signatory curl -X POST $API/ap1/signatories/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"name\": \"Ann Lee\", \"email\": \"ann@example.com\"}' SIGNER=<id from the answer> # 5. Place her signature: 150 × 40 points, 72 points from the left, 640 from the top curl -X POST $API/ap1/documents/fields/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '[{\"document_id\": \"'$DOC'\", \"signatory_id\": \"'$SIGNER'\", \"kind\": 2, \"label\": \"Signature\", \"placeholder\": \"Sign here\", \"page\": \"'$PAGE'\", \"page_number\": 0, \"x\": 72, \"y\": 640, \"width\": 150, \"height\": 40}]' # 6. Send it (Ann gets the signing email) curl -X POST $API/ap1/document/send/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"subject\": \"Please sign the NDA\", \"message\": \"Hi Ann, please sign by Friday.\", \"expiry_date\": \"2026-12-31\"}' # 7. Poll until status is 6 (Completed), then get the signed PDF curl \"$API/ap1/documents-status-list/?document_ids=$DOC\" -H \"Authorization: Bearer $TOKEN\" curl \"$API/ap1/document/download-link/?id=$DOC\" -H \"Authorization: Bearer $TOKEN\" ``` ## Postman Import the whole API into Postman with **Import → Link** and `<this server>/swaggerap1/postman.json`. Set `client_id` and `client_secret` in the collection's **Variables**, run **Get an access token** (it saves the token for every other request), and set `document_id` when a request needs one. ## Webhooks Instead of polling, add an endpoint with `POST /ap1/webhooks/` (or in **Account & Settings → API**) and Signedly posts your organisation's document events to it: `document.sent`, `document.viewed`, `document.signed`, `document.approved`, `document.completed`, `document.rejected` and `document.expired` (all of them, or the `events` you choose). Each is a JSON `POST`: ```json {\"id\": \"5b7f…\", \"type\": \"document.signed\", \"created_at\": \"2026-10-27T09:12:00+00:00\", \"test\": false, \"data\": {\"document\": {\"id\": \"6f0c…\", \"name\": \"nda.pdf\", \"status\": 5}, \"recipient\": {\"id\": \"0b6e…\", \"email\": \"ann@example.com\", \"name\": \"Ann Lee\", \"role\": \"signer\"}}} ``` `recipient` is null for events no recipient caused (sent, completed, expired); `test` is true for documents made with your test keys. Fetch anything else, such as download links, with your access token: events never carry links. **Check every event is from Signedly.** The `Signedly-Signature` header is `t=<unix seconds>,v1=<signature>`, where the signature is the hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret. Refuse an event whose signature doesn't match or whose `t` is more than 5 minutes off: ```python import hashlib, hmac, time def is_from_signedly(secret, header, raw_body): parts = dict(item.split(\"=\", 1) for item in header.split(\",\")) signed = f\"{parts['t']}.{raw_body.decode()}\".encode() expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() fresh = abs(time.time() - int(parts[\"t\"])) <= 300 return fresh and hmac.compare_digest(parts[\"v1\"], expected) ``` **Answer 2xx within 10 seconds**, then do the work. Anything else is retried after 1 and 5 minutes, then 30 minutes and 2, 5 and 10 hours (7 tries in about 18 hours). `Signedly-Event-Id` is the same on every try of an event: use it to ignore repeats. After 20 events in a row fail for good, Signedly switches the endpoint off and emails your organisation's admin; switch it on again with `PUT /ap1/webhooks/{id}/` and `\"is_active\": true`. Each endpoint's deliveries and their last answers are at `GET /ap1/webhooks/{id}/deliveries/`, and any can be sent again. ## Sandbox Build and test against the API without paying for documents: in **Account & Settings → API**, generate your **test keys**, and get a token with them at `/ap1/token/` as usual. Everything works the same, except that what you upload or make from a template with a test token is a **test document** (`is_test` on its upload): - every page of its PDF and of its audit trail says **TEST – NOT LEGALLY BINDING**; - its emails are real, with `[TEST]` at the start of the subject; - it isn't billed or counted toward your plan; - your organisation can make 50 a calendar month (templates don't count); the next upload answers 429. ## Fields Positions and sizes are in **PDF points** (1/72 inch), measured from the **top-left corner** of the page as it is displayed (rotation applied). `page_number` counts pages from 0. A field must sit wholly on its page (1 point of tolerance); otherwise it is refused with 400. A field's page and signatory can't be changed later: delete the field and add it again. ## Status values **Document `status`:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent · 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired. Signatories, fields and sends are only accepted while a document is 1–3 (not yet sent). **Signatory `status`:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected. ## Lists `GET /ap1/documents/`, `/ap1/documents-status-list/`, `/ap1/templates/`, `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10) and `offset`, and read `count`, `next`, `previous` and `results` from the response. ## Errors | Status | Meaning | |---|---| | 400 | The request was refused, also when your plan doesn't include it (see Plans); the body says why (`{\"error\": \"...\"}`, or the name of each bad field with its messages). Nothing was changed. | | 403 | The access token is missing, unknown or expired; the client ID and secret or the refresh token were refused; the organisation's plan has no API access (Free, see Plans); or an `expiry_date` isn't in the future (`\"Invalid Date Entered\"`). | | 402 | No API contract, or an unpaid API invoice: live documents are refused (test keys keep working). | | 404 | The document, template, signatory or field doesn't exist or isn't yours. | | 429 | Too many token requests (wait a minute), or this month's 50 test documents are used. | | 5xx | Our side failed; retry later. | A send that times out may still have worked: check the document's status before sending again (a second send of a sent document answers 400). Download, view and audit links are valid for about 7 days; ask for a new one whenever you need it.
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v1
|
|
9
|
-
Contact:
|
|
9
|
+
Contact: support@signedly.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The Signedly REST API lets your system upload documents, add signatories and fields, send them for signing and download the signed result. Every path starts with `/ap1/`, and every request and response body is JSON unless an endpoint says otherwise (the uploads are `multipart/form-data`). ## Authentication 1. In the Signedly web app, open **Account & Settings → API** and generate a **client ID** and **client secret** for your organisation. 2. `POST /ap1/token/` with them. You get an `access_token` (valid **2 hours**) and a `refresh_token` (valid **7 days**). While both are still valid, calling `/ap1/token/` again returns the same pair. 3. Send the access token on every other call: `Authorization: Bearer <access_token>`. 4. When the access token expires, `POST /ap1/refreshtoken/` with the refresh token for a new access token. When the refresh token has expired too, call `/ap1/token/` again. `/ap1/token/` and `/ap1/refreshtoken/` allow 60 calls a minute per IP address; more answer 429. A missing, unknown or expired access token answers 403 (`\"Client not found\"` or `\"Access token expired\"`). The API acts for your **organisation's admin account**: documents you upload belong to it and appear in its Signedly web app, and you can reach only that account's documents, templates, signatories and fields. Another organisation's IDs answer 404, as if they didn't exist. ## Plans What the API allows depends on the Signedly plan of your **organisation's admin account** (Account & Settings → Account & Plan). The same rules apply to live and test keys. | What | Free | Personal Pro | Business Pro | Teams | |---|---|---|---|---| | Generate live and test keys (Account & Settings → API) | – | ✓ | ✓ | ✓ | | Every endpoint, `/ap1/token/` and `/ap1/refreshtoken/` included | – | ✓ | ✓ | ✓ | | `require_email_otp` on `POST /ap1/signatories/` and `POST /ap1/signatories/bulk/` | – | ✓ | ✓ | ✓ | | Bulk send: `GET /ap1/bulk-sends/columns/` and `POST /ap1/bulk-sends/` | – | – | – | ✓ | The API is part of the paid plans. On Free (or with no plan) every call answers 403 `\"... Your plan doesn't include API access.\"`, with live or test keys, also with a token or keys made earlier; they work again once the plan is paid. On a paid plan, a feature it doesn't include answers 400 with `\"Your plan doesn't include ...\"` and changes nothing, and `GET /ap1/bulk-sends/{id}/` still reports bulk sends already made. Live documents also need an API contract with Signedly. Without one, or with an unpaid API invoice, `POST /ap1/upload/` (except templates), `/ap1/upload_app/`, `/ap1/documents/fromtemplate/` and `/ap1/bulk-sends/` answer 402 with live keys. Test keys work without a contract (see Sandbox). ## Sending a document for signing 1. `POST /ap1/upload/` a PDF or DOCX (`type` 2). The document is prepared in the background: find it in `GET /ap1/documents/?name=<name>` (its `upload.id` is the upload's `id`), and wait until `GET /ap1/documents/{id}/pages/` lists its pages. 2. `POST /ap1/signatories/` (one) or `POST /ap1/signatories/bulk/` (several) to add the people who sign. 3. `POST /ap1/documents/fields/` to place the fields each signatory fills in. 4. Send it: - `POST /ap1/document/send/` emails every signatory a signing link (with ordered signing, only the first; each next one is emailed in turn), or - `POST /ap1/document/send_url/` sends no email and returns the first signatory's signing link, for you to show or send yourself. 5. Poll `GET /ap1/documents-status-list/` (or `GET /ap1/documents/`) until the status is 6 (Completed), then `GET /ap1/document/download-link/` for the signed PDF and `GET /ap1/document/download-audit-link/` for its audit trail. **From a template:** upload with `type` 4 and a `template_name` (or make the template in the web app), place its fields with `POST /ap1/templates/fields/`, then for each signing make a document with `POST /ap1/documents/fromtemplate/`, add its signatory, and send it. **One signer, one call:** `POST /ap1/upload_app/` uploads a PDF or DOCX for one signer and returns their signing link in `redirect_url`; the signer places their own signature. After signing they go to the `redirect_url` you sent, and the signed PDF and its audit trail are emailed to `final_email` (otherwise to your organisation's admin). ## Quick start with curl Each step uses an ID from the step before. `$API` is this server, e.g. `https://l0ads.signedly.com`. ```bash # 1. Token curl -X POST $API/ap1/token/ -H 'Content-Type: application/json' \\ -d '{\"client_id\": \"<client id>\", \"client_secret\": \"<client secret>\"}' TOKEN=<access_token from the answer> # 2. Upload a PDF (answers with the upload's id) curl -X POST $API/ap1/upload/ -H \"Authorization: Bearer $TOKEN\" \\ -F file=@nda.pdf -F name=nda-ann-lee -F type=2 # 3. Find the document, then wait until it has pages curl \"$API/ap1/documents/?name=nda-ann-lee\" -H \"Authorization: Bearer $TOKEN\" DOC=<results[0].id> curl $API/ap1/documents/$DOC/pages/ -H \"Authorization: Bearer $TOKEN\" PAGE=<[0].id> # 4. Add the signatory curl -X POST $API/ap1/signatories/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"name\": \"Ann Lee\", \"email\": \"ann@example.com\"}' SIGNER=<id from the answer> # 5. Place her signature: 150 × 40 points, 72 points from the left, 640 from the top curl -X POST $API/ap1/documents/fields/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '[{\"document_id\": \"'$DOC'\", \"signatory_id\": \"'$SIGNER'\", \"kind\": 2, \"label\": \"Signature\", \"placeholder\": \"Sign here\", \"page\": \"'$PAGE'\", \"page_number\": 0, \"x\": 72, \"y\": 640, \"width\": 150, \"height\": 40}]' # 6. Send it (Ann gets the signing email) curl -X POST $API/ap1/document/send/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"subject\": \"Please sign the NDA\", \"message\": \"Hi Ann, please sign by Friday.\", \"expiry_date\": \"2026-12-31\"}' # 7. Poll until status is 6 (Completed), then get the signed PDF curl \"$API/ap1/documents-status-list/?document_ids=$DOC\" -H \"Authorization: Bearer $TOKEN\" curl \"$API/ap1/document/download-link/?id=$DOC\" -H \"Authorization: Bearer $TOKEN\" ``` ## Postman Import the whole API into Postman with **Import → Link** and `<this server>/swaggerap1/postman.json`. Set `client_id` and `client_secret` in the collection's **Variables**, run **Get an access token** (it saves the token for every other request), and set `document_id` when a request needs one. ## Webhooks Instead of polling, add an endpoint with `POST /ap1/webhooks/` (or in **Account & Settings → API**) and Signedly posts your organisation's document events to it: `document.sent`, `document.viewed`, `document.signed`, `document.approved`, `document.completed`, `document.rejected` and `document.expired` (all of them, or the `events` you choose). Each is a JSON `POST`: ```json {\"id\": \"5b7f…\", \"type\": \"document.signed\", \"created_at\": \"2026-10-27T09:12:00+00:00\", \"test\": false, \"data\": {\"document\": {\"id\": \"6f0c…\", \"name\": \"nda.pdf\", \"status\": 5}, \"recipient\": {\"id\": \"0b6e…\", \"email\": \"ann@example.com\", \"name\": \"Ann Lee\", \"role\": \"signer\"}}} ``` `recipient` is null for events no recipient caused (sent, completed, expired); `test` is true for documents made with your test keys. Fetch anything else, such as download links, with your access token: events never carry links. **Check every event is from Signedly.** The `Signedly-Signature` header is `t=<unix seconds>,v1=<signature>`, where the signature is the hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret. Refuse an event whose signature doesn't match or whose `t` is more than 5 minutes off: ```python import hashlib, hmac, time def is_from_signedly(secret, header, raw_body): parts = dict(item.split(\"=\", 1) for item in header.split(\",\")) signed = f\"{parts['t']}.{raw_body.decode()}\".encode() expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() fresh = abs(time.time() - int(parts[\"t\"])) <= 300 return fresh and hmac.compare_digest(parts[\"v1\"], expected) ``` **Answer 2xx within 10 seconds**, then do the work. Anything else is retried after 1 and 5 minutes, then 30 minutes and 2, 5 and 10 hours (7 tries in about 18 hours). `Signedly-Event-Id` is the same on every try of an event: use it to ignore repeats. After 20 events in a row fail for good, Signedly switches the endpoint off and emails your organisation's admin; switch it on again with `PUT /ap1/webhooks/{id}/` and `\"is_active\": true`. Each endpoint's deliveries and their last answers are at `GET /ap1/webhooks/{id}/deliveries/`, and any can be sent again. ## Sandbox Build and test against the API without paying for documents: in **Account & Settings → API**, generate your **test keys**, and get a token with them at `/ap1/token/` as usual. Everything works the same, except that what you upload or make from a template with a test token is a **test document** (`is_test` on its upload): - every page of its PDF and of its audit trail says **TEST – NOT LEGALLY BINDING**; - its emails are real, with `[TEST]` at the start of the subject; - it isn't billed or counted toward your plan; - your organisation can make 50 a calendar month (templates don't count); the next upload answers 429. ## Fields Positions and sizes are in **PDF points** (1/72 inch), measured from the **top-left corner** of the page as it is displayed (rotation applied). `page_number` counts pages from 0. A field must sit wholly on its page (1 point of tolerance); otherwise it is refused with 400. A field's page and signatory can't be changed later: delete the field and add it again. ## Status values **Document `status`:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent · 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired. Signatories, fields and sends are only accepted while a document is 1–3 (not yet sent). **Signatory `status`:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected. ## Lists `GET /ap1/documents/`, `/ap1/documents-status-list/`, `/ap1/templates/`, `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10) and `offset`, and read `count`, `next`, `previous` and `results` from the response. ## Errors | Status | Meaning | |---|---| | 400 | The request was refused, also when your plan doesn't include it (see Plans); the body says why (`{\"error\": \"...\"}`, or the name of each bad field with its messages). Nothing was changed. | | 403 | The access token is missing, unknown or expired; the client ID and secret or the refresh token were refused; the organisation's plan has no API access (Free, see Plans); or an `expiry_date` isn't in the future (`\"Invalid Date Entered\"`). | | 402 | No API contract, or an unpaid API invoice: live documents are refused (test keys keep working). | | 404 | The document, template, signatory or field doesn't exist or isn't yours. | | 429 | Too many token requests (wait a minute), or this month's 50 test documents are used. | | 5xx | Our side failed; retry later. | A send that times out may still have worked: check the document's status before sending again (a second send of a sent document answers 400). Download, view and audit links are valid for about 7 days; ask for a new one whenever you need it.
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v1
|
|
9
|
-
Contact:
|
|
9
|
+
Contact: support@signedly.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The Signedly REST API lets your system upload documents, add signatories and fields, send them for signing and download the signed result. Every path starts with `/ap1/`, and every request and response body is JSON unless an endpoint says otherwise (the uploads are `multipart/form-data`). ## Authentication 1. In the Signedly web app, open **Account & Settings → API** and generate a **client ID** and **client secret** for your organisation. 2. `POST /ap1/token/` with them. You get an `access_token` (valid **2 hours**) and a `refresh_token` (valid **7 days**). While both are still valid, calling `/ap1/token/` again returns the same pair. 3. Send the access token on every other call: `Authorization: Bearer <access_token>`. 4. When the access token expires, `POST /ap1/refreshtoken/` with the refresh token for a new access token. When the refresh token has expired too, call `/ap1/token/` again. `/ap1/token/` and `/ap1/refreshtoken/` allow 60 calls a minute per IP address; more answer 429. A missing, unknown or expired access token answers 403 (`\"Client not found\"` or `\"Access token expired\"`). The API acts for your **organisation's admin account**: documents you upload belong to it and appear in its Signedly web app, and you can reach only that account's documents, templates, signatories and fields. Another organisation's IDs answer 404, as if they didn't exist. ## Plans What the API allows depends on the Signedly plan of your **organisation's admin account** (Account & Settings → Account & Plan). The same rules apply to live and test keys. | What | Free | Personal Pro | Business Pro | Teams | |---|---|---|---|---| | Generate live and test keys (Account & Settings → API) | – | ✓ | ✓ | ✓ | | Every endpoint, `/ap1/token/` and `/ap1/refreshtoken/` included | – | ✓ | ✓ | ✓ | | `require_email_otp` on `POST /ap1/signatories/` and `POST /ap1/signatories/bulk/` | – | ✓ | ✓ | ✓ | | Bulk send: `GET /ap1/bulk-sends/columns/` and `POST /ap1/bulk-sends/` | – | – | – | ✓ | The API is part of the paid plans. On Free (or with no plan) every call answers 403 `\"... Your plan doesn't include API access.\"`, with live or test keys, also with a token or keys made earlier; they work again once the plan is paid. On a paid plan, a feature it doesn't include answers 400 with `\"Your plan doesn't include ...\"` and changes nothing, and `GET /ap1/bulk-sends/{id}/` still reports bulk sends already made. Live documents also need an API contract with Signedly. Without one, or with an unpaid API invoice, `POST /ap1/upload/` (except templates), `/ap1/upload_app/`, `/ap1/documents/fromtemplate/` and `/ap1/bulk-sends/` answer 402 with live keys. Test keys work without a contract (see Sandbox). ## Sending a document for signing 1. `POST /ap1/upload/` a PDF or DOCX (`type` 2). The document is prepared in the background: find it in `GET /ap1/documents/?name=<name>` (its `upload.id` is the upload's `id`), and wait until `GET /ap1/documents/{id}/pages/` lists its pages. 2. `POST /ap1/signatories/` (one) or `POST /ap1/signatories/bulk/` (several) to add the people who sign. 3. `POST /ap1/documents/fields/` to place the fields each signatory fills in. 4. Send it: - `POST /ap1/document/send/` emails every signatory a signing link (with ordered signing, only the first; each next one is emailed in turn), or - `POST /ap1/document/send_url/` sends no email and returns the first signatory's signing link, for you to show or send yourself. 5. Poll `GET /ap1/documents-status-list/` (or `GET /ap1/documents/`) until the status is 6 (Completed), then `GET /ap1/document/download-link/` for the signed PDF and `GET /ap1/document/download-audit-link/` for its audit trail. **From a template:** upload with `type` 4 and a `template_name` (or make the template in the web app), place its fields with `POST /ap1/templates/fields/`, then for each signing make a document with `POST /ap1/documents/fromtemplate/`, add its signatory, and send it. **One signer, one call:** `POST /ap1/upload_app/` uploads a PDF or DOCX for one signer and returns their signing link in `redirect_url`; the signer places their own signature. After signing they go to the `redirect_url` you sent, and the signed PDF and its audit trail are emailed to `final_email` (otherwise to your organisation's admin). ## Quick start with curl Each step uses an ID from the step before. `$API` is this server, e.g. `https://l0ads.signedly.com`. ```bash # 1. Token curl -X POST $API/ap1/token/ -H 'Content-Type: application/json' \\ -d '{\"client_id\": \"<client id>\", \"client_secret\": \"<client secret>\"}' TOKEN=<access_token from the answer> # 2. Upload a PDF (answers with the upload's id) curl -X POST $API/ap1/upload/ -H \"Authorization: Bearer $TOKEN\" \\ -F file=@nda.pdf -F name=nda-ann-lee -F type=2 # 3. Find the document, then wait until it has pages curl \"$API/ap1/documents/?name=nda-ann-lee\" -H \"Authorization: Bearer $TOKEN\" DOC=<results[0].id> curl $API/ap1/documents/$DOC/pages/ -H \"Authorization: Bearer $TOKEN\" PAGE=<[0].id> # 4. Add the signatory curl -X POST $API/ap1/signatories/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"name\": \"Ann Lee\", \"email\": \"ann@example.com\"}' SIGNER=<id from the answer> # 5. Place her signature: 150 × 40 points, 72 points from the left, 640 from the top curl -X POST $API/ap1/documents/fields/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '[{\"document_id\": \"'$DOC'\", \"signatory_id\": \"'$SIGNER'\", \"kind\": 2, \"label\": \"Signature\", \"placeholder\": \"Sign here\", \"page\": \"'$PAGE'\", \"page_number\": 0, \"x\": 72, \"y\": 640, \"width\": 150, \"height\": 40}]' # 6. Send it (Ann gets the signing email) curl -X POST $API/ap1/document/send/ -H \"Authorization: Bearer $TOKEN\" \\ -H 'Content-Type: application/json' \\ -d '{\"document_id\": \"'$DOC'\", \"subject\": \"Please sign the NDA\", \"message\": \"Hi Ann, please sign by Friday.\", \"expiry_date\": \"2026-12-31\"}' # 7. Poll until status is 6 (Completed), then get the signed PDF curl \"$API/ap1/documents-status-list/?document_ids=$DOC\" -H \"Authorization: Bearer $TOKEN\" curl \"$API/ap1/document/download-link/?id=$DOC\" -H \"Authorization: Bearer $TOKEN\" ``` ## Postman Import the whole API into Postman with **Import → Link** and `<this server>/swaggerap1/postman.json`. Set `client_id` and `client_secret` in the collection's **Variables**, run **Get an access token** (it saves the token for every other request), and set `document_id` when a request needs one. ## Webhooks Instead of polling, add an endpoint with `POST /ap1/webhooks/` (or in **Account & Settings → API**) and Signedly posts your organisation's document events to it: `document.sent`, `document.viewed`, `document.signed`, `document.approved`, `document.completed`, `document.rejected` and `document.expired` (all of them, or the `events` you choose). Each is a JSON `POST`: ```json {\"id\": \"5b7f…\", \"type\": \"document.signed\", \"created_at\": \"2026-10-27T09:12:00+00:00\", \"test\": false, \"data\": {\"document\": {\"id\": \"6f0c…\", \"name\": \"nda.pdf\", \"status\": 5}, \"recipient\": {\"id\": \"0b6e…\", \"email\": \"ann@example.com\", \"name\": \"Ann Lee\", \"role\": \"signer\"}}} ``` `recipient` is null for events no recipient caused (sent, completed, expired); `test` is true for documents made with your test keys. Fetch anything else, such as download links, with your access token: events never carry links. **Check every event is from Signedly.** The `Signedly-Signature` header is `t=<unix seconds>,v1=<signature>`, where the signature is the hex HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret. Refuse an event whose signature doesn't match or whose `t` is more than 5 minutes off: ```python import hashlib, hmac, time def is_from_signedly(secret, header, raw_body): parts = dict(item.split(\"=\", 1) for item in header.split(\",\")) signed = f\"{parts['t']}.{raw_body.decode()}\".encode() expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() fresh = abs(time.time() - int(parts[\"t\"])) <= 300 return fresh and hmac.compare_digest(parts[\"v1\"], expected) ``` **Answer 2xx within 10 seconds**, then do the work. Anything else is retried after 1 and 5 minutes, then 30 minutes and 2, 5 and 10 hours (7 tries in about 18 hours). `Signedly-Event-Id` is the same on every try of an event: use it to ignore repeats. After 20 events in a row fail for good, Signedly switches the endpoint off and emails your organisation's admin; switch it on again with `PUT /ap1/webhooks/{id}/` and `\"is_active\": true`. Each endpoint's deliveries and their last answers are at `GET /ap1/webhooks/{id}/deliveries/`, and any can be sent again. ## Sandbox Build and test against the API without paying for documents: in **Account & Settings → API**, generate your **test keys**, and get a token with them at `/ap1/token/` as usual. Everything works the same, except that what you upload or make from a template with a test token is a **test document** (`is_test` on its upload): - every page of its PDF and of its audit trail says **TEST – NOT LEGALLY BINDING**; - its emails are real, with `[TEST]` at the start of the subject; - it isn't billed or counted toward your plan; - your organisation can make 50 a calendar month (templates don't count); the next upload answers 429. ## Fields Positions and sizes are in **PDF points** (1/72 inch), measured from the **top-left corner** of the page as it is displayed (rotation applied). `page_number` counts pages from 0. A field must sit wholly on its page (1 point of tolerance); otherwise it is refused with 400. A field's page and signatory can't be changed later: delete the field and add it again. ## Status values **Document `status`:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent · 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired. Signatories, fields and sends are only accepted while a document is 1–3 (not yet sent). **Signatory `status`:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected. ## Lists `GET /ap1/documents/`, `/ap1/documents-status-list/`, `/ap1/templates/`, `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10) and `offset`, and read `count`, `next`, `previous` and `results` from the response. ## Errors | Status | Meaning | |---|---| | 400 | The request was refused, also when your plan doesn't include it (see Plans); the body says why (`{\"error\": \"...\"}`, or the name of each bad field with its messages). Nothing was changed. | | 403 | The access token is missing, unknown or expired; the client ID and secret or the refresh token were refused; the organisation's plan has no API access (Free, see Plans); or an `expiry_date` isn't in the future (`\"Invalid Date Entered\"`). | | 402 | No API contract, or an unpaid API invoice: live documents are refused (test keys keep working). | | 404 | The document, template, signatory or field doesn't exist or isn't yours. | | 429 | Too many token requests (wait a minute), or this month's 50 test documents are used. | | 5xx | Our side failed; retry later. | A send that times out may still have worked: check the document's status before sending again (a second send of a sent document answers 400). Download, view and audit links are valid for about 7 days; ask for a new one whenever you need it.
|
|
7
7
|
|
|
8
8
|
The version of the OpenAPI document: v1
|
|
9
|
-
Contact:
|
|
9
|
+
Contact: support@signedly.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
12
12
|
Do not edit the class manually.
|