CorebanqCorebanq Developer Docs
Uploadsv1Files

Create file

Upload a new file

POST/v1/uploads

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/uploads" \  -H "Content-Type: application/json" \  -d '{    "file_name": "customer_agreement.pdf",    "content": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9MZW5ndGggND4+",    "document_type": "customer_agreement",    "approval_needed": 1,    "approval_made": 0,    "signature_needed": 1,    "signature_made": 0,    "active": true,    "metadata": {      "department": "legal"    }  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "file_name": "string",
  "document_type": "bylaws",
  "approval_status": "pending",
  "approval_needed": 0.1,
  "approval_made": 0.1,
  "signature_status": "pending",
  "signature_needed": 0.1,
  "signature_made": 0.1,
  "content_length": 0,
  "file_extension": "string",
  "active": true,
  "metadata": {},
  "created_at": "2019-08-24T14:15:22Z",
  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4"
}

{
  "code": "uploads.invalid_file_extension",
  "message": "Invalid file extension"
}

{
  "code": "uploads.unauthorized",
  "message": "Unauthorized"
}