Use conditional for Element API results?
If you want the latest of both, unless I'm missing something, you should just be able to query on dateUpdated. 

When you create an entry the first time, its dateUpdated gets set to the same date as the dateCreated... So if you query your entries on dateUpdated only, you will get all entries created + updated in your time frame I guess.

As far as code goes, this should do it:

return [
    'endpoints' =&gt; [
        'entries.json' =&gt; function() {
            $timeframe = (new \DateTime('1 day ago'))-&gt;format(\DateTime::ATOM);
            return [
                'elementType' =&gt; Entry::class,
                'criteria' =&gt; [
                    'section' =&gt; 'entries',
                    'dateUpdated' =&gt; '&gt;=' . $timeframe,
                ],
                'transformer' =&gt; function(Entry $entry) {
                    return [
                        'title' =&gt; $entry-&gt;title,
                        'url' =&gt; $entry-&gt;url,
                    ];
                },
            ];
        },
    ]
];