API
Send documents from your own code.
Create a token, send one request to start a document, and follow it to the signed copy.
Get a token
Sign in at sign.gregiteen.xyz, open your settings and create an API token. Copy it when it appears, because it is shown once. Keep it out of source control.
Authenticate
Send the token as a bearer credential. Every request goes to this base address.
https://sign.gregiteen.xyz/api/v1
Authorization: Bearer $SIGNEDGI_TOKEN
Send a document
Four calls take a PDF from your disk to your signer's inbox.
- Create the document. The response holds its id and a one-time upload address.
- Upload the PDF to that address.
- Add a signature box for the signer.
- Send it. Signed, gi. emails the signer a link.
# 1. Create
curl -X POST https://sign.gregiteen.xyz/api/v1/documents \
-H "Authorization: Bearer $SIGNEDGI_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"Order form","recipients":[{"name":"Ada Buyer","email":"ada@example.com"}]}'
# 2. Upload the PDF to the uploadUrl from step 1
curl -X PUT "$UPLOAD_URL" --data-binary @order-form.pdf
# 3. Place the signature box (values are a percent of the page)
curl -X POST https://sign.gregiteen.xyz/api/v1/documents/$DOCUMENT_ID/fields \
-H "Authorization: Bearer $SIGNEDGI_TOKEN" \
-H "Content-Type: application/json" \
-d '{"recipientId":$RECIPIENT_ID,"type":"SIGNATURE","pageNumber":1,"pageX":20,"pageY":82,"pageWidth":30,"pageHeight":8}'
# 4. Send
curl -X POST https://sign.gregiteen.xyz/api/v1/documents/$DOCUMENT_ID/send \
-H "Authorization: Bearer $SIGNEDGI_TOKEN" \
-H "Content-Type: application/json" -d '{}'
Follow it
| Call | What it does |
|---|---|
GET /documents/{id} | Returns the document and its status: DRAFT, PENDING, COMPLETED or REJECTED. |
GET /documents/{id}/download | Returns the signed PDF once the status is COMPLETED. |
Webhooks
Prefer a call to polling? Add a webhook in your settings, give it an address on your server, and Signed, gi. sends a request there when a document changes.
