API

Create share links, manage CTAs, and read analytics and messages from your own systems.

Updated

Create share links, manage a video's call-to-action, and read analytics or viewer messages, all from your own server, no dashboard clicks required.

Get an API key

Where to find it
  1. Next to your name, click
  2. Click Settings
  3. Open API Keys
  4. Click Generate new key and copy it
  5. Under Quick start, pick your video in Which video? and copy an example (or, with no code, click Open the Zapier guide)
Show me how in the app
1
Give the key a name (e.g. "CRM integration").
2
Copy the key: it starts with vl_live_ and is shown exactly once.
3
Send it as an Authorization: Bearer <key> header on every request below.
4
Under Quick start, pick your video in Which video?: every example then has its real Video ID. Copy one with the copy icon on the example.
💡 No code? The No code? Use Zapier or Make card on the same page opens the Zapier guide below (Create a one-time link from Zapier).
💡 A key acts as you: it reaches the videos you uploaded, including ones in a workspace. Revoke it from the same page with the bin icon (Revoke), and anything using it stops working straight away.

Generate a share link for a video that deactivates after its first view, useful for a form on your own site that hands each visitor a personal link.

JavaScript
const response = await fetch('https://vitelnk.com/api/v1/links', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer vl_live_your_key_here',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    videoId: 'your-video-id',
    recipientName: 'Jane Smith',
    recipientEmail: '[email protected]',
  }),
});

const link = await response.json();
console.log(link.url);

Deactivate a link when it's no longer needed: DELETE /api/v1/links/{id}. Each key can create up to 100 links per hour.

Example: when a form is submitted or a deal is won in your CRM, Zapier creates a personal one-time link to your video and emails it to that person. Each link works for one viewing, so it can't be passed around. Using Make instead? See Create a one-time link from Make (no code) below.

1
Get an API key (see Get an API key above). The window that shows the new key also lists every Zapier field below, ready to copy, with your key and your video already in them. To find a Video ID later: open the video, go to the Settings tab and click the ID under Video ID (or pick Copy Video ID in the menu on the video's card).
2
In Zapier, pick your trigger, for example New Form Submission or Deal Won.
3
Add an action: Webhooks by Zapier, event POST.
4
Set URL to https://vitelnk.com/api/v1/links and Payload Type to Json.
5
Under Data, add videoId = your Video ID, recipientName = the name from the trigger, and recipientEmail = the email from the trigger. Optional: expiresAt (a date) to also make the link expire.
6
Under Headers, add Authorization = Bearer vl_live_your_key_here (your key, after the word Bearer and a space).
7
Click Test step. The result has a url: that's the one-time link. If it failed, the error says what to fix, and the API Keys page shows it under Last result.
8
Add one more action, for example Gmail: Send Email, to the trigger's email, and put the url from the Webhooks step in the message.
JSON
{
  "id": 1234,
  "url": "https://vitelnk.com/share/cYfS8r2ZjnyYij69d0MINnV4eO2jdOJP/r/8d305546-f4d2-4bfa-ba34-d343e308029a",
  "videoId": "your-video-id",
  "isOneTime": true,
  "expiresAt": null,
  "recipientName": "Jane Smith",
  "recipientEmail": "[email protected]"
}
💡 Send recipientName and recipientEmail together (or neither). With them, the link is a named magic link: the url is that person's own link (it ends in /r/...), every open shows up under their name in analytics, and your webhooks get their name and email. Getting a 404 means the Video ID is wrong or the video isn't yours (pasting the video's address or one of its share links also works); 429 means the key made 100 links in the last hour.

The same link from a Make scenario, with Make's HTTP app. Field names below are Make's.

1
Get an API key (see Get an API key above) and your Video ID (the window that shows the new key lists it, or see the Zapier steps above).
2
In your scenario, after the trigger (for example a form or CRM module), add HTTP › Make a request.
3
Set URL to https://vitelnk.com/api/v1/links and Method to POST.
4
Set Authentication type to API key and add a keychain under Credentials: Key = Bearer vl_live_your_key_here (the word Bearer, a space, then your key), API key placement = in the header, Parameter name = Authorization.
5
Set Body content type to application/JSON and add videoId = your Video ID, recipientName and recipientEmail mapped from the trigger. Optional: expiresAt.
6
Set Parse response to Yes and run the module once. Its output has a url: that's the one-time link. If it failed, the error says what to fix, and the API Keys page shows it under Last result.
7
Add a module that sends the email (for example Gmail) and map the url into the message.
💡 Make only calls https:// addresses, which vitelnk's API is. The key goes in the Credentials keychain rather than Headers: that's where Make's HTTP docs ask for it.

Every endpoint

SettingWhat it does
POST /api/v1/linksCreate a one-time-view share link for a video.
DELETE /api/v1/links/{id}Deactivate a share link created via the API.
GET /api/v1/videos/{videoId}/ctaRead a video's current primary CTA and its secondary/social links.
PUT /api/v1/videos/{videoId}/ctaUpdate the primary CTA: button text, link, colour, or a Cal.com/Calendly calendar embed.
POST /api/v1/videos/{videoId}/cta/linksAdd a secondary or social link below the video.
PATCH /api/v1/videos/{videoId}/cta/links/{linkId}Update one secondary/social link.
DELETE /api/v1/videos/{videoId}/cta/links/{linkId}Remove one secondary/social link.
GET /api/v1/videos/{videoId}/shares/{shareId}/analyticsViews, plays, completions, and CTA clicks for one share link.
GET /api/v1/videos/{videoId}/shares/{shareId}/messagesViewer messages left on one share link, paginated.
GET /api/v1/meWho the key belongs to: your name and email, the workspace for a workspace key, and your plan. Use it to test a connection.
GET /api/v1/videosYour videos, newest first, with limit (1 to 100, default 50) and page; next_page is null on the last page. A workspace key lists the workspace's videos, a personal key your personal ones.
GET /api/v1/videos/{videoId}/sharesA video's share links, newest first, with the same limit and page.
POST /api/v1/hooksSubscribe a URL to one webhook event (url, event). Answers 201 with the webhook's id and a secret, shown only here, to check the X-vitelnk-Signature header. For apps such as Pipedream; it shows on your Webhooks page as Created by an app.
DELETE /api/v1/hooks/{id}Unsubscribe: deletes a webhook made with POST /api/v1/hooks. Works even when your plan has ended.
GET /api/v1/hooks/sample?event=video.watchedA list with one example of that event, the same shape as a real delivery, from your newest share link.

Webhooks made with POST /api/v1/hooks send only while the key they were made with works (not revoked or expired) and your plan includes webhooks. Revoking the key deletes them, and one whose URL answers 404 or 410 is turned off. Each webhook gets at most 100 deliveries an hour; more are skipped.

{videoId} is the Video ID shown on the video's Settings tab (e.g. video-abc123), not a numeric ID. In POST /api/v1/links you can also paste the video's address or one of its share links. {shareId} and {linkId} are the numeric IDs vitelnk assigns to that share link or CTA link.

Update a CTA to a Cal.com booking calendar

JSON
PUT /api/v1/videos/your-video-id/cta

{
  "embedCalendar": true,
  "calendarProvider": "calcom",
  "calendarBookingUrl": "your-team/discovery-call"
}

A Cal.com booking link is the bare username/event-slug, with no https:// or cal.com/ prefix. A Calendly link is the full URL, e.g. https://calendly.com/you/30min. Either format mistake is rejected with a 422 and an explanation of the expected shape, rather than silently saving a broken embed.

JSON
GET /api/v1/videos/your-video-id/shares/482/analytics

{
  "analytics": {
    "share_id": 482,
    "name": "Prospect Link, Acme",
    "token": "abc123xyz",
    "views": 14,
    "plays": 11,
    "completions": 6,
    "completionRate": 54.5,
    "primaryCtaClicks": 3,
    "avgWatchProgress": 78
  }
}

Error codes

SettingWhat it does
401Missing, invalid, revoked, or expired API key.
403Your account doesn't include the API right now (it comes with paid plans and credit packs), or your plan doesn't include the calendar embed a Cal.com/Calendly CTA update needs. The message links to the plans page.
404No video, share link or CTA link with that ID that your key can reach, or no endpoint at that address. The message says which ID or address it got. vitelnk never tells "doesn't exist" and "not yours" apart, so a key can't be used to probe for videos it doesn't own.
405That address takes a different method (e.g. GET on /api/v1/links, which only takes POST). The message names the right one.
422A field is missing or in the wrong format. The message names the field as you sent it (e.g. videoId, expiresAt) and errors lists every one. recipientName and recipientEmail go together: send both or neither.
429Too many calls: 100 links an hour per key (the message says when you can try again, and Retry-After gives the seconds), or 60 requests a minute per account.

Every error comes back as JSON with a message, even when your tool (Zapier, Make) doesn't ask for JSON, so a failed step shows what to fix.

See whether a call worked

On the API Keys page, Last result shows each key's newest call: a green code when it worked (for a new link, its address), or the error and what the API said. Click the clock icon (View calls) for the last 10 calls made with that key.

💡 A Zapier step that "ran" can still have failed: if no link came out, check Last result first.

Frequently asked questions

Was this page helpful?
Still stuck?

Email [email protected] and we'll help, usually within a day. Or book a 15-min call.