Skip to main content
POST
Open a tap intent

Authorizations

Authorization
string
header
required

Use Authorization: Bearer end_sk_* for partner API keys (e.g. end_sk_AbCd_example_api_key).

Headers

Idempotency-Key
string

Unique key that makes this request safe to retry. Replaying the key with the same body returns the original response with Idempotent-Replayed: true; replaying it with a different body returns 409 idempotency.key_conflict.

Required string length: 1 - 255
Example:

"a1b2c3d4-0000-4000-8000-000000000000"

Body

application/json
rule
enum<string>
required

Who may open the intent. own opens it on a unit in your own environment.

Available options:
own
unit_id
string<uuid>
required

The unit the person will tap.

action
object
required

Opaque to Endstate. Stored with surrounding whitespace trimmed, returned on reads and in webhooks, and compared exactly when you consume.

ttl
integer
default:300

Seconds the intent waits for a tap. A tap after that does not count.

Required range: 60 <= x <= 900
use_within
integer
default:300

Seconds after the person approves in which you can consume the approval. Fixed here: use_by is approved_at plus this, and no call extends it.

Required range: 60 <= x <= 900
code
boolean
default:true

Whether the person must enter a code to confirm. On by default: the response carries tap_code for you to show them. Pass false only where the person asking is the person holding the item and a wrong approval costs little, because anyone who taps the item can then confirm.

redirect_url
string

Where the person is sent after they confirm. tap_intent=<id> is added to it. Must be on one of the environment's allowed origins.

Maximum string length: 2048
Example:

"https://app.example.com/listings/8271/confirm"

display
object

Response

The open tap intent and its code.

id
string
required
status
enum<string>
required

pending until the person confirms. approved once they have: consume it by use_by. consumed once you have used the approval; it is used once. canceled ended without an approval. expired means nobody approved in time, or the approval was not consumed by use_by. consumed and canceled are final. Approving, canceling and consuming each send a webhook; expiring sends none.

Available options:
pending,
approved,
consumed,
canceled,
expired
rule
enum<string>
required
Available options:
own
unit_id
string<uuid>
required
action
object
required
redirect_url
string | null
required
display
object
required
code_required
boolean
required

Whether the person must enter the code to confirm.

scan
object | null
required

The tap the intent was approved with. Null until it is approved.

created_at
string<date-time>
required
expires_at
string<date-time>
required

A tap must arrive by this time. The person can confirm for 10 minutes after their tap.

approved_at
string<date-time> | null
required

When the person approved. Kept on an approval that expired unused.

use_by
string<date-time> | null
required

The approval can be consumed until this time: approved_at plus the use_within set at create. Null until approved.

consumed_at
string<date-time> | null
required

When you consumed the approval. Null until then.

canceled_at
string<date-time> | null
required
tap_code
string | null
required

The six digit code to show the person, or null when code is false. Returned by this response only: no read or webhook carries it, and a replay of the same Idempotency-Key returns null. If you lose it, cancel and open a new tap intent.

Example:

"482913"