Skip to main content
POST
/
v1
/
buckets
/
{bucket_identifier}
/
objects
Create Object
curl --request POST \
  --url https://api.mixpeek.com/v1/buckets/{bucket_identifier}/objects \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Namespace: <x-namespace>' \
  --data '{
  "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
  }
}'
{
  "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": "DRAFT",
  "updated_at": "2024-10-21T10:30:00Z"
}

Authorizations

Authorization
string
header
required

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.

Headers

Authorization
string
required

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

Examples:

"Bearer sk_live_abc123def456"

"Bearer sk_test_xyz789"

X-Namespace
string
required

REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'

Examples:

"ns_abc123def456"

"production"

"my-namespace"

Path Parameters

bucket_identifier
string
required

The unique identifier of the bucket.

Body

application/json

Request model for creating a bucket object.

Objects can be created with blobs from two sources:

  1. Direct data (URLs, base64) - Use CreateBlobRequest.data field
  2. Upload references - Use CreateBlobRequest.upload_id field (from POST /buckets/{id}/uploads)

Upload Reference Workflow: For large files or client-side uploads, use the presigned URL workflow: 1. POST /buckets/{id}/uploads → Returns {upload_id, presigned_url} 2. User uploads file to presigned_url (client-side) 3. POST /uploads/{upload_id}/confirm → Validates upload 4. POST /buckets/{id}/objects with upload_id in blobs (this endpoint)

Use Cases: - Single blob with direct data (simple) - Multiple blobs from presigned uploads (recommended for large files) - Mix of direct data and upload references - Combine multiple uploads into one object

See Also: - CreateBlobRequest for blob field documentation - POST /buckets/{id}/uploads for presigned URL generation

key_prefix
string | null

Storage key/path prefix of the object, this will be used to retrieve the object from the storage. It's at the root of the object.

Example:

"/contract-2024"

blobs
CreateBlobRequest · object[]

List of blobs to be created in this object

Example:
[
{
"data": {
"num_pages": 5,
"title": "Service Agreement 2024"
},
"key_prefix": "/content.pdf",
"metadata": {
"author": "John Doe",
"department": "Legal"
},
"property": "content",
"type": "PDF"
}
]
skip_duplicates
boolean
default:false

Skip duplicate blobs, if a blob with the same hash already exists, it will be skipped.

canonicalize_source
boolean
default:true

Mirror non-S3 sources into internal S3 and reference canonically.

force_remirror
boolean
default:false

Force re-upload to S3 even if a blob with identical content already exists.

Response

Successful Response

Response model for bucket objects.

bucket_id
string
required

ID of the bucket this object belongs to

object_id
string

Unique identifier for the object

key_prefix
string | null

Storage key/path of the object, this will be used to retrieve the object from the storage. It is similar to a file path. If not provided, it will be placed in the root of the bucket.

content_hash
string | null

SHA256 hash of the object's content, used for de-duplication.

blobs
BlobModel · object[]

List of blobs contained in this object

source_details
SourceDetails · object[]

Lineage/source details for this object; used for downstream references.

status
enum<string>

The current status of the object.

Available options:
PENDING,
IN_PROGRESS,
PROCESSING,
COMPLETED,
COMPLETED_WITH_ERRORS,
FAILED,
CANCELED,
UNKNOWN,
SKIPPED,
DRAFT,
ACTIVE,
ARCHIVED,
SUSPENDED
error
string | null

The error message if the object failed to process.

Examples:

"Failed to process object: Object not found"

skip_duplicates
boolean
default:false

Skip duplicate blobs, if a blob with the same hash already exists, it will be skipped.

created_at
string<date-time> | null

Timestamp when the object was created. Automatically populated by the system.

updated_at
string<date-time> | null

Timestamp when the object was last updated. Automatically populated by the system.