Livestream: Building landing pages with AI | 4/3

Announcing Visual Copilot - Figma to production in half the time

Builder logo
builder.io
Contact SalesGo to App

Livestream: Building landing pages with AI | 4/3

Announcing Visual Copilot - Figma to production in half the time

Builder logo
builder.io

Blog

Home

Resources

Blog

Forum

Github

Login

Signup

×

Visual CMS

Drag-and-drop visual editor and headless CMS for any tech stack

Theme Studio for Shopify

Build and optimize your Shopify-hosted storefront, no coding required

Resources

Blog

Get StartedLogin

The Assets API can be used to manage assets in bulk.

  • Delete assets programmatically via the Assets API
  • Encode asset URLs to ensure functional API calls

To access assets through the Assets API, you must have the following:

  • A Public API Key
  • A Space Private Key

See API Keys for more information.

You can delete assets by ID or by URL.

Make the following request, replacing ASSET_ID, PUBLIC_API_KEY, and PRIVATE_API_KEY with your asset ID and your space's public and private key.

curl --location --request DELETE \
  'https://cdn.builder.io/api/v1/assets/ASSET_ID&apiKey=PUBLIC_API_KEY' \
  --header 'Authorization: Bearer PRIVATE_API_KEY'

Make the following request, replacing ENCODED_ASSET_URL, PUBLIC_API_KEY, and PRIVATE_API_KEY with your asset's encoded URL and your space's public and private key.

curl --location --request DELETE \
  'https://cdn.builder.io/api/v1/assets/by-url?url=ENCODED_ASSET_URL&apiKey=PUBLIC_API_KEY' \
  --header 'Authorization: Bearer PRIVATE_API_KEY'

To access your asset's URL:

  1. Visit your Asset Library and right-click on an image
  2. Select Copy Image Address

You also receive the image URL when using the Upload API.

Note: Your asset URL may not have any parameters attached to it. For example, parameters like ?width=500&height=500 should be removed.

The asset's URL must be encoded. An encoded URL will look like the following:

https%3A%2F%2Fcdn.builder.io%2Fapi%2Fv1%2Fimage%2Fassets%252F03e666806e034ea99ba3d09deba16592%252Fac9ba45aa4d3412dbe177edacf4034a0

Note: The asset URL you retrieve from Builder may already be partially encoded. You can tell by the presence of %2F characters within the URL.

Leave these characters within the URL when encoding.

To encode your URL, use the encodeURIComponent() built-in JavaScript function.

encodeURIComponent("YOUR_URL");

Note: The asset URL you retrieve from Builder may already be partially encoded. You can tell by the presence of %2F characters within the URL.

Leave these characters within the URL when encoding.

Programmatically upload files with the Upload API or learn more about how to access images with the Image API.

Was this article helpful?

Product

Visual CMS

Theme Studio for Shopify

Sign up

Login

Featured Integrations

React

Angular

Next.js

Gatsby

Get In Touch

Chat With Us

Twitter

Linkedin

Careers

© 2020 Builder.io, Inc.

Security

Privacy Policy

Terms of Service

Get the latest from Builder.io

By submitting, you agree to our Privacy Policy

  • Platform Overview

  • Integrations

  • What's New

  • Figma to Code Guide

  • Composable Commerce Guide

  • Headless CMS Guide

  • Headless Commerce Guide

  • Composable DXP Guide

  • Design to Code

  • Blog

  • Knowledge Base

  • Community Forum

  • Partners

  • Templates

  • Success Stories

  • Showcase

  • Resource Center

    Glossary

© 2025 Builder.io, Inc.

Security

Privacy Policy

SaaS Terms

Security & Compliance

Cookie Preferences

Gartner Cool Vendor 2024