This endpoint allows you to upload a file to Centrapay.
filerequired stringA file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the multipart/form-data protocol.Each valid purpose has specific file format and size requirements.
bank-account-verificationEvidence of ownership of a Bank Account, used to request a Bank Account Approval.Supported MIME Types: JPEG, PNG
Max Size: 5MB
branding-logoA logo used for any branding including Tokens and Businesses.Supported MIME Types: JPEG, PNG
Max Size: 512KB
business-onboardingA file used to onboard Businesses so that they can accept payments.Supported MIME Types: CSV
Max Size: 50MB
fileobjectA file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the multipart/form-data protocol.Each valid purpose has specific file format and size requirements.
bank-account-verificationEvidence of ownership of a Bank Account, used to request a Bank Account Approval.Supported MIME Types: JPEG, PNG
Max Size: 5MB
branding-logoA logo used for any branding including Tokens and Businesses.Supported MIME Types: JPEG, PNG
Max Size: 512KB
business-onboardingA file used to onboard Businesses so that they can accept payments.Supported MIME Types: CSV
Max Size: 50MB
errorstringThe name of the HTTP status. AlwaysBad Request.messageenumThe error code, or for a 400 a description of what's wrong with the request.Bad RequestThe request is malformed or missing required fields. The message says what's wrong, egamount is required. See 400 Malformed Request.
statusCodeintegerThe HTTP status code. Always400.
errorstringThe name of the HTTP status. AlwaysUnauthorized.messageenumThe error code, or for a 400 a description of what's wrong with the request.Missing authenticationAPI key or JWT is missing, expired or invalid. See Auth.
statusCodeintegerThe HTTP status code. Always401.
errorstringThe name of the HTTP status. AlwaysForbidden.messageenumThe error code, or for a 400 a description of what's wrong with the request.FILE_TOO_LARGEFile size exceeds the allowed threshold.FILE_TYPE_INVALIDInvalid file extension or mime type provided for the purpose.ForbiddenThe resource doesn't exist, or your user or API key doesn't have permission to access it. See 403 Forbidden.
statusCodeintegerThe HTTP status code. Always403.
errorstringThe name of the HTTP status. AlwaysNot Found.messageenumThe error code, or for a 400 a description of what's wrong with the request.Not FoundThe route doesn't exist. Check the URL and HTTP method against the examples. See 404 Route Not Found.
statusCodeintegerThe HTTP status code. Always404.
errorstringThe name of the HTTP status. AlwaysToo Many Requests.messageenumThe error code, or for a 400 a description of what's wrong with the request.RATE_LIMIT_EXCEEDEDCentrapay API rate limits have been exceeded. See Rate Limits.
statusCodeintegerThe HTTP status code. Always429.
errorstringThe name of the HTTP status. AlwaysInternal Server Error.messageenumThe error code, or for a 400 a description of what's wrong with the request.An internal server error occurredSomething went wrong on our end. Retrying should solve the issue. See 5xx Server Error.
statusCodeintegerThe HTTP status code. Always500.
curl -X POST https://service.centrapay.com/api/media-uploads \-H 'content-type: multipart/form-data' \-H 'x-api-key: <TOKEN>' \-F purpose=branding-logo \-F file=@/path/to/a/file.png{ "id": "DKTs3U38hdhfEqwF1JKoT2"}{ "error": "Bad Request", "message": "amount is required", "statusCode": 400}{ "error": "Unauthorized", "message": "Missing authentication", "statusCode": 401}{ "error": "Forbidden", "message": "FILE_TYPE_INVALID", "statusCode": 403}{ "error": "Not Found", "message": "Not Found", "statusCode": 404}{ "error": "Too Many Requests", "message": "RATE_LIMIT_EXCEEDED", "statusCode": 429}{ "error": "Internal Server Error", "message": "An internal server error occurred", "statusCode": 500}