Taps

As the name suggests taps are a core part of Tapp — they are the interactions between our labels and its users. Every tap gives us insight in a label's data or status, and who and where was interacting with that label. On this page, we’ll dive into the different tap endpoints you can use to manage taps programmatically. We'll look at how to create, and update taps.

The tap model

The tap model contains information about the label's status and data, and of the client interacting with that label. Taps can come from webapps or from our native app, and can contain approximated or precise geo locations.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the conversation.

  • Name
    contact_id
    Type
    string
    Description

    Unique identifier for the other contact in the conversation.

  • Name
    group_id
    Type
    string
    Description

    Unique identifier for the group that the conversation belongs to.

  • Name
    pinned_message_id
    Type
    string
    Description

    Unique identifier for the pinned message.

  • Name
    is_pinned
    Type
    boolean
    Description

    Whether or not the conversation has been pinned.

  • Name
    is_muted
    Type
    boolean
    Description

    Whether or not the conversation has been muted.

  • Name
    last_active_at
    Type
    timestamp
    Description

    Timestamp of when the conversation was last active.

  • Name
    last_opened_at
    Type
    timestamp
    Description

    Timestamp of when the conversation was last opened by the authenticated user.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the conversation was created.

  • Name
    archived_at
    Type
    timestamp
    Description

    Timestamp of when the conversation was archived.


GET/v1/taps

List all taps

This endpoint allows you to retrieve a paginated list of all your taps. By default, a maximum of hundred taps are shown per page.

Optional attributes

  • Name
    limit
    Type
    integer
    Description

    Limit the number of taps returned.

  • Name
    startDate
    Type
    string
    Description

    Start date as date, ISO 8601 date format or timestamp (seconds). For example YYYY-MM-DD, YYYY-MM-DDT00:00:00Z or SSSSSSSSS.

  • Name
    endDate
    Type
    string
    Description

    End date as date, ISO 8601 date format or timestamp (seconds). For example YYYY-MM-DD, YYYY-MM-DDT00:00:00Z or SSSSSSSSS.

Request

GET
/v1/taps
curl -G https://api.tapp.online/v1/taps \
	-H "X-API-Key: your-api-key-here" \
	-d limit=100

Response

{
  "has_more": false,
  "data": [
    {
      "id": "xgQQXg3hrtjh7AvZ",
      "contact_id": "WAz8eIbvDR60rouK",
      "group_id": null,
      "pinned_message_id": null,
      "is_pinned": false,
      "is_muted": false,
      "last_active_at": 705103200,
      "last_opened_at": 705103200,
      "created_at": 692233200,
      "archived_at": null
    },
    {
      "id": "hSIhXBhNe8X1d8Et"
      // ...
    }
  ]
}

GET/v1/taps/:id

Retrieve a tap

This endpoint allows you to retrieve a tap by providing the tap id. Refer to the list at the top of this page to see which properties are included with tap objects.

Request

GET
/v1/conversations/xgQQXg3hrtjh7AvZ
curl https://api.protocol.chat/v1/conversations/xgQQXg3hrtjh7AvZ \
  -H "Authorization: Bearer {token}"

Response

{
  "id": "xgQQXg3hrtjh7AvZ",
  "contact_id": "WAz8eIbvDR60rouK",
  "group_id": null,
  "pinned_message_id": null,
  "is_pinned": false,
  "is_muted": false,
  "last_active_at": 705103200,
  "last_opened_at": 705103200,
  "created_at": 692233200,
  "archived_at": null
}

DELETE/v1/taps/:id

Delete a tap

This endpoint allows you to delete a tap. Note: This will permanently delete the tap and all its data.

Request

DELETE
/v1/conversations/xgQQXg3hrtjh7AvZ
curl -X DELETE https://api.protocol.chat/v1/conversations/xgQQXg3hrtjh7AvZ \
  -H "Authorization: Bearer {token}"