---
id: entity-hook-action-update
title: "Update an entity hook action"
description: "Updates an entity hook action."
sidebar_label: "Update an entity hook action"
hide_title: true
hide_table_of_contents: true
api: eJztWP9u28gRfpXBosAlAS3LiZS7EkgBn5sivgNSI3HQA2xDWHFH4l7IXWZ/WNEJ/K//93V6r9MX6CsUs0uKpMXa7iHXAof6D1la7nJnvv2+mdnZMYE2M7JyUiuWsg+V4A4tcAWonHRbyLX+CDyj5xOWMMfXlqVX7HX3lN0kTFdoOM05FyxlcemCHi7i0tSHF7OEVdzwEh0aes2OSdq14i5nCVO8RJYyKVjCbJZjyVm6Y25b0ah1Rqo1S9hKm5I7ljLvpWB1wgx+8tKgYKkzHpM7Hl3mCOd/BL0Cl+OIU+A0CCzQIbmHn3lZFbTffD7Fb2bT6RE+//3yaHYiZkf865OXR7PZy5fz+Ww2nU6nrL5JmMXMG+m2wZ0lcoPm1LucpVc39JisQ+u+1WJL3mRaOVSOvvKqKmQWUDv+0ZKxu0O39fJHzBzhZghjJ9HS002OagwcVL6k41niShuCm68cGjqhISrvK8zkSqKFTY4uRxPQCbDoLPPGQnwDaAPhFaB8UVQFdwT/VxakcmgUL6DQa5lNrtUAvGb7OmkM/PeGtgQ6PDRaQcc2wsNrda3+AM+evdUO02fP4Mwbg8oV2wS0KrZwHV57zUBasL6qtHEo7toYdq4Tpu8FMjMYebsncCTLfZC6nvUtyXLuwBm5XqOxe6yHjGu2qgk16cJQ9P0N6WhjZHhYB8bbSisbqfB8OqV/hwCOcH3DLURHBO39i8nYSe4qylWZAG7YkVgXtmME7qLShcy2C+uzDK0djK24LFgSydxQJZzHzV26S/FwJBjjkFfyk0eQgixbSTQjceCXyD46PGLS0IRTMGi1N9nAhCdv3719CjbQZSvVmiRoEFwubXtO4TTQDk3TZs2V/Cmc0auTlGeZ9sq9ep5S3LQVz/DVi7R3jq9mZGhzJg/aOiI5vlph5lDAchutG08JrVR6W4cArqsol6rQ25JoFiN8sJSOuPMszq33vHmUsRFAmbWYbbWHDVeOAvoS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Mr3fWtxjQi9qu6WxQKZJLGm+/KntkHz3l8tw2SIpvus6kq+79Bsr/67AbzeglBqL2V4hKdVK0yJyK57CyWQ6mbIuIff7w6HytK7kIQo0Xd7YaR5vNN89417b9BEd6mi4w8/uuCq4VLR/gH3XnNVVv0Hd71alUlCEybV1NGu3W3KLH0xR1zT8ySPdW69uEnbLjSQ6hyMV0tJ3wdIVL+zdBnTf9ifvmjj3FP6ztvSoT20Fr6h+D5d1ljKWsI+4jV30+qZOWI5coAmGxgdn0Zyjy9huaxceBOw6aVecZhlW7t65Nz1hXJxenr0hCjYt7zJERWb4hiI930QrdbWvNcPYjhVcrX2QPIsvJcLyId/v8Du4NYrDbhdnXOqPqOp6D4uj34RMXf8L2bak+g==
sidebar_class_name: "patch api-method"
info_path: docs/api/entity-hook
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={"Update an entity hook action"}
>
</Heading>

<MethodEndpoint
  method={"patch"}
  path={"/entity_hook/action/{id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Updates an entity hook action.

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

<ParamsDetails
  parameters={[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the entity hook action to delete.","example":"550e8400-e29b-41d4-a716-446655440000"}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"type":"object","properties":{"when":{"type":"string","enum":["before","after"],"description":"Specifies whether the hook occurs before or after nullplatform's internal logic.\n","example":"before"},"type":{"type":"string","enum":["hook"],"description":"The type of entity hook action.\n\n> **Note:** Currently, only \"hook\" is supported.\n","example":"hook"},"on":{"type":"string","enum":["create","update","delete"],"description":"Specifies the type of action that triggers the hook.","example":"create"}},"title":"entityHook_write"}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The entity hook action was updated.","content":{"application/json":{"schema":{"type":"object","required":["id","nrn","entity","action","on_policy_success","on_policy_fail","when","type","on"],"properties":{"id":{"type":"string","format":"uuid","description":"The unique identifier of the entity hook.","example":"550e8400-e29b-41d4-a716-446655440000"},"nrn":{"type":"string","description":"A resource identifier (NRN) specifying where this action applies.","example":"organization=1:account=2:namespace=3:application=4"},"entity":{"type":"string","description":"The type of entity affected by this entity hook action.","enum":["application","scope","deployment","namespace"],"example":"scope"},"action":{"type":"string","description":"The specific action you want to be notified about.","enum":["deployment:create","deployment:write","deployment:delete","scope:create","scope:write","scope:delete","application:create","application:write","application:delete","namespace:create","namespace:write","namespace:delete"],"example":"scope:create"},"dimensions":{"type":"object","description":"Key-value pairs defining the scope of the action.","example":{"environment":"production","country":"us"}},"on_policy_success":{"type":"string","enum":["manual"],"description":"The action to be taken on the entity hook success.\n\n> **Note:** Currently, only \"manual\" is supported.\n","example":"manual"},"on_policy_fail":{"type":"string","enum":["manual"],"description":"The action to be taken on entity hook failure.\"\n\n  > **Note:** Currently, only \"manual\" is supported.\n","example":"manual"},"when":{"type":"string","enum":["before","after"],"description":"Specifies whether the hook occurs before or after nullplatform's internal logic.\n","example":"before"},"type":{"type":"string","enum":["hook"],"description":"The type of entity hook action.\n\n> **Note:** Currently, only \"hook\" is supported.\n","example":"hook"},"on":{"type":"string","enum":["create","update","delete"],"description":"Specifies the type of action that triggers the hook.","example":"create"},"policies":{"type":"array","description":"The policies applied to the entity.\n\n> ℹ️ If no policies are found, we return an empty array.\n","items":{"type":"object","properties":{"id":{"type":"integer","description":"A unique identifier for the policy.","example":5678},"nrn":{"type":"string","description":"A resource identifier (NRN) specifying where the policy applies.","example":"organization=1:account=2:namespace=3:application=4"},"name":{"type":"string","description":"The name of the policy.","example":"Crypto Kong Policies"},"conditions":{"type":"object","description":"A JSON object defining the conditions under which this policy applies.","example":{"scope.requested_spec.memory_in_gb":{"$lte":4}}}}}}},"title":"entityHook"}}}},"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>


      