Description
Create a new record type.
Request
HTTP Method: POST
Parameter | Description |
---|---|
name | The record type name. |
team_id | ID of team to which the record type belongs. |
fields | An array of objects describing the custom record fields defined by the user. |
editable | Optional Whether the records for this record type are editable or not. |
ttl_days | Optional Records for this record type will be deleted after this number of days. |
curl -X POST \
https://<<META.tenant.domain>>/api/v1/record_types/
-H 'content-type: application/json' \
-H 'Authorization: Bearer <<CREDENTIAL.tines_api_key>>'
-d '{
"name": "Record type name",
"team_id": "<<META.team.id>>",
"fields": [{ "name": "Column 1", "result_type": "TEXT" }],
"editable": true,
"ttl_days": 3
}'
Response
A successful request will return a JSON object representing the created record type.
Field description
Parameter | Description |
---|---|
id | The record type ID. |
name | The record type name. |
team_id | ID of team to which the record type belongs. |
editable | Whether the records for this record type are editable or not. |
ttl_days | Records for this record type will be deleted after this number of days. |
record_fields | An array of objects describing the custom record fields defined by the user. |
default_record_fields | An array of objects describing the default record fields (Timestamp and Story name). |
Sample response
{
"id": 1,
"name": "Record type 1",
"editable": false,
"ttl_days": 3,
"record_fields": [
{
"id": 1,
"name": "Field 1",
"result_type": "TEXT",
"fixed_values": []
}
],
"default_record_fields": [
{
"id": 2,
"name": "Story name",
"result_type": "TEXT",
"fixed_values": []
},
{
"id": 3,
"name": "Timestamp",
"result_type": "TIMESTAMP",
"fixed_values": []
}
]
}