Upload documents
curl --request POST \
--url https://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form document='@example-file'import requests
url = "https://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents"
files = { "document": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('document', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents', 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://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": 655,
"meta_data": {
"insurance_provider": "walaa",
"has_agreed_to_terms_and_conditions": true,
"start_date": "2025-12-11",
"property_cost": 500000,
"documents": [
"gOSkcUZnQQpV3YLvUygSrmkTh6L9g3gxKvFbIfwU.docx"
],
"personal_details": {
"name": "Fahad Al-Qahtani",
"email": "[email protected]",
"birthdate": "1990-05-14",
"nationality": "SA",
"phone_number": "+966501234567",
"nationality_id": "1023456789"
},
"building_details": {
"building_age": 8,
"building_type": "Apartment",
"apartment_size": 120
},
"address": {
"street_name": "King Abdulaziz Road",
"building_number": "345",
"district_name": "Al Olaya",
"city_name": "Riyadh",
"additional_number": "1234",
"zip_code": "12233",
"unit_number": "12B"
}
},
"provider_policy_id": null,
"provider_policy": null,
"client_id": "9f7db0ed-0783-4654-9b18-47c316809204",
"created_at": "2025-07-28T09:54:03.000000Z",
"canceled_at": null,
"status": 0
}{
"code": "42201",
"message": "The document field cannot be empty.",
"details": {
"document": [
"The document field cannot be empty."
]
}
}Upload documents
Upload supporting documents for the related property or contents
POST
/
policies
/
{propertyPolicy}
/
documents
Upload documents
curl --request POST \
--url https://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form document='@example-file'import requests
url = "https://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents"
files = { "document": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('document', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents', 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://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: multipart/form-data"
],
]);
$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://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents")
.header("Authorization", "Bearer <token>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.yasmina.ai/api/v1/property/policies/{propertyPolicy}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": 655,
"meta_data": {
"insurance_provider": "walaa",
"has_agreed_to_terms_and_conditions": true,
"start_date": "2025-12-11",
"property_cost": 500000,
"documents": [
"gOSkcUZnQQpV3YLvUygSrmkTh6L9g3gxKvFbIfwU.docx"
],
"personal_details": {
"name": "Fahad Al-Qahtani",
"email": "[email protected]",
"birthdate": "1990-05-14",
"nationality": "SA",
"phone_number": "+966501234567",
"nationality_id": "1023456789"
},
"building_details": {
"building_age": 8,
"building_type": "Apartment",
"apartment_size": 120
},
"address": {
"street_name": "King Abdulaziz Road",
"building_number": "345",
"district_name": "Al Olaya",
"city_name": "Riyadh",
"additional_number": "1234",
"zip_code": "12233",
"unit_number": "12B"
}
},
"provider_policy_id": null,
"provider_policy": null,
"client_id": "9f7db0ed-0783-4654-9b18-47c316809204",
"created_at": "2025-07-28T09:54:03.000000Z",
"canceled_at": null,
"status": 0
}{
"code": "42201",
"message": "The document field cannot be empty.",
"details": {
"document": [
"The document field cannot be empty."
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
multipart/form-data
Supporting document
Response
Successfully uploaded
Example:
655
Hide child attributes
Hide child attributes
Example:
"walaa"
Example:
true
Example:
"2025-12-11"
Example:
500000
Hide child attributes
Hide child attributes
Example:
"Fahad Al-Qahtani"
Example:
Example:
"1990-05-14"
Example:
"SA"
Example:
"+966501234567"
Example:
"1023456789"
Hide child attributes
Hide child attributes
Example:
"King Abdulaziz Road"
Example:
"345"
Example:
"Al Olaya"
Example:
"Riyadh"
Example:
"1234"
Example:
"12233"
Example:
"12B"
Example:
null
Example:
null
Example:
"9f7db0ed-0783-4654-9b18-47c316809204"
Example:
"2025-07-28T09:54:03.000000Z"
Example:
null
Example:
0
⌘I

