Skip to content

Delete entity record

Delete an entity record in an Entity.

If more than 1 record is found by search_by, we delete all records that were found. You can add as many search_by parameters as you want to narrow down the search.

Endpoint

DELETE /api/v1/external/projects/{projectUuid}/entities/{entityId}/records

Headers

HeaderTypeRequiredDescription
AuthorizationstringYesBearer token for authentication
AcceptstringNoMust be application/json

Request Body

The request should be sent as application/json with the following fields:

FieldTypeRequiredDescription
search_byobjectYesObject containing search criteria
search_by.[key]stringYesThe key to search by
search_by.[value]stringYesThe value to search for

Parameters

ParameterTypeRequiredDescription
projectUuidstringYesThe UUID of the project to upload the document to. Can be found in the Recognito application.
entityIdstringYesThe ID of the entity to create the record in. Can be found in the Recognito application.

Response

Success Response (200 OK)

json
{
  "status": "done",
  "entityRecordsDeleted": 5
}

Error Response (400 Bad Request)

json
{
  "error": "string",
  "message": "string"
}

Example

Request

bash
curl -X PUT https://apiv2.recognito.io/api/v1/external/projects/{projectUuid}/entities/{entityId}/records \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "search_by": {
      "email": "john.doe@example.com",
      "invoice_number": "INV-12345"
    }
  }'

Response

json
{
  "status": "done",
  "entityRecordsDeleted": 1
}