Skip to main content
GET
https://api.theary.ai
/
files
/
release-form
/
generate-upload-url
Generate Upload URL
curl --request GET \
  --url https://api.theary.ai/files/release-form/generate-upload-url \
  --header 'Authorization: Bearer <token>'
{
  "statusCode": 401,
  "message": "Unauthorized"
}

Generate Release Form Upload URL

Generates a presigned URL that allows direct upload of signed release forms to cloud storage. This enables clients to upload release form PDFs directly without proxying through the API server.

Authentication

Required - Bearer token authentication. The tenant context is extracted from the JWT token.

Response

signedUrl
string
A presigned URL valid for 15 minutes that allows direct PUT upload to cloud storage
fileUri
string
The GCS URI (gs://bucket/path) where the file will be stored. Use this value as signedReleaseFileUrl when creating verification orders.

Example Request

curl -X GET "https://api.theary.ai/files/release-form/generate-upload-url" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Example Response

{
  "signedUrl": "https://storage.googleapis.com/verification-api-storage/tenants/acme-corp/releaseForms/550e8400-e29b-41d4-a716-446655440000.pdf?X-Goog-Algorithm=...",
  "fileUri": "gs://verification-api-storage/tenants/acme-corp/releaseForms/550e8400-e29b-41d4-a716-446655440000.pdf"
}

Uploading the File

After obtaining the signed URL, upload your PDF file directly to cloud storage:
# Upload the release form PDF
curl -X PUT "${SIGNED_URL}" \
  -H "Content-Type: application/pdf" \
  --data-binary @signed-release-form.pdf

Using the File URI

After uploading, use the fileUri as the signedReleaseFileUrl when creating a verification order:
{
  "applicant": {
    "firstName": "John",
    "lastName": "Smith",
    "ssn": "123-45-6789",
    "signedReleaseFileUrl": "gs://verification-api-storage/tenants/acme-corp/releaseForms/550e8400-e29b-41d4-a716-446655440000.pdf"
  },
  // ... rest of order
}

File Storage

Files are organized by tenant for security and isolation:
gs://verification-api-storage/
  └── tenants/
      └── {tenant-name}/
          └── releaseForms/
              └── {uuid}.pdf

Important Notes

  • URL Expiration: The signed URL expires after 15 minutes
  • File Type: Only PDF files are supported (application/pdf)
  • File Size: Maximum file size is 10MB
  • Tenant Isolation: Files are stored in tenant-specific directories
  • Security: Files can only be accessed by the owning tenant

Response Codes

Status CodeDescription
200Upload URL generated successfully
401Unauthorized - invalid or missing JWT token
500Internal server error

Error Responses

{
  "statusCode": 401,
  "message": "Unauthorized"
}
{
  "statusCode": 500,
  "message": "Failed to generate upload URL",
  "error": "Internal Server Error"
}