Feel free to reach techsupport@surepass.io for any technical support or guidance.
Authorization
header as Bearer TOKEN
.https://sandbox.surepass.io
https://kyc-api.surepass.io
Header | Required | Description |
---|---|---|
Authorization | Yes | Bearer token authentication using JWT |
Content-Type | Yes | application/json |
Parameter | Type | Required | Description |
---|---|---|---|
client_id | String | Yes | Unique identifier of the client for whom the document is being uploaded |
{
"client_id": "{{client_id}}"
}
Parameter | Type | Description |
---|---|---|
data | Object | Contains the upload link details |
data.link_generated | Boolean | Indicates whether the upload link was successfully generated |
data.url | String | The AWS S3 URL where the PDF should be uploaded |
data.fields | Object | AWS S3 form fields required for the upload |
data.fields.key | String | The unique key/filename for the document in S3 |
data.fields.x-amz-algorithm | String | AWS signature algorithm used |
data.fields.x-amz-credential | String | AWS credential used for signing |
data.fields.x-amz-date | String | Timestamp of when the signature was created |
data.fields.policy | String | Base64-encoded policy document |
data.fields.x-amz-signature | String | The signature for the policy document |
status_code | Integer | HTTP status code of the response |
message_code | String | Short code indicating the result of the operation |
message | String | Human-readable description of the result |
success | Boolean | Overall success status of the API call |
{
"data": {
"link_generated": true,
"url": "https://esign.s3.amazonaws.com/",
"fields": {
"key": "esign_axyXXyJxaohmpadfsadsfadsfadsga754.40323.pdf",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-credential": "AKIAY5K3Qadfadsfadsgadsgadguest",
"x-amz-date": "20210913T131234Z",
"policy": "eyJleHBpcmF0aW9uIjogadsfasdfadsgadgaeyJ4LWFtei1kYXRladsfadsfaNFoifV19",
"x-amz-signature": "9fea3bf7bbc17dadsgshadhadgasdgadsf7321b1af27bd1392dfc08"
}
},
"status_code": 200,
"message_code": "success",
"message": "Link generated successfully",
"success": true
}
{
"data": null,
"status_code": 400,
"message_code": "invalid_client_id",
"message": "The provided client ID is invalid or does not exist",
"success": false
}
curl --location --request POST 'https://kyc-api.surepass.app/api/v1/esign/get-upload-link' \
--header 'Content-Type: application/json' \
--data-raw '{
"client_id": "{{client_id}}"
}'
{
"data": {
"link_generated": true,
"url": "https://esign.s3.amazonaws.com/",
"fields": {
"key": "esign_axyXXyJxaohmpadfsadsfadsfadsga754.40323.pdf",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-credential": "AKIAY5K3Qadfadsfadsgadsgadguest",
"x-amz-date": "20210913T131234Z",
"policy": "eyJleHBpcmF0aW9uIjogadsfasdfadsgadgaeyJ4LWFtei1kYXRladsfadsfaNFoifV19",
"x-amz-signature": "9fea3bf7bbc17dadsgshadhadgasdgadsf7321b1af27bd1392dfc08"
}
},
"status_code": 200,
"message_code": "success",
"message": "Link generated successfully",
"success": true
}