POST
/
v1
/
buckets
/
{bucket_identifier}
/
objects
/
batch
Create Objects in Batch
curl --request POST \
  --url https://api.mixpeek.com/v1/buckets/{bucket_identifier}/objects/batch \
  --header 'Content-Type: application/json' \
  --data '{
  "objects": [
    {
      "blobs": [
        {
          "data": {
            "num_pages": 5,
            "title": "Service Agreement 2024"
          },
          "key_prefix": "/contract-2024/content.pdf",
          "metadata": {
            "author": "John Doe",
            "department": "Legal"
          },
          "property": "content",
          "type": "json"
        },
        {
          "data": {
            "filename": "https://example.com/images/smartphone-x1.jpg",
            "mime_type": "image/jpeg"
          },
          "key_prefix": "/contract-2024/thumbnail.jpg",
          "metadata": {
            "height": 300,
            "width": 200
          },
          "property": "thumbnail",
          "type": "image"
        }
      ],
      "key_prefix": "/documents",
      "metadata": {
        "category": "contracts",
        "status": "draft",
        "year": 2024
      }
    }
  ]
}'
[
  {
    "object_id": "<string>",
    "bucket_id": "<string>",
    "key_prefix": "<string>",
    "content_hash": "<string>",
    "blobs": [
      {
        "blob_id": "<string>",
        "property": "<string>",
        "key_prefix": "<string>",
        "type": "string",
        "data": "<string>",
        "metadata": {},
        "details": {
          "filename": "<string>",
          "size_bytes": 123,
          "mime_type": "<string>",
          "hash": "<string>",
          "s3_object_key": "<string>"
        }
      }
    ],
    "metadata": {},
    "status": "DRAFT",
    "error": "Failed to process object: Object not found",
    "skip_duplicates": false
  }
]

Headers

Authorization
string | null

Bearer token authentication using your API key. Format: 'Bearer your_api_key'. To get an API key, create an account at mixpeek.com/start and generate a key in your account settings. Example: 'Bearer sk_1234567890abcdef'

X-Namespace
string | null

Optional namespace for data isolation. This can be a namespace name or namespace ID. Example: 'netflix_prod' or 'ns_1234567890'. To create a namespace, use the /namespaces endpoint.

Path Parameters

bucket_identifier
string
required

The unique identifier of the bucket.

Body

application/json

Request model for creating multiple bucket objects in a batch.

Response

200
application/json

Successful Response

The response is of type ObjectResponse · object[].