All plugin docs

Server API

The server API lets your own backend invite someone to Streamiva through one of your signup links. Streamiva sends the invitation by e-mail; you never learn whether or as whom they signed up.

Use it when people give you their address on your own page or in your own app. If you only want a sign-up form on your site, the widget needs no server and no key.

Base URL

Every path below is under https://streamiva.net, for example https://streamiva.net/v1/partner/signups.

Testing against stage

https://stage.streamiva.net serves the same API under the same paths. It is the next release of Streamiva, so it may have changes that production does not have yet.

API keys

Sign in to Streamiva and open the developer dashboard (https://streamiva.net/en/developer). It opens once Streamiva approves your developer account. Create keys there. A key starts with sk_live_ and is shown once: keep it on your server, never in a web page or app.

Request What it does
GET /v1/me/developer/api-keys Lists your keys.
POST /v1/me/developer/api-keys Creates a key.
POST /v1/me/developer/api-keys/{key_id}/rotate Replaces a key with a new one.
POST /v1/me/developer/api-keys/{key_id}/revoke Revokes a key.

You can have at most 2 active keys, so you can rotate without downtime. A paused key cannot be rotated.

Inviting someone

POST https://streamiva.net/v1/partner/signups
Authorization: Bearer sk_live_...
Content-Type: application/json
{"email": "viewer@example.com", "bundle_id": "<link code>", "ref": "newsletter", "locale": "he"}

The answer is 202 Accepted:

{"invitation_id": "inv_..."}

The answer is the same whether or not the address already has a Streamiva account. Keep invitation_id if you like: it is the reference to give Streamiva support about this invitation.

A full call against stage:

curl -i https://stage.streamiva.net/v1/partner/signups \
  -H "Authorization: Bearer $STREAMIVA_PARTNER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "bundle_id": "<link code>", "ref": "test", "locale": "en"}'

What the person gets

Streamiva e-mails the address from signup@streamiva.net; you never see or send that e-mail. Expect delivery within a minute. Rarely, the same e-mail arrives twice.

locale Subject
he השלימו את ההרשמה ל-Streamiva
ru Завершите регистрацию в Streamiva
en Finish signing up for Streamiva

The e-mail says one more step is left, has a "Finish signing up" button (in the e-mail's language), and says the link works for 7 days.

Opening the link signs the person in to Streamiva with that address, with no code to type. Then:

The link signs in once; a second open asks for a normal sign-in, with a code e-mailed to the address. After 7 days it can no longer be opened.

Errors

Every error is JSON with a detail. For a request body that does not fit the format above, detail is a list, one entry per problem:

{"detail": [{"type": "missing", "loc": ["body", "bundle_id"], "msg": "Field required", "input": {}}]}

That happens for a missing bundle_id, a locale other than he, ru or en, or a body that is not JSON. The body is checked before the key, so these answers come even without a key.

Every other error has detail as one message:

Status detail What to do
401 An API key is required Send Authorization: Bearer sk_live_....
401 Unknown or revoked API key Use an active key.
403 This key is paused (...); contact Streamiva See Keeping a key in good standing.
403 This developer is suspended; contact Streamiva Contact Streamiva.
403 The dashboard opens once the operator approves the account. Wait for approval.
422 Give exactly one of email and phone
422 Not an e-mail address
422 Disposable e-mail addresses are not accepted
422 A phone number is in E.164 form, like +972501234567
422 Phone invitations are not available yet; send an email address
422 Not one of your live signup links The code is wrong, the link is someone else's, or it is paused, revoked, expired or full.
429 Too many requests for this key; try again in a minute Retry after the minute.
429 Daily invitation limit reached Retry tomorrow.
429 This address was invited recently Do not retry; the address already has an invitation that works.

No answer carries a Retry-After header. A 5xx is Streamiva's fault and says nothing more; retrying is safe, but if the first call got through, the retry answers 429 This address was invited recently.

Limits

The per-minute limit counts every request that gets past the key check, including ones refused with 422.

Keeping a key in good standing

If more than 5% of a key's invitations in a day bounce (once at least 20 were sent), or recipients mark 3 as spam within 30 days, the key is paused. Every call with it then answers 403 until Streamiva lifts the pause; you get no other notice.

You get no per-person callbacks and no list of who signed up: invited signups show only as counts in the link's stats.