---
id: api-key-list
title: "List API keys"
description: "Lists all API keys."
sidebar_label: "List API keys"
hide_title: true
hide_table_of_contents: true
api: eJzdWNtuI7kR/ZUCX5wAbbmlsWdnBcyDYu8kTjIbY0ZGNrENo9Rdkrhmkz28WNYI/Zb3/E7yO/mB/EJQ7G7dPVb2kgQxDF2oIuvwsE4VuxYiJ5dZWXpptOiL30vnHaBSMLi6hAeau86tFonwOHGifyPaUXGXCFOSRZ53mYu+wFLeP9C8r6TzIhGOsmCln4v+zUKMCC3ZQfBT0b+5q+4SUaLFgjxZFw0k+/4UyM5FIjQWJPrCzDTZe5mLZAvjO6k82SVAGM0h2sLlRYc9Z1MqUPQXws9LXkhqTxOyokqEpU9BWspFf4zKUSLoCYtSkeh/9ebrKtkPJL4dAILtOvAxlKWx3kGGjo6ldqSd9PKRoETrJSpw3ko9gQJ9NiXXgXfGQoMjAUdosyn/PjYWjlDR0xHMpFK1fXTiQMkHgqOBoifIDR0ltWG39+oogXba8dP889FeQmoAX+ZD8BKCj8qSK4125HiFXpry2yYXwynBMhhghg5cyDJybhwUA8iM9qQ9T8SyVDKLhiffO5692MVnRt9TxkG0gncjSpww6IgnKB8jsLTs1ssaW2PxwjpmPHbEg0oW0u+u0vy+Gz7bEcC7dh6tBzMGP+XzZf8wkzo3sw68l1oWoQDpIGUWltSmVev8ZSfv8SkuokMxIsueSFFB2jvwBix5K4lDiyxkqFQH2gnSQS/d9NtNq6pa8bdyjtYix7v0VLiX+IuCbCQRs0IiJha15w+ZJfSU3yNPCmXeftkhWeYH7P1ay0+B4PIiSoEZbtS2uaveq9Oq1ep2iO87s+XII0U1wUQ+kmY6n3Mhzi9Pzi/gPUrNoinQPfC+6oT3stM/mWChnrR/+cFgMOg87fu7Grq3THdQCkds622gqk3HOwe46XfAozE4ceIAnTOZ5BOBmfRTmDOqFs6tvtX/+Mvf//m3v8LlGLRppliCsQk6T2BGHGzBakANVJR+DtFpXR0OChzmKhGPqALtBsRBRA5xwmi/vJWtg+MDq30etHw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n20jhfYJRr03LiNtyyt7TN/mKl+ef7dTV4T0/+pFTNg2tkZtHQd9N27FjfU+M8Dy0WI3R0bVVV8XDdCGNSc+k4lFaNomcRvdCd2wssPv2tN/yaJzYhuCf3o3z/rzblvsBD01xZcXDHX6ysb403d1UipoQ52Xgy9ZxBllHp12bt1AJeZamjX38zFInAzUjfiuy4evsoq+dray8WtcXQPJCuKtEC9/xdVHdVVf0LMV+ehw==
sidebar_class_name: "get api-method"
info_path: docs/api/authorization
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"List API keys"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/api_key"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Lists all API keys.


<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"in":"query","name":"owner_id","description":"Filter API keys by owner ID.","schema":{"type":"integer"},"required":false,"example":789},{"in":"query","name":"name","description":"Filter API keys by name. Supports case-insensitive partial string matches. For example, searching for 'alex' will match names like 'Alex doe', 'alex123', or 'alex-xyz'.","schema":{"type":"string"},"required":false,"example":"alex"}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The operation was successful.","content":{"application/json":{"schema":{"type":"object","required":["paging","results"],"properties":{"paging":{"type":"object","required":["offset","limit"],"properties":{"offset":{"type":"integer","description":"The start of the paging window. Minimum is 0.","example":0},"limit":{"type":"integer","description":"Maximum number of elements to retrieve per call. Maximum is 200.","example":10}}},"results":{"type":"array","items":{"type":"object","required":["id","name","tags","grants","created_at","updated_at"],"properties":{"id":{"type":"integer","description":"Unique ID for the API key.","example":1234},"name":{"type":"string","description":"The descriptive name given to the API key.","example":"CI/CD Main"},"masked_api_key":{"type":"string","description":"Your masked API key.","example":"AAAA.xxxxxxxxxxxxxxxxxxxxxPTs=","nullable":true},"tags":{"type":"array","description":"Array of tags associated with your API key.\n\nℹ️ If no tags are found, we return an empty array.\n","items":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","description":"Tag key associated with your API key.","example":"CI"},"value":{"type":"string","description":"Tag value associated with your API key.","example":"main"}}}},"grants":{"type":"array","description":"Defines access grants for an API key.","items":{"type":"object","required":["nrn","role_id","role_slug"],"properties":{"nrn":{"type":"string","description":"The NRN of the resource where the API key's role is assigned.","example":"organization=1:account=1:namespace=1:application=4"},"role_id":{"type":"integer","description":"The ID of the role assigned to the API key for this NRN.","example":1855672260},"role_slug":{"type":"string","description":"The slug of the role assigned to the API key for this NRN.","example":"machine:ci"}}}},"owner_id":{"type":"integer","description":"The unique ID of the user that creates the API key.","example":1595},"last_used_at":{"type":"string","description":"The ISO-8601 UTC timestamp of when the API key was last used.","nullable":true,"format":"date-time","example":"2021-01-02T00:00:00Z"},"created_at":{"type":"string","description":"The ISO-8601 UTC timestamp of when the API key was created.","format":"date-time","example":"2021-01-02T00:00:00Z"},"updated_at":{"type":"string","nullable":true,"description":"The ISO-8601 UTC timestamp of when the API key was last updated.","format":"date-time","example":"2021-01-02T00:00:00Z"}},"title":"apiKeyResponse"}}},"title":"apiKeyPaginatedResponse"}}}},"4XX":{"description":"Client error responses due to invalid input or missing parameters.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific client error (e.g., 400, 401, 403, 404).","example":400},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"bad_request"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Bad Request\", \"Unauthorized\").","example":"Bad Request"},"message":{"type":"string","description":"Additional details about the error.","example":"The request was malformed or contained invalid parameters."}}}}}},"5XX":{"description":"Server error responses indicating an issue on the API side.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific server error (e.g., 500, 502, 503).","example":500},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"internal_server_error"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Internal Server Error\", \"Service Unavailable\").","example":"Internal Server Error"},"message":{"type":"string","description":"Additional details about the error.","example":"An unexpected error occurred. Please try again later."}}}}}}}}
>
  
</StatusCodes>


      