Reflecto Interactions API
The Interactions API from Reflecto — 2 operation(s) for interactions.
The Interactions API from Reflecto — 2 operation(s) for interactions.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/reflecto-dev:reflecto-dev-interactions-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Reflecto Interactions API
version: 1.1.0
description: 'The Reflecto public HTTP API lets you push notifications to your own paired
devices — your Android phone and any browser extensions you''ve paired with it.
Designed for the same job as Pushover or the old Pushbullet API: a single
HTTPS call from a script, cron job, or webhook puts a notification on every
screen you own.
Authentication uses opaque prefixed bearer tokens (`rfk_live_…`) created and
managed on your paired Android device — there are no email accounts, no
passwords, no server-side user records beyond device pairing state. See the
Authentication guide for the token lifecycle.
The public-API surface is small on purpose: `POST /v1/send`, its
capability-URL alias `POST /v1/send/{token}`, and a Pushover-compatible shim
at `POST /v1/messages.json`. Mirroring traffic from your phone to your
extension never reaches this surface — it stays end-to-end encrypted via the
private `/v1/sync` SSE stream.
See the Guides tab for the quickstart, authentication model, rate-limit
contract, and encryption posture.'
contact:
name: Reflecto
url: https://github.com/reflectoapp/reflecto
license:
name: MIT
url: https://github.com/reflectoapp/reflecto/blob/main/LICENSE
servers:
- url: https://api.reflecto.dev
description: Production
security:
- BearerAuth: []
tags:
- name: Interactions
paths:
/v1/interactions:
post:
operationId: createInteraction
tags:
- Interactions
summary: Ask a question on your paired phone and wait for an answer
description: 'Sends a question — with 2–4 answer choices (default `["Approve","Deny"]`) — to the phone paired with the user behind the bearer token. The phone shows it as a high-priority notification; the first tap wins.
**Idempotent duplicates.** Re-sending the same `idempotency_key` (or, when it''s omitted, the same `question` + `choices` from the same token) while a matching interaction is within its idempotency window (until its `expires_at`) returns the **existing** interaction with `200` instead of creating a new one — no second prompt reaches the phone. This holds even after the phone has already answered: the idempotency key outlives the answer, so a duplicate create after an answer still returns the same (now-answered) interaction''s id, not a fresh one. A genuinely new request returns `201`.
Poll the result with `GET /v1/interactions/{id}`. Each owner may have at most **10 pending** interactions at once (`429 too_many_pending`); the owning account must have a paired phone device (`409 no_phone_device`).
**Phone-capability gate.** If the paired phone''s reported app build is too old to show the prompt, the request is refused outright (`426 phone_app_outdated`) rather than accepted and silently dropped on arrival. A phone that has never reported its version is allowed through anyway (unknown builds fail open), but this is not yet surfaced back to the caller for this endpoint.'
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateInteractionRequest'
examples:
minimal:
summary: Minimal — question only (default Approve/Deny choices)
value:
question: Deploy to production?
full:
summary: Full — custom choices, expiry, idempotency key
value:
question: 'Merge PR #482?'
choices:
- Merge
- Wait
- Close
expires_in: 300
idempotency_key: pr-482-merge-ask
responses:
'200':
description: Idempotent duplicate — an existing interaction with the same idempotency key, still within its idempotency window (until its `expires_at`), was returned instead of creating a new one. No new prompt was sent to the phone. Can surface an already-answered interaction's id if the duplicate arrives after the phone answered but before expiry.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateInteractionResponse'
examples:
duplicate:
value:
id: int_3f6e2a7c9b1d4f8e8a5b6c1d2e3f4a5b
expires_at: 1754800000
'201':
description: Created — a new interaction was reserved and dispatched to the phone.
content:
application/json:
schema:
$ref: '#/components/schemas/CreateInteractionResponse'
examples:
created:
value:
id: int_3f6e2a7c9b1d4f8e8a5b6c1d2e3f4a5b
expires_at: 1754800000
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'409':
$ref: '#/components/responses/Conflict'
'415':
$ref: '#/components/responses/UnsupportedMediaType'
'426':
$ref: '#/components/responses/UpgradeRequired'
'429':
$ref: '#/components/responses/RateLimitedInteractions'
/v1/interactions/{id}:
get:
operationId: getInteraction
tags:
- Interactions
summary: Poll an interaction for the phone's answer
description: 'Returns the current state of an interaction created via `POST /v1/interactions`. `wait` requests a **bounded server-side wait**: the call holds the connection open and returns early as soon as the phone answers, or once the wait budget is spent — whichever comes first — so a single poll can replace a naive tight loop. Cross-principal reads and unknown ids are indistinguishable — both return `404` rather than confirming an id exists to the wrong owner.'
security:
- BearerAuth: []
parameters:
- schema:
type: string
description: The interaction id returned by `POST /v1/interactions`.
example: int_3f6e2a7c9b1d4f8e8a5b6c1d2e3f4a5b
required: true
description: The interaction id returned by `POST /v1/interactions`.
name: id
in: path
- schema:
type: integer
description: Seconds to hold the connection open waiting for an answer — bounded server-side wait, returns early when answered. Out-of-range values are clamped into [0, 45].
example: 20
default: 0
minimum: 0
maximum: 45
required: false
description: Seconds to hold the connection open waiting for an answer — bounded server-side wait, returns early when answered. Out-of-range values are clamped into [0, 45].
name: wait
in: query
responses:
'200':
description: Current interaction state.
content:
application/json:
schema:
$ref: '#/components/schemas/PollInteractionResponse'
examples:
pending:
summary: Still pending
value:
id: int_3f6e2a7c9b1d4f8e8a5b6c1d2e3f4a5b
status: pending
expires_at: 1754800000
answered:
summary: Answered
value:
id: int_3f6e2a7c9b1d4f8e8a5b6c1d2e3f4a5b
status: answered
choice_index: 0
answered_at: 1754799500
expires_at: 1754800000
expired:
summary: Expired, unanswered
value:
id: int_3f6e2a7c9b1d4f8e8a5b6c1d2e3f4a5b
status: expired
expires_at: 1754800000
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/RateLimitedInteractions'
components:
responses:
NotFound:
description: The requested resource does not exist or is not visible to this principal.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
notFound:
summary: Unknown interaction id, one past its 24h retention window, or owned by a different principal — cross-principal reads are deliberately indistinguishable from unknown ids (never confirm existence to the wrong owner)
value:
error:
code: not_found
message: not_found
UpgradeRequired:
description: The target phone's Reflecto app is too old to receive this — update Reflecto on the phone from the Google Play Store before this can be delivered. Nothing was sent.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
phoneAppOutdated:
value:
error:
code: phone_app_outdated
message: the paired phone's Reflecto app is too old to receive this — update Reflecto on the phone from the Google Play Store before this can be delivered; nothing was sent.
Conflict:
description: The request conflicts with the current state of a resource.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
noPhoneDevice:
summary: Owner has no paired phone to ask
value:
error:
code: no_phone_device
message: no_phone_device
BadRequest:
description: Malformed payload or invalid field value.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
invalidPriority:
value:
error:
code: invalid_priority
message: priority must be one of min, low, default, high, urgent
messageTooLong:
value:
error:
code: message_too_long
message: message must be ≤ 1500 bytes
details:
bytes: 1620
max: 1500
UnsupportedMediaType:
description: The request body's media type is not supported — an unrecognised Content-Type, a non-utf charset, or an unsupported Content-Encoding.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
unsupportedMediaType:
value:
error:
code: unsupported_media_type
message: Content-Type is not supported by this endpoint
RateLimitedInteractions:
description: Rate limit or resource cap exceeded. For interaction creation this includes the 10-pending-per-owner cap; for ring and reminders, IP/token rate limits.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
rateLimitExceeded:
value:
error:
code: rate_limit_exceeded
message: Rate limit hit
tooManyPending:
summary: Owner already has 10 pending interactions
value:
error:
code: too_many_pending
message: too_many_pending
Unauthorized:
description: Missing, invalid, or revoked bearer token.
content:
application/json:
schema:
$ref: '#/components/schemas/SimpleErrorResponse'
examples:
missingToken:
value:
error: missing_token
message: 'Authorization: Bearer rfk_live_… required'
invalidToken:
value:
error: invalid_token
Forbidden:
description: Token exists but lacks scope for the requested action.
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
priorityCapped:
value:
error:
code: priority_capped
message: Token's priority_cap is 'default'; requested 'high'
schemas:
CreateInteractionResponse:
type: object
properties:
id:
type: string
description: Interaction id (`int_` prefix). Poll it via `GET /v1/interactions/{id}`.
example: int_3f6e2a7c9b1d4f8e8a5b6c1d2e3f4a5b
expires_at:
type: integer
description: Unix epoch seconds when the interaction expires without an answer.
example: 1754800000
required:
- id
- expires_at
PollInteractionResponse:
type: object
properties:
id:
type: string
description: Interaction id, echoed back.
example: int_3f6e2a7c9b1d4f8e8a5b6c1d2e3f4a5b
status:
type: string
enum:
- pending
- answered
- expired
description: Current interaction state.
example: answered
choice_index:
type: integer
minimum: 0
maximum: 3
description: Index into the original `choices` array. Present only once `status` is `answered`.
example: 0
answered_at:
type: integer
description: Unix epoch seconds when the phone answered. Present only once `status` is `answered`.
example: 1754799500
expires_at:
type: integer
description: Unix epoch seconds when the interaction expires (or expired).
example: 1754800000
required:
- id
- status
- expires_at
ErrorResponse:
type: object
properties:
error:
type: object
properties:
code:
type: string
example: message_too_long
message:
type: string
example: message must be ≤ 1500 bytes
details:
type: object
additionalProperties: {}
required:
- code
- message
required:
- error
SimpleErrorResponse:
type: object
properties:
error:
type: string
example: invalid_token
message:
type: string
required:
- error
description: 'Flat error shape used for auth failures — `invalid_token` carries only the stable code; `missing_token` adds a `message` hint pointing at the `Authorization: Bearer …` header. The `message` field is therefore optional.'
CreateInteractionRequest:
type: object
properties:
question:
type: string
description: The question shown on the phone. 1–1000 characters.
example: Deploy to production?
choices:
type: array
items:
type: string
minItems: 2
maxItems: 4
description: Answer labels rendered as buttons. 2–4 entries. Default ["Approve","Deny"].
example:
- Approve
- Deny
expires_in:
type: integer
minimum: 60
maximum: 86400
description: Seconds until the ask expires. 60–86400, default 600.
example: 600
idempotency_key:
type: string
minLength: 1
maxLength: 128
description: Client-supplied dedup key; server derives one from content hashes when absent.
required:
- question
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: rfk_live_…
description: Opaque bearer token created on your paired Android phone. The format is `rfk_live_` followed by 32 URL-safe alphanumeric characters (≥160 bits of entropy). Test tokens use the `rfk_test_` prefix.
ConnectorOAuth:
type: http
scheme: bearer
description: OAuth 2.1 access token issued by Reflecto's authorization server to a connected AI assistant (the remote MCP connector flow). Must carry the `sms:send` scope, which is never granted to `rfk_live_` API tokens.