How to set slug with data API?

Hi, this problem is still unsolved for me…

1 Like

Have you reported it as a bug?

No because I was not sure about it!
I though it was nicer to ask here first.

Maybe now I’ll do it!

I’ve verified the same. Pushing data with “post” with “Slug” gets the slug in, but then “Patch” returns a “Bad Request”.

I do rely (more than I should…) on Slug field as an unique human readable id. I hope that this “bug” turns out as a feature. It would be great if patch would be able to update it too…

Trying to update the Slug and getting error 400: Bad Request. Unrecognized field: Slug.
How to change SLUGs using Bubble Object API?

Slug’s are easily misused in Once I’ve found that Slug’s can’t be changed on normal field operation (there is an action specifically for it), I’ve realized that I’ve messed it up… Slugs are ment to be “url visible” id’s. If you don’ t have that usage on your app and need some kind of “key”, just create a new field called “key”. It will save you in the long run.

But… if you really need to use the API to setup Slug, my best proposal is to have a “_slug” field that you post to and then a trigger on the “Thing” that once that Thing gets updated, the Slug is set to the current _slug value.

Another solution, that I’ve made for myself a long time ago, was to use WorkFlows where it is easy peasy to receive the fields and then set them on the Thing (or multiple things) and update the Slug directly.