Actions252
- Api Keys Actions
- Attachments Actions
- Blocklists Actions
- Calendar Channel Event Associations Actions
- Find Many Calendar Channel Event Associations
- Create One Calendar Channel Event Association
- Create Many Calendar Channel Event Associations
- Find One Calendar Channel Event Association
- Delete One Calendar Channel Event Association
- Update One Calendar Channel Event Association
- Find Calendar Channel Event Association Duplicates
- Companies Actions
- Calendar Channels Actions
- Calendar Event Participants Actions
- Calendar Events Actions
- Connected Accounts Actions
- Favorite Folders Actions
- Favorites Actions
- Message Channel Message Associations Actions
- Find Many Message Channel Message Associations
- Create One Message Channel Message Association
- Create Many Message Channel Message Associations
- Find One Message Channel Message Association
- Delete One Message Channel Message Association
- Update One Message Channel Message Association
- Find Message Channel Message Association Duplicates
- Message Channels Actions
- Message Folders Actions
- View Fields Actions
- Message Participants Actions
- Messages Actions
- Message Threads Actions
- Notes Actions
- Note Targets Actions
- Opportunities Actions
- People Actions
- Tasks Actions
- Task Targets Actions
- Timeline Activities Actions
- View Filter Groups Actions
- View Filters Actions
- View Groups Actions
- Views Actions
- View Sorts Actions
- Webhooks Actions
- Workflow Automated Triggers Actions
- Workflow Runs Actions
- Workflows Actions
- Workflow Versions Actions
- Workspace Members Actions
Overview
This node operation updates a single API key object in the connected service. It allows users to modify properties such as the API key's name, expiration date, and revocation date by specifying the unique identifier of the API key to update. This is useful for managing API keys dynamically, for example, to extend their validity, revoke access, or rename keys for better organization.
Practical examples include:
- Revoking an API key that is no longer needed or compromised.
- Extending the expiration date of an API key for continued access.
- Renaming an API key to reflect new usage or ownership.
Properties
| Name | Meaning |
|---|---|
| Id | The unique identifier of the API key object to update. |
| Depth | Level of nested related objects to include in the response: 0 (primary only), 1 (primary + direct), 2 (primary + direct + nested). |
| Revoked At | The date when the API key was revoked, effectively disabling it from that time onward. |
| Expires At | The expiration date of the API key, after which it will no longer be valid. |
| Name | The name assigned to the API key, used for identification or organizational purposes. |
Output
The output JSON contains the updated API key object reflecting the changes made. Depending on the depth parameter, the response may include related nested objects up to two levels deep. The structure typically includes fields like the API key's id, name, expiration and revocation dates, and potentially related entities depending on depth.
No binary data output is involved in this operation.
Dependencies
- Requires an API key credential or similar authentication token configured in n8n to authorize requests to the external service.
- The node uses a base URL and headers preset for JSON communication with the Twenty API.
- The operation depends on the external Twenty API being available and accessible.
Troubleshooting
- Invalid Id: If the provided API key ID does not exist, the node will likely return an error indicating the resource was not found. Verify the ID is correct.
- Authentication Errors: Missing or invalid API credentials will cause authorization failures. Ensure the API key credential is properly set up.
- Date Format Issues: The
revokedAtandexpiresAtfields expect string dates. Incorrect formats may cause validation errors. Use ISO 8601 date strings. - Depth Parameter Misuse: Setting an unsupported depth value might result in unexpected responses or errors. Use only 0, 1, or 2 as specified.
Links and References
- Twenty API Documentation (hypothetical link for reference)
- ISO 8601 Date Format