Create a site visit
curl --request POST \
--url https://sitevisit.app/api/v1/site-visits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"property_id": "<string>",
"title": "<string>",
"visit_date": "2023-11-07T05:31:56Z",
"summary": "<string>",
"notes": "<string>"
}
'import requests
url = "https://sitevisit.app/api/v1/site-visits"
payload = {
"property_id": "<string>",
"title": "<string>",
"visit_date": "2023-11-07T05:31:56Z",
"summary": "<string>",
"notes": "<string>"
}
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({
property_id: '<string>',
title: '<string>',
visit_date: '2023-11-07T05:31:56Z',
summary: '<string>',
notes: '<string>'
})
};
fetch('https://sitevisit.app/api/v1/site-visits', 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://sitevisit.app/api/v1/site-visits",
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([
'property_id' => '<string>',
'title' => '<string>',
'visit_date' => '2023-11-07T05:31:56Z',
'summary' => '<string>',
'notes' => '<string>'
]),
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://sitevisit.app/api/v1/site-visits"
payload := strings.NewReader("{\n \"property_id\": \"<string>\",\n \"title\": \"<string>\",\n \"visit_date\": \"2023-11-07T05:31:56Z\",\n \"summary\": \"<string>\",\n \"notes\": \"<string>\"\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://sitevisit.app/api/v1/site-visits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"property_id\": \"<string>\",\n \"title\": \"<string>\",\n \"visit_date\": \"2023-11-07T05:31:56Z\",\n \"summary\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sitevisit.app/api/v1/site-visits")
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 \"property_id\": \"<string>\",\n \"title\": \"<string>\",\n \"visit_date\": \"2023-11-07T05:31:56Z\",\n \"summary\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"propertyId": "<string>",
"propertyName": "<string>",
"title": "<string>",
"visitDate": "2023-11-07T05:31:56Z",
"recipients": [
"<string>"
],
"isTest": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"actionItemCount": 123,
"openActionItemCount": 123,
"publicReportUrl": "<string>",
"summary": "<string>",
"notes": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "plan_limit_exceeded",
"message": "<string>",
"docs_url": "<string>",
"request_id": "<string>",
"upgrade_url": "https://sitevisit.app/settings#upgrade",
"current_plan": "free",
"used": 1,
"limit": 1
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}API Reference
Create a site visit
Create a site visit on a property the caller owns. Starts in DRAFT status. Returns 402 with upgrade URL if the plan visit limit is hit, 404 if the property doesn’t exist or isn’t owned.
POST
/
site-visits
Create a site visit
curl --request POST \
--url https://sitevisit.app/api/v1/site-visits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"property_id": "<string>",
"title": "<string>",
"visit_date": "2023-11-07T05:31:56Z",
"summary": "<string>",
"notes": "<string>"
}
'import requests
url = "https://sitevisit.app/api/v1/site-visits"
payload = {
"property_id": "<string>",
"title": "<string>",
"visit_date": "2023-11-07T05:31:56Z",
"summary": "<string>",
"notes": "<string>"
}
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({
property_id: '<string>',
title: '<string>',
visit_date: '2023-11-07T05:31:56Z',
summary: '<string>',
notes: '<string>'
})
};
fetch('https://sitevisit.app/api/v1/site-visits', 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://sitevisit.app/api/v1/site-visits",
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([
'property_id' => '<string>',
'title' => '<string>',
'visit_date' => '2023-11-07T05:31:56Z',
'summary' => '<string>',
'notes' => '<string>'
]),
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://sitevisit.app/api/v1/site-visits"
payload := strings.NewReader("{\n \"property_id\": \"<string>\",\n \"title\": \"<string>\",\n \"visit_date\": \"2023-11-07T05:31:56Z\",\n \"summary\": \"<string>\",\n \"notes\": \"<string>\"\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://sitevisit.app/api/v1/site-visits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"property_id\": \"<string>\",\n \"title\": \"<string>\",\n \"visit_date\": \"2023-11-07T05:31:56Z\",\n \"summary\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sitevisit.app/api/v1/site-visits")
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 \"property_id\": \"<string>\",\n \"title\": \"<string>\",\n \"visit_date\": \"2023-11-07T05:31:56Z\",\n \"summary\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"propertyId": "<string>",
"propertyName": "<string>",
"title": "<string>",
"visitDate": "2023-11-07T05:31:56Z",
"recipients": [
"<string>"
],
"isTest": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"actionItemCount": 123,
"openActionItemCount": 123,
"publicReportUrl": "<string>",
"summary": "<string>",
"notes": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "plan_limit_exceeded",
"message": "<string>",
"docs_url": "<string>",
"request_id": "<string>",
"upgrade_url": "https://sitevisit.app/settings#upgrade",
"current_plan": "free",
"used": 1,
"limit": 1
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid, revoked, or doesn't exist.",
"docs_url": "<string>",
"request_id": "req_abc123"
}
}Authorizations
Bearer API key. Two modes: sv_live_* for production data, sv_test_* for a parallel sandbox dataset that doesn't count against plan limits. Issued from Settings → Developers in the SiteVisit app.
Headers
Optional idempotency key, scoped to the authenticated account. Repeating a write with the same key + same body returns the original response; same key + different body returns 422 idempotency_key_in_use.
Maximum string length:
255Body
application/json
Response
Resource created.
Available options:
DRAFT, PROCESSING, READY, SENT, DONE True for objects created via a sv_test_* API key. Mirrors the parent Property's mode.
Was this page helpful?
⌘I