First Steps

All authenticated requests must include a valid JWT token in the Authorization header using the Bearer scheme.

Authorization

A valid JWT token will grant access to all endpoints that require authentication. This token must be obtained by making a request to the /user/login endpoint.

Request example

GET - {{host}}/user/login
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=
x-api-key: {{api-key}}

Response example

eyJhbGciOiJIUzI1NiIsInR5cCI6...

This JWT must be included in the Authorization header as Bearer token for all protected endpoints.


Create Sign operation

Once the Authentication is done, it is possible to create a Sign Operation by using the /sign/new endpoint.

Request example

POST {{host}}/sign/new
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6...

{
    "files": [
        {
            "receivers": [
                {
                    "email": "[email protected]"
                }
            ],
            "name": "My first send",
            "base64content": "{{file}}"
        }
    ]
}

Note: The file has to be encoded to base64

Response example

{
	"document_ids": [
		"631efb204031642c3a895463"
	],
	"documents": [
		// ... additional fields omitted for clarity
	]
}

Note: For other document operations requests, the document_ids must be included.


Download Sign operation

It is possible to download the signed – or unsigned – documents through our API through the /document/:id/signed endpoint, where :id is the document_ids obtained through the /sign/new endpoint response.

Request example

GET {{host}}/document/:id/signed
Accept application/pdf
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6...

Response example

The expected response is the signed file – or the original if it is not already signed.