Skip to main content
Records

User field value

Request
curl -X POST https://api.tapeapp.com/v1/record/app/1 \
-H "Authorization: Bearer $TAPE_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"fields": {
"title": "Quarterly pipeline review",
"responsible_for_note_taking": 1,
"participants": [4, "sierra@acme.com"]
}
}'
Response
{
"record_id": 1,
"title": "Quarterly pipeline review",
"fields": [
{
"field_id": 4,
"external_id": "title",
"label": "Title",
"type": "text",
"field_type": "single_text",
"values": [{ "value": "Quarterly pipeline review" }]
},
{
"field_id": 1,
"external_id": "responsible_for_note_taking",
"label": "Responsible for Note taking",
"type": "contact",
"field_type": "single_user",
"values": [
{
"value": {
"user_id": 1,
"name": "Juliet Adams",
"email": "juliet@acme.com",
"mail": ["juliet@acme.com"],
"phone": "+1 555 0100",
"org_id": 1,
"type": "user",
"image": null
}
}
]
},
{
"field_id": 2,
"external_id": "participants",
"label": "Participants",
"type": "contact",
"field_type": "multi_user",
"values": [
{
"value": {
"user_id": 4,
"name": "Dan Jacob",
"email": "dan@acme.com",
"mail": ["dan@acme.com"],
"phone": null,
"org_id": 1,
"type": "user",
"image": null
}
},
{
"value": {
"user_id": 5,
"name": "Sierra Johns",
"email": "sierra@acme.com",
"mail": ["sierra@acme.com"],
"phone": null,
"org_id": 1,
"type": "user",
"image": null
}
}
]
}
]
}
Request
curl https://api.tapeapp.com/v1/record/1 \
-H "Authorization: Bearer $TAPE_TOKEN"
Response
{
"record_id": 1,
"title": "Quarterly pipeline review",
"fields": [
{
"field_id": 4,
"external_id": "title",
"label": "Title",
"type": "text",
"field_type": "single_text",
"values": [{ "value": "Quarterly pipeline review" }]
},
{
"field_id": 1,
"external_id": "responsible_for_note_taking",
"label": "Responsible for Note taking",
"type": "contact",
"field_type": "single_user",
"values": [
{
"value": {
"user_id": 1,
"name": "Juliet Adams",
"email": "juliet@acme.com",
"mail": ["juliet@acme.com"],
"phone": "+1 555 0100",
"org_id": 1,
"type": "user",
"image": null
}
}
]
},
{
"field_id": 2,
"external_id": "participants",
"label": "Participants",
"type": "contact",
"field_type": "multi_user",
"values": [
{
"value": {
"user_id": 4,
"name": "Dan Jacob",
"email": "dan@acme.com",
"mail": ["dan@acme.com"],
"phone": null,
"org_id": 1,
"type": "user",
"image": null
}
},
{
"value": {
"user_id": 5,
"name": "Sierra Johns",
"email": "sierra@acme.com",
"mail": ["sierra@acme.com"],
"phone": null,
"org_id": 1,
"type": "user",
"image": null
}
}
]
}
]
}
Request
curl -X PUT https://api.tapeapp.com/v1/record/1 \
-H "Authorization: Bearer $TAPE_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"fields": {
"responsible_for_note_taking": 2,
"participants": [5]
}
}'
Response
{
"record_id": 1,
"title": "Quarterly pipeline review",
"fields": [
{
"field_id": 4,
"external_id": "title",
"label": "Title",
"type": "text",
"field_type": "single_text",
"values": [{ "value": "Quarterly pipeline review" }]
},
{
"field_id": 1,
"external_id": "responsible_for_note_taking",
"label": "Responsible for Note taking",
"type": "contact",
"field_type": "single_user",
"values": [
{
"value": {
"user_id": 2,
"name": "Delaney Beatty",
"email": "delaney@acme.com",
"mail": ["delaney@acme.com"],
"phone": null,
"org_id": 1,
"type": "user",
"image": null
}
}
]
},
{
"field_id": 2,
"external_id": "participants",
"label": "Participants",
"type": "contact",
"field_type": "multi_user",
"values": [
{
"value": {
"user_id": 5,
"name": "Sierra Johns",
"email": "sierra@acme.com",
"mail": ["sierra@acme.com"],
"phone": null,
"org_id": 1,
"type": "user",
"image": null
}
}
]
}
]
}

Use a user field value to read and write the users of a record.

Each value of a user field is a short preview of one user of your organization. A single_user field holds at most one user. A multi_user field holds several users.

User field value object
{
"field_id": 1,
"external_id": "responsible_for_note_taking",
"label": "Responsible for Note taking",
"type": "contact",
"field_type": "single_user",
"values": [
{
"value": {
"user_id": 1,
"name": "Juliet Adams",
"email": "juliet@acme.com",
"mail": ["juliet@acme.com"],
"phone": "+1 555 0100",
"org_id": 1,
"type": "user",
"image": null
}
}
]
}

typestring

"contact" for both user field types.

Example value "contact"

field_typestring

"single_user" or "multi_user".

Example value "single_user"

values[].value.user_idnumber

ID of the user.

Example value 1

values[].value.namestring

Name of the user.

Example value "Juliet Adams"

values[].value.emailstring

Email address of the user.

Example value "juliet@acme.com"

values[].value.mailstring[]

The email address as an array, for older integrations. Use email instead.

Example value ["juliet@acme.com"]

values[].value.phonestring or null

Phone number of the user, or null if the user has none.

Example value "+1 555 0100"

values[].value.org_idnumber

ID of the user's organization.

Example value 1

values[].value.typestring

"user".

Example value "user"

values[].value.imagenull

Not filled. The value is null.

Example value null

Each field in a record response also contains the field's config. The examples on this page leave it out.

Record creation​

Use the create record endpoint to assign users to a new record.

POST/v1/record/app/{app_id}api.tapeapp.com
Request
curl -X POST https://api.tapeapp.com/v1/record/app/1 \
-H "Authorization: Bearer $TAPE_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"fields": {
"title": "Quarterly pipeline review",
"responsible_for_note_taking": 1,
"participants": [4, "sierra@acme.com"]
}
}'
Response
{
"record_id": 1,
"title": "Quarterly pipeline review",
"fields": [
{
"field_id": 4,
"external_id": "title",
"label": "Title",
"type": "text",
"field_type": "single_text",
"values": [{ "value": "Quarterly pipeline review" }]
},
{
"field_id": 1,
"external_id": "responsible_for_note_taking",
"label": "Responsible for Note taking",
"type": "contact",
"field_type": "single_user",
"values": [
{
"value": {
"user_id": 1,
"name": "Juliet Adams",
"email": "juliet@acme.com",
"mail": ["juliet@acme.com"],
"phone": "+1 555 0100",
"org_id": 1,
"type": "user",
"image": null
}
}
]
},
{
"field_id": 2,
"external_id": "participants",
"label": "Participants",
"type": "contact",
"field_type": "multi_user",
"values": [
{
"value": {
"user_id": 4,
"name": "Dan Jacob",
"email": "dan@acme.com",
"mail": ["dan@acme.com"],
"phone": null,
"org_id": 1,
"type": "user",
"image": null
}
},
{
"value": {
"user_id": 5,
"name": "Sierra Johns",
"email": "sierra@acme.com",
"mail": ["sierra@acme.com"],
"phone": null,
"org_id": 1,
"type": "user",
"image": null
}
}
]
}
]
}

The example creates the meeting "Quarterly pipeline review" in the meetings app from User field. It sets the "Responsible for Note taking" field (ID 1, type single_user, slug responsible_for_note_taking) and the "Participants" field (ID 2, type multi_user, slug participants). The second participant is set by email address.

General behavior

  • Use the field ID or the field's slug (returned as external_id in records) as the key in fields.
  • Identify a user by user ID, email address or name. Tape compares email addresses and names case-insensitively and looks only at users of your organization. Tape also accepts objects like { "user_id": 1 } or { "value": 1 }, and arrays of these.
  • Find user IDs with Retrieve organization users.
  • Send one user to a single_user field. If you send an array, Tape uses its first user.
  • Tape drops a user ID that belongs to no user.

Requirements: records:edit. Works with a personal access token, an OAuth access token or a user API key.

Errors

  • An email address or name that matches no user of your organization returns 400 with the message Could not resolve a user for "<value>".

See Errors for all error codes.

Record retrieval​

Use the retrieve record endpoint to read the users assigned to a record.

GET/v1/record/{record_id}api.tapeapp.com
Request
curl https://api.tapeapp.com/v1/record/1 \
-H "Authorization: Bearer $TAPE_TOKEN"
Response
{
"record_id": 1,
"title": "Quarterly pipeline review",
"fields": [
{
"field_id": 4,
"external_id": "title",
"label": "Title",
"type": "text",
"field_type": "single_text",
"values": [{ "value": "Quarterly pipeline review" }]
},
{
"field_id": 1,
"external_id": "responsible_for_note_taking",
"label": "Responsible for Note taking",
"type": "contact",
"field_type": "single_user",
"values": [
{
"value": {
"user_id": 1,
"name": "Juliet Adams",
"email": "juliet@acme.com",
"mail": ["juliet@acme.com"],
"phone": "+1 555 0100",
"org_id": 1,
"type": "user",
"image": null
}
}
]
},
{
"field_id": 2,
"external_id": "participants",
"label": "Participants",
"type": "contact",
"field_type": "multi_user",
"values": [
{
"value": {
"user_id": 4,
"name": "Dan Jacob",
"email": "dan@acme.com",
"mail": ["dan@acme.com"],
"phone": null,
"org_id": 1,
"type": "user",
"image": null
}
},
{
"value": {
"user_id": 5,
"name": "Sierra Johns",
"email": "sierra@acme.com",
"mail": ["sierra@acme.com"],
"phone": null,
"org_id": 1,
"type": "user",
"image": null
}
}
]
}
]
}

Requirements: records:read. Works with a personal access token, an OAuth access token or a user API key.

Record update​

Use the update record endpoint to change the users assigned to a record.

PUT/v1/record/{record_id}api.tapeapp.com
Request
curl -X PUT https://api.tapeapp.com/v1/record/1 \
-H "Authorization: Bearer $TAPE_TOKEN" \
-H "Content-Type: application/json" \
--data '{
"fields": {
"responsible_for_note_taking": 2,
"participants": [5]
}
}'
Response
{
"record_id": 1,
"title": "Quarterly pipeline review",
"fields": [
{
"field_id": 4,
"external_id": "title",
"label": "Title",
"type": "text",
"field_type": "single_text",
"values": [{ "value": "Quarterly pipeline review" }]
},
{
"field_id": 1,
"external_id": "responsible_for_note_taking",
"label": "Responsible for Note taking",
"type": "contact",
"field_type": "single_user",
"values": [
{
"value": {
"user_id": 2,
"name": "Delaney Beatty",
"email": "delaney@acme.com",
"mail": ["delaney@acme.com"],
"phone": null,
"org_id": 1,
"type": "user",
"image": null
}
}
]
},
{
"field_id": 2,
"external_id": "participants",
"label": "Participants",
"type": "contact",
"field_type": "multi_user",
"values": [
{
"value": {
"user_id": 5,
"name": "Sierra Johns",
"email": "sierra@acme.com",
"mail": ["sierra@acme.com"],
"phone": null,
"org_id": 1,
"type": "user",
"image": null
}
}
]
}
]
}

The example hands note taking for the meeting with ID 1 to the user with ID 2 and keeps only Sierra Johns as participant.

General behavior

  • The new users replace the old ones. To add a user to a multi_user field, send the existing users together with the new one.
  • To clear the field, send null. For a multi_user field, an empty array [] also works.
  • You can't clear a required field. The request returns 400.
  • Fields that aren't in the request keep their values.
Request: clear the field
{
"fields": {
"participants": null
}
}

A cleared field isn't in the fields of the response.

Requirements: records:edit. Works with a personal access token, an OAuth access token or a user API key.

Errors

Same errors as under Record creation.

See Errors for all error codes.

Next steps​