Create a Loop Link
Create a new Loop Link to begin submitting events and feedback.
Enter your PredictHQ API key. The Bearer prefix is added automatically.
When calling the API directly, send: 'Authorization: Bearer <YOUR_API_KEY>' as documented at https://docs.predicthq.com/api/overview/authenticating
Date/time the Loop Link is set to expire in ISO 8601 format.
All dates are in UTC.
This is an optional field - omit if not needed.
E.g. 2023-05-08T00:29:45.859Z
Name of the Loop Link. This is for your own use as a way to differentiate your Loop Links.
E.g. Hotel ABC
Hotel ABCPattern: ^[a-zA-Z0-9 _-]+$Successful Response
Validation Error
Examples
curl -X POST "https://api.predicthq.com/v1/loop/links" \
-H "Accept: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @<(cat <<EOF
{
"name": "Hotel A",
"expire_dt": "2021-11-01T11:12:34",
"metadata": {
"hotel_id": "123456789"
}
}
EOF
)import requests
response = requests.post(
url="https://api.predicthq.com/v1/loop/links",
headers={
"Authorization": "Bearer $ACCESS_TOKEN",
"Accept": "application/json"
},
json={
"name": "Hotel A",
"expire_dt": "2021-11-01T11:12:34",
"metadata": {
"hotel_id": "123456789"
}
}
)
print(response.json())OpenAPI Spec
The OpenAPI spec for Loop API can be found here.
Guides
Below are some guides relevant to this API:
Last updated
Was this helpful?