Create Object
Changed onThis endpoint creates a new object in the specified bucket. The object must conform to the bucket's schema.
**Processing**: By default, objects are created in PENDING status, which
means not processed yet, and are processed when a batch that includes them
is submitted. An object stays PENDING until that batch run finishes with it;
the batch status shows whether it has been submitted. Set the `auto_process=true` query parameter
to automatically create a batch and submit it for processing (zero-touch
workflow). Sending `auto_process` in the JSON body returns 422, unless the
bucket schema declares a field with that name.
If the bucket has a unique_key configured, the insertion policy determines behavior:
- insert: Create only. Fail with 409 Conflict if unique key exists.
- update: Update only. Fail with 404 Not Found if unique key doesn't exist.
- upsert: Create if new, update if exists (idempotent).
Policy resolution:
1. Use ?policy= query parameter if provided
2. Fall back to bucket's default_policy if configured
3. Error 400 if neither is specified
Request
- Base URL: https://api.mixpeek.com
- URL: https://api.mixpeek.com/v1/buckets/{bucket_identifier}/objects
- Auth: HTTP bearer and API key in header X-Namespace
Path parameters
The unique identifier of the bucket.
Query parameters
Insertion policy for unique key enforcement. Valid values: 'insert', 'update', 'upsert'. Only applies if bucket has unique_key configured. Overrides bucket's default_policy if provided.
Automatically create a batch and submit it for processing. When true, the object will be immediately queued for processing without requiring separate batch creation and submission calls. Ideal for onboarding and single-object workflows.
Request body
Example request
{
"blobs": [
{
"data": "https://example.com/contract-2024.pdf",
"key_prefix": "/contract-2024/content.pdf",
"metadata": {
"author": "John Doe",
"department": "Legal",
"num_pages": 5
},
"property": "content",
"type": "pdf"
},
{
"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"
}
],
"category": "contracts",
"key_prefix": "/documents",
"title": "Service Agreement 2024",
"year": 2024
}Response
Successful Response
Example response
{
"blobs": [
{
"blob_id": "blob_1",
"data": {
"num_pages": 5,
"title": "Service Agreement 2024"
},
"key_prefix": "/contract-2024/content.pdf",
"metadata": {
"author": "John Doe",
"department": "Legal"
},
"property": "content",
"type": "PDF"
}
],
"bucket_id": "bkt_9xy8z7",
"content_hash": "28a9f5e8...",
"created_at": "2024-10-21T10:30:00Z",
"key_prefix": "/contract-2024",
"metadata": {
"category": "contracts",
"year": 2024
},
"object_id": "obj_123abc456def",
"skip_duplicates": false,
"status": "PENDING",
"updated_at": "2024-10-21T10:30:00Z"
}Changes
- info
the
response's property default value changed fromDRAFTtoPENDINGfor the status
- info
- warning
removed the optional property
from the response with the status - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status
- warning