Support Log in

22. Field Values API

Developer Guide
Prefer video? Watch the Field Forge tutorials 8 short guides covering every feature Watch

Read and write field values for individual posts via REST.

Bulk updates skip or reject fields whose type is not available under the current plan, so a service account cannot keep writing Repeater/Clone/Relationship/etc. values after a downgrade.

GET /fieldforge/v1/fields/{post_id}

Get all field values for a post.

bash
curl -s -u "$AUTH" 
  "https://example.com/wp-json/fieldforge/v1/fields/42"
Response:
json
{
  "price": "29.99",
  "subtitle": "Great product",
  "is_featured": "1",
  "sku": "PROD-001",
  "hero": {
    "headline": "Launch headline",
    "cta_url": "https://example.com/start"
  },
  "features": [
    { "title": "Fast setup", "body": "Editors can add this row." },
    { "title": "Reusable", "body": "Developers get structured JSON." }
  ],
  "sections": [
    {
      "acf_fc_layout": "hero",
      "heading": "Flexible hero"
    },
    {
      "acf_fc_layout": "cta",
      "label": "Book a demo",
      "url": "https://example.com/demo"
    }
  ]
}

Compound values are returned in the same shape as the ACF-compatible template API: Group fields are associative objects, Repeaters are arrays of row objects, Flexible Content rows include acf_fc_layout, Gallery values are arrays, and Relationship / Post Object / Taxonomy fields respect each field’s configured return format. The endpoint no longer exposes the internal parent-row scalars used in wp_fieldforge_values for Group, Repeater, and Flexible Content storage.

PUT /fieldforge/v1/fields/{post_id}

Update multiple field values in a single request.

bash
curl -s -X PUT -u "$AUTH" 
  -H "Content-Type: application/json" 
  "https://example.com/wp-json/fieldforge/v1/fields/42" 
  -d '{
    "price": "34.99",
    "is_featured": "1",
    "subtitle": "Updated subtitle"
  }'
Response: { "success": true }

Forge AI Assistant Online

Hi! I'm the Field Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs