Hi @aarshay and @BrownieDev ,
Thanks for sharing with the Community.
Are you trying to add consent to customer profiles who have submitted a form or what is the method for collecting customer profiles onto your Klaviyo account first?
Can you also confirm you have create private API keys within your account to work with the Python code?
The 'Subscribe Profiles to List' endpoint requires according to our API documentation:

I'll need a bit more information about how exactly you are structuring your request, and subscribing profiles via this form you've created. Can you provide a snippet of your code responsible for subscribing profiles when the form is submitted? Can you also show where the error is appearing? Is the profile’s $source property also API and not something else?
I have tried testing in previous situations and found that the API was being picky about how I formatted my phone number:
1. It needs to have the country code (+1), which is expected.
2. In my case, it had to be in single quotes, instead of double quotes. That typically isn't the case as I've ran it in double quotes successfully in the past, but I figured it is worth mentioning.
Thanks,
Alex