title: Can you set a custom field in a new post through the REST API without using any plugins?
body: <p>I'm able to create posts using the REST API but don't see any way to define custom fields on that post without modifying the source code.</p>
  <p>I've looked through the documentation and I don't see any support for it. It looks like you have to add it yourself (doesn't say where) or what to send in a REST call:</p>
  <p><a href="https://developer.wordpress.org/rest-api/extending-the-rest-api/modifying-responses/#working-with-registered-meta-in-the-rest-api" rel="nofollow noreferrer">https://developer.wordpress.org/rest-api/extending-the-rest-api/modifying-responses/#working-with-registered-meta-in-the-rest-api</a></p>
  <p>I've looked for plugins and I don't see any that do it. I've seen plugins that allow you to return metadata but all of these guides are old.</p>
  <p>Is there any way to insert metadata when creating or updating a new post without using a plugin or modifying the source code?</p>
  <pre><code>var results = await fetch(url, {
      method: &quot;POST&quot;,
      headers:{
          'Content-Type': 'application/json',
          'accept': 'application/json'
      },
      body: JSON.stringify({
          title: &quot;My Post&quot;,
          content: &quot;Hello world!&quot;,
          status: 'publish',
          meta: {
              name:&quot;favoriteColor&quot;, 
              value: &quot;blue&quot;
          }
      })
  })
  </code></pre>
  <p>The code above works to create the post but doesn't create the custom fields.</p>