Ir al contenido
UnoPagoDocumentación
Referencia de la APIAccountConnected accounts

Request an upload URL for a verification document

POST
/v1/accounts/{accountId}/verification/upload-url

Returns the fileKey and how to upload the file: PUT it to upload.url with exactly upload.headers, before upload.expiresAt (15 minutes), then submit the fileKey with POST /v1/accounts/{accountId}/verification. JPG, PNG, WEBP or PDF, up to 10 MB. Refused while a document is in review or once the account is verified.

Autorización

bearerAuth
headerAutorizaciónBearer <token>

Your API key, created in Configuración → Claves API. The key alone, without the Bearer prefix, is accepted too.

Parámetros de ruta

accountId*string
Patrón^[cC][0-9a-z]{6,}$
Formatocuid
application/json
  1. body
fileName*string
Longitud1 <= length <= 255
contentType*string
Valor en"image/jpeg""image/png""image/webp""application/pdf"
size*integer
Rango0 < value <= 10485760

Cuerpo de la respuesta

Successful response

application/json
  1. response
fileKey*string

Submit it with POST /v1/accounts/{accountId}/verification once the file is uploaded.

upload*
Ejemplo de solicitud
curl -X POST 'https://api.unopago.com/v1/accounts/string/verification/upload-url' \  -H 'Content-Type: application/json' \  -d '{  "fileName": "string",  "contentType": "image/jpeg",  "size": 1}'
Ejemplo de respuesta
{  "fileKey": "string",  "upload": {    "url": "string",    "method": "PUT",    "headers": {      "Content-Type": "string"    },    "expiresAt": "string"  }}