---
title: "Create origin"
method: POST
path: "/v1/accounts/origins"
tags: ["Account Management API", "Origins"]
---

# Create origin

`POST /v1/accounts/origins`

**Note:** This API is currently in beta.  
Creates a new origin and returns the origin object.

## Request body

- union — Schema for origin request resources.
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'S3', required
    - `includeCanonicalHeader` boolean — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `bucket` string, required — S3 bucket name.
    - `prefix` string — Path prefix inside the bucket.
    - `useIAMRole` boolean — Use IAM role for authentication instead of access/secret keys. When set to `true`, send an empty string for both `accessKey` and `secretKey`.
    - `accessKey` string, required — Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
    - `secretKey` string, required — Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'S3_COMPATIBLE', required
    - `includeCanonicalHeader` boolean — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `bucket` string, required — S3 bucket name.
    - `prefix` string — Path prefix inside the bucket.
    - `accessKey` string, required — Access key for the bucket.
    - `secretKey` string, required — Secret key for the bucket.
    - `endpoint` string, uri, required — Custom S3-compatible endpoint.
    - `s3ForcePathStyle` boolean — Use path-style S3 URLs?
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'CLOUDINARY_BACKUP', required
    - `includeCanonicalHeader` boolean — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `bucket` string, required — S3 bucket name.
    - `prefix` string — Path prefix inside the bucket.
    - `useIAMRole` boolean — Use IAM role for authentication instead of access/secret keys. When set to `true`, send an empty string for both `accessKey` and `secretKey`.
    - `accessKey` string, required — Access key for the bucket. When `useIAMRole` is `true`, send an empty string.
    - `secretKey` string, required — Secret key for the bucket. When `useIAMRole` is `true`, send an empty string.
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'WEB_FOLDER', required
    - `includeCanonicalHeader` boolean — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `baseUrl` string, uri, required — Root URL for the web folder origin.
    - `forwardHostHeaderToOrigin` boolean — Forward the Host header to origin?
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'WEB_PROXY', required
    - `includeCanonicalHeader` boolean — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'GCS', required
    - `includeCanonicalHeader` boolean — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `bucket` string, required
    - `prefix` string
    - `clientEmail` string, email, required
    - `privateKey` string, required
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'AZURE_BLOB', required
    - `includeCanonicalHeader` boolean — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `container` string, required
    - `prefix` string
    - `accountName` string, required
    - `sasToken` string, required
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'AKENEO_PIM', required
    - `includeCanonicalHeader` boolean — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `baseUrl` string, uri, required — Akeneo instance base URL.
    - `clientId` string, required — Akeneo API client ID.
    - `clientSecret` string, required — Akeneo API client secret.
    - `username` string, required — Akeneo API username.
    - `password` string, required — Akeneo API password.

## Response `201`

Origin created successfully.

- union — Origin object as returned by the API (sensitive fields removed).
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'S3', required
    - `includeCanonicalHeader` boolean, required — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `bucket` string, required — S3 bucket name.
    - `prefix` string, required — Path prefix inside the bucket.
    - `useIAMRole` boolean — Whether the origin authenticates using an IAM role instead of access/secret keys.
    - `id` string, required — Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'S3_COMPATIBLE', required
    - `includeCanonicalHeader` boolean, required — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `bucket` string, required — S3 bucket name.
    - `prefix` string, required — Path prefix inside the bucket.
    - `endpoint` string, uri, required — Custom S3-compatible endpoint.
    - `s3ForcePathStyle` boolean, required — Use path-style S3 URLs?
    - `id` string, required — Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'CLOUDINARY_BACKUP', required
    - `includeCanonicalHeader` boolean, required — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `bucket` string, required — S3 bucket name.
    - `prefix` string, required — Path prefix inside the bucket.
    - `useIAMRole` boolean — Whether the origin authenticates using an IAM role instead of access/secret keys.
    - `id` string, required — Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'WEB_FOLDER', required
    - `includeCanonicalHeader` boolean, required — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `baseUrl` string, uri, required — Root URL for the web folder origin.
    - `forwardHostHeaderToOrigin` boolean, required — Forward the Host header to origin?
    - `id` string, required — Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'WEB_PROXY', required
    - `includeCanonicalHeader` boolean, required — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `id` string, required — Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'GCS', required
    - `includeCanonicalHeader` boolean, required — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `bucket` string, required
    - `prefix` string, required
    - `clientEmail` string, email, required
    - `id` string, required — Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'AZURE_BLOB', required
    - `includeCanonicalHeader` boolean, required — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `container` string, required
    - `prefix` string, required
    - `accountName` string, required
    - `id` string, required — Unique identifier for the origin. This is generated by ImageKit when you create a new origin.
  - object
    - `name` string, required — Display name of the origin.
    - `type` 'AKENEO_PIM', required
    - `includeCanonicalHeader` boolean, required — Whether to send a Canonical header.
    - `baseUrlForCanonicalHeader` string, uri — URL used in the Canonical header (if enabled).
    - `baseUrl` string, uri, required — Akeneo instance base URL.
    - `id` string, required — Unique identifier for the origin. This is generated by ImageKit when you create a new origin.

## 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)
