# Customisation of Mock Entity and Responses

This page explains how to use APIs to create custom mock entities for integration purposes. Additionally, responses for any scenario can be simulated by adding a custom expected response to a specific mock entity. The behavior of the created mock entities will default to the Response Simulator.

## Overview:

The Response Simulator is built to handle custom entities and responses for any request, while also mimicking the behavior of real Entity Protocol APIs. It offers a controlled environment for developers to test and validate custom scenarios without depending on the default behavior of the Response Simulator.

### Authorization: &#x20;

All the APIs listed below require a user token for authorization. Onboarded users can generate a token using their credentials, which can then be used to create mock entities, configure custom responses, and more.&#x20;

{% content-ref url="../../identity-and-access-management" %}
[identity-and-access-management](https://developer.sahamati.org.in/no-longer-relevent/technical-specifications/identity-and-access-management)
{% endcontent-ref %}

We recommend to use below postman collection for quicker access

{% file src="<https://content.gitbook.com/content/CKUjTKikPLYOjZEtClEd/blobs/8J3WIZ3sPQLiaPNiBYXi/Simulator-service.postman_collection.json>" %}

{% openapi src="<https://content.gitbook.com/content/CKUjTKikPLYOjZEtClEd/blobs/ZT5qtzCsU8u6rGk6ywma/MockEntityCreate%20api.yml>" path="/entity/mock/register" method="post" %}
[MockEntityCreate api.yml](https://content.gitbook.com/content/CKUjTKikPLYOjZEtClEd/blobs/ZT5qtzCsU8u6rGk6ywma/MockEntityCreate%20api.yml)
{% endopenapi %}

{% hint style="warning" %}

#### Regenerate the User Token after creating the mock entity to enable access to the newly created entity.

{% endhint %}

{% openapi src="<https://content.gitbook.com/content/CKUjTKikPLYOjZEtClEd/blobs/F67bUODEupSapOBLehgN/Simulator%20api.yml>" path="/response/add" method="post" %}
[Simulator api.yml](https://content.gitbook.com/content/CKUjTKikPLYOjZEtClEd/blobs/F67bUODEupSapOBLehgN/Simulator%20api.yml)
{% endopenapi %}

{% openapi src="<https://content.gitbook.com/content/CKUjTKikPLYOjZEtClEd/blobs/F67bUODEupSapOBLehgN/Simulator%20api.yml>" path="/response/list" method="post" %}
[Simulator api.yml](https://content.gitbook.com/content/CKUjTKikPLYOjZEtClEd/blobs/F67bUODEupSapOBLehgN/Simulator%20api.yml)
{% endopenapi %}
