Record Data
record_dataLog a single entry for a chosen data type, storing its value, fields, tags, and note so the record can be read back later.
Instructions
Record a single record for a recordable data type.
Use get_data_catalog to find data types; user-defined ones use the
"/" ID form (create new ones with create_data_type).
Recorded data can be read back with get_records. For v1 types (including
user-defined Event and Metric types), the response gives the new record's
id, which get_records returns as the record's id and delete_records takes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Free-text note stored with the record. | |
| tags | No | Tag names to attach; missing tags are created automatically. | |
| value | No | The value to record, for types that take one. E.g. "75.5" for numeric, "true" for boolean, "3" for scale. | |
| fields | No | Values for the data type's own fields, e.g. {"mood": "calm", "energy": 7}. get_data_catalog with data_type set lists a user-defined type's fields. | |
| end_time | No | When the recorded range ended. Must include tz (ISO8601). Only for duration-style types, where it is required. | |
| data_type | Yes | The ID of the data type to record to. | |
| record_id | No | v1 types only. The id (a UUID) to give the record. Leave it out and one is generated. To retry a send whose outcome is unknown, pass the id from the first attempt: a record sent again with the same id is stored as the same record, not a second one. | |
| start_time | No | When the record occurred; defaults to now. Must include tz. ISO8601. Duration-style types require it. |