younifyd
Menu

Update API key

Update API key

PATCH/keys/{key}

Use it in a workflow

  1. Add a step and choose the Meilisearch connector.
  2. Pick the Update API key action (under Keys).
  3. Fill in the fields below, then reference the result from later steps as {{updateApiKey.response.data}}.

Request

Path parameters

keystring (password)required

The `uid` or `key` field of an existing API key.

Request body

Enter the body as JSON in the step's Body field.

descriptionstring | null

A new description for the API key. Pass `null` to remove the existing description. Useful for documenting the purpose or usage of the key.

namestring | null

A new human-readable name for the API key. Pass `null` to remove the existing name. Use this to identify keys by purpose, such as "Production Search Key" or "CI/CD Indexing Key".

json
{
  "description": "This key is used to update documents in the products index",
  "name": "Indexing Products API key"
}

Response

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

namestring | null

A human-readable name for the API key. Use this to identify the purpose of each key, such as "Frontend Search Key" or "Admin Key for CI/CD". This is optional and can be `null`.

descriptionstring | null

A longer description explaining the purpose or usage of this API key. Useful for documenting why the key was created and how it should be used. This is optional and can be `null`.

keystring

The actual API key string to use in the `Authorization: Bearer <key>` header when making requests to Meilisearch. Keep this value secret and never expose it in client-side code.

uidstring (uuid)

The unique identifier (UUID) for this API key. Use this to update or delete the key. The UID remains constant even if the key's name or description changes.

actionsarray<string>

The list of actions (permissions) this key is allowed to perform. Examples include `documents.add`, `search`, `indexes.create`, `settings.update`, etc. Use `*` to grant all permissions.

indexesarray<string>

The list of index UIDs this key can access. Use `*` to grant access to all indexes, including future ones. Patterns are also supported, e.g., `movies_*` matches any index starting with "movies_".

expiresAtstring | null

The expiration date and time of the key in RFC 3339 format. After this time, the key will no longer be valid for authentication. Set to `null` for keys that never expire.

createdAtstring (date-time)

The date and time when this API key was created, formatted as an RFC 3339 date-time string. This is automatically set by Meilisearch and cannot be modified.

updatedAtstring (date-time)

The date and time when this API key was last modified, formatted as an RFC 3339 date-time string. This is automatically updated by Meilisearch when the key's name or description changes.

json
{
  "key": "string",
  "uid": "00000000-0000-0000-0000-000000000000",
  "actions": [
    "*"
  ],
  "indexes": [
    "string"
  ],
  "createdAt": "2025-01-01T00:00:00Z",
  "updatedAt": "2025-01-01T00:00:00Z",
  "name": "string",
  "description": "string",
  "expiresAt": "2025-01-01T00:00:00Z"
}

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

Was this page helpful?