---
title: "Upload Image From URL"
description: "How to call Upload Image From URL (POST /api/images) in the Klaviyo REST API: authentication, parameters, request and response bodies, and an example request."
url: "https://developers.klaviyo.com/en/v2025-01-15/reference/upload_image_from_url"
revision: "2025-01-15"
latestUrl: "https://developers.klaviyo.com/en/reference/upload_image_from_url"
operationId: "upload_image_from_url"
aliases: ["create_image"]
method: "POST"
endpoint: "https://a.klaviyo.com/api/images"
authentication: "privateKey"
scopes: ["images:write"]
rateLimits: {"burst":"3/s","steady":"100/m","daily":"100/d"}
revisionHeader: {"name":"revision","required":true}
deprecated: false
related: ["https://developers.klaviyo.com/en/v2025-01-15/reference/images/llms.txt","https://developers.klaviyo.com/en/v2025-01-15/reference/get_images.md","https://developers.klaviyo.com/en/v2025-01-15/reference/get_image.md","https://developers.klaviyo.com/en/v2025-01-15/reference/update_image.md","https://developers.klaviyo.com/en/v2025-01-15/reference/upload_image_from_file.md"]
---

# Upload Image From URL

> This is the Markdown version of https://developers.klaviyo.com/en/v2025-01-15/reference/upload_image_from_url

```http
POST https://a.klaviyo.com/api/images
```

Import an image from a url or data uri.

If you want to upload an image from a file, use the Upload Image From File endpoint instead.

- Revision header: `revision: 2025-01-15` (required)
- Scopes: `images:write`
- Rate limits: Burst: `3/s`, Steady: `100/m`, Daily: `100/d`

## Example request

```bash
curl --request POST \
     --url 'https://a.klaviyo.com/api/images' \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/vnd.api+json' \
     --header 'revision: 2025-01-15' \
     --header 'content-type: application/vnd.api+json' \
     --data '{
  "data": {
    "type": "image",
    "attributes": {
      "import_from_url": "https://www.example.com/example.jpg"
    }
  }
}'
```

## Headers

- `revision` (string, required): API endpoint revision (format: YYYY-MM-DD[.suffix]) Default: `2025-01-15`

## Request body

Content type: `application/vnd.api+json` (required)

- `data` (object, required)
  - `type` (string, required): Allowed values: `image`
  - `attributes` (object, required)
    - `name` (string, nullable): A name for the image.  Defaults to the filename if not provided.  If the name matches an existing image, a suffix will be added.
    - `import_from_url` (string, required): An existing image url to import the image from. Alternatively, you may specify a base-64 encoded data-uri (`data:image/...`). Supported image formats: jpeg,png,gif. Maximum image size: 5MB. Example: `https://www.example.com/example.jpg`
    - `hidden` (boolean, nullable): If true, this image is not shown in the asset library. Default: `false`

### Example request body

```json
{
  "data": {
    "type": "image",
    "attributes": {
      "import_from_url": "https://www.example.com/example.jpg"
    }
  }
}
```

## Responses

### 201: Success

Content type: `application/vnd.api+json`

- `data` (object, required)
  - `type` (string, required): Allowed values: `image`
  - `id` (string, required): The ID of the image Example: `7`
  - `attributes` (object, required)
    - `name` (string, required)
    - `image_url` (string, required)
    - `format` (string, required)
    - `size` (integer, required)
    - `hidden` (boolean, required)
    - `updated_at` (string<date-time>, required): Example: `2022-11-08T00:00:00+00:00`
  - `links` (object, required)
    - `self` (string<uri>, required)

#### Example response body

```json
{
  "data": {
    "type": "image",
    "id": "7",
    "attributes": {
      "name": "string",
      "image_url": "string",
      "format": "string",
      "size": 0,
      "hidden": true,
      "updated_at": "2022-11-08T00:00:00+00:00"
    },
    "links": {
      "self": "https://www.example.com"
    }
  }
}
```

### 4XX: Client Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```

### 5XX: Server Error

Content type: `application/vnd.api+json`

- `errors` (object[], required)
  - `id` (string, required)
  - `code` (string, required)
  - `title` (string, required)
  - `detail` (string, required)
  - `source` (object)
    - `pointer` (string)
    - `parameter` (string)

#### Example response body

```json
{
  "errors": [
    {
      "id": "string",
      "code": "string",
      "title": "string",
      "detail": "string",
      "source": {
        "pointer": "string",
        "parameter": "string"
      }
    }
  ]
}
```
