Deleting Objects

Each object that allows deletion via the API will have a delete method in that object's namespace.

The delete method takes a single parameter which is the primary identifier for the object to be deleted.  See Fetching Objects for more information about how to specify an object.

Delete will return null if the delete is successful.  If the object did not exist to begin with, null is also returned.

Calling the delete method

Here is an example request calling the delete method

A JSON-RPC Request for calling the delete method

    "method": "member.delete",
    "params": ["example_username"],
    "id": 1

The JSON-RPC Response

    "result": null,
    "error": null,
    "id": 1

Deleting Member Objects

Member objects are a special case for delete.  With other object types, you can delete the object and add back an different version of that object.  Members are treated differently.  When a member object is deleted, the username associated with that member is not released.  Therefore, any subsequence member.create for that same username will fail with a duplicate object error.

Docs Navigation