# Patch Token

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Patch Token"}
>
</Heading>

<MethodEndpoint
  method={"patch"}
  path={"/api/v1/token/{api_token_id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Updates the name of a token in the database.

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

<ParamsDetails
  parameters={[{"description":"A unique identifier of the API token you want to delete. Call the Get Tokens endpoint to check the IDs of the existing API tokens.","in":"path","name":"api_token_id","required":true,"schema":{"description":"A unique identifier of the API token you want to delete. Call the Get Tokens endpoint to check the IDs of the existing API tokens.","format":"uuid","title":"Api Token Id","type":"string"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The name of the API token.","title":"API Token Name"},"organization_role":{"anyOf":[{"enum":["ADMIN","MEMBER","EXTERNAL"],"title":"OrganizationRoles","type":"string"},{"type":"null"}],"description":"The role of the API token in the organization. Defaults to the role of the user that created the token. Admin users can create tokens with any role.","title":"Organization Role"},"personal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Indicates if the API token is a personal or service level token.","title":"API Token type"},"role_id":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"The ID of the role assigned to the API token. Defaults to the role of the user who created it. Admin users can create tokens with any role.","title":"API Token Role ID"}},"title":"UpdateToken","type":"object"}}},"required":true}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"204":{"description":"Successful Response"},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"}}}
>
  
</StatusCodes>
