JSON:API error unprocessable entity status 422 entity_id this value should not be null I'm trying to post a flag with JSON:API but I'm getting the following error:
&quot;errors&quot;: [
    {
        &quot;title&quot;: &quot;Unprocessable Entity&quot;,
        &quot;status&quot;: &quot;422&quot;,
        &quot;detail&quot;: &quot;entity_id: This value should not be null.&quot;,
        &quot;source&quot;: {
            &quot;pointer&quot;: &quot;/data/attributes/entity_id&quot;
        }
    }

I'm very confused because in the data I'm posting, the entity_id is definitely included...
Check if you have the JSON:API Extras module enabled.
If you do, you or someone else may have disabled the field for the resource you are trying to POST to at /admin/config/services/jsonapi/resource_types.
In this case, I had disabled the entity_id field for my flag resource, causing the &quot;null&quot; error even when I posted a value with axios.