All available operations for user presence
This endpoint updates a user's location.
PUT https://api.cord.com/v1/users/<USER_ID>/presence
Listed below are the fields of the request body to be added as part of the HTTP PUT request.
{
"organizationID": "<ORG_ID>",
"location": { "page": "<PAGE_ID>", "paragraph": "<PARAGRAPH_ID>" },
"exclusiveWithin": { "page": "<PAGE_ID>" }
}
As a user moves around a page, their paragraphID will change, while their pageID will remain the same. The above call to setPresent will mark them present at their specific paragraph. However, since every update uses the same exclusiveWithin, each time they are marked present at one paragraph they will become no longer present at their previous paragraph.
true
, this is a durable presence update, when false
, or is not used, it is an ephemeral presence update.false.
true
, this is an absence update, meaning that the user has just left this location. If the user is currently present at that location, it is cleared. This cannot be used with a durable presence update.false.
The user will be set as present at the location.If successful, the response will be:
{
"success": true,
"message": "✅ You successfully updated user <USER_ID> presence"
}
To show a user as present at the location { "page": "docs", "section": "presence" }
.
curl "https://api.cord.com/v1/users/<USER_ID>/presence" \
-X PUT \
-H 'Authorization: Bearer <ACCESS_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"location": { "page": "docs", "section": "presence" },
"organizationID": <ORG_ID>
}'