[Common Issue] Netlify CMS API_ERROR. Now what?

Hi @fool, thanks for your response!

I ran into the same issue now myself so I had a chance to check the JWT token. It seems to also have a 1 hour expiry, however I’m getting the error while it’s still valid (currently 20 minutes since I logged in, and 40 minutes left on the clock according to jwt.io).

Opening the article editor in a new tab also doesn’t ask me to log in again (it just asks if I want to restore a local backup of the article).

Any other ideas?

(Note: when trying to click save again a minute or two later it worked just fine…)

Hi there! sorry to be slow to reply - there are quite a few API error issues on the Netlify CMS repo.

‘API ERROR’ is a common catch-all error message for a variety of different reasons.

Probably your best bet is to go and see if there is an issue that matches your circumstances - its possible there is a solution, or you are more than welcome to file a new one!


Hi @perry,

can i ask what is the main reason here when im uploading a image in netlify cms it shows “Failed to persist media: API_ERROR” but its uploading in our github repo.

Thanks @perry!

Could this be because you have a clashing branch name, like in post 2 of this topic?

What do you mean @Scott?

That particular error you’re seeing, it sounds a bit like:

@Scott @aaronrye12 this issue is already being handled in a separate topic:

1 Like

Thanks for the signposting, Tom!

1 Like

This is super helpful, thank you, but has anyone encountered “Failed to persist entry: API_ERROR: Validation Failed”?

It doesn’t affect all of my posts, only one in the collection. There is another message about it on this board however the resolution of the issue was not posted: Netlify CMS: 'Failed to persist entry: API_ERROR: Validation Failed' - #2 by hrishikesh

Thanks for reaching out! Let’s continue the conversation on the thread you linked (also here) in order to streamline support!

Hello, what if the error is simply “Failed to persist entry: API_ERROR” with none of the text in your examples (“Not Found” / “Validation Failed”)?

This pops up when trying to add a first entry to a collection.

@cobbie Have you set the right branch in your config?

Yup, branch is set correct. Such as the ff right?

  name: git-gateway
  branch: master

Looks reasonable to me. This of course could only work if we are hosting the site live - to use our hosted git-gateway as the backend.