# Update an API key

> Updates an API key's name, project scope, or policies. The project scope can be changed to another project, set (scoping a previously unscoped key), or cleared with null (unscoping the key). Only the owner or an admin can update it. A project-scoped credential can only update keys in its own project, and cannot move a key to another project or unscope it.

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Update an API key"}
>
</Heading>

<MethodEndpoint
  method={"put"}
  path={"/api/v1/api-keys/{api_key_id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Updates an API key's name, project scope, or policies. The project scope can be changed to another project, set (scoping a previously unscoped key), or cleared with null (unscoping the key). Only the owner or an admin can update it. A project-scoped credential can only update keys in its own project, and cannot move a key to another project or unscope it.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
>
  <Translate id="theme.openapi.request.title">Request</Translate>
</Heading>

<ParamsDetails
  {...require("./update-api-key.ParamsDetails.json")}
>
  
</ParamsDetails>

<RequestSchema
  {...require("./update-api-key.RequestSchema.json")}
>
  
</RequestSchema>

<StatusCodes
  {...require("./update-api-key.StatusCodes.json")}
>
  
</StatusCodes>
