> For the complete documentation index, see [llms.txt](https://docs.filemail.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.filemail.com/api/sending-files/complete.md).

# Complete

## PUT /transfer/complete

> Completes a transfer after all files have been uploaded. This operation makes the transfer available for downloads and sends out emails to recipients, and optionally to the sender. The response also includes a common (non-tracked) URL to the download page for this transfer. Downloading files at this URL will record downloads, but not linked to any recipient.

```json
{"openapi":"3.0.4","info":{"title":"Filemail REST API","version":"2.0"},"tags":[{"name":"Transfer"}],"servers":[{"url":"https://api-public.filemail.com","description":"Production"}],"paths":{"/transfer/complete":{"put":{"tags":["Transfer"],"description":"Completes a transfer after all files have been uploaded. This operation makes the transfer available for downloads and sends out emails to recipients, and optionally to the sender. The response also includes a common (non-tracked) URL to the download page for this transfer. Downloading files at this URL will record downloads, but not linked to any recipient.","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CompleteTransferRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/CompleteTransferRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/CompleteTransferRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CompleteTransferRequest"}}}},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/TransferCompleteResultBaseResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/TransferCompleteResultBaseResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/TransferCompleteResultBaseResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/FilemailErrorResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/FilemailErrorResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/FilemailErrorResponse"}}}},"409":{"description":"Conflict","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/FilemailErrorResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/FilemailErrorResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/FilemailErrorResponse"}}}}}}}},"components":{"schemas":{"CompleteTransferRequest":{"required":["transferid","transferkey"],"type":"object","properties":{"transferid":{"minLength":1,"type":"string","description":"ID of the transfer to be completed (retrieved in the 'Initialize' response)."},"transferkey":{"type":"string","description":"Secret key of the transfer to be completed (retrieved in the 'Initialize' response).","format":"uuid"}},"additionalProperties":false},"TransferCompleteResultBaseResponse":{"type":"object","properties":{"responsestatus":{"$ref":"#/components/schemas/FilemailStatusEnum"},"errorid":{"type":"string","nullable":true},"errormessage":{"type":"string","nullable":true},"data":{"$ref":"#/components/schemas/TransferCompleteResult"},"errorcode":{"type":"integer","description":"Numeric representation of the `responsestatus` field.","format":"int32","nullable":true,"readOnly":true}},"additionalProperties":false},"FilemailStatusEnum":{"enum":["OK","UnknownError","InvalidParameter","InputParameterMissing","InvalidEmail","NotFound","CantRemoveLastCorpAdmin","CantRemoveYourself","CantRemoveAdminRoleForYourself","ServiceInterruption","ImageThumbTooExpensive","MissingApikey","InvalidApikey","ApiKeyQuotaExceeded","RateLimitExceeded","DuplicateUploadItemName","WrongUsernamePassword","PasswordTooWeak","InvalidOrExpiredLoginToken","AccountExpired","CaptchaRequiredForNextLogin","LDAPUnableToCreateUser","LDAPWrongUsernamePassword","AccessDenied","CorpAuthenticationRequired","InvalidRequest","UseSsoLink","SsoSessionExpired","SsoCompanyDoesNotUseAdLogin","SsoGroupIdNotSupported","SsoSignatureInvalid","TwoFactorTokenNotFound","TwoFactorUserNotFound","TwoFactorPinNotValid","PasswordResetRequired","SsoUserDisabled","SsoLoginGeneralError","SsoMissingAuthCode","RefreshTokenExpired","RefreshTokenAlreadyUsed","SsoResetPasswordBlocked","AuthorizationFailure","CorpAuthorizationFailed","BusinessAccountExistsRegistrationRequired","UserAccountExistsLoginRequired","Blocked","AllFileserversBusy","FreeLimitReached","AccountExpiredAndOutOfTransferCredits","EmailNotVerified","FeatureAvailableForRegisteredUsers","FileSizeBlockSender","FileSizeBlockRecipient","TooManyRecipients","InvalidTransferState","TransferExpired","PasswordRequired","UploadNotComplete","FileIsDeleted","UploadRecentlyUpdated","FileIsInfected","SubscriptionNotFound","EmailAlreadyRegistered","SignupFormNotAccepted","SessionPasswordNotFound","SessionCustRefNotFound","AllUserLicencesesInUse","RegistrationRequired","PaymentMethodNotAccepted","SubscriptionCancellationFailed","InvalidSubscriptionState","PaymentFailed","ReceiptVerificationError","ReceiptAlreadyUsedForActivation","SubscriptionNotPaid","SubscriptionAlreadyActivated","SubscriptionPurchaseAckFailed","InvoiceFailure","InvalidDowngrade","InvalidDataState","InvalidMembership","ContactsLimitReached","StorageCapReached","ContactsFileParseError","RecoveryNotPossible","ImageFileError","ContactDuplicate","ChunkDownloadError","FileOperationError","IncomingPageBlockedInOverdue","NotAVideo","OperationCancelled","VideoFileError","FileRequestRecipientLimitTrial","FileRequestRecipientLimitBasic","FileRequestShareLimitTrial","FileRequestShareLimitBasic","FileRequestBlock","FileRequestShareLimitTimeframe"],"type":"string"},"TransferCompleteResult":{"required":["downloadurl"],"type":"object","properties":{"downloadurl":{"minLength":1,"type":"string","description":"URL of the download page for the completed transfer. This URL is valid for as long as the transfer is not expired. Using this URL to download files will register downloads, but the download data will only include the IP of the end user, but will not link any recipient data. I.e. this URL is not a tracked-url (as opposed to URLs included in emails which are sent to transfer recipients)."},"recipients":{"type":"array","items":{"$ref":"#/components/schemas/TransferRecipient"},"description":"The final list of transfer recipients including their transfer URLs with tracking IDs included.","nullable":true},"confirmationUrl":{"type":"string","description":"Optional. The resolved custom confirmation URL for this portal upload, with placeholder tokens substituted. Only present when the portal has a configured custom confirmation URL and that URL passes safety validation.","nullable":true}},"additionalProperties":false},"TransferRecipient":{"type":"object","properties":{"email":{"type":"string","nullable":true},"downloadlink":{"type":"string","nullable":true},"delivered":{"type":"boolean"},"deliveryerror":{"type":"string","nullable":true}},"additionalProperties":false},"FilemailErrorResponse":{"type":"object","properties":{"validationerrors":{"type":"array","items":{"$ref":"#/components/schemas/ValidationError"},"description":"List of validation errors when the request was not properly formed.","nullable":true},"responsestatus":{"$ref":"#/components/schemas/FilemailStatusEnum"},"errorid":{"type":"string","nullable":true},"errormessage":{"type":"string","nullable":true},"data":{"description":"This field contains endpoint-sepcific response data.","nullable":true},"errorcode":{"type":"integer","description":"Numeric representation of the `responsestatus` field.","format":"int32","nullable":true,"readOnly":true}},"additionalProperties":false},"ValidationError":{"required":["propertyName"],"type":"object","properties":{"propertyName":{"minLength":1,"type":"string","description":"Name of the invalid property contained in the request body or query string."},"errorCode":{"$ref":"#/components/schemas/FilemailStatusEnum"},"errorMessage":{"type":"string","description":"Message explaining the validation error.","nullable":true}},"additionalProperties":false}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.filemail.com/api/sending-files/complete.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
