---
title: "Create an upload URL for a CTA image"
method: POST
path: "/org/cta-assets/upload-url"
tags: ["CTA Templates"]
---

# Create an upload URL for a CTA image

`POST /org/cta-assets/upload-url`

## Request

- Base URL: `https://apiv2.senso.ai/api/v1`
- URL: `https://apiv2.senso.ai/api/v1/org/cta-assets/upload-url`
- Auth: API key in header `X-API-Key`

Returns a short-lived, pre-signed URL for uploading a CTA image. Upload the file bytes with an HTTP `PUT` to `upload_url`, sending exactly the returned `upload_headers`, then use `image_url` as a template's `image_url`. Accepted content types are `image/png`, `image/jpeg`, `image/webp` and `image/gif`, up to 10 MiB; when `filename` has an extension it must match the content type (`.png`, `.jpg`/`.jpeg`, `.webp`, `.gif`). Returns `503` when image storage is not configured for the deployment. Requires the GEO product.

## Request body

- CTAAssetUploadRequest: Describes the CTA image about to be uploaded.
  - `filename` string, required: The file's name. Its extension, when present, must match `content_type`.
  - `content_type` 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif', required: The image's media type.
  - `file_size_bytes` integer, required: The file size in bytes, at most 10 MiB.

## Response `200`

Where and how to upload the image.

- CTAAssetUploadResponse: A pre-signed upload target for a CTA image.
  - `upload_url` string, required: The pre-signed URL to `PUT` the file bytes to.
  - `image_url` string, required: The public URL the image will have once uploaded — use it as a template's `image_url`.
  - `object_key` string, required: The storage key of the uploaded object. Its extension follows `content_type` (`.png`, `.jpg`, `.webp` or `.gif`), not `filename`.
  - `expires_in` integer, required: Seconds until `upload_url` stops accepting the upload (currently 900).
  - `upload_headers` object, required: The headers to send with the `PUT`: `Content-Type` (the accepted content type) and `Cache-Control`.

## Other responses

- `400`: The request body was invalid — either it failed field validation (`ValidationErrorResponse`) or was otherwise malformed (`ErrorResponse`).
- `401`: Missing or invalid credentials — supply a valid org API key in the `X-API-Key` header.
- `403`: The API key is authenticated but not permitted to access this resource.
- `404`: The requested resource does not exist or is not visible to this key.
- `409`: The request conflicts with the current state (e.g. a duplicate).
- `503`: The service is temporarily unavailable — retry later.

---

[API](https://skmtc.dev/senso/apis/senso-org-api.md) - [All operations](https://skmtc.dev/senso/apis/senso-org-api/llms.txt) - [OpenAPI document](https://skmtc.dev/senso/apis/senso-org-api/revisions/d789b4fcbe84?raw)
