> For the complete documentation index, see [llms.txt](https://docs.saafe.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saafe.in/central-registry/iam-user-endpoints/secret-management/entity-secret-reset.md).

# Entity Secret Reset

### Environment

<table><thead><tr><th width="218">Environment</th><th>IAM Base URL</th></tr></thead><tbody><tr><td>Saafe Hackathon</td><td><code>https://api.sandbox.sahamati.org.in/iam</code></td></tr><tr><td>Saafe Sandbox</td><td><code>https://api.uat.sahamati.org.in/iam</code></td></tr></tbody></table>

### API Request

<mark style="color:green;">`POST`</mark> `{{IAM Base URL}}/v1/entity/secret/reset`

Lets the FIU reset the entity id's secret on a specific interval.&#x20;

Note:&#x20;

1. If you fail to reset the secret before the expiry token generation will fail
2. Old Secret will not working immediately after the new secret is generated
3. Token generated using the old token will be still active as long as the token is not expired.

**Headers**

| Name          | Value                     |
| ------------- | ------------------------- |
| Content-Type  | `application/json`        |
| Authorization | `Bearer <IAM User Token>` |

**Body**

```json
{
    "ver": "1.0.0",
    "timestamp": "2024-10-10T10:48:45.030353256Z", //Current timestamp
    "txnId": "79ecd03d-867a-491d-8f5d-ec521a31c159", //unique UUID
    "entityId": "your entity id" //Entity ID under the user
}
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "ver": "1.0.0",
    "timestamp": "2024-10-10T10:48:45.030353256Z",
    "txnId": "79ecd03d-867a-491d-8f5d-ec521a31c159",
    "entityId": "your entity id",
    "secret": "string", //Your Entity ID's secret key
    "expiresOn": 1733226041466
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.saafe.in/central-registry/iam-user-endpoints/secret-management/entity-secret-reset.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
