---
title: "Create pre-signed S3 upload link for a custom block archive"
method: POST
path: "/api/organizations/{organizationId}/custom-block/upload-link"
tags: ["OrganizationCreateProject"]
---

# Create pre-signed S3 upload link for a custom block archive

`POST /api/organizations/{organizationId}/custom-block/upload-link`

## Request

- Base URL: `https://studio.edgeimpulse.com/v1`
- URL: `https://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/custom-block/upload-link`
- Auth: one of:
  - API key in header `x-api-key`
  - API key in cookie `jwt`
  - API key in header `x-jwt-token`
  - OAuth 2
    - Authorization code: `/v1/oauth/authorize`
    - Client credentials
    - Implicit: `/v1/oauth/authorize`
    - Password
    - Token URL: `/v1/oauth/token`
- TypeScript: <https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/docs/api/organizations/:organizationId/custom-block/upload-link/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a signed link to securely upload a custom block archive directly to S3.

## Path parameters

- `organizationId` integer, required

## Request body

- CreateCustomBlockUploadLinkRequest
  - `fileName` string, required: file name
  - `fileSize` integer, required: file size in bytes
  - `fileHash` string, required: hash to identify file changes
  - `type` 'transform' | 'deploy' | 'dsp' | 'transferLearning', required
  - `blockId` integer, required

## Response `200`

OK

- CreateCustomBlockUploadLinkResponse
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Optional error description (set if 'success' was false)
  - `url` string: S3 Upload Link
  - `ETag` string: S3 File Tag
  - `uploadKey` string, required: S3 object key for the staged upload

---

[API](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api.md) - [All operations](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/llms.txt) - [OpenAPI document](https://skmtc.dev/edgeimpulse/apis/edge-impulse-api/revisions/e2a976d38427?raw)
