SDK reference

Photos

Each route's function in the SDK, its call beside the same request in cURL.
mePhotosLibrary

GET/v1/me/photos/library

The library: its settings, storage (shared with Drive's personal space) and counts. Made on first use.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/library' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchMePhotosSettings

PATCH/v1/me/photos/settings

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).

Parameters and answers
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
  }'
mePhotosDays

GET/v1/me/photos/days

Photos per local day on the timeline (newest first), for the scrubber and the grid's layout.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/days' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosTimeline

GET/v1/me/photos/timeline

Timeline photos taken between from and to (ms), newest first.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/timeline' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosListsByList

GET/v1/me/photos/lists/:list

Favourites, the archive or the trash, newest first.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/lists/{list}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosTrashEmpty

POST/v1/me/photos/trash/empty

Deletes everything in the trash for good (the files from Drive too).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/photos/trash/empty' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosPhotosBatch

POST/v1/me/photos/photos/batch

Several photos by id (the map's pins, a selection), in the order asked.

Parameters and answers
curl -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"
    ]
  }'
postMePhotosPhotosState

POST/v1/me/photos/photos/state

Favourite, unfavourite, archive, unarchive, move to the trash, restore or delete forever (trashed photos only).

Parameters and answers
curl -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"
  }'
mePhotosPhotosByPhotoId

GET/v1/me/photos/photos/:photoId

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 answers
curl 'https://api.cactive.com.au/v1/me/photos/photos/{photoId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchMePhotosPhotosByPhotoId

PATCH/v1/me/photos/photos/:photoId

Description, capture time (takenAt, ms; null goes back to the file's) and location (null removes it; "file" goes back to the file's).

Parameters and answers
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
  }'
mePhotosPhotosOriginal

GET/v1/me/photos/photos/:photoId/original

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.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/photos/{photoId}/original' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putMePhotosPhotosPoster

PUT/v1/me/photos/photos/:photoId/poster

A video's poster frame, made in the browser (JPEG or WebP, base64, up to 1 MB).

Parameters and answers
curl -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"
  }'
mePhotosMap

GET/v1/me/photos/map

Every located photo as a point (id, latitude, longitude, time), for the map.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/map' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosAlbums

GET/v1/me/photos/albums

Your albums, most recently changed first, with covers and how many links show each.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/albums' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosAlbums

POST/v1/me/photos/albums

Creates an album, optionally with photos.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/photos/albums' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Example"
  }'
mePhotosAlbumsByAlbumId

GET/v1/me/photos/albums/:albumId

An album and a page of its photos, in its sort order.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchMePhotosAlbumsByAlbumId

PATCH/v1/me/photos/albums/:albumId

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).

Parameters and answers
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>"
  }'
deleteMePhotosAlbumsByAlbumId

DELETE/v1/me/photos/albums/:albumId

Deletes the album (its photos stay in the library) and turns off its links.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosAlbumsPhotos

POST/v1/me/photos/albums/:albumId/photos

Adds photos to an album (up to 20,000 in one album). Ones already there stay.

Parameters and answers
curl -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"
    ]
  }'
postMePhotosAlbumsPhotosRemove

POST/v1/me/photos/albums/:albumId/photos/remove

Takes photos out of an album; they stay in the library.

Parameters and answers
curl -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"
    ]
  }'
mePhotosAlbumsSharing

GET/v1/me/photos/albums/:albumId/sharing

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 answers
curl 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}/sharing' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosAlbumsSharing

POST/v1/me/photos/albums/:albumId/sharing

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 answers
curl -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"
  }'
patchMePhotosAlbumsSharingByPrincipal

PATCH/v1/me/photos/albums/:albumId/sharing/:principal

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.

Parameters and answers
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
  }'
deleteMePhotosAlbumsSharingByPrincipal

DELETE/v1/me/photos/albums/:albumId/sharing/:principal

Ends a share (or withdraws an invitation, by its gin_ id) at once; whoever no longer sees the album has their photos taken out.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/photos/albums/{albumId}/sharing/{principal}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosShared

GET/v1/me/photos/shared

Albums shared with the person (through them, their groups, circles or organisations), and offers waiting for them.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/shared' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosSharedByAlbumId

GET/v1/me/photos/shared/:albumId

A shared album and a page of everyone's photos as the person may see them (locations only where their owners share them).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/shared/{albumId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosSharedPhotosByPhotoId

GET/v1/me/photos/shared/:albumId/photos/:photoId

One photo: its preview or video (5-minute links), and the original with download=1 (cleaned unless its location is shared).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/shared/{albumId}/photos/{photoId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosSharedPhotos

POST/v1/me/photos/shared/:albumId/photos

A contributor adds photos from their own library (they stay theirs); keepLocation shares where they were taken.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/photos/shared/{albumId}/photos' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "photoIds": [
      "example"
    ]
  }'
postMePhotosSharedPhotosRemove

POST/v1/me/photos/shared/:albumId/photos/remove

Takes the person's own photos out (the owner: anyone's); mine takes out every one of theirs.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/photos/shared/{albumId}/photos/remove' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchMePhotosSharedPhotosByPhotoId

PATCH/v1/me/photos/shared/:albumId/photos/:photoId

The photo's owner shows or hides where it was taken.

Parameters and answers
curl -X PATCH 'https://api.cactive.com.au/v1/me/photos/shared/{albumId}/photos/{photoId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "keepLocation": true
  }'
postMePhotosSharedLeave

POST/v1/me/photos/shared/:albumId/leave

Takes all the person's photos and comments out and gives back a share made to them.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/photos/shared/{albumId}/leave' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosSharedPhotosComments

GET/v1/me/photos/shared/:albumId/photos/:photoId/comments

A photo's comments, oldest first, by people who still see the album.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/shared/{albumId}/photos/{photoId}/comments' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosSharedPhotosComments

POST/v1/me/photos/shared/:albumId/photos/:photoId/comments

Comments on a photo; <@usr_…> mentions people who see the album (at most 10), who hear by push, as does the photo's owner.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/photos/shared/{albumId}/photos/{photoId}/comments' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "text": "example"
  }'
deleteMePhotosSharedPhotosCommentsByCommentId

DELETE/v1/me/photos/shared/:albumId/photos/:photoId/comments/:commentId

Deletes a comment: its author's, or any for the album's owner.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/photos/shared/{albumId}/photos/{photoId}/comments/{commentId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosSharedPeople

GET/v1/me/photos/shared/:albumId/people

Whom a comment in the album can mention: people who still see it.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/shared/{albumId}/people' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosPartner

GET/v1/me/photos/partner

Partner sharing: whom the library is shared with, its settings, and partners' libraries shared with the person.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/partner' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosPartner

POST/v1/me/photos/partner

Offers the library to one person by address (they accept first); refused while a partner, an offer or an invitation exists.

Parameters and answers
curl -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"
  }'
patchMePhotosPartner

PATCH/v1/me/photos/partner

From when the partner sees photos (null: all) and whether they see where they were taken.

Parameters and answers
curl -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
  }'
deleteMePhotosPartner

DELETE/v1/me/photos/partner

Ends partner sharing at once (the partner, an offer or an invitation).

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/photos/partner' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosPartnersByUserId

GET/v1/me/photos/partners/:userId

A page of a partner's library, newest first (5-minute links, no metadata; locations only if the owner shows them).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/partners/{userId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosPartnersPhotosByPhotoId

GET/v1/me/photos/partners/:userId/photos/:photoId

One of a partner's photos: its preview or video, and the original with download=1 (cleaned unless locations show).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/partners/{userId}/photos/{photoId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosPartnersLeave

POST/v1/me/photos/partners/:userId/leave

The partner stops seeing the library.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/photos/partners/{userId}/leave' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosLinks

POST/v1/me/photos/links

A link to an album or to chosen photos: view only, locations removed unless keepLocation, optional expiry and password.

Parameters and answers
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"
  }'
postMePhotosUploadsCheck

POST/v1/me/photos/uploads/check

Which of these SHA-256 hashes are already in the library (skip uploading them).

Parameters and answers
curl -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"
    ]
  }'
postMePhotosUploads

POST/v1/me/photos/uploads

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.

Parameters and answers
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"
  }'
postMePhotosUploadsParts

POST/v1/me/photos/uploads/:uploadId/parts

Links for more parts of an upload (an hour each).

Parameters and answers
curl -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
    ]
  }'
mePhotosUploadsByUploadId

GET/v1/me/photos/uploads/:uploadId

The parts already stored (resuming).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/uploads/{uploadId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosUploadsComplete

POST/v1/me/photos/uploads/:uploadId/complete

Finishes an upload: the photo (details and previews follow in the background), or the one it duplicates.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/photos/uploads/{uploadId}/complete' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
deleteMePhotosUploadsByUploadId

DELETE/v1/me/photos/uploads/:uploadId

Abandons an upload and the parts it stored.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/photos/uploads/{uploadId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosImports

GET/v1/me/photos/imports

Google Takeout imports, newest first.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/imports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosImports

POST/v1/me/photos/imports

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.

Parameters and answers
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"
    ]
  }'
mePhotosImportsByImportId

GET/v1/me/photos/imports/:importId

An import with the parts each of its uploads has stored (resuming).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/imports/{importId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosImportsFilesParts

POST/v1/me/photos/imports/:importId/files/:index/parts

Links for the parts of one archive's upload (index: its place in files).

Parameters and answers
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
    ]
  }'
postMePhotosImportsStart

POST/v1/me/photos/imports/:importId/start

Completes the archives' uploads and starts importing (in the background; re-imports skip what's there).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/photos/imports/{importId}/start' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosImportsCancel

POST/v1/me/photos/imports/:importId/cancel

Stops an import; what it imported stays.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/photos/imports/{importId}/cancel' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
deleteMePhotosImportsByImportId

DELETE/v1/me/photos/imports/:importId

Removes a finished, failed or canceled import (and its uploaded archives). Imported photos stay.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/photos/imports/{importId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosTokens

GET/v1/me/photos/tokens

Personal tokens for uploading (iPhone Shortcut, Mac sync) and reading (MCP).

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/tokens' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosTokens

POST/v1/me/photos/tokens

Makes a token; its secret is in the answer only.

Parameters and answers
curl -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"
    ]
  }'
deleteMePhotosTokensByTokenId

DELETE/v1/me/photos/tokens/:tokenId

Removes a photo token: it stops working at once.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/me/photos/tokens/{tokenId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosExports

GET/v1/me/photos/exports

Full exports of the library: ZIPs of every original with an index of dates, places, albums and descriptions.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/exports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postMePhotosExports

POST/v1/me/photos/exports

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.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/me/photos/exports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosExportsByExportId

GET/v1/me/photos/exports/:exportId

An export with each ZIP's status and its download link (a day) once ready.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/exports/{exportId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosLog

GET/v1/me/photos/log

The owner's personal log: every change and access (theirs, their tokens', link visitors').

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/log' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
mePhotosAccess

GET/v1/me/photos/access

Who can see what: links, tokens, and any of the library's files shared through Drive.

Parameters and answers
curl 'https://api.cactive.com.au/v1/me/photos/access' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"