createFile
    • PDF

    createFile

    • PDF

    Article Summary

    Uploads a file.
    The fileId of the uploaded file can be reused for 24 hours.
    After 24 hours, the file will be deleted and its fileId will no longer be valid.

    POST https://{endpoint}/files
    

    Request

    Request parameters

    Parameter nameRequired statusTypeRestrictionsDescription
    fileListYesFileFile to upload

    Response

    HTTP status codeDescription
    201File uploaded successfully.
    400Authentication failed, invalid request.
    500Server errors

    Example

    Request example

    POST https://mail.apigw.ntruss.com/api/v1/files
    Content-Type: multipart/form-data; boundary=a29b1180-70f5-42f7-afbe-0d68a15f2370
    
    --a29b1180-70f5-42f7-afbe-0d68a15f2370
    Content-Disposition: form-data; name="fileList"; filename="test\resources\test.txt"
    Content-Type: text/plain
    Content-Length: 16
    
    upload test file
    --a29b1180-70f5-42f7-afbe-0d68a15f2370--
    

    Response example

    {
      "tempRequestId":"f355aac1-7776-4c0b-8484-20eaa065cb65-99",
      "files":[
        {
          "fileName":"test.txt",
          "fileSize":16,
          "fileId":"40fe58bd-91fe-4f89-a62e-705a7c17d65e-99"
        }
      ]
    }
    

    Property

    CategoryRequired statusTypeRestrictionsDescription
    tempRequestIdYesStringTemporary request ID (used to delete or search the file)
    filesYesList<AttachFile>List of files

    Error codes

    HTTP Status CodeReturn codeResponse message
    40077101Error in login information
    40077102BAD_REQUEST
    40077103Resource not found
    40377201No permission
    40377202No request to subscribe the email product
    40577001METHOD_NOT_ALLOWED
    41577002UNSUPPORTED_MEDIA_TYPE
    50077301Default project not found
    50077302Error in working with external system API
    50077303Other INTERNAL_SERVER_ERROR

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.