Delete the provided profile.

There is a small delay between the time a profile is deleted and it being reflected in the search layer (usually a couple of seconds). That means that a profile that was just deleted might still be returned by the searchProfiles function.

deleteProfile(id, [options], [callback])

Arguments Type Description
id string Unique profile identifier to delete
options JSON Object Optional parameters
callback function (Optional) Callback handling the response


Option Type Description Default
queuable boolean Make this request queuable or not true
refresh string If set to wait_for, Kuzzle will wait the persistence layer to finish indexing (available with Elasticsearch 5.x and above) undefined

Return Value

Returns the Security object to allow chaining.

Callback Response

Returns the ID of the security profile that has been deleted.


Copied to clipboard!


use \Kuzzle\Kuzzle;

$profileId = 'myProfile';

$kuzzle = new Kuzzle('localhost');

try {
catch (ErrorException $e) {


Callback response

Copied to clipboard!
"deleted profile identifier"