# Reset the secret token for an APM resource. **POST /deployments/{deployment_id}/apm/{ref_id}/_reset-token** Reset the token of an APM resource. ## Servers - https://api.elastic-cloud.com/api/v1: https://api.elastic-cloud.com/api/v1 () ## Parameters ### Path parameters - **deployment_id** (string) Identifier for the Deployment. - **ref_id** (string) User-specified RefId for the Resource (or '_main' if there is only one). ## Responses ### 202 Response containing the new secret token, plan to apply it starts #### Body: application/json (object) - **apm_id** (string) For an operation creating or updating an APM server, the Id of that server - **secret_token** (string) The secret token for accessing the server - **diagnostics** (object) If the endpoint is called with URL param 'validate_only=true', then this contains advanced debug info (the internal plan representation) ### 400 Reset token is not supported when APM is managed by Elastic Agent. (code: `clusters.cluster_plan_state_error`) #### Headers - **x-cloud-error-codes** (string) The error codes associated with the response #### Body: application/json (object) - **errors** (array[object]) A list of errors that occurred in the failing request ### 404 * The Deployment specified by {deployment_id} cannot be found. (code: `deployments.deployment_not_found`) * The Resource specified by {ref_id} cannot be found. (code: `deployments.deployment_resource_not_found`) #### Headers - **x-cloud-error-codes** (string) The error codes associated with the response #### Body: application/json (object) - **errors** (array[object]) A list of errors that occurred in the failing request ### 500 We have failed you. (code: `deployments.deployment_resource_no_longer_exists`) #### Headers - **x-cloud-error-codes** (string) The error codes associated with the response #### Body: application/json (object) - **errors** (array[object]) A list of errors that occurred in the failing request [Powered by Bump.sh](https://bump.sh)