SDK reference
Photos
GET/
The library: its settings, storage (shared with Drive's personal space) and counts. Made on first use.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/library' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PATCH/
Opt-in features (faces, objects and text, memories: nothing runs while off), whether new links keep locations, and whether Vehicles may suggest photos for the person's own cars' drives (vehicles, on until turned off; vehiclesNoticed closes the note that it's on).
curl -X PATCH 'https://api.cactive.com.au/v1/me/photos/settings' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"ai": {
"faces": true,
"objects": true,
"memories": true
},
"keepLocation": true,
"vehicles": true
}'GET/
Photos per local day on the timeline (newest first), for the scrubber and the grid's layout.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/days' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Timeline photos taken between from and to (ms), newest first.
curl 'https://api.cactive.com.au/v1/me/photos/timeline' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Favourites, the archive or the trash, newest first.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/lists/{list}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Deletes everything in the trash for good (the files from Drive too).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/trash/empty' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Several photos by id (the map's pins, a selection), in the order asked.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/photos/batch' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"photoIds": [
"example"
]
}'POST/
Favourite, unfavourite, archive, unarchive, move to the trash, restore or delete forever (trashed photos only).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/photos/state' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"photoIds": [
"example"
],
"action": "favourite"
}'GET/
A photo's details: when (and from where that's known) and where it was taken, camera, size, description, albums, and one-hour links to show it (and a Live Photo's video). Logged as opened.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/photos/{photoId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PATCH/
Description, capture time (takenAt, ms; null goes back to the file's) and location (null removes it; "file" goes back to the file's).
curl -X PATCH 'https://api.cactive.com.au/v1/me/photos/photos/{photoId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"description": "example",
"favourite": true,
"takenAt": 1
}'GET/
A one-hour link to the original (inline=1 to show it; motion=1 for a Live Photo's video). transcode=1 with inline=1, for a video the browser can't play: its preview transcode, pending while it's made, or the original with unplayable.
curl 'https://api.cactive.com.au/v1/me/photos/photos/{photoId}/original' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PUT/
A video's poster frame, made in the browser (JPEG or WebP, base64, up to 1 MB).
Parameters and answerscurl -X PUT 'https://api.cactive.com.au/v1/me/photos/photos/{photoId}/poster' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"image": "example"
}'GET/
Search by when (from/to, ms), where (a box: south,west,north,east; or near=lat,lon with km), words in names and descriptions, type and favourites.
curl 'https://api.cactive.com.au/v1/me/photos/search' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Every located photo as a point (id, latitude, longitude, time), for the map.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/map' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Your albums, most recently changed first, with covers and how many links show each.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/albums' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Creates an album, optionally with photos.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/albums' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"title": "Example"
}'GET/
An album and a page of its photos, in its sort order.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"PATCH/
Renames an album, changes its description, cover (a photo in it; null for the first) or order, and whether members of a shared album see where your own photos in it were taken (keepLocation).
curl -X PATCH 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"title": "Example",
"description": "example",
"coverId": "<coverId>"
}'DELETE/
Deletes the album (its photos stay in the library) and turns off its links.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Adds photos to an album (up to 20,000 in one album). Ones already there stay.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}/photos' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"photoIds": [
"example"
]
}'POST/
Takes photos out of an album; they stay in the library.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}/photos/remove' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"photoIds": [
"example"
]
}'GET/
Who an album is shared with (the sharing service's view), whom its owner can choose (their organisations, groups and circles), and its location setting.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}/sharing' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Shares it with one of the owner's organisations, a group or circle they're in, or a person by address (who accepts first): Viewer or Contributor.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}/sharing' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"to": {},
"preset": "viewer"
}'PATCH/
Makes someone you shared an album with a Viewer or a Contributor (rev from the album's sharing). A viewer keeps the photos they added.
curl -X PATCH 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}/sharing/{principal}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"preset": "viewer",
"rev": 1
}'DELETE/
Ends a share (or withdraws an invitation, by its gin_ id) at once; whoever no longer sees the album has their photos taken out.
curl -X DELETE 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}/sharing/{principal}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Partner sharing: whom the library is shared with, its settings, and partners' libraries shared with the person.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/partner' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Offers the library to one person by address (they accept first); refused while a partner, an offer or an invitation exists.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/partner' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"email": "person@example.com"
}'PATCH/
From when the partner sees photos (null: all) and whether they see where they were taken.
Parameters and answerscurl -X PATCH 'https://api.cactive.com.au/v1/me/photos/partner' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"since": 1,
"keepLocation": true
}'DELETE/
Ends partner sharing at once (the partner, an offer or an invitation).
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/me/photos/partner' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
A page of a partner's library, newest first (5-minute links, no metadata; locations only if the owner shows them).
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/partners/{userId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
One of a partner's photos: its preview or video, and the original with download=1 (cleaned unless locations show).
curl 'https://api.cactive.com.au/v1/me/photos/partners/{userId}/photos/{photoId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
The partner stops seeing the library.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/partners/{userId}/leave' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Links anyone can open: albums and chosen photos.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/links' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
A link to an album or to chosen photos: view only, locations removed unless keepLocation, optional expiry and password.
curl -X POST 'https://api.cactive.com.au/v1/me/photos/links' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"albumId": "<albumId>",
"photoIds": [
"example"
],
"title": "Example"
}'PATCH/
Changes a link: password null removes it; rotate makes a new address (the old one stops working).
curl -X PATCH 'https://api.cactive.com.au/v1/me/photos/links/{linkId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"title": "Example",
"keepLocation": true,
"download": true
}'DELETE/
Turns a link off: it stops working at once.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/me/photos/links/{linkId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Which of these SHA-256 hashes are already in the library (skip uploading them).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/uploads/check' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"hashes": [
"example"
]
}'POST/
Starts an upload into the library: answers Drive's part links (PUT each part, then complete), or duplicate with the photo when sha256 is already there. singlePart (iPhone Shortcuts) sends the whole file to one link; its size may then be left out.
curl -X POST 'https://api.cactive.com.au/v1/me/photos/uploads' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example"
}'POST/
Links for more parts of an upload (an hour each).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/uploads/{uploadId}/parts' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"partNumbers": [
1
]
}'GET/
The parts already stored (resuming).
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/uploads/{uploadId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Finishes an upload: the photo (details and previews follow in the background), or the one it duplicates.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/uploads/{uploadId}/complete' \
-H "Authorization: Bearer $CACTIVE_TOKEN"DELETE/
Abandons an upload and the parts it stored.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/me/photos/uploads/{uploadId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"curl 'https://api.cactive.com.au/v1/me/photos/imports' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
A Takeout import: archives to upload (files: name and size of each.zip or.tgz; answers an upload per file) or archives already in Drive (driveItemIds, personal files). Start it once they're uploaded.
curl -X POST 'https://api.cactive.com.au/v1/me/photos/imports' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"files": [
{
"name": "Example",
"size": 1
}
],
"driveItemIds": [
"example"
]
}'GET/
An import with the parts each of its uploads has stored (resuming).
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/imports/{importId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Links for the parts of one archive's upload (index: its place in files).
curl -X POST 'https://api.cactive.com.au/v1/me/photos/imports/{importId}/files/{index}/parts' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"partNumbers": [
1
]
}'POST/
Completes the archives' uploads and starts importing (in the background; re-imports skip what's there).
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/imports/{importId}/start' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Stops an import; what it imported stays.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/imports/{importId}/cancel' \
-H "Authorization: Bearer $CACTIVE_TOKEN"DELETE/
Removes a finished, failed or canceled import (and its uploaded archives). Imported photos stay.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/me/photos/imports/{importId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Personal tokens for uploading (iPhone Shortcut, Mac sync) and reading (MCP).
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/tokens' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Makes a token; its secret is in the answer only.
Parameters and answerscurl -X POST 'https://api.cactive.com.au/v1/me/photos/tokens' \
-H "Authorization: Bearer $CACTIVE_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"name": "Example",
"scopes": [
"photos:upload"
]
}'DELETE/
Removes a photo token: it stops working at once.
Parameters and answerscurl -X DELETE 'https://api.cactive.com.au/v1/me/photos/tokens/{tokenId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Full exports of the library: ZIPs of every original with an index of dates, places, albums and descriptions.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/exports' \
-H "Authorization: Bearer $CACTIVE_TOKEN"POST/
Starts a full export of the library (originals as ZIPs of up to 10,000 files and 10 GB, with photos.json and albums.json). Ask for it until it's ready.
curl -X POST 'https://api.cactive.com.au/v1/me/photos/exports' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
An export with each ZIP's status and its download link (a day) once ready.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/exports/{exportId}' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
The owner's personal log: every change and access (theirs, their tokens', link visitors').
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/log' \
-H "Authorization: Bearer $CACTIVE_TOKEN"GET/
Who can see what: links, tokens, and any of the library's files shared through Drive.
Parameters and answerscurl 'https://api.cactive.com.au/v1/me/photos/access' \
-H "Authorization: Bearer $CACTIVE_TOKEN"