OpenWA icon

OpenWA

Interact with OpenWA WhatsApp API Gateway

Actions164

API Key → Update

AI-generated

Summary

Update an existing API key's properties by specifying its ID and the fields to modify. Only the provided fields in the update request are changed, leaving other properties intact.

Inputs

  • API Key Name or ID (required) — The identifier of the API key to update; select from a dropdown of existing keys or provide an ID via expression.
  • Fields — One or more optional fields to update on the API key (e.g., name, allowed chats, allowed IPs, allowed sessions, expiration date, role). Only specified fields are changed; unspecified fields remain unchanged.

Output shape

a single record representing the updated API key object with its current properties.

Fields sent in the update will overwrite existing values; fields left out remain unchanged. Empty lists in allowed chat/IP/session restrictions do not clear existing restrictions. The update requires providing a valid key ID; invalid or blank fields are rejected.

Examples

Example 1: Rename an API key and restrict it to specific chats

Set the key ID to the target API key. In fields, set 'Name' to the new name and 'Allowed Chats' to a comma-separated list of chat IDs.

Links

Discussion