> ## Documentation Index
> Fetch the complete documentation index at: https://loops.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Complete an upload

> Finalize an image upload after the file has been uploaded to the pre-signed URL.

<Warning>
  Content API endpoints are currently in an open alpha and are subject to
  change.
</Warning>

## Request

<Info>
  Call this endpoint after uploading the file to the `presignedUrl` returned by
  [Create an upload](/api-reference/create-upload).
</Info>

### Path parameters

<ParamField path="id" type="string" required>
  The `emailAssetId` returned when the upload was created.
</ParamField>

## Response

### Success

<ResponseField name="success" type="boolean" required />

<ResponseField name="emailAssetId" type="string" required>
  The ID of the uploaded asset.
</ResponseField>

<ResponseField name="finalUrl" type="string" required>
  The public URL of the uploaded asset. Use this URL in [LMX image elements](/creating-emails/lmx#images) when
  [updating an email message](/api-reference/update-email-message).
</ResponseField>

### Error

A `400 Bad Request` is returned if the upload id is missing or the uploaded
file has an unsupported content type.

A `404 Not Found` is returned if the upload does not exist.

If the API key is invalid (or content API is not enabled for your team), a
`401 Unauthorized` is returned.

<ResponseField name="success" type="boolean" required />

<ResponseField name="message" type="string" required>
  An error message describing what went wrong.
</ResponseField>

<ResponseExample>
  ```json Response theme={"dark"}
  {
    "success": true,
    "emailAssetId": "cmp2cz4mn0oru0izztre5fgob",
    "finalUrl": "https://images.vialoops.com/cmp2cnlf600yz0f042m792otk/cmp2cz4mn0oru0izztre5fgob.jpg"
  }
  ```

  ```json Error response theme={"dark"}
  {
    "success": false,
    "message": "Upload not found."
  }
  ```
</ResponseExample>
