How AI is powering better personalization in e-commerce [with Vercel]. Sign up now

Sanity Netlify Dashboard Widget Returns 404 on Deploy Button

5 repliesLast updated: Dec 1, 2025

https://www.sanity.io/plugins/sanity-plugin-dashboard-widget-netlify I cant get this widget to work. I am able to curl the build-hook just fine, but the widget just gives me a mystical 404-message when I press the deploy-button
AI Update

I can see you're experiencing a frustrating 404 error when clicking the deploy button in the sanity-plugin-dashboard-widget-netlify widget, even though your curl command to the build hook works perfectly. Let me help you troubleshoot this.

First, verify your configuration

The most common cause is incorrect configuration values. Make sure your sanity.config.ts (or .js) has the correct format:

netlifyWidget({
  sites: [
    {
      title: 'My Site',
      apiId: 'your-api-id',        // From Netlify: Site Settings > General > Site Details > API ID
      buildHookId: 'your-hook-id', // JUST the ID, not the full URL
      name: 'your-netlify-site-name',
    }
  ]
})

Critical detail about buildHookId: When you create a build hook in Netlify (Site Settings > Build & Deploy > Build Hooks), you get a URL like https://api.netlify.com/build_hooks/abc123def456. The buildHookId should be only the ID portion at the end (abc123def456), not the full URL. This is one of the most common mistakes.

Check your Netlify API ID

The apiId is found in Netlify under Site Settings > General > Site Details > Site Information > API ID. Make sure you're using this exact value, not your site name or another identifier.

Common troubleshooting steps

Plugin compatibility issues

Looking at the GitHub issues for this plugin, there have been some compatibility problems with newer versions of Sanity Studio and the dashboard plugin. Make sure you're running compatible versions:

Alternative approach

If the widget continues giving you trouble after trying these fixes, you might consider using Sanity Functions instead. Functions let you create serverless endpoints that can trigger your Netlify builds without the browser-based limitations. You could create a Function that calls your Netlify build hook and trigger it from a custom Studio action button. This would be more reliable since the request happens server-side.

The browser console output will be the most helpful for pinpointing the exact issue. The 404 error message from the widget itself isn't very informative, but the actual network request in the developer tools will show you exactly what's going wrong and whether it's a configuration issue or something else.

Show original thread
5 replies

Was this answer helpful?

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Related contributions