This page takes you from a new key to a live device in a browser. You create an account for
one of your customers, start a session in it, keep it alive from your server, open it in a
browser, and receive the session.started event on your webhook endpoint.
Every request below is a plain curl call. The responses are real ones from a test
partner; your ids, times and devices will differ.
You need:
- a person in your VibeView organization with the Partner admin permission (ask support@vibeview.io to set up your partner and grant it);
- an app of your organization shared with your partner, which every session runs (see Apps in accounts);
- an HTTPS URL on the public internet that can receive a
POST(for the webhook).
1. Create a key and a webhook endpoint
Open the Partner page in the dashboard. Your partner id (ptn_…) is shown at the top.
- Under API keys, choose Create key. Give it a name and tick these scopes:
accounts:read,accounts:write,tokens:write,webhooks:read,sessions:readandsessions:write. Copy the key: it is shown once. - Under Webhook endpoints, choose Add endpoint. Enter your HTTPS URL and tick
session.started(or every event). Copy the Signing secret (whsec_…).
Each change asks you to confirm your identity first.
Keep the key on your server only. Set it and your partner id in your shell:
export VIBEVIEW_KEY='vvp_test_…' # the key you just copied
export PTN='ptn_34e771b2c0472a4d' # your partner id
2. Create an account
One account per customer of yours. external_ref is your own id for that customer.
curl https://vibeview.io/api/v1/partners/$PTN/accounts \
-H "Authorization: Bearer $VIBEVIEW_KEY" \
-H 'Idempotency-Key: acct-cust_1042' \
-H 'Content-Type: application/json' \
-d '{"external_ref":"cust_1042","display_name":"Northwind Traders"}'
{
"object": "account",
"id": "org_95aa9b33d49e3752",
"external_ref": "cust_1042",
"display_name": "Northwind Traders",
"status": "active",
"suspended_by": [],
"livemode": false,
"created": 1795269940,
"limits": {
"concurrent_sessions": 1,
"max_session_minutes": 30,
"streaming_minutes_per_month": 600,
"build_minutes_per_month": 10,
"build_minutes_mac_per_month": 0,
"concurrent_builds": 1,
"storage_bytes": 1000000,
"collab_guests_per_session": 1,
"build_time_limit_s": 1800
},
"period_anchor_day": 21,
"period": {"start": 1795219200, "end": 1797811200},
"extra": {"streaming_minutes": 0, "build_minutes": 0, "build_minutes_mac": 0, "expires_at": 1797811200},
"suspended_reason": null
}
Store the id next to your customer record. The Idempotency-Key makes the call safe to
retry: sending it again returns this same account instead of creating a second one.
export ACCOUNT='org_95aa9b33d49e3752'
3. Mint an access token for the account
An access token acts in one account only and expires on its own. Use it for everything inside the account.
curl https://vibeview.io/api/v1/partners/$PTN/accounts/$ACCOUNT/tokens \
-H "Authorization: Bearer $VIBEVIEW_KEY" \
-H 'Content-Type: application/json' \
-d '{"scopes":["sessions:read","sessions:write"],"ttl_seconds":3600}'
{
"object": "access_token",
"id": "atok_bc803592cfbf69c6",
"token": "vvat_…",
"account": "org_95aa9b33d49e3752",
"scopes": ["sessions:read", "sessions:write"],
"expires_at": 1795273570
}
export TOKEN='vvat_…' # the token from the response
You can also skip the token and send your key with a VibeView-Account: org_… header on
every request. See Keys, tokens and scopes.
4. Pick a device
curl https://vibeview.io/api/v1/devices/pools \
-H "Authorization: Bearer $TOKEN"
{
"object": "list",
"data": [
{"object": "device", "type": "android", "category": "phone", "model": "Pixel 7 Pro", "os_version": "Android 15 (API 35)", "available": true},
{"object": "device", "type": "ios", "category": "phone", "model": "iPhone 17", "os_version": "iOS 26.4", "available": true},
{"object": "device", "type": "ios", "category": "tv", "model": "Apple TV 4K", "os_version": "tvOS 26.4", "available": true}
],
"has_more": false
}
Each entry is a kind of device you can start. Send its four fields back exactly as listed.
5. Create and start a session
A session needs an app: here, one your organization shares with your partner, by its id as
GET /api/v1/apps/ lists it (an account’s own uploaded app works the same way; see
Apps in accounts). The session installs it, opens it and stays in it.
curl https://vibeview.io/api/v1/sessions/ \
-H "Authorization: Bearer $TOKEN" \
-H 'Idempotency-Key: sess-cust_1042-0001' \
-H 'Content-Type: application/json' \
-d '{"device_type":"ios","device_category":"phone","model":"iPhone 17","os_version":"iOS 26.4","app":"Xk3pQ9vB2m"}'
{
"object": "session",
"id": "ea2d0d1a-a6ee-498f-ba17-26dd51469efc",
"account": "org_95aa9b33d49e3752",
"status": "pending",
"device": {"type": "ios", "category": "phone", "model": "iPhone 17", "os_version": "iOS 26.4"},
"app": "Xk3pQ9vB2m",
"build": null,
"queue": null,
"created": 1795269982,
"started": null,
"ended": null,
"end_reason": null,
"streaming_seconds": 0,
"warnings": [],
"livemode": false,
"labels": {},
"confined": true,
"reused": false
}
export SESSION='ea2d0d1a-a6ee-498f-ba17-26dd51469efc'
curl -X POST https://vibeview.io/api/v1/sessions/$SESSION/start \
-H "Authorization: Bearer $TOKEN"
The start answers with the session as it is now, "status": "starting". Read it until it is
active (a few seconds), or wait for the session.started event in step 8:
curl https://vibeview.io/api/v1/sessions/$SESSION \
-H "Authorization: Bearer $TOKEN"
{
"object": "session",
"id": "ea2d0d1a-a6ee-498f-ba17-26dd51469efc",
"account": "org_95aa9b33d49e3752",
"status": "active",
"device": {"type": "ios", "category": "phone", "model": "iPhone 17", "os_version": "iOS 26.4"},
"app": "Xk3pQ9vB2m",
"build": null,
"queue": null,
"created": 1795269982,
"started": 1795269989,
"ended": null,
"end_reason": null,
"streaming_seconds": 12,
"warnings": [],
"livemode": false,
"labels": {},
"confined": true
}
6. Keep it alive
A session started from a server has no viewer, so tell VibeView you are still using it. Each call holds the session for 60 seconds; call it every 15 seconds while you need the device.
curl -X POST https://vibeview.io/api/v1/sessions/$SESSION/presence \
-H "Authorization: Bearer $TOKEN"
{
"object": "session_presence",
"session": "ea2d0d1a-a6ee-498f-ba17-26dd51469efc",
"expires_at": 1795270051,
"idle_ends_at": 1795270889
}
An active session that nobody holds ends about two minutes after it became active. Holding is
not the same as using: a session with no input until idle_ends_at ends for inactivity.
A browser that is watching (next step) also holds the session.
7. Show it in a browser
Mint a collab credential and hand its url to your customer’s browser. Never send your key
or an access token to a browser.
curl -X PUT https://vibeview.io/api/v1/sessions/$SESSION/collab \
-H "Authorization: Bearer $TOKEN" \
-H 'Content-Type: application/json' \
-d '{"enabled":true,"role":"view"}'
{
"object": "collab_credential",
"session": "ea2d0d1a-a6ee-498f-ba17-26dd51469efc",
"token": "eyJ…",
"url": "https://vibeview.io/s/eyJ…",
"expires_at": 1795273629,
"role": "view"
}
Open the url. The page shows the device. With "role":"control" instead, the person can
also use it, and can do anything on the device, leaving your app included: give control
only to people you would trust with the whole device. A browser can connect until expires_at (at most one hour after you mint it). See
Show a session in a browser for framing it in
your own page.
8. Receive session.started
When the session became active, VibeView sent this to your endpoint:
POST /hooks/vibeview
content-type: application/json
user-agent: VibeView-Webhooks/1
webhook-id: evt_65c48c15afe2b922fa533b4f
webhook-timestamp: 1795269990
webhook-signature: v1,BemeaIiF/X+K06lOAPNZh2XfKMCUsbnzA7cRsQ2BmCM=
{
"object": "event",
"id": "evt_65c48c15afe2b922fa533b4f",
"type": "session.started",
"created": 1795269989,
"api_version": "2026-11-09",
"partner": "ptn_34e771b2c0472a4d",
"account": {"id": "org_95aa9b33d49e3752", "external_ref": "cust_1042"},
"data": {
"object": {
"object": "session",
"id": "ea2d0d1a-a6ee-498f-ba17-26dd51469efc",
"account": "org_95aa9b33d49e3752",
"status": "active",
"device": {"type": "ios", "category": "phone", "model": "iPhone 17", "os_version": "iOS 26.4"},
"app": "Xk3pQ9vB2m",
"build": null,
"queue": null,
"created": 1795269982,
"started": 1795269989,
"ended": null,
"end_reason": null,
"streaming_seconds": 6,
"warnings": [],
"livemode": false,
"labels": {},
"confined": true
}
},
"livemode": false
}
Verify the signature before you trust the body. With Python:
# pip install standardwebhooks flask
import os
from flask import Flask, abort, request
from standardwebhooks.webhooks import Webhook
app = Flask(__name__)
webhook = Webhook(os.environ["VIBEVIEW_WEBHOOK_SECRET"]) # "whsec_..."
@app.post("/hooks/vibeview")
def vibeview_events():
try:
# The raw bytes, before any JSON parsing.
event = webhook.verify(request.get_data(), request.headers)
except Exception:
abort(400)
# Drop duplicates: the same event can arrive more than once.
print(event["id"], event["type"])
return "", 204
A Node.js version and the rules for retries are on Events and webhooks.
9. End the session
curl -X DELETE https://vibeview.io/api/v1/sessions/$SESSION \
-H "Authorization: Bearer $TOKEN"
The answer is the ended session, with "status": "stopped" and "end_reason": "stopped".
Your endpoint receives session.ended, and the browser page says the session has ended.
Next steps
- Accounts: limits, suspension and deletion.
- Sessions from your server: driving the device, agent tools, the queue.
- Errors, idempotency, versioning and rate limits.