--- title: "POST | Disable API secret" slug: "api-post-disable-api-secret" updated: 2026-03-04T12:05:22Z published: 2026-03-04T14:37:38Z canonical: "docs.senhasegura.io/api-post-disable-api-secret" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.senhasegura.io/llms.txt > Use this file to discover all available pages before exploring further. # POST | Disable API secret Disable an API secret in **MySafe**. ## Prerequisites - Permission to edit the API secret. - An active API secret in **MySafe**. ## Request ` POST` `/api/mysafe/secretapi/inactive/[identifier]` ## Request parameters Send the parameter below in the **path** of the URL. identifier - int - required - API secret unique identification code. **Note**: this value is automatically assigned by Segura® in [POST | Create API secret](/v4-2/docs/api-post-create-api-secret) and is obtained in the response to the [GET | List all API secrets](/v4-2/docs/api-get-list-all-api-secrets). ### Example request ` POST` `{{url}}/api/mysafe/secretapi/inactive/5` ## Response ``` HTTP/1.1 200 OK ``` ``` { "code": 200, "response": { "status": 200, "message": "Api secret successfully deactivated", "error": false, "error_code": 0, "detail": "", "mensagem": "Api secret successfully deactivated", "erro": false, "cod_erro": 0 } } ``` Info If the API secret is already inactive, the call will return a `200` response code with the message `Api secret has already been deactivated`. ## Errors ****400 - Bad Request**.** --- **Message: "1005: Api secret not found"** **Possible cause**: Api secret wasn't found **Solution**: check the value for the `identifier` and resend the request. --- **Message: "1006: User does not have access"** **Possible cause**: user doesn't have access to the API secret. --- ****500 - Internal Server Error**.** --- **Message: "Unexpected error."** **Possible cause**: the error is on the Segura® server. **Solution**: contact the support team for more information. --- ****No route matched with those values.**** --- **Message: "No route matched with those values."** **Possible causes**: failure in your application authentication with the Segura® server or incorrect URL. **Solution**: check the authentication parameters such as `Access Token URL`, `Client ID` and `Client Secret` and request a new access token or check and correct the URL. --- ****An invalid response was received from the upstream server** .** --- **Message: "An invalid response was received from the a seupstream server** **Possible cause**: the upstream server may be taking too long to respond, leading to a timeout error that is interpreted as an invalid response by the proxy/gateway server. **Solution**: check the connectivity between the source of the request and the Segura® server. --- ****The upstream server is timing out**.** --- **Message: "The upstream server is timing out"** **Possible cause**: the request time has expired. **Solution**: check the connectivity between the source of the request and the Segura® server. ---