curl --request POST \
--url https://{subdomain}.conveyour.com/api/custom-reports/{id}/share \
--header 'Content-Type: application/json' \
--header 'x-conveyour-token: <api-key>' \
--data '
{
"params": {},
"expires": "<string>",
"config": {}
}
'const options = {
method: 'POST',
headers: {'x-conveyour-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({params: {}, expires: '<string>', config: {}})
};
fetch('https://{subdomain}.conveyour.com/api/custom-reports/{id}/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'x-conveyour-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({params: {}, expires: '<string>', config: {}})
};
fetch('https://{subdomain}.conveyour.com/api/custom-reports/{id}/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{subdomain}.conveyour.com/api/custom-reports/{id}/share"
payload = {
"params": {},
"expires": "<string>",
"config": {}
}
headers = {
"x-conveyour-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.conveyour.com/api/custom-reports/{id}/share",
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([
'params' => [
],
'expires' => '<string>',
'config' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-conveyour-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": "ok",
"message": "Share URL generated",
"data": {
"url": "https://<your-subdomain>.conveyour.com/ui/reports/shared/abc123def456?token=eyJhbGciOiJIUzI1...",
"expires": "+30 days",
"params": {
"office_id": "office_101",
"office_name": "Downtown Office"
}
}
}{
"status": "failed",
"message": "Token is either expired or does not have the correct permissions",
"data": []
}{
"status": "failed",
"message": "Contact not found",
"data": []
}Share a custom report
Generates a shareable URL for a custom report. When the report is secure=true, parameters are JWT-encoded so locked values cannot be tampered with. The share URL can be opened by anyone without a ConveYour login.
Generate a shareable URL for a custom report
curl --request POST \
--url https://{subdomain}.conveyour.com/api/custom-reports/{id}/share \
--header 'Content-Type: application/json' \
--header 'x-conveyour-token: <api-key>' \
--data '
{
"params": {},
"expires": "<string>",
"config": {}
}
'const options = {
method: 'POST',
headers: {'x-conveyour-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({params: {}, expires: '<string>', config: {}})
};
fetch('https://{subdomain}.conveyour.com/api/custom-reports/{id}/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'x-conveyour-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({params: {}, expires: '<string>', config: {}})
};
fetch('https://{subdomain}.conveyour.com/api/custom-reports/{id}/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{subdomain}.conveyour.com/api/custom-reports/{id}/share"
payload = {
"params": {},
"expires": "<string>",
"config": {}
}
headers = {
"x-conveyour-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{subdomain}.conveyour.com/api/custom-reports/{id}/share",
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([
'params' => [
],
'expires' => '<string>',
'config' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-conveyour-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": "ok",
"message": "Share URL generated",
"data": {
"url": "https://<your-subdomain>.conveyour.com/ui/reports/shared/abc123def456?token=eyJhbGciOiJIUzI1...",
"expires": "+30 days",
"params": {
"office_id": "office_101",
"office_name": "Downtown Office"
}
}
}{
"status": "failed",
"message": "Token is either expired or does not have the correct permissions",
"data": []
}{
"status": "failed",
"message": "Contact not found",
"data": []
}Authorizations
Your API key token. Contacts endpoints require a Server-only — Full API key — see Authentication.
Path Parameters
The id identifier.
Query Parameters
Team scope for the request, as one or more team ObjectIds. The brackets are required: PHP keeps only the last value for a repeated plain key, so teams=A&teams=B silently resolves to B alone. On requests with a JSON body you may send teams (no brackets) in the body instead.
Values that are not valid ObjectIds are silently ignored — a mistyped team ID behaves as if no team was sent. See the teams section of the API conventions guide.
Body
The parameter values to encode in the JWT token. Used for locked parameters that differ per share link (e.g. scoping a report to a specific office ID).
Token expiration window. Default: +8 hours. Options: +1 hour, +8 hours, +24 hours, +7 days, +30 days, +90 days, +1 year.
Extra configuration to encode into the share token. Supplying this forces a custom token to be generated, and only takes effect on a secure report.
Response
Success.
The common response envelope shared by all ConveYour endpoints.