Add UV Map via python?

Im trying to add a uv map via python and not having any luck.
Im on 2.80. Im getting the selected object, getting the mesh, then trying to add a second uv channel with ‘bpy.ops.mesh.uv_texture_add()’ as per the documentation:

I get the following error:
Operator bpy.ops.mesh.uv_texture_add.poll() failed, context is incorrect

    selected = bpy.context.active_object
    if selected == "" or selected is None:{'ERROR'},"please select a mesh")
        return {"FINISHED"}

    #vcol_data =
    mesh =
    for uv_layer in mesh.uv_layers:
        for tri in mesh.loop_triangles:
            for loop_index in tri.loops:
    #bm = bmesh.from_edit_mesh(mesh)


    # check for second uv channel
    if len(mesh.uv_layers) < 2:

    # copy verts[1][0] to uv[1][0]
    # copy verts[2][0] to uv[1][1]
    uv_lay =
    for face in mesh.faces:
        for loop in face.loops:
            uv = loop[0].uv 
            print("Loop UV: %f, %f" % uv[:])
            vert = loop.vert
            print("Loop Vert: (%f,%f,%f)" %[:])
    return {"FINISHED"}'NewUVMap')