Paytrie Developer Documentation
API ReferenceUsers

Request signed URLs for direct-to-GCS KYC document upload

View as Markdown
POST
/users/{userId}/kyc-documents/upload-urls

Authorization

ApiKeyAuth BearerAuth
x-api-key<token>

API key for integrator authentication

In: header

AuthorizationBearer <token>

JWT token for user authentication

In: header

Path Parameters

userId*string

Header Parameters

x-api-key*string

API key for authentication

Authorization*string

JWT token from login endpoints

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

import { PaytrieAPI, configure } from '@paytrie/sdk'configure({ headers: { 'x-api-key': process.env.PAYTRIE_API_KEY! } })const { data } = await PaytrieAPI.createUserKycDocumentUploadUrls("550e8400-e29b-41d4-a716-446655440000", {  documents: [    {      name: "passport.jpg",      contentType: "image/jpeg",      size: 524288    }  ]})
{  "success": true,  "data": {    "uploads": [      {        "objectName": "kyc/<userId>/<uuid>.jpeg",        "uploadUrl": "https://storage.googleapis.com/...",        "requiredHeaders": {          "Content-Type": "image/jpeg",          "x-goog-content-length-range": "0,10485760"        },        "expiresAt": "2024-01-01T00:15:00.000Z"      }    ]  }}
{  "success": false,  "errors": [    {      "field": "string",      "message": "string"    }  ]}