younifyd
Menu

Add or update documents

Add or update documents

PUT/indexes/{index_uid}/documents

Use it in a workflow

  1. Add a step and choose the Meilisearch connector.
  2. Pick the Add or update documents action (under Documents).
  3. Fill in the fields below, then reference the result from later steps as {{addOrUpdateDocuments.response.data}}.

Request

Path parameters

index_uidstringrequired

Unique identifier of the index.

Query parameters

primaryKeystring

The [primary key](https://www.meilisearch.com/docs/learn/getting_started/primary_key) field for uniquely identifying each document. This parameter is optional and can only be set the first time documents are added to an index. Subsequent attempts to specify it will be ignored if the primary key has already been set.

csvDelimiterstring

Customize the CSV column delimiter when importing CSV documents. Must be a single ASCII character. Only valid when the content type is `text/csv`; using this parameter with `application/json` or `application/x-ndjson` will return an error. Default: `,`.

Default ","

customMetadatastring

A string that can be used to identify and filter tasks. This metadata is stored with the task and returned in task responses. Useful for tracking tasks from external systems or associating tasks with specific operations in your application.

skipCreationboolean

When set to `true`, only updates existing documents and skips creating new ones. Documents that don't already exist in the index will be ignored. This is useful for partial updates where you only want to modify existing records without adding new ones.

Response

Returns 202 with an object. Read it in later steps with {{addOrUpdateDocuments.response.data.<field>}}.

taskUidinteger (u-int32)

Unique sequential identifier of the task.

indexUidstring | null

Unique identifier of the targeted index. Null for global tasks.

statusstring

The status of a task.

One ofenqueuedprocessingsucceededfailedcanceled

typestring

The type of the task.

One ofdocumentAdditionOrUpdatedocumentEditiondocumentDeletionsettingsUpdateindexCreationindexDeletionindexUpdateindexSwaptaskCancelationtaskDeletiondumpCreationsnapshotCreationexportupgradeDatabaseindexCompactionnetworkTopologyChangedsrUpdatedsrClear

enqueuedAtstring (date-time)

Date and time when the task was enqueued.

customMetadatastring | null

Custom metadata attached to this task at creation. Use it to associate tasks with external systems or add application-specific information.

json
{
  "taskUid": 0,
  "status": "processing",
  "type": "documentAdditionOrUpdate",
  "enqueuedAt": "2025-01-01T00:00:00Z",
  "indexUid": "string",
  "customMetadata": "string"
}

Need more? See the Meilisearch guide for connection setup and behaviour shared by every action.