Video Message
curl --request POST \
--url https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": "http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4",
"caption": "this video send via contact id with json payload"
}
'import requests
url = "https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video"
payload = {
"file": "http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4",
"caption": "this video send via contact id with json payload"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file: 'http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4',
caption: 'this video send via contact id with json payload'
})
};
fetch('https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file' => 'http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4',
'caption' => 'this video send via contact id with json payload'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video"
payload := strings.NewReader("{\n \"file\": \"http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4\",\n \"caption\": \"this video send via contact id with json payload\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file\": \"http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4\",\n \"caption\": \"this video send via contact id with json payload\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": \"http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4\",\n \"caption\": \"this video send via contact id with json payload\"\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"message": "Resource created successfully.",
"data": {}
}{
"message": "Unauthenticated."
}{
"message": "Resource not found.",
"status": 404
}{
"message": "Validation error",
"errors": {}
}Send Messages (Via Id)
Video Message
Send a video message to a specific contact within a workspace.
POST
/
workspaces
/
{workspace}
/
contacts
/
{contact}
/
messages
/
video
Video Message
curl --request POST \
--url https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"file": "http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4",
"caption": "this video send via contact id with json payload"
}
'import requests
url = "https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video"
payload = {
"file": "http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4",
"caption": "this video send via contact id with json payload"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
file: 'http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4',
caption: 'this video send via contact id with json payload'
})
};
fetch('https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file' => 'http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4',
'caption' => 'this video send via contact id with json payload'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video"
payload := strings.NewReader("{\n \"file\": \"http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4\",\n \"caption\": \"this video send via contact id with json payload\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"file\": \"http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4\",\n \"caption\": \"this video send via contact id with json payload\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lancepilot.com/api/v3/workspaces/{workspace}/contacts/{contact}/messages/video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": \"http://static.videezy.com/system/resources/previews/000/000/150/original/waterdrop.mp4\",\n \"caption\": \"this video send via contact id with json payload\"\n}"
response = http.request(request)
puts response.read_body{
"status": 201,
"message": "Resource created successfully.",
"data": {}
}{
"message": "Unauthenticated."
}{
"message": "Resource not found.",
"status": 404
}{
"message": "Validation error",
"errors": {}
}This endpoint allows you to send an video message to a contact. You can provide the video in two ways:
- Video URL: Pass the video URL in the request body.
- Uploaded File: Send the video as a file using
multipart/form-data.
File Field Requirements
- file:
- Required
- Allowed MIME types:
mp4,3gp - Maximum size: 16 MB (
max:16384KB)
Request Options
-
Video URL Example (JSON):
{ "file": "https://example.com/video.mp4" } -
Uploaded File Example (multipart/form-data):
POST /workspaces/{workspace}/contacts/{contact}/messages/video Content-Type: multipart/form-data file: [binary video file]
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the workspace.
ID of the contact.
Body
application/json
Message sending parameters.
⌘I