{"openapi":"3.1.0","info":{"title":"GustKit signature API","version":"1.0.0","description":"Create an envelope, collect verified email signatures from one or more people, copy others who do not sign, download the sealed PDF, and verify it. Field kinds are signature, initials, date, and name. order is parallel or sequential. A daily email cap queues messages instead of failing the envelope. Simple visual stamps on the website stay outside this API. This is not an ICP-Brasil or qualified signature."},"servers":[{"url":"https://gustkit.com"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"gk_live_ key from the developer page"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]},"Signer":{"type":"object","properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"},"role":{"type":"string","description":"Optional role, such as client or witness."}},"required":["email"]},"Field":{"type":"object","properties":{"signer":{"type":"integer","description":"Zero-based index into signers."},"page":{"type":"integer"},"x":{"type":"number"},"y":{"type":"number"},"w":{"type":"number"},"h":{"type":"number"},"kind":{"type":"string","enum":["signature","initials","date","name"]}}},"EnvelopeCreate":{"type":"object","required":["signers"],"properties":{"pdfBase64":{"type":"string"},"pdfUrl":{"type":"string","format":"uri"},"ownerEmail":{"type":"string","format":"email"},"ownerName":{"type":"string"},"senderSigns":{"type":"boolean","description":"Add the account email as a signer when it is not already in signers."},"signers":{"type":"array","items":{"$ref":"#/components/schemas/Signer"}},"copies":{"type":"array","items":{"type":"string","format":"email"},"description":"People who are notified and receive the sealed PDF, and do not sign."},"order":{"type":"string","enum":["parallel","sequential"]},"fields":{"type":"array","items":{"$ref":"#/components/schemas/Field"}},"message":{"type":"string"},"lang":{"type":"string","description":"Envelope language. Emails and the certificate use this, not a hardcoded language."},"externalId":{"type":"string"},"webhook":{"type":"object","properties":{"url":{"type":"string"},"secret":{"type":"string"}}}}}}},"security":[{"apiKey":[]}],"paths":{"/api/v1/envelopes":{"post":{"operationId":"createEnvelope","summary":"Create an envelope","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnvelopeCreate"}}}},"responses":{"201":{"description":"Created. emailDelivery is sent, queued, or skipped. statusUrl tracks the request without an account.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/envelopes/{id}":{"get":{"operationId":"getEnvelope","summary":"Envelope status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/envelopes/{id}/download":{"get":{"operationId":"downloadEnvelope","summary":"Download the sealed PDF","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/envelopes/{id}/remind":{"post":{"operationId":"remindEnvelope","summary":"Resend the invitation to pending signers whose turn it is","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"signerId":{"type":"string"}}}}}},"responses":{"200":{"description":"Reminded count and emailDelivery","content":{"application/json":{"schema":{"type":"object"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/envelopes/{id}/cancel":{"post":{"operationId":"cancelEnvelope","summary":"Cancel an open envelope and delete the stored PDF","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cancelled","content":{"application/json":{"schema":{"type":"object"}}}},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/verify":{"post":{"operationId":"verifyPdf","summary":"Check a PDF seal and the stored audit hashes","security":[],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"pdf":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Verification","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/v1/usage":{"get":{"operationId":"usage","summary":"Monthly envelope usage for this key","responses":{"200":{"description":"Usage","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}