Uploads API
Presigned uploads for attachments above 4 MB and large contact imports.
2 operations. Guide: Send email with the API. Requests and responses are JSON with snake_case fields; authenticate with Authorization: Bearer <api key>. The examples assume a client built as in SDKs and the command line.
Create a presigned upload
POST /v1/uploads
Returns a presigned S3 PUT URL valid for 15 minutes. Upload the bytes, then pass the id as upload_id to POST /v1/attachments or POST /v1/contacts/import.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
purpose | one of "attachment", "import" | yes | |
filename | string | yes | 1 to 255 characters. |
content_type | string | yes | At most 255 characters. |
size | integer | yes | 1 to 52428800. |
Response
201 Created: object.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | A UUID. |
object | "upload" | yes | |
purpose | one of "attachment", "import" | yes | |
upload_url | string | yes | |
expires_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
status | one of "pending", "completed", "consumed" | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl -X POST https://api.minket.com/v1/uploads \
-H "Authorization: Bearer $MINKET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"purpose":"attachment","filename":"report.pdf","content_type":"application/pdf","size":5242880}'const result = await minket.uploads.create({
purpose: "attachment",
filename: "report.pdf",
content_type: "application/pdf",
size: 5242880
});minket api createUpload --body '{"purpose":"attachment","filename":"report.pdf","content_type":"application/pdf","size":5242880}'from minket.api.uploads import create_upload
from minket.models import CreateUploadBody
result = create_upload.sync(client=client, body=CreateUploadBody.from_dict({"purpose":"attachment","filename":"report.pdf","content_type":"application/pdf","size":5242880}))var body minket.CreateUploadJSONRequestBody
res, err := client.CreateUploadWithResponse(ctx, body)Get an upload's status
GET /v1/uploads/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | A UUID. |
Response
200 Success: object.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | A UUID. |
object | "upload" | yes | |
purpose | one of "attachment", "import" | yes | |
upload_url | string | yes | |
expires_at | string (date-time) | yes | An ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z. |
status | one of "pending", "completed", "consumed" | yes |
Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.
Examples
curl https://api.minket.com/v1/uploads/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
-H "Authorization: Bearer $MINKET_API_KEY"const result = await minket.uploads.get("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b");minket api getUpload 019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5bfrom minket.api.uploads import get_upload
result = get_upload.sync("019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b", client=client)res, err := client.GetUploadWithResponse(ctx, "019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b")