Webflow sync, pageviews & more.
NEW

How can I fix the "Bad Request" and "ValidationError" error I am getting when trying to send a POST request from Zapier to Webflow using API integration?

TL;DR
  • Confirm you're using the correct Webflow API endpoint (/collections/{collection_id}/items) with a POST method.
  • Set required headers in Zapier: Authorization (Bearer token), accept-version (e.g., 1.0.0), and Content-Type (application/json).
  • Format the JSON payload properly with a "fields" object and ensure all required fields, especially "slug," are included.
  • Validate that all field names match Webflow’s API field keys exactly, not their designer-friendly names.
  • Inspect Webflow’s detailed error response in Zapier to pinpoint the issue.
  • Ensure your API token is correct and update it if expired.
  • Update your integration if using newer Webflow field types unsupported by older API versions.

You're encountering a "Bad Request" and "ValidationError" when sending a POST request from Zapier to Webflow's API, which typically means the data you're sending does not match what Webflow expects.

Here’s how to fix it:

1. Check Your API Endpoint and Method

  • Confirm you are hitting the correct Webflow API endpoint, typically https://api.webflow.com/collections/{collection_id}/items for adding CMS items.
  • Make sure you're using the POST method, not GET or PUT.

2. Set Proper Headers in Zapier

  • Add required headers in Zapier’s webhook setup:
  • Authorization: Bearer YOUR_WEBFLOW_API_TOKEN
  • accept-version: Set it to 1.0.0 (or your specific API version Webflow expects)
  • Content-Type: application/json

3. Format the Payload Correctly

  • Your JSON body must match Webflow’s schema exactly.

  • The top level must have a single fields object.

  • Example structure (adapt to your Collection fields):

    ```
    {
    "fields": {
    "name": "Item Name",
    "slug": "item-name",
    "_archived": false,
    "_draft": false
    }
    }
    ```

  • No extra parentheses, no missing required fields, and no wrong field names.

  • If your collection has required fields (like an image or a reference field), you must include them even if they aren't visible in the designer.

4. Validate Field Names

  • Ensure field keys match the field API names in Webflow, not the user-friendly names.
  • How to find API field names: Go to Webflow’s CMS Collections, export the collection schema, or check in Webflow’s API documentation.

5. Handle Required Slug Field Properly

  • Almost all Webflow collections require a slug field.
  • Include a "slug" key manually or create it by transforming the name (lowercase and hyphens only).

6. Inspect Webflow's Error Response

  • Webflow often sends back error details in the body during a validation error.
  • In Zapier, enable debugging or review the full response to see exactly which field is causing the failure.

7. Double-Check Authentication

  • If your API token is incorrect or expired, it may also trigger confusing errors.
  • Regenerate your Webflow API token if necessary and update it in Zapier.

8. Update or Upgrade Webflow API Integration if Needed

  • If your Webflow project uses new field types (e.g., multi-image fields), be aware that older API versions might not support them.
  • Consider updating your Webflow API usage to the latest specifications.

Summary

To fix the "Bad Request" and "ValidationError" when sending a POST request from Zapier to Webflow, verify you're setting the correct endpoint, headers, and field data format. Ensure all required fields (especially "slug") are included and that field names match Webflow’s API schema exactly. Always review Webflow’s error messages for specific validation clues.

Rate this answer

Other Webflow Questions