{"openapi":"3.1.0","info":{"title":"SignKnox API","version":"1.0.0","description":"Create documents from templates, follow their progress, download signed copies, and embed signing in your own app. Authenticate with \"Authorization: Bearer knox_...\". Each key allows 1000 requests per hour by default."},"servers":[{"url":"https://signknox.com/api/v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key from Settings, Developers"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}},"Recipient":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"type":{"enum":["signer","cc","firm"]},"step":{"type":"integer"},"status":{"enum":["pending","viewed","paying","signed","declined"]},"verify":{"enum":["none","code","email","sms"]},"client_user_id":{"type":["string","null"]},"viewed_at":{"type":["string","null"]},"signed_at":{"type":["string","null"]},"signing_url":{"type":"string","description":"Only in the create response, for recipients without a client_user_id"},"access_code":{"type":"string","description":"Only when verify is \"code\"; give it to them by phone"}}},"Document":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"document"},"title":{"type":"string"},"status":{"enum":["draft","sent","completed","declined","voided","expired","purged"]},"ref":{"type":"string"},"external_id":{"type":["string","null"]},"template_id":{"type":["string","null"]},"created_at":{"type":"string"},"sent_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"purge_at":{"type":["string","null"]},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/Recipient"}},"fields":{"type":"array","items":{"type":"object","properties":{"label":{"type":["string","null"]},"type":{"type":"string"},"recipient_id":{"type":"string"},"page":{"type":"integer"},"required":{"type":"boolean"},"value":{}}}},"files":{"type":"object","properties":{"original":{"type":["string","null"]},"signed":{"type":["string","null"]},"audit":{"type":"string"}}}}},"Template":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"pages":{"type":"integer"},"signs_first":{"type":"boolean","description":"The firm signs first with its saved signature"},"roles":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"name":{"type":"string"},"type":{"enum":["signer","cc"]},"step":{"type":"integer"},"verify":{"type":"string"}}}},"fields":{"type":"array","items":{"type":"object"}}}},"CreateDocument":{"type":"object","required":["template_id","recipients"],"properties":{"template_id":{"type":"string"},"title":{"type":"string"},"message":{"type":"string"},"external_id":{"type":"string","description":"Your own id, echoed in webhooks"},"recipients":{"type":"array","items":{"type":"object","required":["name","email"],"properties":{"role":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Role name from the template (or its index)"},"name":{"type":"string"},"email":{"type":"string"},"verify":{"enum":["none","code","email","sms"]},"phone":{"type":"string","description":"E.164, needed for sms"},"client_user_id":{"type":"string","description":"Set it to sign inside your app (no email is sent)"},"note":{"type":"string","description":"A private note only this recipient sees"},"text_link":{"type":"boolean","description":"Also text the signing link to phone (needs Twilio)"}}}},"values":{"type":"object","additionalProperties":{"type":"string"},"description":"Pre-fill boxes by their label"},"lock_values":{"type":"boolean"},"expire_days":{"type":"integer","default":30},"remind":{"type":"boolean","default":true},"allow_reassign":{"type":"boolean","default":true},"send":{"type":"boolean","default":true}}}}},"paths":{"/me":{"get":{"summary":"Check your key","responses":{"200":{"description":"The firm and key"}}}},"/templates":{"get":{"summary":"List templates","responses":{"200":{"description":"Templates","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Template"}}}}}}}}}},"/templates/{id}":{"get":{"summary":"Get a template","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Template","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}}}}},"/documents":{"get":{"summary":"List documents","parameters":[{"name":"status","in":"query","schema":{"type":"string"}},{"name":"external_id","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":100}},{"name":"starting_after","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Newest first"}}},"post":{"summary":"Create (and send) a document from a template","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocument"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/documents/{id}":{"get":{"summary":"Get a document","responses":{"200":{"description":"Document","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}}}}},"/documents/{id}/send":{"post":{"summary":"Send a draft created with send:false","responses":{"200":{"description":"Document"}}}},"/documents/{id}/pdf":{"get":{"summary":"Download the signed PDF (with its Certificate of Completion and digital seal)","responses":{"200":{"description":"PDF"},"409":{"description":"Not completed yet"}}}},"/documents/{id}/original":{"get":{"summary":"Download the original PDF","responses":{"200":{"description":"PDF"}}}},"/documents/{id}/audit":{"get":{"summary":"The event history","responses":{"200":{"description":"Events"}}}},"/documents/{id}/void":{"post":{"summary":"Void a document that is out for signature","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"Document"}}}},"/documents/{id}/remind":{"post":{"summary":"Email a reminder to whoever is up next","responses":{"200":{"description":"Count"}}}},"/documents/{id}/recipients/{rid}/embed":{"post":{"summary":"Single-use signing URL (5 minutes) for a recipient with a client_user_id","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"return_url":{"type":"string"},"client_user_id":{"type":"string"}}}}}},"responses":{"201":{"description":"{ url, expires_at }"}}}}},"webhooks":{"document.sent":{"post":{"summary":"Sent on document.sent. Verify the SignKnox-Signature header: HMAC-SHA256 of \"t.body\" with your endpoint secret.","responses":{"200":{"description":"Any 2xx acknowledges it"}}}},"recipient.viewed":{"post":{"summary":"Sent on recipient.viewed. Verify the SignKnox-Signature header: HMAC-SHA256 of \"t.body\" with your endpoint secret.","responses":{"200":{"description":"Any 2xx acknowledges it"}}}},"recipient.signed":{"post":{"summary":"Sent on recipient.signed. Verify the SignKnox-Signature header: HMAC-SHA256 of \"t.body\" with your endpoint secret.","responses":{"200":{"description":"Any 2xx acknowledges it"}}}},"document.completed":{"post":{"summary":"Sent on document.completed. Verify the SignKnox-Signature header: HMAC-SHA256 of \"t.body\" with your endpoint secret.","responses":{"200":{"description":"Any 2xx acknowledges it"}}}},"document.declined":{"post":{"summary":"Sent on document.declined. Verify the SignKnox-Signature header: HMAC-SHA256 of \"t.body\" with your endpoint secret.","responses":{"200":{"description":"Any 2xx acknowledges it"}}}},"document.voided":{"post":{"summary":"Sent on document.voided. Verify the SignKnox-Signature header: HMAC-SHA256 of \"t.body\" with your endpoint secret.","responses":{"200":{"description":"Any 2xx acknowledges it"}}}},"document.expired":{"post":{"summary":"Sent on document.expired. Verify the SignKnox-Signature header: HMAC-SHA256 of \"t.body\" with your endpoint secret.","responses":{"200":{"description":"Any 2xx acknowledges it"}}}},"payment.succeeded":{"post":{"summary":"Sent on payment.succeeded. Verify the SignKnox-Signature header: HMAC-SHA256 of \"t.body\" with your endpoint secret.","responses":{"200":{"description":"Any 2xx acknowledges it"}}}},"recipient.reassigned":{"post":{"summary":"Sent on recipient.reassigned. Verify the SignKnox-Signature header: HMAC-SHA256 of \"t.body\" with your endpoint secret.","responses":{"200":{"description":"Any 2xx acknowledges it"}}}},"recipient.updated":{"post":{"summary":"Sent on recipient.updated. Verify the SignKnox-Signature header: HMAC-SHA256 of \"t.body\" with your endpoint secret.","responses":{"200":{"description":"Any 2xx acknowledges it"}}}},"document.purged":{"post":{"summary":"Sent on document.purged. Verify the SignKnox-Signature header: HMAC-SHA256 of \"t.body\" with your endpoint secret.","responses":{"200":{"description":"Any 2xx acknowledges it"}}}},"recipient.reviewed":{"post":{"summary":"Sent on recipient.reviewed. Verify the SignKnox-Signature header: HMAC-SHA256 of \"t.body\" with your endpoint secret.","responses":{"200":{"description":"Any 2xx acknowledges it"}}}}}}