Can the Freeform Plugin be used with headless mode in Craft?
Broadly speaking, any Form plugin that implements Forms using Elements can probably be used headlessly using Craft's Element API plugin.

I'll give an example using the Sprout Forms plugin.


Install the Element API plugin
Add a config/element-api.php file to your project's config folder
Build your API


The following example creates two endpoints. 

The first returns a Form Element that can be used by your front-end framework to output the form. You can use the Default Form Templates as an example of how the HTML needs to be built for submission and remember to submit the form using a CSRF token. This example returns the field data and the field folder name which can be used as a unique identifier when determining which field template to display on the front-end.

The second returns a list of unread Form Entry Elements. You can customize the query however you'd like, just like any Element Query.

&lt;?php

use barrelstrength\sproutforms\elements\Form;
use barrelstrength\sproutforms\elements\Entry;

return [
    'endpoints' =&gt; [
        'api/sproutforms/&lt;formId:\d+&gt;.json' =&gt; function($formId) {
            return [
                'elementType' =&gt; Form::class,
                'criteria' =&gt; ['id' =&gt; $formId],
                'one' =&gt; true,
                'transformer' =&gt; function(Form $form) {
                    foreach ($form-&gt;getFieldLayout()-&gt;getTabs() as $tab) {
                        foreach ($tab-&gt;getFields() as $field) {
                            $fields[] = [
                                'field' =&gt; $field,
                                'folder' =&gt; $field-&gt;getFieldInputFolder()
                            ];
                        }

                        $tabs[] = [
                            'title' =&gt; $tab-&gt;name,
                            'fields' =&gt; $fields
                        ];
                    }

                    return [
                        'handle' =&gt; $form-&gt;handle,
                        'tabs' =&gt; $tabs
                    ];
                },
            ];
        },
        'api/sproutforms/&lt;formId:\d+&gt;/entries.json' =&gt; function($formId) {
            return [
                'elementType' =&gt; Entry::class,
                'criteria' =&gt; [
                    'formId' =&gt; $formId,
                    'status' =&gt; 'unread'
                ],
                'paginate' =&gt; true,
                'transformer' =&gt; function(Entry $entry) {
                    return [
                        'id' =&gt; $entry-&gt;id,
                        'dateCreated' =&gt; $entry-&gt;dateCreated,
                        'title' =&gt; $entry-&gt;title,
                        'customField' =&gt; $entry-&gt;customField,
                    ];
                },
            ];
        }
    ]
];