---
title: "Create URL‑endpoint"
method: POST
path: "/v1/accounts/url-endpoints"
tags: ["Account Management API", "URL endpoints"]
---

# Create URL‑endpoint

`POST /v1/accounts/url-endpoints`

**Note:** This API is currently in beta.  
Creates a new URL‑endpoint and returns the resulting object.

## Request body

- UrlEndpointRequest — Schema for URL endpoint resource.
  - `description` string, required — Description of the URL endpoint.
  - `urlPrefix` string — Path segment appended to your base URL to form the endpoint (letters, digits, and hyphens only — or empty for the default endpoint).
  - `origins` string[] — Ordered list of origin IDs to try when the file isn’t in the Media Library; ImageKit checks them in the sequence provided. Origin must be created before it can be used in a URL endpoint.
  - `urlRewriter` union — Configuration for third-party URL rewriting.
    - object
      - `type` 'CLOUDINARY', required
      - `preserveAssetDeliveryTypes` boolean — Whether to preserve `<asset_type>/<delivery_type>` in the rewritten URL.
    - object
      - `type` 'IMGIX', required
    - object
      - `type` 'AKAMAI', required

## Response `201`

URL‑endpoint created successfully.

- UrlEndpointResponse — URL‑endpoint object as returned by the API.
  - `description` string, required — Description of the URL endpoint.
  - `urlPrefix` string, required — Path segment appended to your base URL to form the endpoint (letters, digits, and hyphens only — or empty for the default endpoint).
  - `origins` string[], required — Ordered list of origin IDs to try when the file isn’t in the Media Library; ImageKit checks them in the sequence provided. Origin must be created before it can be used in a URL endpoint.
  - `urlRewriter` union — Configuration for third-party URL rewriting.
    - object
      - `type` 'CLOUDINARY', required
      - `preserveAssetDeliveryTypes` boolean, required — Whether to preserve `<asset_type>/<delivery_type>` in the rewritten URL.
    - object
      - `type` 'IMGIX', required
    - object
      - `type` 'AKAMAI', required
  - `id` string, required — Unique identifier for the URL-endpoint. This is generated by ImageKit when you create a new URL-endpoint. For the default URL-endpoint, this is always `default`.

## Other responses

- `400` — Bad request. The request body is invalid.
- `401` — Unauthorized request.
- `403` — Forbidden.
- `429` — The request exceeded the rate limit. Contains headers indicating the limits and a message detailing the error.

---

[API](https://skmtc.dev/imagekit-developer/apis/imagekit-api.md) · [All operations](https://skmtc.dev/imagekit-developer/apis/imagekit-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/imagekit-developer/imagekit-api/revisions/bb3e9ff84b3e/schema)
