Skip to main content

User Field Value

A user field value consists of its value property which holds a reference to a user. A user has the properties user_id (unique ID), name (the username), org_Id (ID of the user's organization) and others. A single_user field value holds at most one user reference while a multi_user field value can hold multiple user references.

Record creation

POSThttps://api.tapeapp.com/v1/record/app/{app_id}

A user field value can be created as part of a record creation. Here is an example request body for creating a record with a value for the "Supervisor" field with ID 2, type single_user and external ID supervisor and a value for the "Interviewed by" field with ID 3, type multi_user and external ID interviewed_by:

➡️    Request
curl -X POST https://api.tapeapp.com/v1/record/app/1 \
-u user_key_replace_with_your_api_key: \
-H "Content-Type: application/json" \
--data '{
"fields": {
"supervisor": 1,
"interviewed_by": [4, 5]
}
}'
⬅️    Response
{
"record_id": 1,
"title": "Zoe Maxwell",
"fields": [
{
"field_id": 2,
"external_id": "supervisor",
"label": "Supervisor",
"type": "user",
"field_type": "single_user",
"values": [
{
"value": {
"user_id": 1,
"mail": ["[email protected]"],
"image": null,
"name": "Zoe Maxwell",
"org_id": 1,
"type": "user"
}
}
]
},
{
"field_id": 3,
"external_id": "interviewed_by",
"label": "Interviewed by",
"field_type": "multi_user",
"type": "user",
"values": [
{
"value": {
"user_id": 4,
"mail": ["[email protected]"],
"image": null,
"name": "Dan Jacob",
"org_id": 1,
"type": "user"
}
},
{
"value": {
"user_id": 5,
"mail": ["[email protected]"],
"image": null,
"name": "Sierra Johns",
"org_id": 1,
"type": "user"
}
}
]
}
]
}

Record retrieval

GEThttps://api.tapeapp.com/v1/record/{record_id}

A user field value can be retrieved as part of a record retrieval:

➡️    Request
curl https://api.tapeapp.com/v1/record/1 \
-u user_key_replace_with_your_api_key:
⬅️    Response
{
"record_id": 1,
"title": "Zoe Maxwell",
"fields": [
{
"field_id": 2,
"external_id": "supervisor",
"label": "Supervisor",
"type": "user",
"field_type": "single_user",
"values": [
{
"value": {
"user_id": 1,
"mail": ["[email protected]"],
"image": null,
"name": "Zoe Maxwell",
"org_id": 1,
"type": "user"
}
}
]
},
{
"field_id": 3,
"external_id": "interviewed_by",
"label": "Interviewed by",
"field_type": "multi_user",
"type": "user",
"values": [
{
"value": {
"user_id": 4,
"mail": ["[email protected]"],
"image": null,
"name": "Dan Jacob",
"org_id": 1,
"type": "user"
}
},
{
"value": {
"user_id": 5,
"mail": ["[email protected]"],
"image": null,
"name": "Sierra Johns",
"org_id": 1,
"type": "user"
}
}
]
}
]
}

Record update

PUThttps://api.tapeapp.com/v1/record/{record_id}

One or more user field values can be updated as part of a record update. Here is an example request body for updating multiple user field values of a record:

➡️    Request
curl -X PUT https://api.tapeapp.com/v1/record/1 \
-u user_key_replace_with_your_api_key: \
-H "Content-Type: application/json" \
--data '{
"fields": {
"supervisor": 2,
"interviewed_by": [5]
}
}'
⬅️    Response
{
"record_id": 1,
"title": "Delaney Beatty",
"fields": [
{
"field_id": 2,
"external_id": "supervisor",
"label": "Supervisor",
"type": "user",
"field_type": "single_user",
"values": [
{
"value": {
"user_id": 2,
"mail": ["[email protected]"],
"image": null,
"name": "Delaney Beatty",
"org_id": 1,
"type": "user"
}
}
]
},
{
"field_id": 3,
"external_id": "interviewed_by",
"label": "Interviewed by",
"field_type": "multi_user",
"type": "user",
"values": [
{
"value": {
"user_id": 5,
"mail": ["[email protected]"],
"image": null,
"name": "Sierra Johns",
"org_id": 1,
"type": "user"
}
}
]
}
]
}