provider taskstasks POST /api/projects/{project_id}/tasks/{id}/presence/
@utdk/posthog /api/projects/{project_id}/tasks/{id}/presence/
Beacon presence for a device watching this task
Idempotent upsert: marks the calling user + `device_id` as actively watching this task for the next ~60 seconds. While at least one device for the user has a non-expired presence row for this task, the push fanout will skip ALL of that user's other registered devices for task notifications — the contract is 'if any device is demonstrably watching, suppress the others'. Clients call this every ~30s while the task screen is foregrounded. `device_id` is the UUID of the caller's UserPushToken row.
id path required
string
project_id path required
Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.
string

Try it

Authentication
Configure credentials for PostHog API
tasksPresenceCreate
POST/api/projects/{project_id}/tasks/{id}/presence/
Idempotent upsert: marks the calling user + `device_id` as actively watching this task for the next ~60 seconds. While at least one device for the user has a non-expired presence row for this task, the push fanout will skip ALL of that user's other registered devices for task notifications — the contract is 'if any device is demonstrably watching, suppress the others'. Clients call this every ~30s while the task screen is foregrounded. `device_id` is the UUID of the caller's UserPushToken row.

Parameters

required
required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

Input

required

UUID of the caller's UserPushToken (returned by `/api/users/@me/push_tokens/` on register).

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.tasksPresenceCreate()