'DELETE /api/users/{id}/custom_builds/{key}
Delete a custom build.
:param id: the encoded id of the user
:type  id: str
:param id: custom build key to be deleted
:type  id: str'

@expose_api
def delete_custom_builds(self, trans, id, key, payload={}, **kwd):

    user = self._get_user(trans, id)
    dbkeys = (json.loads(user.preferences['dbkeys']) if ('dbkeys' in user.preferences) else {})
    if (key and (key in dbkeys)):
        del dbkeys[key]
        user.preferences['dbkeys'] = json.dumps(dbkeys)
        trans.sa_session.flush()
        return {'message': ('Deleted    %s.' % key)}
    else:
        raise MessageException(('Could    not    find    and    delete    build    (%s).' % key))
