REST examples for creating records

When looking at the rest.yaml file I see the create POST method. It takes record values set.

 - name: create
     method: POST
     title: Create record in module section
     path: "/"
     parameters:
       post:
       - type: types.RecordValueSet
         name: values
         required: false
         title: Record values
       - type: types.RecordBulkSet
         name: records
         required: false
         title: Records
       - type: map[string]string
         name: labels
         title: Labels
         parser: label.ParseStrings

Looking the the result of the get records, I see the values structure as:

"values": [
          {
            "name": "Body",
            "value": "<p>(7/10/2021)</p><p><span><span>Hi, how are you doing ? I wanted to connect with you to catch up and maybe explore some business opportunities</span></span></p>"
          },
          {
            "name": "LeadId",
            "value": "239430221214777347"
          },
          {
            "name": "Title",
            "value": "Initial LinkedIn Text"
          }
]

So I assume this is the record value set that need to be passed on to the REST POST payload. Of course need to use the correct for any references etc.

Is there an example somewhere to look at ?

You can take a look at this.

Please note that these API examples are relatively old and I haven’t gotten around to validating/updating them yet. The concrete example seems fine but don’t quote me on it.

You can also take a look on how the Compose user interface formats the request (under the Network tab of the developer console)