Skip to main content

Link Field Value

A link field value consists of its value property which holds one or multiple link entries. An entry contains the link url itself, plus link preview meta information, such as a website title or a description. These previews are generated by the server asynchronously, so they are not instantly available after creation / update.

Record creation

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

A link field value can be created as part of a record creation. It is possible to provide either a url string, or an array of such.

Here is an example request body for creating a record with a value for the "Customer website" field with ID 2, type multi_link and external ID customer_website :

➡️    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": {
"customer_website":
[
"https://somecustomerwebsite.com"
]
}
}'
⬅️    Response
{
"record_id": 1,
"title": "Tape Technologies GmbH",
"fields": [
{
"field_id": 2,
"external_id": "customer_website",
"label": "Customer website",
"type": "link",
"field_type": "multi_link",
"values": [
{
"embed_id": 100,
"url": "https://somecustomerwebsite.com"
}
]
}
]
}

Note that the individual link address entries contain an embed_id. Be sure to include them in updates, to keep existing link entries. If you omit it, new entries will be created instead and the respective existing ones will be removed. Individual link entries can not be updated, only removed.

After the link preview has been fully generated, it will contain meta info. The body will contain more information in that case, follow the next section about record retrieval:

⬅️    Response (after link preview has been generated)
{
"record_id": 1,
"title": "Tape Technologies GmbH",
"fields": [
{
"field_id": 2,
"external_id": "customer_website",
"label": "Customer website",
"type": "link",
"field_type": "multi_link",
"values": [
{
"embed_id": 100,
"url": "https://somecustomerwebsite.com",
"title": "Some awesome customer website",
"description": "Welcome, Find our products and services here.",
"type": "link"
}
]
}
]
}

Record retrieval

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

A link 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": "Tape Technologies GmbH",
"fields": [
{
"field_id": 2,
"external_id": "customer_website",
"label": "Customer website",
"type": "link",
"field_type": "multi_link",
"values": [
{
"embed_id": 100,
"url": "https://somecustomerwebsite.com",
"title": "Some awesome customer website",
"description": "Welcome, Find our products and services here.",
"type": "link"
}
]
}
]
}

Record update

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

One or more link field values can be updated as part of a record update, while omitted entries will be removed. Be sure to include the ID of existing entries, to prevent them from being recreated and regenerated. Here is an example request body for updating the link entries of an link field with external ID customer_website of a record, keeping one existing entry and adding another one via URL:

➡️    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": {
"customer_website":
[
{
"embed_id": 100,
"url": "https://somecustomerwebsite.com",
"title": "Some awesome customer website",
"description": "Welcome, Find our products and services here."
},
"https://secondcustomerwebsite.com"
]
}
}'
⬅️    Response
{
"record_id": 1,
"title": "Tape Technologies GmbH",
"fields": [
{
"field_id": 2,
"external_id": "customer_website",
"label": "Customer website",
"type": "link",
"field_type": "multi_link",
"values": [
{
"embed_id": 100,
"url": "https://somecustomerwebsite.com",
"title": "Some awesome customer website",
"description": "Welcome, Find our products and services here.",
"type": "link"
},
{
"embed_id": 101,
"url": "https://secondcustomerwebsite.com",
"title": "Another awesome customer website",
"description": "Welcome, Find our more and other products and services here.",
"type": "link"
}
]
}
]
}