Create

Description

Create a new record.

Request

HTTP Method: POST

Parameter Description
record_type_id Specifies the id of the record type for which the record is being created.
field_values This parameter is an array comprised of objects. Each object must include a field_id, which identifies the record field, and a value, specifying the data to be assigned to that field for the newly created record.

Field values parameter

Field values Description
field_id The ID of the record field.
value The value to set the record field.
curl -X POST \
  https://<<META.tenant.domain>>/api/v1/records \
  -H 'content-type: application/json' \
  -H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>' \
  -d '{
      "record_type_id": "1",
      "field_values": [{ "field_id": "1", "value": "Test" }]
    }'

Response

A successful request will return a JSON object representing the created record.

Field description

Parameter Description
id The record ID.
record_type The record type.
records The captured data for the given instance of the record type.
created_at ISO 8601 Timestamp representing the creation date and time of the record.

Sample response

{
  "id": 1973,
  "created_at": "2024-06-25T14:41:23Z",
  "record_type": {
    "id": 1097,
    "name": "Tines Sample Alert"
  },
  "records": [
    {
      "field_id": "5999",
      "name": "Affected user email",
      "value": "john@example.com"
    },
    {
      "field_id": "5998",
      "name": "Source",
      "value": "Login alerts"
    },
    {
      "field_id": "5997",
      "name": "Description",
      "value": "Suspicious login"
    },
    {
      "field_id": "5996",
      "name": "Severity",
      "value": "High"
    },
    {
      "field_id": "5991",
      "name": "Timestamp",
      "value": "2024-06-25 15:41:23"
    }
  ]
}
Was this helpful?