Ah! Ummm… I think I accidentally stumbled upon a workaround for that recently. (But I need to research to re-uncover what that was…)
However, the “non-hacky” workaround is this:
Presumably, API Workflows don’t need custom states as they have the database (perma-storage). So, in the workflow, you can create a new thing (of whatever type you need) and reference its unique ID (via “results of”) to delete it when done with it.
Obviously this slows things down over temporary (in-memory) storage, but it seems Bubble guarantees us no bits in an API Workflow…
Apologies for the vagueness of this answer, but I did stumble across a potential solution (it may have related to unused optional arguments OR “return data from an API”… but I feel like there’s a way to (perhaps unintentionally) set, store and retrieve a value in API Workflows using Results of… a previous step.).
If that’s so, it may be fragile (subject to being fixed as a bug), but currently extant.