curl --request POST \
--url https://api.meetcampfire.com/ca/api/file/uploadimport requests
url = "https://api.meetcampfire.com/ca/api/file/upload"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.meetcampfire.com/ca/api/file/upload', 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://api.meetcampfire.com/ca/api/file/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.meetcampfire.com/ca/api/file/upload"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.meetcampfire.com/ca/api/file/upload")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/ca/api/file/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyUpload File
Upload a file directly to Campfire. This is the primary way to upload files.
Supported Models: bill, chat, close_task, closecheckitem, contract, credit_memo, customer, debit_memo, draft_queue, fixed_asset, intercompany_journal, invoice, journal_entry, journalentry, lease_v2, migration_record, policy, reconciliation, reconciliation_report, revenue_contract
Supported Content Types: application/msword, application/pdf, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.openxmlformats-officedocument.wordprocessingml.document, image/gif, image/jpeg, image/jpg, image/png, image/webp, text/csv, text/markdown, text/plain, text/x-markdown
Maximum File Size: 100MB
Example:
curl -X POST "https://api.meetcampfire.com/ca/api/file/upload?model=bill&object_id=12345" \
-H "Authorization: Token YOUR_TOKEN" \
-F "file=@receipt.pdf"
Query Parameters:
model(required): Model type (e.g., “bill”, “invoice”, “contract”)object_id(optional): ID of the object to attach the file to
Request Body:
file(required): The file to upload (multipart/form-data)
curl --request POST \
--url https://api.meetcampfire.com/ca/api/file/uploadimport requests
url = "https://api.meetcampfire.com/ca/api/file/upload"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.meetcampfire.com/ca/api/file/upload', 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://api.meetcampfire.com/ca/api/file/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.meetcampfire.com/ca/api/file/upload"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.meetcampfire.com/ca/api/file/upload")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetcampfire.com/ca/api/file/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyResponse
No response body