signedly 0.1.2__tar.gz → 0.1.3__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.
Files changed (203) hide show
  1. signedly-0.1.3/PKG-INFO +18 -0
  2. {signedly-0.1.2 → signedly-0.1.3}/README.md +185 -28
  3. {signedly-0.1.2 → signedly-0.1.3}/pyproject.toml +7 -7
  4. signedly-0.1.3/setup.py +51 -0
  5. signedly-0.1.3/signedly/__init__.py +95 -0
  6. {signedly-0.1.2 → signedly-0.1.3}/signedly/api/api_request_logs_api.py +54 -20
  7. {signedly-0.1.2 → signedly-0.1.3}/signedly/api/authentication_api.py +4 -4
  8. {signedly-0.1.2 → signedly-0.1.3}/signedly/api/bulk_sending_api.py +1 -1
  9. {signedly-0.1.2 → signedly-0.1.3}/signedly/api/documents_api.py +49 -55
  10. {signedly-0.1.2 → signedly-0.1.3}/signedly/api/downloads_api.py +22 -7
  11. {signedly-0.1.2 → signedly-0.1.3}/signedly/api/fields_api.py +16 -16
  12. {signedly-0.1.2 → signedly-0.1.3}/signedly/api/sending_api.py +10 -10
  13. {signedly-0.1.2 → signedly-0.1.3}/signedly/api/signatories_api.py +7 -7
  14. {signedly-0.1.2 → signedly-0.1.3}/signedly/api/templates_api.py +19 -22
  15. {signedly-0.1.2 → signedly-0.1.3}/signedly/api/webhooks_api.py +17 -16
  16. {signedly-0.1.2 → signedly-0.1.3}/signedly/api_client.py +2 -2
  17. signedly-0.1.3/signedly/configuration.py +596 -0
  18. signedly-0.1.3/signedly/exceptions.py +200 -0
  19. {signedly-0.1.2 → signedly-0.1.3}/signedly/helpers.py +27 -9
  20. signedly-0.1.3/signedly/models/__init__.py +69 -0
  21. signedly-0.1.3/signedly/models/create_bulk_send202_response.py +105 -0
  22. signedly-0.1.3/signedly/models/create_bulk_send_request.py +101 -0
  23. signedly-0.1.3/signedly/models/create_document_fields_request_inner.py +158 -0
  24. signedly-0.1.3/signedly/models/create_document_from_template200_response.py +101 -0
  25. signedly-0.1.3/signedly/models/create_document_from_template_request.py +115 -0
  26. signedly-0.1.3/signedly/models/create_document_from_template_request_recipients_inner.py +92 -0
  27. signedly-0.1.3/signedly/models/create_signatories_request.py +100 -0
  28. signedly-0.1.3/signedly/models/create_signatories_request_signatories_inner.py +92 -0
  29. signedly-0.1.3/signedly/models/create_signatory_request.py +94 -0
  30. signedly-0.1.3/signedly/models/create_template_fields_request_inner.py +160 -0
  31. signedly-0.1.3/signedly/models/create_webhook_endpoint_request.py +103 -0
  32. signedly-0.1.3/signedly/models/delete_document204_response.py +88 -0
  33. signedly-0.1.3/signedly/models/delete_field_request.py +88 -0
  34. signedly-0.1.3/signedly/models/document.py +158 -0
  35. signedly-0.1.3/signedly/models/document_page.py +112 -0
  36. signedly-0.1.3/signedly/models/document_status_page.py +112 -0
  37. signedly-0.1.3/signedly/models/document_status_row.py +90 -0
  38. signedly-0.1.3/signedly/models/fill_and_send_document_request.py +116 -0
  39. signedly-0.1.3/signedly/models/fill_and_send_document_request_elements_inner.py +96 -0
  40. signedly-0.1.3/signedly/models/get_access_token_request.py +90 -0
  41. signedly-0.1.3/signedly/models/get_audit_trail_link200_response.py +88 -0
  42. signedly-0.1.3/signedly/models/get_download_status200_response.py +90 -0
  43. signedly-0.1.3/signedly/models/list_bulk_send_columns200_response_inner.py +92 -0
  44. signedly-0.1.3/signedly/models/model_field.py +201 -0
  45. signedly-0.1.3/signedly/models/page.py +102 -0
  46. signedly-0.1.3/signedly/models/refresh_access_token200_response.py +99 -0
  47. signedly-0.1.3/signedly/models/refresh_access_token_request.py +88 -0
  48. signedly-0.1.3/signedly/models/request_count_page.py +112 -0
  49. signedly-0.1.3/signedly/models/request_hit.py +92 -0
  50. signedly-0.1.3/signedly/models/request_log.py +107 -0
  51. signedly-0.1.3/signedly/models/request_log_page.py +112 -0
  52. signedly-0.1.3/signedly/models/rotate_webhook_secret_request.py +88 -0
  53. signedly-0.1.3/signedly/models/send_document200_response.py +96 -0
  54. signedly-0.1.3/signedly/models/send_document200_response_existing_signatures.py +95 -0
  55. signedly-0.1.3/signedly/models/send_document_by_link200_response.py +98 -0
  56. signedly-0.1.3/signedly/models/send_document_by_link_request.py +91 -0
  57. signedly-0.1.3/signedly/models/send_document_request.py +102 -0
  58. signedly-0.1.3/signedly/models/signatory.py +118 -0
  59. signedly-0.1.3/signedly/models/template.py +124 -0
  60. signedly-0.1.3/signedly/models/template_field.py +208 -0
  61. signedly-0.1.3/signedly/models/template_page.py +112 -0
  62. signedly-0.1.3/signedly/models/update_document_field_by_body_request.py +160 -0
  63. signedly-0.1.3/signedly/models/update_document_field_by_body_request_items_inner.py +92 -0
  64. signedly-0.1.3/signedly/models/update_webhook_endpoint_request.py +105 -0
  65. signedly-0.1.3/signedly/models/upload.py +109 -0
  66. signedly-0.1.3/signedly/models/upload_document_for_one_signer200_response.py +98 -0
  67. signedly-0.1.3/signedly/models/upload_document_for_one_signer_request.py +96 -0
  68. signedly-0.1.3/signedly/models/upload_document_request.py +101 -0
  69. signedly-0.1.3/signedly/models/webhook_delivery.py +139 -0
  70. signedly-0.1.3/signedly/models/webhook_delivery_page.py +112 -0
  71. signedly-0.1.3/signedly/models/webhook_endpoint.py +119 -0
  72. signedly-0.1.3/signedly/models/webhook_endpoint_with_secret.py +123 -0
  73. signedly-0.1.3/signedly/rest.py +258 -0
  74. signedly-0.1.3/signedly.egg-info/PKG-INFO +18 -0
  75. {signedly-0.1.2 → signedly-0.1.3}/signedly.egg-info/SOURCES.txt +6 -0
  76. signedly-0.1.3/test/test_delete_document204_response.py +52 -0
  77. {signedly-0.1.2 → signedly-0.1.3}/test/test_helpers.py +51 -0
  78. signedly-0.1.3/test/test_rotate_webhook_secret_request.py +52 -0
  79. signedly-0.1.3/test/test_send_document200_response_existing_signatures.py +55 -0
  80. signedly-0.1.2/PKG-INFO +0 -18
  81. signedly-0.1.2/setup.py +0 -51
  82. signedly-0.1.2/signedly/__init__.py +0 -92
  83. signedly-0.1.2/signedly/configuration.py +0 -596
  84. signedly-0.1.2/signedly/exceptions.py +0 -200
  85. signedly-0.1.2/signedly/models/__init__.py +0 -66
  86. signedly-0.1.2/signedly/models/create_bulk_send202_response.py +0 -105
  87. signedly-0.1.2/signedly/models/create_bulk_send_request.py +0 -101
  88. signedly-0.1.2/signedly/models/create_document_fields_request_inner.py +0 -156
  89. signedly-0.1.2/signedly/models/create_document_from_template200_response.py +0 -101
  90. signedly-0.1.2/signedly/models/create_document_from_template_request.py +0 -115
  91. signedly-0.1.2/signedly/models/create_document_from_template_request_recipients_inner.py +0 -92
  92. signedly-0.1.2/signedly/models/create_signatories_request.py +0 -100
  93. signedly-0.1.2/signedly/models/create_signatories_request_signatories_inner.py +0 -92
  94. signedly-0.1.2/signedly/models/create_signatory_request.py +0 -94
  95. signedly-0.1.2/signedly/models/create_template_fields_request_inner.py +0 -156
  96. signedly-0.1.2/signedly/models/create_webhook_endpoint_request.py +0 -103
  97. signedly-0.1.2/signedly/models/delete_field_request.py +0 -88
  98. signedly-0.1.2/signedly/models/document.py +0 -158
  99. signedly-0.1.2/signedly/models/document_page.py +0 -112
  100. signedly-0.1.2/signedly/models/document_status_page.py +0 -112
  101. signedly-0.1.2/signedly/models/document_status_row.py +0 -90
  102. signedly-0.1.2/signedly/models/fill_and_send_document_request.py +0 -116
  103. signedly-0.1.2/signedly/models/fill_and_send_document_request_elements_inner.py +0 -96
  104. signedly-0.1.2/signedly/models/get_access_token_request.py +0 -90
  105. signedly-0.1.2/signedly/models/get_audit_trail_link200_response.py +0 -88
  106. signedly-0.1.2/signedly/models/get_download_status200_response.py +0 -90
  107. signedly-0.1.2/signedly/models/list_bulk_send_columns200_response_inner.py +0 -92
  108. signedly-0.1.2/signedly/models/model_field.py +0 -201
  109. signedly-0.1.2/signedly/models/page.py +0 -102
  110. signedly-0.1.2/signedly/models/refresh_access_token200_response.py +0 -99
  111. signedly-0.1.2/signedly/models/refresh_access_token_request.py +0 -88
  112. signedly-0.1.2/signedly/models/request_count_page.py +0 -112
  113. signedly-0.1.2/signedly/models/request_hit.py +0 -92
  114. signedly-0.1.2/signedly/models/request_log.py +0 -107
  115. signedly-0.1.2/signedly/models/request_log_page.py +0 -112
  116. signedly-0.1.2/signedly/models/send_document200_response.py +0 -88
  117. signedly-0.1.2/signedly/models/send_document_by_link200_response.py +0 -90
  118. signedly-0.1.2/signedly/models/send_document_by_link_request.py +0 -91
  119. signedly-0.1.2/signedly/models/send_document_request.py +0 -102
  120. signedly-0.1.2/signedly/models/signatory.py +0 -118
  121. signedly-0.1.2/signedly/models/template.py +0 -124
  122. signedly-0.1.2/signedly/models/template_field.py +0 -201
  123. signedly-0.1.2/signedly/models/template_page.py +0 -112
  124. signedly-0.1.2/signedly/models/update_document_field_by_body_request.py +0 -158
  125. signedly-0.1.2/signedly/models/update_document_field_by_body_request_items_inner.py +0 -92
  126. signedly-0.1.2/signedly/models/update_webhook_endpoint_request.py +0 -105
  127. signedly-0.1.2/signedly/models/upload.py +0 -109
  128. signedly-0.1.2/signedly/models/upload_document_for_one_signer200_response.py +0 -90
  129. signedly-0.1.2/signedly/models/upload_document_for_one_signer_request.py +0 -96
  130. signedly-0.1.2/signedly/models/upload_document_request.py +0 -101
  131. signedly-0.1.2/signedly/models/webhook_delivery.py +0 -139
  132. signedly-0.1.2/signedly/models/webhook_delivery_page.py +0 -112
  133. signedly-0.1.2/signedly/models/webhook_endpoint.py +0 -115
  134. signedly-0.1.2/signedly/models/webhook_endpoint_with_secret.py +0 -119
  135. signedly-0.1.2/signedly/rest.py +0 -258
  136. signedly-0.1.2/signedly.egg-info/PKG-INFO +0 -18
  137. {signedly-0.1.2 → signedly-0.1.3}/LICENSE +0 -0
  138. {signedly-0.1.2 → signedly-0.1.3}/setup.cfg +0 -0
  139. {signedly-0.1.2 → signedly-0.1.3}/signedly/api/__init__.py +0 -0
  140. {signedly-0.1.2 → signedly-0.1.3}/signedly/api_response.py +0 -0
  141. {signedly-0.1.2 → signedly-0.1.3}/signedly/py.typed +0 -0
  142. {signedly-0.1.2 → signedly-0.1.3}/signedly.egg-info/dependency_links.txt +0 -0
  143. {signedly-0.1.2 → signedly-0.1.3}/signedly.egg-info/requires.txt +0 -0
  144. {signedly-0.1.2 → signedly-0.1.3}/signedly.egg-info/top_level.txt +0 -0
  145. {signedly-0.1.2 → signedly-0.1.3}/test/test_api_request_logs_api.py +0 -0
  146. {signedly-0.1.2 → signedly-0.1.3}/test/test_authentication_api.py +0 -0
  147. {signedly-0.1.2 → signedly-0.1.3}/test/test_bulk_sending_api.py +0 -0
  148. {signedly-0.1.2 → signedly-0.1.3}/test/test_create_bulk_send202_response.py +0 -0
  149. {signedly-0.1.2 → signedly-0.1.3}/test/test_create_bulk_send_request.py +0 -0
  150. {signedly-0.1.2 → signedly-0.1.3}/test/test_create_document_fields_request_inner.py +0 -0
  151. {signedly-0.1.2 → signedly-0.1.3}/test/test_create_document_from_template200_response.py +0 -0
  152. {signedly-0.1.2 → signedly-0.1.3}/test/test_create_document_from_template_request.py +0 -0
  153. {signedly-0.1.2 → signedly-0.1.3}/test/test_create_document_from_template_request_recipients_inner.py +0 -0
  154. {signedly-0.1.2 → signedly-0.1.3}/test/test_create_signatories_request.py +0 -0
  155. {signedly-0.1.2 → signedly-0.1.3}/test/test_create_signatories_request_signatories_inner.py +0 -0
  156. {signedly-0.1.2 → signedly-0.1.3}/test/test_create_signatory_request.py +0 -0
  157. {signedly-0.1.2 → signedly-0.1.3}/test/test_create_template_fields_request_inner.py +0 -0
  158. {signedly-0.1.2 → signedly-0.1.3}/test/test_create_webhook_endpoint_request.py +0 -0
  159. {signedly-0.1.2 → signedly-0.1.3}/test/test_delete_field_request.py +0 -0
  160. {signedly-0.1.2 → signedly-0.1.3}/test/test_document.py +0 -0
  161. {signedly-0.1.2 → signedly-0.1.3}/test/test_document_page.py +0 -0
  162. {signedly-0.1.2 → signedly-0.1.3}/test/test_document_status_page.py +0 -0
  163. {signedly-0.1.2 → signedly-0.1.3}/test/test_document_status_row.py +0 -0
  164. {signedly-0.1.2 → signedly-0.1.3}/test/test_documents_api.py +0 -0
  165. {signedly-0.1.2 → signedly-0.1.3}/test/test_downloads_api.py +0 -0
  166. {signedly-0.1.2 → signedly-0.1.3}/test/test_fields_api.py +0 -0
  167. {signedly-0.1.2 → signedly-0.1.3}/test/test_fill_and_send_document_request.py +0 -0
  168. {signedly-0.1.2 → signedly-0.1.3}/test/test_fill_and_send_document_request_elements_inner.py +0 -0
  169. {signedly-0.1.2 → signedly-0.1.3}/test/test_get_access_token_request.py +0 -0
  170. {signedly-0.1.2 → signedly-0.1.3}/test/test_get_audit_trail_link200_response.py +0 -0
  171. {signedly-0.1.2 → signedly-0.1.3}/test/test_get_download_status200_response.py +0 -0
  172. {signedly-0.1.2 → signedly-0.1.3}/test/test_list_bulk_send_columns200_response_inner.py +0 -0
  173. {signedly-0.1.2 → signedly-0.1.3}/test/test_model_field.py +0 -0
  174. {signedly-0.1.2 → signedly-0.1.3}/test/test_page.py +0 -0
  175. {signedly-0.1.2 → signedly-0.1.3}/test/test_refresh_access_token200_response.py +0 -0
  176. {signedly-0.1.2 → signedly-0.1.3}/test/test_refresh_access_token_request.py +0 -0
  177. {signedly-0.1.2 → signedly-0.1.3}/test/test_request_count_page.py +0 -0
  178. {signedly-0.1.2 → signedly-0.1.3}/test/test_request_hit.py +0 -0
  179. {signedly-0.1.2 → signedly-0.1.3}/test/test_request_log.py +0 -0
  180. {signedly-0.1.2 → signedly-0.1.3}/test/test_request_log_page.py +0 -0
  181. {signedly-0.1.2 → signedly-0.1.3}/test/test_send_document200_response.py +0 -0
  182. {signedly-0.1.2 → signedly-0.1.3}/test/test_send_document_by_link200_response.py +0 -0
  183. {signedly-0.1.2 → signedly-0.1.3}/test/test_send_document_by_link_request.py +0 -0
  184. {signedly-0.1.2 → signedly-0.1.3}/test/test_send_document_request.py +0 -0
  185. {signedly-0.1.2 → signedly-0.1.3}/test/test_sending_api.py +0 -0
  186. {signedly-0.1.2 → signedly-0.1.3}/test/test_signatories_api.py +0 -0
  187. {signedly-0.1.2 → signedly-0.1.3}/test/test_signatory.py +0 -0
  188. {signedly-0.1.2 → signedly-0.1.3}/test/test_template.py +0 -0
  189. {signedly-0.1.2 → signedly-0.1.3}/test/test_template_field.py +0 -0
  190. {signedly-0.1.2 → signedly-0.1.3}/test/test_template_page.py +0 -0
  191. {signedly-0.1.2 → signedly-0.1.3}/test/test_templates_api.py +0 -0
  192. {signedly-0.1.2 → signedly-0.1.3}/test/test_update_document_field_by_body_request.py +0 -0
  193. {signedly-0.1.2 → signedly-0.1.3}/test/test_update_document_field_by_body_request_items_inner.py +0 -0
  194. {signedly-0.1.2 → signedly-0.1.3}/test/test_update_webhook_endpoint_request.py +0 -0
  195. {signedly-0.1.2 → signedly-0.1.3}/test/test_upload.py +0 -0
  196. {signedly-0.1.2 → signedly-0.1.3}/test/test_upload_document_for_one_signer200_response.py +0 -0
  197. {signedly-0.1.2 → signedly-0.1.3}/test/test_upload_document_for_one_signer_request.py +0 -0
  198. {signedly-0.1.2 → signedly-0.1.3}/test/test_upload_document_request.py +0 -0
  199. {signedly-0.1.2 → signedly-0.1.3}/test/test_webhook_delivery.py +0 -0
  200. {signedly-0.1.2 → signedly-0.1.3}/test/test_webhook_delivery_page.py +0 -0
  201. {signedly-0.1.2 → signedly-0.1.3}/test/test_webhook_endpoint.py +0 -0
  202. {signedly-0.1.2 → signedly-0.1.3}/test/test_webhook_endpoint_with_secret.py +0 -0
  203. {signedly-0.1.2 → signedly-0.1.3}/test/test_webhooks_api.py +0 -0
@@ -0,0 +1,18 @@
1
+ Metadata-Version: 2.1
2
+ Name: signedly
3
+ Version: 0.1.3
4
+ Summary: Signedly API
5
+ Home-page: https://github.com/signedly/signedly-sdks
6
+ Author: Signedly
7
+ Author-email: support@signedly.com
8
+ License: MIT
9
+ Keywords: OpenAPI,OpenAPI-Generator,Signedly API
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: urllib3<3.0.0,>=1.25.3
13
+ Requires-Dist: python-dateutil>=2.8.2
14
+ Requires-Dist: pydantic>=2
15
+ Requires-Dist: typing-extensions>=4.7.1
16
+
17
+ 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 &#x60;/ap1/&#x60;, and every request and response body is JSON unless an endpoint says otherwise (the uploads are &#x60;multipart/form-data&#x60;). ## Authentication 1. In the Signedly web app, your organisation&#39;s **super admin** opens **Account &amp; Settings → API** and generates a **client ID** and **client secret**. Only the super admin can see, regenerate or replace the keys and manage webhooks there, because a key acts for the organisation admin. 2. &#x60;POST /ap1/token/&#x60; with them. You get an &#x60;access_token&#x60; (valid **2 hours**) and a &#x60;refresh_token&#x60; (valid **7 days**). While both are still valid, calling &#x60;/ap1/token/&#x60; again returns the same pair. 3. Send the access token on every other call: &#x60;Authorization: Bearer &lt;access_token&gt;&#x60;. 4. When the access token expires, &#x60;POST /ap1/refreshtoken/&#x60; with the refresh token for a new access token. The refresh token stays the same and each refresh keeps it valid for 7 more days, up to 30 days after &#x60;/ap1/token/&#x60; made it. When it has expired, call &#x60;/ap1/token/&#x60; again. Your key pair has one token, shared by all your processes: after a refresh, the access token it replaced keeps working for 60 seconds (never past its own expiry), so another process using it isn&#39;t refused mid-call; switch every process to the new one. &#x60;/ap1/token/&#x60; and &#x60;/ap1/refreshtoken/&#x60; allow 60 calls a minute per IP address; more answer 429. Every other call counts against your API client, separately for the live and the test keys: **600 calls a minute** in all, of which **120 a minute** may upload or send documents (&#x60;upload/&#x60;, &#x60;upload_app/&#x60;, &#x60;document/send/&#x60;, &#x60;document/send_url/&#x60;, &#x60;document/update_and_send/&#x60;, &#x60;documents/fromtemplate/&#x60;, &#x60;bulk-sends/&#x60;; a bulk send counts once, however many rows it has). Over a limit the call answers 429 with &#x60;Retry-After&#x60; (seconds until the next minute) and &#x60;X-RateLimit-Limit&#x60;, &#x60;X-RateLimit-Remaining&#x60; and &#x60;X-RateLimit-Reset&#x60; (Unix time); wait that long and retry. Contact support@signedly.com if your integration needs more. A missing, unknown or expired access token answers 403 (&#x60;\&quot;Client not found\&quot;&#x60; or &#x60;\&quot;Access token expired\&quot;&#x60;). The API acts for your **organisation&#39;s admin account**: documents you upload belong to it and appear in its Signedly web app, and you can reach only that account&#39;s documents, templates, signatories and fields, plus every document your API client made. When your super admin hands the organisation over, the API acts for the new super admin and still reaches what it made before. Another organisation&#39;s IDs answer 404, as if they didn&#39;t exist. ## Plans What the API allows depends on the Signedly plan of your **organisation&#39;s admin account** (Account &amp; Settings → Account &amp; Plan). The same rules apply to live and test keys. | What | Free | Personal Pro | Business Pro | Teams | |---|---|---|---|---| | Generate live and test keys (Account &amp; Settings → API) | – | ✓ | ✓ | ✓ | | Every endpoint, &#x60;/ap1/token/&#x60; and &#x60;/ap1/refreshtoken/&#x60; included | – | ✓ | ✓ | ✓ | | &#x60;require_email_otp&#x60; on &#x60;POST /ap1/signatories/&#x60; and &#x60;POST /ap1/signatories/bulk/&#x60; | – | ✓ | ✓ | ✓ | | Bulk send: &#x60;GET /ap1/bulk-sends/columns/&#x60; and &#x60;POST /ap1/bulk-sends/&#x60; | – | – | – | ✓ | The API is part of the paid plans. On Free (or with no plan) every call answers 403 &#x60;\&quot;... Your plan doesn&#39;t include API access.\&quot;&#x60;, 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&#39;t include answers 400 with &#x60;\&quot;Your plan doesn&#39;t include ...\&quot;&#x60; and changes nothing, and &#x60;GET /ap1/bulk-sends/{id}/&#x60; still reports bulk sends already made. Live documents also need an API contract with Signedly. Without one, or with an unpaid API invoice, &#x60;POST /ap1/upload/&#x60; (except templates), &#x60;/ap1/upload_app/&#x60;, &#x60;/ap1/documents/fromtemplate/&#x60;, &#x60;/ap1/bulk-sends/&#x60; and sending a draft already uploaded (&#x60;/ap1/document/send/&#x60;, &#x60;/ap1/document/send_url/&#x60;, &#x60;/ap1/document/update_and_send/&#x60;) answer 402 with live keys. Test keys work without a contract (see Sandbox). ## API billing Live API documents are billed per document under your organisation&#39;s API contract, on top of its Signedly plan. List prices (a contract can differ; prices exclude tax): | Tier | Per document | Monthly minimum | |---|---|---| | Basic | $0.80 / ₹60 | 100 documents | | Standard | $0.50 / ₹40 | 250 documents | | Premium | $0.25 / ₹20 | 1,000 documents | - **What counts:** a live document your API client sends, once, when it&#39;s sent. &#x60;/ap1/upload_app/&#x60; documents count when they&#39;re made, because that route returns a signing link straight away. Every document of an API bulk send counts. Drafts never sent, templates, test-key documents and documents sent from the web app don&#39;t count. Sending again or archiving doesn&#39;t count twice. Months are calendar months in UTC; the API page in Account &amp; Settings shows this month&#39;s count. - **Rejected, voided and expired documents** are still billed: a document is billed when it&#39;s sent, whatever happens to it afterwards. A send refused before it goes out (a 4xx answer) isn&#39;t billed. - **Minimum and overage:** on the 1st of each month your invoice charges that month&#39;s minimum upfront, plus last month&#39;s documents above its minimum at last month&#39;s price. Unused documents of the minimum don&#39;t roll over. The first month is charged in full, whatever day the contract starts. - **Changing or ending a contract:** new terms apply from the next invoice. When a contract ends, live documents keep working to the end of its last month; the next invoice charges only that month&#39;s overage, and live documents are then refused (402) until a contract is in place again. - **Paying:** an invoice is due 7 days after it&#39;s issued. Reminders go out 1, 7 and 13 days after the due date; 14 days after it, live documents are paused (402) until every overdue invoice is paid, and work again as soon as it is. Test keys, your data and documents already sent are never affected. - **Tax:** prices exclude tax; INR invoices show GST as its own line when it applies. - **Refunds** are handled by hand: email support@signedly.com. ## Sending a document for signing 1. &#x60;POST /ap1/upload/&#x60; a PDF or DOCX (&#x60;type&#x60; 2). The document is prepared in the background: find it in &#x60;GET /ap1/documents/?name&#x3D;&lt;name&gt;&#x60; (its &#x60;upload.id&#x60; is the upload&#39;s &#x60;id&#x60;), and wait until &#x60;GET /ap1/documents/{id}/pages/&#x60; lists its pages. 2. &#x60;POST /ap1/signatories/&#x60; (one) or &#x60;POST /ap1/signatories/bulk/&#x60; (several) to add the people who sign. 3. &#x60;POST /ap1/documents/fields/&#x60; to place the fields each signatory fills in. 4. Send it: - &#x60;POST /ap1/document/send/&#x60; emails every signatory a signing link (with ordered signing, only the first; each next one is emailed in turn), or - &#x60;POST /ap1/document/send_url/&#x60; returns the first signatory&#39;s signing link, for you to show or send yourself, and emails them nothing; any other signatories are emailed as by &#x60;send/&#x60; (all at once, or with ordered signing each in turn after the one before signs). 5. Poll &#x60;GET /ap1/documents-status-list/&#x60; (or &#x60;GET /ap1/documents/&#x60;) until the status is 6 (Completed), then &#x60;GET /ap1/document/download-link/&#x60; for the signed PDF and &#x60;GET /ap1/document/download-audit-link/&#x60; for its audit trail. **The two document lists differ on purpose.** &#x60;GET /ap1/documents/&#x60; lists only the documents this API client made through the API. &#x60;GET /ap1/documents-status-list/&#x60; lists every document of the organisation&#39;s admin, including ones made in the web app. Use the first to see your integration&#39;s own documents, and the second for everything the admin account owns. **From a template:** upload with &#x60;type&#x60; 4 and a &#x60;template_name&#x60; (or make the template in the web app), place its fields with &#x60;POST /ap1/templates/fields/&#x60; (each on the role named by its &#x60;signatory_id&#x60;, a role&#39;s &#x60;id&#x60; from &#x60;GET /ap1/signatories/?document_id&#x3D;&lt;template ID&gt;&#x60;; without one, on the first role), then for each signing make a document with &#x60;POST /ap1/documents/fromtemplate/&#x60;, add its signatory, and send it. **One signer, one call:** &#x60;POST /ap1/upload_app/&#x60; uploads a PDF or DOCX for one signer and returns their signing link in &#x60;redirect_url&#x60;; the signer places their own signature. After signing they go to the &#x60;redirect_url&#x60; you sent, and the signed PDF and its audit trail are emailed to &#x60;final_email&#x60; (otherwise to your organisation&#39;s admin). **A PDF that is already digitally signed** (Adobe, DocuSign, a DSC or Aadhaar eSign) is accepted, but signing it on Signedly invalidates those signatures. The upload and send answers (&#x60;upload/&#x60;, &#x60;upload_app/&#x60;, &#x60;send/&#x60;, &#x60;send_url/&#x60;, &#x60;update_and_send/&#x60;) say so: &#x60;existing_signatures&#x60; has the &#x60;count&#x60; (null when the file couldn&#39;t be checked) and the signers&#39; &#x60;names&#x60;, and &#x60;warnings&#x60; holds the text to show your user, e.g. \&quot;This PDF already has 1 digital signature (by Asha Rao). Signing it on Signedly will invalidate it.\&quot; &#x60;warnings&#x60; is empty when there is nothing to warn about. Nothing is refused because of it. ## Quick start with curl Each step uses an ID from the step before. &#x60;$API&#x60; is this server, e.g. &#x60;https://l0ads.signedly.com&#x60;. &#x60;&#x60;&#x60;bash # 1. Token curl -X POST $API/ap1/token/ -H &#39;Content-Type: application/json&#39; \ -d &#39;{\&quot;client_id\&quot;: \&quot;&lt;client id&gt;\&quot;, \&quot;client_secret\&quot;: \&quot;&lt;client secret&gt;\&quot;}&#39; TOKEN&#x3D;&lt;access_token from the answer&gt; # 2. Upload a PDF (answers with the upload&#39;s id) curl -X POST $API/ap1/upload/ -H \&quot;Authorization: Bearer $TOKEN\&quot; \ -F file&#x3D;@nda.pdf -F name&#x3D;nda-ann-lee -F type&#x3D;2 # 3. Find the document, then wait until it has pages curl \&quot;$API/ap1/documents/?name&#x3D;nda-ann-lee\&quot; -H \&quot;Authorization: Bearer $TOKEN\&quot; DOC&#x3D;&lt;results[0].id&gt; curl $API/ap1/documents/$DOC/pages/ -H \&quot;Authorization: Bearer $TOKEN\&quot; PAGE&#x3D;&lt;[0].id&gt; # 4. Add the signatory curl -X POST $API/ap1/signatories/ -H \&quot;Authorization: Bearer $TOKEN\&quot; \ -H &#39;Content-Type: application/json&#39; \ -d &#39;{\&quot;document_id\&quot;: \&quot;&#39;$DOC&#39;\&quot;, \&quot;name\&quot;: \&quot;Ann Lee\&quot;, \&quot;email\&quot;: \&quot;ann@example.com\&quot;}&#39; SIGNER&#x3D;&lt;id from the answer&gt; # 5. Place her signature: 150 × 40 points, 72 points from the left, 640 from the top curl -X POST $API/ap1/documents/fields/ -H \&quot;Authorization: Bearer $TOKEN\&quot; \ -H &#39;Content-Type: application/json&#39; \ -d &#39;[{\&quot;document_id\&quot;: \&quot;&#39;$DOC&#39;\&quot;, \&quot;signatory_id\&quot;: \&quot;&#39;$SIGNER&#39;\&quot;, \&quot;kind\&quot;: 2, \&quot;label\&quot;: \&quot;Signature\&quot;, \&quot;placeholder\&quot;: \&quot;Sign here\&quot;, \&quot;page\&quot;: \&quot;&#39;$PAGE&#39;\&quot;, \&quot;page_number\&quot;: 0, \&quot;x\&quot;: 72, \&quot;y\&quot;: 640, \&quot;width\&quot;: 150, \&quot;height\&quot;: 40}]&#39; # 6. Send it (Ann gets the signing email) curl -X POST $API/ap1/document/send/ -H \&quot;Authorization: Bearer $TOKEN\&quot; \ -H &#39;Content-Type: application/json&#39; \ -d &#39;{\&quot;document_id\&quot;: \&quot;&#39;$DOC&#39;\&quot;, \&quot;subject\&quot;: \&quot;Please sign the NDA\&quot;, \&quot;message\&quot;: \&quot;Hi Ann, please sign by Friday.\&quot;, \&quot;expiry_date\&quot;: \&quot;2026-12-31\&quot;}&#39; # 7. Poll until status is 6 (Completed), then get the signed PDF curl \&quot;$API/ap1/documents-status-list/?document_ids&#x3D;$DOC\&quot; -H \&quot;Authorization: Bearer $TOKEN\&quot; curl \&quot;$API/ap1/document/download-link/?id&#x3D;$DOC\&quot; -H \&quot;Authorization: Bearer $TOKEN\&quot; &#x60;&#x60;&#x60; ## Postman Import the whole API into Postman with **Import → Link** and &#x60;&lt;this server&gt;/swaggerap1/postman.json&#x60;. Set &#x60;client_id&#x60; and &#x60;client_secret&#x60; in the collection&#39;s **Variables**, run **Get an access token** (it saves the token for every other request), and set &#x60;document_id&#x60; when a request needs one. ## SDKs Official client libraries, generated from this API&#39;s spec. Each also gets and renews the access token for you and checks webhook signatures: | Language | Install | |---|---| | Python 3.8+ | &#x60;pip install signedly&#x60; | | Node / TypeScript | &#x60;npm install @signedly/sdk&#x60; | | PHP 7.4+ | &#x60;composer require signedly/sdk&#x60; | | Java 11+ | Maven or Gradle &#x60;com.signedly:signedly-sdk&#x60; | Source and a quick start for each language: https://github.com/signedly/signedly-sdks ## Webhooks Instead of polling, add an endpoint with &#x60;POST /ap1/webhooks/&#x60; (or in **Account &amp; Settings → API**) and Signedly posts your organisation&#39;s document events to it: &#x60;document.sent&#x60;, &#x60;document.viewed&#x60;, &#x60;document.signed&#x60;, &#x60;document.approved&#x60;, &#x60;document.completed&#x60;, &#x60;document.rejected&#x60;, &#x60;document.expired&#x60; and &#x60;document.voided&#x60; (all of them, or the &#x60;events&#x60; you choose). Each is a JSON &#x60;POST&#x60;: &#x60;&#x60;&#x60;json {\&quot;id\&quot;: \&quot;5b7f…\&quot;, \&quot;type\&quot;: \&quot;document.signed\&quot;, \&quot;created_at\&quot;: \&quot;2026-10-27T09:12:00+00:00\&quot;, \&quot;test\&quot;: false, \&quot;data\&quot;: {\&quot;document\&quot;: {\&quot;id\&quot;: \&quot;6f0c…\&quot;, \&quot;name\&quot;: \&quot;nda.pdf\&quot;, \&quot;status\&quot;: 5}, \&quot;recipient\&quot;: {\&quot;id\&quot;: \&quot;0b6e…\&quot;, \&quot;email\&quot;: \&quot;ann@example.com\&quot;, \&quot;name\&quot;: \&quot;Ann Lee\&quot;, \&quot;role\&quot;: \&quot;signer\&quot;}}} &#x60;&#x60;&#x60; &#x60;recipient&#x60; is null for events no recipient caused (sent, completed, expired); &#x60;test&#x60; 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 &#x60;Signedly-Signature&#x60; header is &#x60;t&#x3D;&lt;unix seconds&gt;,v1&#x3D;&lt;signature&gt;&#x60;, where the signature is the hex HMAC-SHA256 of &#x60;&lt;t&gt;.&lt;raw body&gt;&#x60; with the endpoint&#39;s secret. Refuse an event whose signature doesn&#39;t match or whose &#x60;t&#x60; is more than 5 minutes off. The header can carry more than one &#x60;v1&#x60; (after you rotate the secret, see below): accept the event if any of them matches. The signature with the old secret is always the last &#x60;v1&#x60;, so a check that reads only the last one keeps working until you switch secrets. &#x60;&#x60;&#x60;python import hashlib, hmac, time def is_from_signedly(secret, header, raw_body): items &#x3D; [item.split(\&quot;&#x3D;\&quot;, 1) for item in header.split(\&quot;,\&quot;)] t &#x3D; next(value for name, value in items if name &#x3D;&#x3D; \&quot;t\&quot;) signed &#x3D; f\&quot;{t}.{raw_body.decode()}\&quot;.encode() expected &#x3D; hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() fresh &#x3D; abs(time.time() - int(t)) &lt;&#x3D; 300 return fresh and any( hmac.compare_digest(value, expected) for name, value in items if name &#x3D;&#x3D; \&quot;v1\&quot; ) &#x60;&#x60;&#x60; **Rotating the secret** (&#x60;POST /ap1/webhooks/{id}/rotate-secret/&#x60;, or in Account &amp; Settings → API) gives a new secret. For the next 24 hours every event is signed with both the new and the old one, so you can deploy the new secret without refusing events; &#x60;previous_secret_expires_at&#x60; says when the old one stops. If the old secret leaked, send &#x60;{\&quot;expire_previous\&quot;: true}&#x60; and it stops at once. **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). &#x60;Signedly-Event-Id&#x60; 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&#39;s admin; switch it on again with &#x60;PUT /ap1/webhooks/{id}/&#x60; and &#x60;\&quot;is_active\&quot;: true&#x60;. Each endpoint&#39;s deliveries and their last answers are at &#x60;GET /ap1/webhooks/{id}/deliveries/&#x60;, and any can be sent again. Webhook history is kept for **30 days**: a delivery that succeeded or failed more than 30 days ago is deleted and can&#39;t be sent again. **Delivery is at least once and in no set order.** Build your endpoint for both: - *The same event can arrive more than once:* an answer that came after the 10 seconds, a lost connection after your server got the event, or a delivery you send again from the deliveries list. Every copy has the same &#x60;Signedly-Event-Id&#x60; and the same body (&#x60;id&#x60;, &#x60;created_at&#x60;, &#x60;data&#x60;); only &#x60;t&#x60; and the signature in &#x60;Signedly-Signature&#x60; are new. Keep the event ids you&#39;ve handled and skip repeats. - *Events can arrive out of order:* each is sent on its own and retries mix in, so &#x60;document.signed&#x60; can come after &#x60;document.completed&#x60;. &#x60;created_at&#x60; is when the event happened, not when it was sent: order by it, or fetch the document (&#x60;GET /ap1/documents-status/{id}/&#x60;) for its current status. - *What counts as a failure:* any answer that isn&#39;t 2xx within 10 seconds, redirects (3xx) included, since they aren&#39;t followed; timeouts; connection and TLS errors; and a URL that no longer points to a public address. Each is retried on the schedule above. An endpoint that is switched off, or an organisation whose plan has no API access, gets nothing, and those deliveries fail at once without counting toward switching the endpoint off. - *Where events go:* only &#x60;https://&#x60; URLs on public internet addresses, checked when you save the endpoint and before every try. ## Sandbox Build and test against the API without paying for documents: in **Account &amp; Settings → API**, generate your **test keys**, and get a token with them at &#x60;/ap1/token/&#x60; as usual. Everything works the same, except that what you upload or make from a template with a test token is a **test document** (&#x60;is_test&#x60; on its upload): - every page of its PDF and of its audit trail says **TEST – NOT LEGALLY BINDING**; - its emails are real, with &#x60;[TEST]&#x60; at the start of the subject; - it isn&#39;t billed or counted toward your plan; - your organisation can make 50 a calendar month (templates don&#39;t count); the next upload answers 429; - a test token sees and acts only on test documents: a live document answers 404 and isn&#39;t listed. It can use your templates (list them, read their fields, make documents and bulk sends from them) but not change or delete a live one. - &#x60;/ap1/logs/&#x60; and &#x60;/ap1/logs/hits/&#x60; show a test token only calls made with your test keys, and a live token only live calls (add &#x60;is_test&#x3D;true&#x60; to see the test calls). Webhook deliveries listed or resent with a test token are only those of test documents&#39; events (&#x60;\&quot;test\&quot;: true&#x60;). ## 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). &#x60;page_number&#x60; counts pages from 0: send the &#x60;id&#x60; and &#x60;page_number&#x60; that &#x60;GET /ap1/documents/{id}/pages/&#x60; lists for the same page. A field needs a known &#x60;kind&#x60; and a &#x60;width&#x60; and &#x60;height&#x60; above 0, and must sit wholly on its page (1 point of tolerance); otherwise it is refused with 400. A field&#39;s page and signatory can&#39;t be changed later: delete the field and add it again. ## Status values **Document &#x60;status&#x60;:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent · 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired · 10 Voided (stopped by its sender in the web app; its links no longer sign). Signatories, fields and sends are only accepted while a document is 1–3 (not yet sent). **Signatory &#x60;status&#x60;:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected. ## Lists &#x60;GET /ap1/documents/&#x60;, &#x60;/ap1/documents-status-list/&#x60;, &#x60;/ap1/templates/&#x60;, &#x60;/ap1/logs/&#x60; and &#x60;/ap1/logs/hits/&#x60; are paged: pass &#x60;limit&#x60; (default 10, at most 100; a larger value gets 100) and &#x60;offset&#x60;, and read &#x60;count&#x60;, &#x60;next&#x60;, &#x60;previous&#x60; and &#x60;results&#x60; from the response. Follow &#x60;next&#x60; until it is null to read every result. ## Errors | Status | Meaning | |---|---| | 400 | The request was refused, also when your plan doesn&#39;t include it (see Plans); the body says why (&#x60;{\&quot;error\&quot;: \&quot;...\&quot;}&#x60;, 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&#39;s plan has no API access (Free, see Plans); or an &#x60;expiry_date&#x60; isn&#39;t in the future (&#x60;\&quot;Invalid Date Entered\&quot;&#x60;). | | 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&#39;t exist or isn&#39;t yours. | | 429 | Too many requests this minute (see the limits under Authentication; wait &#x60;Retry-After&#x60; seconds), or this month&#39;s 50 test documents are used. | | 5xx | Our side failed; retry later. | A send that times out may still have worked: check the document&#39;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. ## Versioning and changes The API has one version today, &#x60;/ap1/&#x60;. A **breaking change** is only ever made in a new version path (for example &#x60;/ap1/v2/&#x60;): the current one keeps working, and its end (sunset) date is announced at least **6 months** ahead, by email to every API client&#39;s organisation admin and here in these docs. Breaking means: removing or renaming a route, a field or an enum value; a new required input; a changed status code or error shape; a changed meaning of an existing field. Not breaking, and made without notice: new routes; new optional inputs; new fields in responses and webhook payloads; new webhook event types; new enum values in responses; clearer error messages. **Ignore fields and event types you don&#39;t know**, so these changes never break your integration. The SDKs follow the API: a breaking change comes with a new major SDK version (see SDKs).
18
+
@@ -7,25 +7,41 @@ otherwise (the uploads are `multipart/form-data`).
7
7
 
8
8
  ## Authentication
9
9
 
10
- 1. In the Signedly web app, open **Account & Settings → API** and generate a
11
- **client ID** and **client secret** for your organisation.
10
+ 1. In the Signedly web app, your organisation's **super admin** opens **Account &
11
+ Settings → API** and generates a **client ID** and **client secret**. Only the
12
+ super admin can see, regenerate or replace the keys and manage webhooks there,
13
+ because a key acts for the organisation admin.
12
14
  2. `POST /ap1/token/` with them. You get an `access_token` (valid **2 hours**) and
13
15
  a `refresh_token` (valid **7 days**). While both are still valid, calling
14
16
  `/ap1/token/` again returns the same pair.
15
17
  3. Send the access token on every other call:
16
18
  `Authorization: Bearer <access_token>`.
17
19
  4. When the access token expires, `POST /ap1/refreshtoken/` with the refresh token
18
- for a new access token. When the refresh token has expired too, call
19
- `/ap1/token/` again.
20
+ for a new access token. The refresh token stays the same and each refresh keeps
21
+ it valid for 7 more days, up to 30 days after `/ap1/token/` made it. When it has
22
+ expired, call `/ap1/token/` again. Your key pair has one token, shared by all your
23
+ processes: after a refresh, the access token it replaced keeps working for 60
24
+ seconds (never past its own expiry), so another process using it isn't refused
25
+ mid-call; switch every process to the new one.
20
26
 
21
27
  `/ap1/token/` and `/ap1/refreshtoken/` allow 60 calls a minute per IP address;
22
- more answer 429. A missing, unknown or expired access token answers 403
28
+ more answer 429. Every other call counts against your API client, separately for
29
+ the live and the test keys: **600 calls a minute** in all, of which **120 a
30
+ minute** may upload or send documents (`upload/`, `upload_app/`, `document/send/`,
31
+ `document/send_url/`, `document/update_and_send/`, `documents/fromtemplate/`,
32
+ `bulk-sends/`; a bulk send counts once, however many rows it has). Over a limit
33
+ the call answers 429 with `Retry-After` (seconds until the next minute) and
34
+ `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` (Unix time);
35
+ wait that long and retry. Contact support@signedly.com if your integration needs
36
+ more. A missing, unknown or expired access token answers 403
23
37
  (`\"Client not found\"` or `\"Access token expired\"`).
24
38
 
25
39
  The API acts for your **organisation's admin account**: documents you upload
26
40
  belong to it and appear in its Signedly web app, and you can reach only that
27
- account's documents, templates, signatories and fields. Another organisation's
28
- IDs answer 404, as if they didn't exist.
41
+ account's documents, templates, signatories and fields, plus every document your
42
+ API client made. When your super admin hands the organisation over, the API acts
43
+ for the new super admin and still reaches what it made before. Another
44
+ organisation's IDs answer 404, as if they didn't exist.
29
45
 
30
46
  ## Plans
31
47
 
@@ -49,9 +65,48 @@ paid plan, a feature it doesn't include answers 400 with
49
65
 
50
66
  Live documents also need an API contract with Signedly. Without one, or with an
51
67
  unpaid API invoice, `POST /ap1/upload/` (except templates), `/ap1/upload_app/`,
52
- `/ap1/documents/fromtemplate/` and `/ap1/bulk-sends/` answer 402 with live keys.
68
+ `/ap1/documents/fromtemplate/`, `/ap1/bulk-sends/` and sending a draft already
69
+ uploaded (`/ap1/document/send/`, `/ap1/document/send_url/`,
70
+ `/ap1/document/update_and_send/`) answer 402 with live keys.
53
71
  Test keys work without a contract (see Sandbox).
54
72
 
73
+ ## API billing
74
+
75
+ Live API documents are billed per document under your organisation's API contract,
76
+ on top of its Signedly plan. List prices (a contract can differ; prices exclude
77
+ tax):
78
+
79
+ | Tier | Per document | Monthly minimum |
80
+ |---|---|---|
81
+ | Basic | $0.80 / ₹60 | 100 documents |
82
+ | Standard | $0.50 / ₹40 | 250 documents |
83
+ | Premium | $0.25 / ₹20 | 1,000 documents |
84
+
85
+ - **What counts:** a live document your API client sends, once, when it's sent.
86
+ `/ap1/upload_app/` documents count when they're made, because that route returns
87
+ a signing link straight away. Every document of an API bulk send counts. Drafts
88
+ never sent, templates, test-key documents and documents sent from the web app
89
+ don't count. Sending again or archiving doesn't count twice. Months are calendar
90
+ months in UTC; the API page in Account & Settings shows this month's count.
91
+ - **Rejected, voided and expired documents** are still billed: a document is
92
+ billed when it's sent, whatever happens to it afterwards. A send refused before it
93
+ goes out (a 4xx answer) isn't billed.
94
+ - **Minimum and overage:** on the 1st of each month your invoice charges that
95
+ month's minimum upfront, plus last month's documents above its minimum at last
96
+ month's price. Unused documents of the minimum don't roll over. The first month
97
+ is charged in full, whatever day the contract starts.
98
+ - **Changing or ending a contract:** new terms apply from the next invoice. When a
99
+ contract ends, live documents keep working to the end of its last month; the next
100
+ invoice charges only that month's overage, and live documents are then refused
101
+ (402) until a contract is in place again.
102
+ - **Paying:** an invoice is due 7 days after it's issued. Reminders go out 1, 7 and
103
+ 13 days after the due date; 14 days after it, live documents are paused (402)
104
+ until every overdue invoice is paid, and work again as soon as it is. Test keys,
105
+ your data and documents already sent are never affected.
106
+ - **Tax:** prices exclude tax; INR invoices show GST as its own line when it
107
+ applies.
108
+ - **Refunds** are handled by hand: email support@signedly.com.
109
+
55
110
  ## Sending a document for signing
56
111
 
57
112
  1. `POST /ap1/upload/` a PDF or DOCX (`type` 2). The document is prepared in the
@@ -65,14 +120,24 @@ Test keys work without a contract (see Sandbox).
65
120
  - `POST /ap1/document/send/` emails every signatory a signing link (with
66
121
  ordered signing, only the first; each next one is emailed in
67
122
  turn), or
68
- - `POST /ap1/document/send_url/` sends no email and returns the first
69
- signatory's signing link, for you to show or send yourself.
123
+ - `POST /ap1/document/send_url/` returns the first signatory's signing
124
+ link, for you to show or send yourself, and emails them nothing; any other
125
+ signatories are emailed as by `send/` (all at once, or with ordered signing
126
+ each in turn after the one before signs).
70
127
  5. Poll `GET /ap1/documents-status-list/` (or `GET /ap1/documents/`) until the
71
128
  status is 6 (Completed), then `GET /ap1/document/download-link/` for the
72
129
  signed PDF and `GET /ap1/document/download-audit-link/` for its audit trail.
73
130
 
131
+ **The two document lists differ on purpose.** `GET /ap1/documents/` lists only the
132
+ documents this API client made through the API. `GET /ap1/documents-status-list/`
133
+ lists every document of the organisation's admin, including ones made in the web app.
134
+ Use the first to see your integration's own documents, and the second for everything
135
+ the admin account owns.
136
+
74
137
  **From a template:** upload with `type` 4 and a `template_name` (or make the
75
- template in the web app), place its fields with `POST /ap1/templates/fields/`,
138
+ template in the web app), place its fields with `POST /ap1/templates/fields/`
139
+ (each on the role named by its `signatory_id`, a role's `id` from
140
+ `GET /ap1/signatories/?document_id=<template ID>`; without one, on the first role),
76
141
  then for each signing make a document with `POST /ap1/documents/fromtemplate/`,
77
142
  add its signatory, and send it.
78
143
 
@@ -82,6 +147,15 @@ own signature. After signing they go to the `redirect_url` you sent, and the
82
147
  signed PDF and its audit trail are emailed to `final_email` (otherwise to your
83
148
  organisation's admin).
84
149
 
150
+ **A PDF that is already digitally signed** (Adobe, DocuSign, a DSC or Aadhaar
151
+ eSign) is accepted, but signing it on Signedly invalidates those signatures. The
152
+ upload and send answers (`upload/`, `upload_app/`, `send/`, `send_url/`,
153
+ `update_and_send/`) say so: `existing_signatures` has the `count` (null when the
154
+ file couldn't be checked) and the signers' `names`, and `warnings` holds the text
155
+ to show your user, e.g. \"This PDF already has 1 digital signature (by Asha Rao).
156
+ Signing it on Signedly will invalidate it.\" `warnings` is empty when there is
157
+ nothing to warn about. Nothing is refused because of it.
158
+
85
159
  ## Quick start with curl
86
160
 
87
161
  Each step uses an ID from the step before. `$API` is this server, e.g.
@@ -134,12 +208,28 @@ Import the whole API into Postman with **Import → Link** and
134
208
  collection's **Variables**, run **Get an access token** (it saves the token for
135
209
  every other request), and set `document_id` when a request needs one.
136
210
 
211
+ ## SDKs
212
+
213
+ Official client libraries, generated from this API's spec. Each also gets and
214
+ renews the access token for you and checks webhook signatures:
215
+
216
+ | Language | Install |
217
+ |---|---|
218
+ | Python 3.8+ | `pip install signedly` |
219
+ | Node / TypeScript | `npm install @signedly/sdk` |
220
+ | PHP 7.4+ | `composer require signedly/sdk` |
221
+ | Java 11+ | Maven or Gradle `com.signedly:signedly-sdk` |
222
+
223
+ Source and a quick start for each language:
224
+ https://github.com/signedly/signedly-sdks
225
+
137
226
  ## Webhooks
138
227
 
139
228
  Instead of polling, add an endpoint with `POST /ap1/webhooks/` (or in **Account &
140
229
  Settings → API**) and Signedly posts your organisation's document events to it:
141
230
  `document.sent`, `document.viewed`, `document.signed`, `document.approved`,
142
- `document.completed`, `document.rejected` and `document.expired` (all of them,
231
+ `document.completed`, `document.rejected`, `document.expired` and
232
+ `document.voided` (all of them,
143
233
  or the `events` you choose). Each is a JSON `POST`:
144
234
 
145
235
  ```json
@@ -157,19 +247,31 @@ as download links, with your access token: events never carry links.
157
247
  **Check every event is from Signedly.** The `Signedly-Signature` header is
158
248
  `t=<unix seconds>,v1=<signature>`, where the signature is the hex HMAC-SHA256 of
159
249
  `<t>.<raw body>` with the endpoint's secret. Refuse an event whose signature
160
- doesn't match or whose `t` is more than 5 minutes off:
250
+ doesn't match or whose `t` is more than 5 minutes off. The header can carry more
251
+ than one `v1` (after you rotate the secret, see below): accept the event if any
252
+ of them matches. The signature with the old secret is always the last `v1`, so a
253
+ check that reads only the last one keeps working until you switch secrets.
161
254
 
162
255
  ```python
163
256
  import hashlib, hmac, time
164
257
 
165
258
  def is_from_signedly(secret, header, raw_body):
166
- parts = dict(item.split(\"=\", 1) for item in header.split(\",\"))
167
- signed = f\"{parts['t']}.{raw_body.decode()}\".encode()
259
+ items = [item.split(\"=\", 1) for item in header.split(\",\")]
260
+ t = next(value for name, value in items if name == \"t\")
261
+ signed = f\"{t}.{raw_body.decode()}\".encode()
168
262
  expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
169
- fresh = abs(time.time() - int(parts[\"t\"])) <= 300
170
- return fresh and hmac.compare_digest(parts[\"v1\"], expected)
263
+ fresh = abs(time.time() - int(t)) <= 300
264
+ return fresh and any(
265
+ hmac.compare_digest(value, expected) for name, value in items if name == \"v1\"
266
+ )
171
267
  ```
172
268
 
269
+ **Rotating the secret** (`POST /ap1/webhooks/{id}/rotate-secret/`, or in Account &
270
+ Settings → API) gives a new secret. For the next 24 hours every event is signed
271
+ with both the new and the old one, so you can deploy the new secret without
272
+ refusing events; `previous_secret_expires_at` says when the old one stops. If the
273
+ old secret leaked, send `{\"expire_previous\": true}` and it stops at once.
274
+
173
275
  **Answer 2xx within 10 seconds**, then do the work. Anything else is retried after
174
276
  1 and 5 minutes, then 30 minutes and 2, 5 and 10 hours (7 tries in about 18
175
277
  hours). `Signedly-Event-Id` is the same on every try of an event: use it to
@@ -177,7 +279,28 @@ ignore repeats. After 20 events in a row fail for good, Signedly switches the
177
279
  endpoint off and emails your organisation's admin; switch it on again with
178
280
  `PUT /ap1/webhooks/{id}/` and `\"is_active\": true`. Each endpoint's deliveries and
179
281
  their last answers are at `GET /ap1/webhooks/{id}/deliveries/`, and any can be
180
- sent again.
282
+ sent again. Webhook history is kept for **30 days**: a delivery that succeeded or
283
+ failed more than 30 days ago is deleted and can't be sent again.
284
+
285
+ **Delivery is at least once and in no set order.** Build your endpoint for both:
286
+
287
+ - *The same event can arrive more than once:* an answer that came after the 10
288
+ seconds, a lost connection after your server got the event, or a delivery you
289
+ send again from the deliveries list. Every copy has the same `Signedly-Event-Id`
290
+ and the same body (`id`, `created_at`, `data`); only `t` and the signature in
291
+ `Signedly-Signature` are new. Keep the event ids you've handled and skip repeats.
292
+ - *Events can arrive out of order:* each is sent on its own and retries mix in, so
293
+ `document.signed` can come after `document.completed`. `created_at` is when the
294
+ event happened, not when it was sent: order by it, or fetch the document
295
+ (`GET /ap1/documents-status/{id}/`) for its current status.
296
+ - *What counts as a failure:* any answer that isn't 2xx within 10 seconds,
297
+ redirects (3xx) included, since they aren't followed; timeouts; connection and
298
+ TLS errors; and a URL that no longer points to a public address. Each is retried
299
+ on the schedule above. An endpoint that is switched off, or an organisation
300
+ whose plan has no API access, gets nothing, and those deliveries fail at once
301
+ without counting toward switching the endpoint off.
302
+ - *Where events go:* only `https://` URLs on public internet addresses, checked
303
+ when you save the endpoint and before every try.
181
304
 
182
305
  ## Sandbox
183
306
 
@@ -191,20 +314,30 @@ upload):
191
314
  - its emails are real, with `[TEST]` at the start of the subject;
192
315
  - it isn't billed or counted toward your plan;
193
316
  - your organisation can make 50 a calendar month (templates don't count); the next
194
- upload answers 429.
317
+ upload answers 429;
318
+ - a test token sees and acts only on test documents: a live document answers 404
319
+ and isn't listed. It can use your templates (list them, read their fields, make
320
+ documents and bulk sends from them) but not change or delete a live one.
321
+ - `/ap1/logs/` and `/ap1/logs/hits/` show a test token only calls made with your
322
+ test keys, and a live token only live calls (add `is_test=true` to see the
323
+ test calls). Webhook deliveries listed or resent with a test token are only
324
+ those of test documents' events (`\"test\": true`).
195
325
 
196
326
  ## Fields
197
327
 
198
328
  Positions and sizes are in **PDF points** (1/72 inch), measured from the
199
329
  **top-left corner** of the page as it is displayed (rotation applied).
200
- `page_number` counts pages from 0. A field must sit wholly on its page (1 point
330
+ `page_number` counts pages from 0: send the `id` and `page_number` that
331
+ `GET /ap1/documents/{id}/pages/` lists for the same page. A field needs a known
332
+ `kind` and a `width` and `height` above 0, and must sit wholly on its page (1 point
201
333
  of tolerance); otherwise it is refused with 400. A field's page and signatory
202
334
  can't be changed later: delete the field and add it again.
203
335
 
204
336
  ## Status values
205
337
 
206
338
  **Document `status`:** 1 Draft · 2 Signees Added · 3 Prepared · 4 Sent ·
207
- 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired. Signatories,
339
+ 5 In Progress · 6 Completed · 7 Rejected · 8 Archived · 9 Expired · 10 Voided
340
+ (stopped by its sender in the web app; its links no longer sign). Signatories,
208
341
  fields and sends are only accepted while a document is 1–3 (not yet sent).
209
342
 
210
343
  **Signatory `status`:** 1 Waiting · 2 Invited · 3 Signed · 4 Viewed · 5 Rejected.
@@ -212,8 +345,9 @@ fields and sends are only accepted while a document is 1–3 (not yet sent).
212
345
  ## Lists
213
346
 
214
347
  `GET /ap1/documents/`, `/ap1/documents-status-list/`, `/ap1/templates/`,
215
- `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10) and
216
- `offset`, and read `count`, `next`, `previous` and `results` from the response.
348
+ `/ap1/logs/` and `/ap1/logs/hits/` are paged: pass `limit` (default 10, at most
349
+ 100; a larger value gets 100) and `offset`, and read `count`, `next`, `previous` and
350
+ `results` from the response. Follow `next` until it is null to read every result.
217
351
 
218
352
  ## Errors
219
353
 
@@ -223,7 +357,7 @@ fields and sends are only accepted while a document is 1–3 (not yet sent).
223
357
  | 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\"`). |
224
358
  | 402 | No API contract, or an unpaid API invoice: live documents are refused (test keys keep working). |
225
359
  | 404 | The document, template, signatory or field doesn't exist or isn't yours. |
226
- | 429 | Too many token requests (wait a minute), or this month's 50 test documents are used. |
360
+ | 429 | Too many requests this minute (see the limits under Authentication; wait `Retry-After` seconds), or this month's 50 test documents are used. |
227
361
  | 5xx | Our side failed; retry later. |
228
362
 
229
363
  A send that times out may still have worked: check the document's status before
@@ -232,11 +366,30 @@ sending again (a second send of a sent document answers 400).
232
366
  Download, view and audit links are valid for about 7 days; ask for a new one
233
367
  whenever you need it.
234
368
 
369
+ ## Versioning and changes
370
+
371
+ The API has one version today, `/ap1/`. A **breaking change** is only ever made in
372
+ a new version path (for example `/ap1/v2/`): the current one keeps working, and
373
+ its end (sunset) date is announced at least **6 months** ahead, by email to every
374
+ API client's organisation admin and here in these docs.
375
+
376
+ Breaking means: removing or renaming a route, a field or an enum value; a new
377
+ required input; a changed status code or error shape; a changed meaning of an
378
+ existing field.
379
+
380
+ Not breaking, and made without notice: new routes; new optional inputs; new fields
381
+ in responses and webhook payloads; new webhook event types; new enum values in
382
+ responses; clearer error messages. **Ignore fields and event types you don't
383
+ know**, so these changes never break your integration.
384
+
385
+ The SDKs follow the API: a breaking change comes with a new major SDK version
386
+ (see SDKs).
387
+
235
388
 
236
389
  This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
237
390
 
238
391
  - API version: v1
239
- - Package version: 0.1.2
392
+ - Package version: 0.1.3
240
393
  - Generator version: 7.10.0
241
394
  - Build package: org.openapitools.codegen.languages.PythonClientCodegen
242
395
  For more information, please visit [https://signedly.com](https://signedly.com)
@@ -300,12 +453,13 @@ with signedly.ApiClient(configuration) as api_client:
300
453
  api_instance = signedly.APIRequestLogsApi(api_client)
301
454
  method = 'method_example' # str | Only this HTTP method. (optional)
302
455
  path = 'path_example' # str | Only paths that contain this, e.g. `/ap1/document/`. (optional)
303
- limit = 56 # int | How many results to return (default 10). (optional)
456
+ is_test = True # bool | Live token only: `true` lists the calls made with your test keys instead of the live ones. A test token always sees only test-key calls. (optional)
457
+ limit = 56 # int | How many results to return (default 10, at most 100). (optional)
304
458
  offset = 56 # int | How many results to skip. (optional)
305
459
 
306
460
  try:
307
461
  # Count your API calls per path
308
- api_response = api_instance.list_request_counts(method=method, path=path, limit=limit, offset=offset)
462
+ api_response = api_instance.list_request_counts(method=method, path=path, is_test=is_test, limit=limit, offset=offset)
309
463
  print("The response of APIRequestLogsApi->list_request_counts:\n")
310
464
  pprint(api_response)
311
465
  except ApiException as e:
@@ -331,7 +485,7 @@ Class | Method | HTTP request | Description
331
485
  *DocumentsApi* | [**get_download_status**](docs/DocumentsApi.md#get_download_status) | **GET** /ap1/documents-status/{id}/ | Check whether the signed PDF is ready
332
486
  *DocumentsApi* | [**list_document_pages**](docs/DocumentsApi.md#list_document_pages) | **GET** /ap1/documents/{id}/pages/ | List a document&#39;s pages and their fields
333
487
  *DocumentsApi* | [**list_document_statuses**](docs/DocumentsApi.md#list_document_statuses) | **GET** /ap1/documents-status-list/ | List the status of your organisation&#39;s documents
334
- *DocumentsApi* | [**list_documents**](docs/DocumentsApi.md#list_documents) | **GET** /ap1/documents/ | List the documents this API client created
488
+ *DocumentsApi* | [**list_documents**](docs/DocumentsApi.md#list_documents) | **GET** /ap1/documents/ | List your organisation&#39;s documents
335
489
  *DocumentsApi* | [**upload_document**](docs/DocumentsApi.md#upload_document) | **POST** /ap1/upload/ | Upload a document or template
336
490
  *DocumentsApi* | [**upload_document_for_one_signer**](docs/DocumentsApi.md#upload_document_for_one_signer) | **POST** /ap1/upload_app/ | Upload a document for one signer and get their signing link
337
491
  *DownloadsApi* | [**get_audit_trail_link**](docs/DownloadsApi.md#get_audit_trail_link) | **GET** /ap1/document/download-audit-link/ | Get a link to the audit trail
@@ -381,6 +535,7 @@ Class | Method | HTTP request | Description
381
535
  - [CreateSignatoryRequest](docs/CreateSignatoryRequest.md)
382
536
  - [CreateTemplateFieldsRequestInner](docs/CreateTemplateFieldsRequestInner.md)
383
537
  - [CreateWebhookEndpointRequest](docs/CreateWebhookEndpointRequest.md)
538
+ - [DeleteDocument204Response](docs/DeleteDocument204Response.md)
384
539
  - [DeleteFieldRequest](docs/DeleteFieldRequest.md)
385
540
  - [Document](docs/Document.md)
386
541
  - [DocumentPage](docs/DocumentPage.md)
@@ -400,7 +555,9 @@ Class | Method | HTTP request | Description
400
555
  - [RequestHit](docs/RequestHit.md)
401
556
  - [RequestLog](docs/RequestLog.md)
402
557
  - [RequestLogPage](docs/RequestLogPage.md)
558
+ - [RotateWebhookSecretRequest](docs/RotateWebhookSecretRequest.md)
403
559
  - [SendDocument200Response](docs/SendDocument200Response.md)
560
+ - [SendDocument200ResponseExistingSignatures](docs/SendDocument200ResponseExistingSignatures.md)
404
561
  - [SendDocumentByLink200Response](docs/SendDocumentByLink200Response.md)
405
562
  - [SendDocumentByLinkRequest](docs/SendDocumentByLinkRequest.md)
406
563
  - [SendDocumentRequest](docs/SendDocumentRequest.md)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "signedly"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  description = "Signedly API"
5
5
  authors = ["Signedly <support@signedly.com>"]
6
6
  license = "MIT"
@@ -18,12 +18,12 @@ pydantic = ">= 2"
18
18
  typing-extensions = ">= 4.7.1"
19
19
 
20
20
  [tool.poetry.dev-dependencies]
21
- pytest = ">= 7.2.1"
22
- pytest-cov = ">= 2.8.1"
23
- tox = ">= 3.9.0"
24
- flake8 = ">= 4.0.0"
25
- types-python-dateutil = ">= 2.8.19.14"
26
- mypy = ">= 1.5"
21
+ pytest = ">= 9.2.0"
22
+ pytest-cov = ">= 7.1.0"
23
+ tox = ">= 4.67.12"
24
+ flake8 = ">= 7.5.0"
25
+ types-python-dateutil = ">= 2.9.0.20261104"
26
+ mypy = ">= 2.4.1"
27
27
 
28
28
 
29
29
  [build-system]