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
- Next to your name, click
- Click Settings
- Open API Keys
- Click Generate new key and copy it
- Under Quick start, pick your video in Which video? and copy an example (or, with no code, click Open the Zapier guide)
vl_live_ and is shown exactly once.Authorization: Bearer <key> header on every request below.Create a one-time-view share link
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.
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.
Create a one-time link from Zapier (no code)
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.
https://vitelnk.com/api/v1/links and Payload Type to Json.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.Authorization = Bearer vl_live_your_key_here (your key, after the word Bearer and a space).{
"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]"
}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.Create a one-time link from Make (no code)
The same link from a Make scenario, with Make's HTTP app. Field names below are Make's.
https://vitelnk.com/api/v1/links and Method to POST.Bearer vl_live_your_key_here (the word Bearer, a space, then your key), API key placement = in the header, Parameter name = Authorization.videoId = your Video ID, recipientName and recipientEmail mapped from the trigger. Optional: expiresAt.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
| Setting | What it does |
|---|---|
| POST /api/v1/links | Create 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}/cta | Read a video's current primary CTA and its secondary/social links. |
| PUT /api/v1/videos/{videoId}/cta | Update the primary CTA: button text, link, colour, or a Cal.com/Calendly calendar embed. |
| POST /api/v1/videos/{videoId}/cta/links | Add 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}/analytics | Views, plays, completions, and CTA clicks for one share link. |
| GET /api/v1/videos/{videoId}/shares/{shareId}/messages | Viewer messages left on one share link, paginated. |
| GET /api/v1/me | Who 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/videos | Your 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}/shares | A video's share links, newest first, with the same limit and page. |
| POST /api/v1/hooks | Subscribe 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.watched | A 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
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.
Read a share link's analytics
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
| Setting | What it does |
|---|---|
| 401 | Missing, invalid, revoked, or expired API key. |
| 403 | Your 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. |
| 404 | No 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. |
| 405 | That address takes a different method (e.g. GET on /api/v1/links, which only takes POST). The message names the right one. |
| 422 | A 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. |
| 429 | Too 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.
Frequently asked questions
Email [email protected] and we'll help, usually within a day. Or book a 15-min call.
