# Upsert a Custom Entity instance `UpsertCustomEntity` `POST /api/customentities/{entityType}` - [OpenAPI fragment](https://www.lusid.com/docs/api/lusid/endpoints/custom-entities/UpsertCustomEntity.json) - [Rendered page](https://www.lusid.com/docs/api/lusid/endpoints/custom-entities/UpsertCustomEntity) Insert the Custom Entity if it does not exist or update the Custom Entity with the supplied state if it does exist. ## Referenced schemas - [CustomEntityRequest](https://www.lusid.com/docs/api/lusid/schemas/CustomEntityRequest.txt) - [CustomEntityResponse](https://www.lusid.com/docs/api/lusid/schemas/CustomEntityResponse.txt) [< CustomEntities](https://www.lusid.com/docs/api/lusid/endpoints/custom-entities/llms.txt)