> For the complete documentation index, see [llms.txt](https://developer.kizen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.kizen.com/api/s3.md).

# S3

## GET S3 Presigned POST

> Generate a presigned POST for uploading files directly to S3.\
> \
> \*\*Upload Flow:\*\*\
> 1\. Call this endpoint to get presigned POST URL and fields\
> 2\. POST the file to S3 using the returned URL and fields (include \`file\` as last field)\
> 3\. Call \`/api/s3/success\` with the key, uuid, name, and etag to confirm upload\
> \
> \*\*Expiration:\*\* 5 minutes<br>

```json
{"openapi":"3.0.3","info":{"title":"Kizen API","version":"1.0.0"},"security":[{"businessId":[],"userId":[],"apiKey":[]},{}],"components":{"securitySchemes":{"businessId":{"type":"apiKey","in":"header","name":"X-BUSINESS-ID"}},"schemas":{"PresignedPostResponse":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"POST destination URL for upload"},"fields":{"type":"object","additionalProperties":{"type":"string"},"description":"Form fields to include in POST request"},"s3object_id":{"type":"string","format":"uuid","description":"UUID to use when calling /api/s3/success"},"max_file_size":{"type":"integer","description":"Maximum allowed file size in bytes"},"expires_at":{"type":"string","format":"date-time","description":"When the presigned POST expires"}},"required":["expires_at","fields","max_file_size","s3object_id","url"]},"PresignedPostErrorResponse":{"type":"object","properties":{"detail":{"type":"object","additionalProperties":{"type":"string"}}},"required":["detail"]}}},"paths":{"/api/s3/presigned-post":{"get":{"operationId":"s3_presigned_post_retrieve","description":"Generate a presigned POST for uploading files directly to S3.\n\n**Upload Flow:**\n1. Call this endpoint to get presigned POST URL and fields\n2. POST the file to S3 using the returned URL and fields (include `file` as last field)\n3. Call `/api/s3/success` with the key, uuid, name, and etag to confirm upload\n\n**Expiration:** 5 minutes\n","summary":"GET S3 Presigned POST","parameters":[{"in":"query","name":"contenttype","schema":{"type":"string"},"description":"MIME type of the file. Examples: `application/pdf`, `text/plain`, `image/png`, `application/json`","required":true},{"in":"query","name":"filename","schema":{"type":"string"},"description":"Name of the file to upload (e.g., 'updated-resume.pdf')","required":true},{"in":"query","name":"source","schema":{"type":"string"},"description":"Allowed values: `field_value`, `form_field_value`, `activity_field_value`, `automation_value`, `employee_import`, `record_import`, `meta_import`, `smart_connector_import`, `knowledge_source`, `public_image`, `third_party_image`","required":true}],"tags":["S3"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedPostResponse"}}},"description":""},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedPostErrorResponse"}}},"description":""}}}}}}
```

## POST S3 File upload success

> This is where the upload will send a POST request after the file has been stored in S3.

```json
{"openapi":"3.0.3","info":{"title":"Kizen API","version":"1.0.0"},"security":[{"businessId":[],"userId":[],"apiKey":[]},{}],"components":{"securitySchemes":{"businessId":{"type":"apiKey","in":"header","name":"X-BUSINESS-ID"}},"schemas":{"S3Object":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"created":{"type":"string","format":"date-time","readOnly":true},"key":{"type":"string"},"name":{"type":"string","nullable":true},"url":{"type":"string","format":"uri"},"thumbnail_url":{"type":"string","format":"uri"},"size_bytes":{"type":"integer","maximum":9223372036854776000,"minimum":0,"format":"int64"},"size_formatted":{"type":"string","readOnly":true},"content_type":{"type":"string","nullable":true},"is_public":{"type":"boolean"},"common_key":{"type":"string","readOnly":true,"nullable":true},"is_common":{"type":"boolean","readOnly":true},"metadata":{"type":"object","additionalProperties":{}},"employee":{"type":"object","additionalProperties":{},"readOnly":true}},"required":["common_key","created","employee","id","is_common","key","size_formatted","thumbnail_url","url"]}}},"paths":{"/api/s3/success":{"post":{"operationId":"s3_success_create","description":"This is where the upload will send a POST request after the file has been stored in S3.","summary":"POST S3 File upload success","parameters":[{"in":"query","name":"source","schema":{"type":"string"},"description":"Kind of the file (e.g. 'SMART_CONNECTOR_IMPORT')"}],"tags":["S3"],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"uuid":{"type":"string","description":"S3 object UUID"},"key":{"type":"string","description":"S3 object key"},"name":{"type":"string","description":"File name"},"is_public":{"type":"boolean","description":"Whether the S3 object is public (default: false)","required":false},"etag":{"type":"string","description":"S3 object Entity Tag (ETag)"},"business_id":{"type":"string","description":"ID of the business associated with the S3 object","required":false}}}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3Object"}}},"description":""}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.kizen.com/api/s3.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
