TwentyDEV icon

TwentyDEV

Consume the Twenty API

Actions252

Overview

This node operation "Find Many Api Keys" retrieves multiple API key objects from the connected service. It supports filtering, sorting, pagination, and controlling the depth of related nested objects returned. This is useful when you want to list or search through API keys programmatically, for example, to audit active keys, manage access, or synchronize API keys with another system.

Practical examples:

  • Fetch all API keys created after a certain date.
  • Retrieve API keys sorted by creation date or usage count.
  • Paginate through large sets of API keys in batches.
  • Include related user or project information linked to each API key by adjusting the depth.

Properties

Name Meaning
Order By Sorts the returned API key objects. Format: field_name_1,field_name_2[DIRECTION_2],.... Directions can be AscNullsFirst, AscNullsLast, DescNullsFirst, DescNullsLast. Default direction is AscNullsFirst. Example: created_at, idDescNullsLast
Filter Filters the API keys returned. Format: field[COMPARATOR]:value pairs separated by commas. Supports comparators like eq, neq, in, containsAny, is, gt, gte, lt, lte, startsWith, like, ilike. Can combine filters with or, and, not. Use field[is]:NULL or field[is]:NOT_NULL for null checks. Default excludes a zero UUID.
Limit Limits the number of API key objects returned in one response. Default is 60.
Depth Controls how many levels of nested related objects are included: 0 = only primary API key info, 1 = includes directly related objects, 2 = includes related objects of those related objects. Default is 1.
Starting After Returns objects starting after a specific cursor value (used for pagination). Cursor values come from startCursor or endCursor in the response's pageInfo.
Ending Before Returns objects ending before a specific cursor value (used for pagination). Cursor values come from startCursor or endCursor in the response's pageInfo.

Output

The output JSON contains an array of API key objects matching the query parameters. Each object includes fields describing the API key itself and, depending on the depth parameter, may include nested related objects such as associated users or projects.

If pagination is used, the output also includes pageInfo containing cursors (startCursor, endCursor) to facilitate fetching subsequent or previous pages.

No binary data output is expected from this operation.

Dependencies

  • Requires an API authentication credential configured in n8n to connect to the Twenty API service.
  • The node uses the Twenty API base URL and expects JSON responses.
  • No additional external dependencies beyond the configured API credentials.

Troubleshooting

  • Empty results: Check your filter syntax and ensure that the filter criteria match existing API keys. Also verify that the limit and pagination cursors are set correctly.
  • Invalid filter or order_by format: Ensure filters and sort strings follow the documented syntax exactly, including correct comparator names and field names.
  • Authentication errors: Verify that the API key credential is valid and has sufficient permissions to list API keys.
  • Pagination issues: When using starting_after or ending_before, use cursor values exactly as provided in the previous response's pageInfo.
  • Depth too high: Requesting a very high depth might increase response size and latency; if performance issues occur, try reducing the depth.

Links and References

Discussion