# Generated by tools/gen_openapi.py from src/SpaceAccount (routes, records, ApiError throws) and chapter 9; do not edit. openapi: "3.0.3" info: title: "Space Backup account service" version: "code-a1a1888be6c1" description: "Generated from the code by tools/gen_openapi.py (do not edit). Every path is from https://spacebackup.net/account. Answers are JSON with camelCase names; a field marked nullable is sent as null, a field not in required is left out when it has no value. Errors of /api/... are {\"error\": \"...\"}. The prose reference is chapter 9 of the manual: https://spacebackup.net/manual/api-account/" contact: email: "support@spacebackup.net" servers: - url: "https://spacebackup.net/account" externalDocs: url: "https://spacebackup.net/manual/api-account/" tags: - name: "Album tickets" - name: "Albums" - name: "Assistant" - name: "Company key" - name: "Company-key recovery" - name: "Data keys" - name: "Devices" - name: "Groups" - name: "Guests" - name: "Health" - name: "Members & people" - name: "Notifications" - name: "Peer tickets" - name: "Session & company" - name: "Shares" - name: "Sign-in" - name: "Space Relay billing" - name: "Waiting for the company key" - name: "Web pages" - name: "faces" - name: "geo" - name: "links" - name: "matchkey" - name: "tv" - name: "tv-tickets" - name: "tvs" - name: "usage" - name: "work" paths: "/api/album-tickets/check": post: operationId: "postAlbumTicketsCheck" tags: - "Album tickets" summary: "A PC asks what an album ticket allows now." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-album-tickets-check" x-auth: "registered device of the album's company (the PC)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumTicketCheck" example: ticket: "at_…" responses: "200": description: "| `access` | Meaning | |---|---| | `owner` | the album's owner | | `member` | a member, read-only | | `member-add` | a member who may add" content: "application/json": schema: $ref: "#/components/schemas/AlbumTicketCheckView" example: requesterDevice: "d_7pz4wn5cq2am3k9x" requesterName: "Bobs-iPhone" requesterEmail: "bob@acme.com" album: "al_x7k2mq9pa4zw3n5c" albumName: "Las Vegas" ownerEmail: "anna@acme.com" access: "member-add" destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "e3b0c442" label: "Backup disk" expires: "2026-10-18T10:15:00.000+00:00" deleted: false memberDevices: - "Bobs-iPhone" - "BOB-PC" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - " must be a string" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such album for that ticket (expired, the album deleted or no longer shared) (also when the requester device or its member was removed); for a link ticket no such link for that ticket (revoked or expired)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such link for that ticket (revoked or expired)" x-error-messages: - "no such link for that ticket (revoked or expired)" "/api/album-tickets/relay": post: operationId: "postAlbumTicketsRelay" tags: - "Album tickets" summary: "A source PC exchanges a good ticket for a relay ticket bound to itself, valid 30 days, to finish transfer jobs to album drives that are offline. Renew it by sending the relay ticket itself." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-album-tickets-relay" x-auth: "registered device (the source PC)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumTicketCheck" example: ticket: "at_…" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/AlbumTicketView" example: ticket: "ar_M2c…" album: "al_…" name: "Las Vegas" access: "relay" expires: "…" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - " must be a string" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such album for that ticket (expired, the album deleted, or not the owner's) (also a guest's ticket, a plain member ticket, or another PC's relay ticket)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "Not Found" "/api/albums": post: operationId: "postAlbums" tags: - "Albums" summary: "POST /api/albums" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums" x-auth: "active member (the caller becomes the owner)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumCreate" example: name: "Las Vegas" destinations: - device: "d_4f2a7cqm3xk9wz2b" dest: "e3b0c442" label: "Backup disk" responses: "200": description: "For a device's existing public album" content: "application/json": schema: $ref: "#/components/schemas/AlbumView" example: id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: "Anna Smith" membersCanAdd: true faces: true cover: "…" filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: "…" archived: "2026-10-18T09:12:00.123+00:00" mergedFrom: - "…" deletedAt: "2026-10-18T09:12:00.123+00:00" deletedBy: "…" deletedByName: "ANNA-PC" purgeAt: "2026-10-18T09:12:00.123+00:00" x-example: "generated" "201": description: "Album" content: "application/json": schema: $ref: "#/components/schemas/AlbumView" example: id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: "Anna Smith" membersCanAdd: true faces: true cover: "…" filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: "…" archived: "2026-10-18T09:12:00.123+00:00" mergedFrom: - "…" deletedAt: "2026-10-18T09:12:00.123+00:00" deletedBy: "…" deletedByName: "ANNA-PC" purgeAt: "2026-10-18T09:12:00.123+00:00" x-example: "generated" "400": description: "name is required, name is too long, at most 8 destinations per album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - "at most 8 destinations per album" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such device" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" get: operationId: "getAlbums" tags: - "Albums" summary: "Lists the caller's albums: their own, and the albums shared with them (shared with me)." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-albums" x-auth: "active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`[Album]`: the caller's own albums first, then those shared with them, by name" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/AlbumView" example: {} x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "/api/albums/auto": post: operationId: "postAlbumsAuto" tags: - "Albums" summary: "A PC asks which albums to fill from one device's backups, after a vision pass over that device's new items." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-auto" x-auth: "registered device of the company (the PC holding the backups)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumAutoRequest" example: machine: "Vlads-iPhone" responses: "200": description: "Only active filters naming the machine, and only when it is one of the album owner's own devices. `added` and `removed` are the album's record: items its filter added, and items taken out of the album since (by the owner, or a PC reporting the remove with POST albums/{id} `removed`)" content: "application/json": schema: $ref: "#/components/schemas/AlbumAutoList" example: machine: "Vlads-iPhone" albums: - album: "al_x7k2mq9pa4zw3n5c" name: "Night Chicago Views" ownerEmail: "vlad@acme.com" filter: words: "…" content: "view" night: true place: name: "Chicago" lat: 41.88 lon: -87.63 radiusKm: 18.5 kind: "all" timeFrom: null timeTo: null machines: - "Vlads-iPhone" since: "2026-10-22T15:05:00+00:00" active: true destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "VLAD-PC" dest: "e3b0c442" label: null added: - "A1B2C3" removed: - "D4E5F6" lastChecked: "2026-10-22T03:10:00+00:00" ticket: "at_…" expires: "2026-10-22T16:05:00+00:00" "400": description: "machine is required" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - " must be a string" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "/api/albums/deleted": get: operationId: "getAlbumsDeleted" tags: - "Albums" summary: "Recently deleted: the caller's own albums deleted in the last 30 days, and those they deleted as an admin, newest first." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-albums-deleted" x-auth: "an active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "OK" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/AlbumView" example: {} x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "/api/albums/invitations": get: operationId: "getAlbumsInvitations" tags: - "Albums" summary: "The caller's open invitations: pending first, then declined, each newest first." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-albums-invitations" x-auth: "signed in (in a company or not)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`state`: `pending` or `declined`. `fromName`, `company` and `decided` (when declined) are *optional*. `sameCompany` (*optional*, `true`): from the caller's own company (they turned off `autoAcceptCompany`)" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/InvitationView" example: - id: "inv_c4n7zq2m9xa3kw5p" album: "al_x7k2mq9pa4zw3n5c" albumName: "Las Vegas" fromEmail: "anna@acme.com" created: "2026-10-17T10:00:00.000+00:00" state: "pending" fromName: "Anna Smith" company: "Acme" - id: "inv_p2w8kx4m7qa9zc3n" album: "al_m4q8zx2c7pa9kw3n" albumName: "Team lunch" fromEmail: "zoe@acme.com" created: "2026-10-30T12:00:00.000+00:00" state: "declined" company: "Acme" sameCompany: true decided: "2026-10-30T12:05:00.000+00:00" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "/api/albums/invitations/{id}/accept": post: operationId: "postAlbumsInvitationsIdAccept" tags: - "Albums" summary: "POST /api/albums/invitations/{id}/accept" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-invitations-id-accept" x-auth: "signed in, with the invited email." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: false content: "application/json": schema: $ref: "#/components/schemas/InvitationAnswer" example: trustSender: true responses: "204": description: "No Content" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " must be a string" x-error-messages: - " must be a string" - " is too long" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "404": description: "no such invitation (accepted already, withdrawn, or the album was deleted) (also another person's)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such invitation (accepted already, withdrawn, or the album was deleted)" x-error-messages: - "no such invitation (accepted already, withdrawn, or the album was deleted)" "/api/albums/invitations/{id}/decline": post: operationId: "postAlbumsInvitationsIdDecline" tags: - "Albums" summary: "POST /api/albums/invitations/{id}/decline" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-invitations-id-decline" x-auth: "signed in, with the invited email." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "The invitation is `declined`, still listed for the caller (who may accept it later) and in the album's `invited` for the owner" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " must be a string" x-error-messages: - " must be a string" - " is too long" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "404": description: "no such invitation (accepted already, withdrawn, or the album was deleted) (also another person's)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such invitation (accepted already, withdrawn, or the album was deleted)" x-error-messages: - "no such invitation (accepted already, withdrawn, or the album was deleted)" "/api/albums/merge": post: operationId: "postAlbumsMerge" tags: - "Albums" summary: "Merges two of the caller's albums (Vladimir, 2026-11-08; docs/albums.md \"Merging two albums\"): a new album of the caller's, unshared, with the first album's cover and faces setting, the first album's " description: "Merges two of the caller's albums (Vladimir, 2026-11-08; docs/albums.md \"Merging two albums\"): a new album of the caller's, unshared, with the first album's cover and faces setting, the first album's drives then the second's (at most 8) and `mergedFrom` [first, second]; both albums are archived. One transaction. The service holds no items: the app then sends the peer request `album.merge` to a PC holding both albums, which copies every item of the first and the second into the new album, duplicates once. Undo: unarchive both, then delete the new one. The caller's devices get `changed: [\"albums\", \"album:\", \"album:\"]`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-merge" x-auth: "an active member, the owner of both albums." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumMergeRequest" example: albums: - "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" destinations: - device: null dest: null label: null x-example: "generated" responses: "201": description: "The new Album, then the two merged ones as they are now" content: "application/json": schema: $ref: "#/components/schemas/AlbumMergeView" example: album: id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: null membersCanAdd: true faces: true cover: null filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: null archived: null mergedFrom: null deletedAt: null deletedBy: null deletedByName: null purgeAt: null archived: - id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: null membersCanAdd: true faces: true cover: null filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: null archived: null mergedFrom: null deletedAt: null deletedBy: null deletedByName: null purgeAt: null x-example: "generated" "400": description: "merge two different albums, the Shared publicly album cannot be merged, name …, at most 8 destinations per album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "merge two different albums" x-error-messages: - "merge two different albums" - "the album cannot be merged" - " is required" - " is too long" - " must not contain control characters" - "at most 8 destinations per album" - " must be a string" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only albums you own can be merged" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only albums you own can be merged" x-error-messages: - "only albums you own can be merged" - "not an active member of a company" "404": description: "no such album, no such device" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" - "no such device" "/api/albums/{id}": get: operationId: "getAlbumsId" tags: - "Albums" summary: "GET /api/albums/{id}" externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-albums-id" x-auth: "active member who may see it." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "Album" content: "application/json": schema: $ref: "#/components/schemas/AlbumView" example: id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: "Anna Smith" membersCanAdd: true faces: true cover: "…" filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: "…" archived: "2026-10-18T09:12:00.123+00:00" mergedFrom: - "…" deletedAt: "2026-10-18T09:12:00.123+00:00" deletedBy: "…" deletedByName: "ANNA-PC" purgeAt: "2026-10-18T09:12:00.123+00:00" x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "404": description: "no such album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" post: operationId: "postAlbumsId" tags: - "Albums" summary: "Changes an album. Every field is optional; a field left out stays." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id" x-auth: "the album's owner. Exception: `{\"itemCount\", \"removed\"?}` alone is also accepted from a device that holds one" x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumUpdate" example: membersCanAdd: true cover: "2026-10-14/IMG_0412.HEIC" x-field-rules: name: "rename (1–100 characters)" itemCount: "the number of items now (0–10,000,000)" membersCanAdd: "the members may add their own photos and remove what they added. It sets everyone at once: each person's own setting (shares/can-add) is cleared, so all follow it" cover: "an item id of the album (up to 200 characters) as cover; `null` or `\"\"` clears it (the newest item)" faces: "recognise faces in the album's photos (on the company's PCs); may go with `name` and `membersCanAdd` in the same request" removed: "item ids just removed (with `itemCount`; at most 10,000): the cover among them is cleared, and their remove requests are done" responses: "200": description: "Album" content: "application/json": schema: $ref: "#/components/schemas/AlbumView" example: id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: "Anna Smith" membersCanAdd: true faces: true cover: "…" filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: "…" archived: "2026-10-18T09:12:00.123+00:00" mergedFrom: - "…" deletedAt: "2026-10-18T09:12:00.123+00:00" deletedBy: "…" deletedByName: "ANNA-PC" purgeAt: "2026-10-18T09:12:00.123+00:00" x-example: "generated" "400": description: "itemCount out of range, too many removed ids, cover too long, cover must be an item id or null, the Shared publicly album keeps its name" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "itemCount out of range" x-error-messages: - "itemCount out of range" - "too many removed ids" - "the album keeps its name" - " is required" - " is too long" - " must not contain control characters" - "cover too long" - "cover must be an item id or null" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the album's owner can change it (members and admins too)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "only the album's owner can change it" "404": description: "no such album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" "/api/albums/{id}/added": post: operationId: "postAlbumsIdAdded" tags: - "Albums" summary: "Tells the service that this device just added photos or videos to the album, so the others hear of it. Call it after a successful add." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-added" x-auth: "registered device of the owner, or of a member who may add (their `canAdd`)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumAddedRequest" example: count: 12 job: "job_3f9c2a71d04b8e65" responses: "204": description: "No Content" "400": description: "count is required, count must be 1 to 1000000, job is at most 64 characters" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "count is required" x-error-messages: - "count is required" - "count must be 1 to 1000000" - "job is at most 64 characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the album's owner can add to it (its owner has not let members add)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the album's owner can add to it (its owner has not let members add)" x-error-messages: - "only the album's owner can add to it (its owner has not let members add)" - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" "/api/albums/{id}/archive": post: operationId: "postAlbumsIdArchive" tags: - "Albums" summary: "Archives the album for its owner: it leaves the album list on all of the owner's devices and is listed under Albums › Archived (`archived` in the owner's Album and the sync's Album briefs). Everything" description: "Archives the album for its owner: it leaves the album list on all of the owner's devices and is listed under Albums › Archived (`archived` in the owner's Album and the sync's Album briefs). Everything else stays: its items, drives, members (to whom it is an ordinary album), tickets and links. The owner's devices get `changed: [\"albums\", \"album:\"]`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-archive" x-auth: "the album's owner." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/AlbumView" example: id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: "Anna Smith" membersCanAdd: true faces: true cover: "…" filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: "…" archived: "2026-10-18T09:12:00.123+00:00" mergedFrom: - "…" deletedAt: "2026-10-18T09:12:00.123+00:00" deletedBy: "…" deletedByName: "ANNA-PC" purgeAt: "2026-10-18T09:12:00.123+00:00" x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the album's owner can archive it" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the album's owner can archive it" x-error-messages: - "only the album's owner can archive it" - "not an active member of a company" "404": description: "no such album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" "/api/albums/{id}/auto-added": post: operationId: "postAlbumsIdAutoAdded" tags: - "Albums" summary: "The PC says what it added for the album's filter." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-auto-added" x-auth: "registered device of the company." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumAutoAdded" example: machine: "Vlads-iPhone" added: - "A1B2C3" - "A7B8C9" encrypted: 2 responses: "200": description: "(`already`: recorded before, by this or another PC)" content: "application/json": schema: $ref: "#/components/schemas/AlbumAutoAddedView" example: album: "al_…" added: 1 already: 1 encrypted: 2 "400": description: "machine is required, at most 10000 ids at a time" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "at most 10000 ids at a time" x-error-messages: - "at most 10000 ids at a time" - "encrypted out of range" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such album with an active filter for that machine" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album with an active filter for that machine" x-error-messages: - "no such album with an active filter for that machine" "/api/albums/{id}/delete": post: operationId: "postAlbumsIdDelete" tags: - "Albums" summary: "Deletes the album, kept 30 days in Recently deleted (GET /api/albums/deleted): it leaves every list (the owner's, its members' and guests', the sync's `albums`), its tickets and pending album-add push" description: "Deletes the album, kept 30 days in Recently deleted (GET /api/albums/deleted): it leaves every list (the owner's, its members' and guests', the sync's `albums`), its tickets and pending album-add pushes go, open remove requests are resolved, whole-album public links stop serving and open invitations are hidden. Its members and guests (with their own settings), invitations, name, cover, settings, filter, drives and links are kept for restore. After 30 days the service ends it for good (as purge). The PCs move their copies to their drives' deleted area (peer request `album.delete`, sent by the owner's device)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-delete" x-auth: "the album's owner or an owner/admin of the company." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "No Content" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the album's owner or an admin can delete it" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the album's owner or an admin can delete it" x-error-messages: - "only the album's owner or an admin can delete it" - "not an active member of a company" "404": description: "no such album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" "/api/albums/{id}/destinations": post: operationId: "postAlbumsIdDestinations" tags: - "Albums" summary: "Replaces the list of drives the album is kept on. The phone then asks a PC holding the album to copy it to the new drives." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-destinations" x-auth: "the album's owner." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumDestinationsRequest" example: destinations: - device: null dest: null label: null x-example: "generated" responses: "200": description: "Album" content: "application/json": schema: $ref: "#/components/schemas/AlbumView" example: id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: "Anna Smith" membersCanAdd: true faces: true cover: "…" filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: "…" archived: "2026-10-18T09:12:00.123+00:00" mergedFrom: - "…" deletedAt: "2026-10-18T09:12:00.123+00:00" deletedBy: "…" deletedByName: "ANNA-PC" purgeAt: "2026-10-18T09:12:00.123+00:00" x-example: "generated" "400": description: "at most 8 destinations per album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "at most 8 destinations per album" x-error-messages: - "at most 8 destinations per album" - " is required" - " is too long" - " must not contain control characters" - " must be a string" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not the owner" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the album's owner can change it" x-error-messages: - "only the album's owner can change it" - "not an active member of a company" "404": description: "no such album, no such device" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" - "no such device" "/api/albums/{id}/filter": post: operationId: "postAlbumsIdFilter" tags: - "Albums" summary: "Sets the album's standing filter, or stops it." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-filter" x-auth: "the album's owner, or an owner or admin of its company." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumFilterRequest" example: filter: null responses: "200": description: "The Album with its `filter`" content: "application/json": schema: $ref: "#/components/schemas/AlbumView" example: id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: "Anna Smith" membersCanAdd: true faces: true cover: "…" filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: "…" archived: "2026-10-18T09:12:00.123+00:00" mergedFrom: - "…" deletedAt: "2026-10-18T09:12:00.123+00:00" deletedBy: "…" deletedByName: "ANNA-PC" purgeAt: "2026-10-18T09:12:00.123+00:00" x-example: "generated" "400": description: "filter is required (null stops it), filter.kind must be all, photos or videos, filter.timeFrom and filter.timeTo go together, filter.night and filter.day exclude each other, filter.timeFrom and timeTo are minutes after midnight (0-1440), filter.place needs lat (-90 to 90) and lon (-180 to 180), filter.place.radiusKm must be above 0 (at most 20000), filter.machines must name the devices whose new items are judged, filter.machines: at most 20, filter.words is too long (at most 500)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "filter is required (null stops it)" x-error-messages: - "filter is required (null stops it)" - "filter must be an object or null" - "filter: " - "filter. is too long (at most )" - "filter.kind must be all, photos or videos" - "filter.timeFrom and filter.timeTo go together" - "filter.night and filter.day exclude each other" - "filter.timeFrom and timeTo are minutes after midnight (0-1440)" - "filter.place needs lat (-90 to 90) and lon (-180 to 180)" - "filter.place.radiusKm must be above 0 (at most 20000)" - "filter.machines: a name is too long" - "filter.machines: at most 20" - "filter.machines must name the devices whose new items are judged" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the album's owner or an admin can set its filter" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the album's owner or an admin can set its filter" x-error-messages: - "only the album's owner or an admin can set its filter" - "not an active member of a company" "404": description: "no such album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" "/api/albums/{id}/jobs/accept": post: operationId: "postAlbumsIdJobsAccept" tags: - "Albums" summary: "A PC accepted a detached album.add or album.clone (`detach: true`, iOS request #63): it binds the job to the device that sent it, so that when the job ends it can alert that device's member (POST albu" description: "A PC accepted a detached album.add or album.clone (`detach: true`, iOS request #63): it binds the job to the device that sent it, so that when the job ends it can alert that device's member (POST albums/{id}/jobs/done) with the phone gone. The PC calls it as the job starts, off the request." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-jobs-accept" x-auth: "registered device of the company (the PC running the job)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumJobAcceptRequest" example: ticket: "at_…" job: "job_3f9c2a71d04b8e65" op: "add" responses: "200": description: "`device`: the device that sent the job (the ticket's)" content: "application/json": schema: $ref: "#/components/schemas/AlbumJobAcceptView" example: job: "job_3f9c2a71d04b8e65" device: "d_7k2mq9pa4zw3n5cx" album: "al_…" until: "2026-10-24T18:02:11Z" "400": description: "job is required, op is required, op is add or clone, ticket is required" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "op is add or clone" x-error-messages: - "op is add or clone" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "that device may not add to this album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "that device may not add to this album" x-error-messages: - "that device may not add to this album" - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such album for that ticket (expired, another album's, or not a device's own album ticket) (a guest's, link's, filter's or assistant job's ticket too)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "Not Found" "409": description: "this job is bound already" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this job is bound already" x-error-messages: - "this job is bound already" "/api/albums/{id}/jobs/done": post: operationId: "postAlbumsIdJobsDone" tags: - "Albums" summary: "A PC's detached add or clone of the album ended (iOS request #63): the member whose device sent it gets one alert, the album's people re-read the album, and what was added goes to them as that device'" description: "A PC's detached add or clone of the album ended (iOS request #63): the member whose device sent it gets one alert, the album's people re-read the album, and what was added goes to them as that device's POST albums/{id}/added would." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-jobs-done" x-auth: "registered device of the company: the PC that bound the job." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumJobDoneRequest" example: job: "job_3f9c2a71d04b8e65" ticket: "at_…" added: 23 already: 0 failed: 0 kind: "photos" error: "The album drive CHIA2 G: is not connected" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/AlbumJobDoneView" example: title: "Chicago Night River" body: "23 photos added" notification: 1043 counted: true "400": description: "job is required" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "no album job of this PC bound to that ticket (albums/{id}/jobs/accept; for the job's 24 hours) (not bound, another PC's, another ticket or album, ended already, or the 24 hours over)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such album (deleted while the job ran)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album (deleted while the job ran)" x-error-messages: - "no such album (deleted while the job ran)" "/api/albums/{id}/purge": post: operationId: "postAlbumsIdPurge" tags: - "Albums" summary: "Delete permanently: a live or a recently deleted album ends for good at once (it cannot be put back). Its members, guests and drives go, open invitations are withdrawn, whole-album public links revoke" description: "Delete permanently: a live or a recently deleted album ends for good at once (it cannot be put back). Its members, guests and drives go, open invitations are withdrawn, whole-album public links revoked. A relay ticket of it still answers `deleted: true`, so a PC's waiting delete job runs." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-purge" x-auth: "the album's owner or an owner/admin of the company (a recently deleted one: as for restore)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "No Content" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the album's owner or an admin can delete it" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the album's owner or an admin can delete it" x-error-messages: - "only the album's owner or an admin can delete it" - "not an active member of a company" "404": description: "no such album, no such deleted album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" - "no such deleted album" "/api/albums/{id}/remove-requests": post: operationId: "postAlbumsIdRemoveRequests" tags: - "Albums" summary: "A member asks the album's owner to remove a photo that is not theirs." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-remove-requests" x-auth: "a member of the album in its company (not the owner, not a guest)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumRemoveRequest" example: item: "2026-10-14/IMG_0412.HEIC" source: "Bobs-iPhone" responses: "200": description: "With the same body when this person had asked for this item already (nothing new)" content: "application/json": schema: $ref: "#/components/schemas/AlbumRemoveRequestView" example: album: "al_x7k2mq9pa4zw3n5c" item: "2026-10-14/IMG_0412.HEIC" "201": description: "Created" content: "application/json": schema: $ref: "#/components/schemas/AlbumRemoveRequestView" example: album: "al_x7k2mq9pa4zw3n5c" item: "2026-10-14/IMG_0412.HEIC" "400": description: "item is required, source too long" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "source too long" x-error-messages: - "source too long" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "404": description: "no such album (also for the owner, guests, admins who are not members)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" "429": description: "too many remove requests today (at most 50 a day)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many remove requests today (at most 50 a day)" x-error-messages: - "too many remove requests today (at most 50 a day)" "/api/albums/{id}/restore": post: operationId: "postAlbumsIdRestore" tags: - "Albums" summary: "Put back: a recently deleted album returns exactly as it was: its members and guests with their own `canAdd` and `shown`, open invitations, name, cover, `membersCanAdd`, `faces`, filter, drives and pu" description: "Put back: a recently deleted album returns exactly as it was: its members and guests with their own `canAdd` and `shown`, open invitations, name, cover, `membersCanAdd`, `faces`, filter, drives and public links. The owner's, members' and guests' devices get `changed: [\"albums\", \"album:\"]`, invitees' `[\"invitations\"]`. Remove requests resolved by the delete do not come back. The apps then send `album.restore` to the album's PCs." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-restore" x-auth: "the album's owner, the admin who deleted it, or an owner/admin of the company." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/AlbumView" example: id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: "Anna Smith" membersCanAdd: true faces: true cover: "…" filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: "…" archived: "2026-10-18T09:12:00.123+00:00" mergedFrom: - "…" deletedAt: "2026-10-18T09:12:00.123+00:00" deletedBy: "…" deletedByName: "ANNA-PC" purgeAt: "2026-10-18T09:12:00.123+00:00" x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "404": description: "no such deleted album (not deleted, deleted more than 30 days ago, deleted permanently, unknown)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such deleted album" x-error-messages: - "no such deleted album" "409": description: "that device has a new Shared publicly album since (a device's public album, when it made a new one)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "that device has a new album since" x-error-messages: - "that device has a new album since" "/api/albums/{id}/shares": post: operationId: "postAlbumsIdShares" tags: - "Albums" summary: "Shares the album with people." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-shares" x-auth: "the album's owner or an owner/admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumShareRequest" example: email: "bob@acme.com" responses: "200": description: "When everyone had it already (or an invitation was open: pending or declined" content: "application/json": schema: $ref: "#/components/schemas/AlbumView" example: id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: "Anna Smith" membersCanAdd: true faces: true cover: "…" filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: "…" archived: "2026-10-18T09:12:00.123+00:00" mergedFrom: - "…" deletedAt: "2026-10-18T09:12:00.123+00:00" deletedBy: "…" deletedByName: "ANNA-PC" purgeAt: "2026-10-18T09:12:00.123+00:00" x-example: "generated" "201": description: "Album when anyone was added or invited" content: "application/json": schema: $ref: "#/components/schemas/AlbumView" example: id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: "Anna Smith" membersCanAdd: true faces: true cover: "…" filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: "…" archived: "2026-10-18T09:12:00.123+00:00" mergedFrom: - "…" deletedAt: "2026-10-18T09:12:00.123+00:00" deletedBy: "…" deletedByName: "ANNA-PC" purgeAt: "2026-10-18T09:12:00.123+00:00" x-example: "generated" "400": description: "the album is already anna@acme.com's, emails must not be empty, too many emails (at most 100), not a valid email address" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "emails must not be empty" x-error-messages: - "emails must not be empty" - "too many emails (at most 100)" - "the album is already 's" - "not a valid email address" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the album's owner or an admin can share it" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the album's owner or an admin can share it" x-error-messages: - "only the album's owner or an admin can share it" - "not an active member of a company" "404": description: "no such album, bob@acme.com is not a member of your company (invite them to the company first)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is not a member of your company (invite them to the company first)" x-error-messages: - " is not a member of your company (invite them to the company first)" - "no such album" "429": description: "too many invitations today (at most 200 a day)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many invitations today (at most 200 a day)" x-error-messages: - "too many invitations today (at most 200 a day)" "/api/albums/{id}/shares/can-add": post: operationId: "postAlbumsIdSharesCanAdd" tags: - "Albums" summary: "Lets one person the album is shared with add their own photos and videos (and remove what they added), or stops them. Their setting overrides the album's `membersCanAdd` until the album-wide switch is" description: "Lets one person the album is shared with add their own photos and videos (and remove what they added), or stops them. Their setting overrides the album's `membersCanAdd` until the album-wide switch is set again (POST /api/albums/{id} with `membersCanAdd`, which clears everyone's own setting). Someone with no setting of their own follows the album. Their tickets follow at the next check (within the PCs' 5-minute cache): `member-add` or `member`, and a relay ticket for their adds stops serving when it is turned off." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-shares-can-add" x-auth: "the album's owner, or an owner/admin of the company." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumCanAddRequest" example: email: "bob@acme.com" canAdd: true responses: "204": description: "No Content" "400": description: "canAdd is required (true or false), not a valid email address, a guest of the album cannot add to it" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "canAdd is required (true or false)" x-error-messages: - "canAdd is required (true or false)" - "a guest of the album cannot add to it" - "not a valid email address" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the album's owner or an admin can say who may add to it" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the album's owner or an admin can say who may add to it" x-error-messages: - "only the album's owner or an admin can say who may add to it" - "not an active member of a company" "404": description: "no such album, not shared with them (also the owner's own email)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not shared with them" x-error-messages: - "not shared with them" - "no such album" "/api/albums/{id}/shares/remove": post: operationId: "postAlbumsIdSharesRemove" tags: - "Albums" summary: "Stops sharing with one person, withdraws an invitation (pending or declined), or removes a guest. A member may remove themselves (leaving the album). It takes effect on the PCs within 5 minutes." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-shares-remove" x-auth: "the album's owner, an owner/admin, or the member themselves." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumShareRequest" example: email: "bob@acme.com" responses: "204": description: "(also when not shared)" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not a valid email address" x-error-messages: - "not a valid email address" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the album's owner or an admin can stop sharing it" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the album's owner or an admin can stop sharing it" x-error-messages: - "only the album's owner or an admin can stop sharing it" - "not an active member of a company" "404": description: "no such album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" "/api/albums/{id}/show": post: operationId: "postAlbumsIdShow" tags: - "Albums" summary: "Turns an album shared with the caller off or back on, for them alone (Vladimir 2026-10-31). Off: the apps keep it out of Photos, Recent and Albums lists and download or cache nothing of it, and the se" description: "Turns an album shared with the caller off or back on, for them alone (Vladimir 2026-10-31). Off: the apps keep it out of Photos, Recent and Albums lists and download or cache nothing of it, and the service sends no album-add push (nor inbox entry) for it; the caller stays a member (or guest), the owner sees them in `members` with `shown: false`, and their tickets work as before. On: back as it was. This is not leaving the album (shares/remove with their own email, or guest leave)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-show" x-auth: "signed in, its owner (an active member of its company), or someone the album is shared with: a member of" x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AlbumShowRequest" example: "on": false responses: "204": description: "(also when it already was)" "400": description: "on is required (true or false)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "on is required (true or false)" x-error-messages: - "on is required (true or false)" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "404": description: "no such album (also not shared with the caller, or deleted)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" "/api/albums/{id}/tickets": post: operationId: "postAlbumsIdTickets" tags: - "Albums" summary: "POST /api/albums/{id}/tickets" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-tickets" x-auth: "registered device of the album's owner or of a member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`access`: `owner`, `member` (read-only) or `member-add` (a member who may add: their own `canAdd`, else the album's `membersCanAdd`)" content: "application/json": schema: $ref: "#/components/schemas/AlbumTicketView" example: ticket: "at_Q9xV2bT1rL6sD0fH5jK9eG3uI7oA2cYk3Qm9xP2aZ" album: "al_x7k2mq9pa4zw3n5c" name: "Las Vegas" access: "owner" expires: "2026-10-18T10:15:00.000+00:00" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" "/api/albums/{id}/unarchive": post: operationId: "postAlbumsIdUnarchive" tags: - "Albums" summary: "Unarchive: the album is back in the owner's album list (`archived` absent)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-albums-id-unarchive" x-auth: "the album's owner." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/AlbumView" example: id: "al_x7k2mq9pa4zw3n5c" name: "Chicago trip" ownerEmail: "anna@acme.com" mine: true created: "2026-10-18T09:12:00.123+00:00" updated: "2026-10-18T09:12:00.123+00:00" itemCount: 412 destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "D:\\Backups" label: null members: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" name: "Anna Smith" guest: false canAdd: true shown: true ownerName: "Anna Smith" membersCanAdd: true faces: true cover: "…" filter: words: "…" content: null night: null day: null place: name: "Chicago trip" lat: 1.5 lon: 1.5 radiusKm: 1.5 kind: "…" timeFrom: null timeTo: null machines: - "…" since: "2026-10-18T09:12:00.123+00:00" active: true invited: - email: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" state: "waiting" name: "Chicago trip" decided: null shown: true public: true publicDevice: "…" archived: "2026-10-18T09:12:00.123+00:00" mergedFrom: - "…" deletedAt: "2026-10-18T09:12:00.123+00:00" deletedBy: "…" deletedByName: "ANNA-PC" purgeAt: "2026-10-18T09:12:00.123+00:00" x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the album's owner can archive it" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the album's owner can archive it" x-error-messages: - "only the album's owner can archive it" - "not an active member of a company" "404": description: "no such album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album" x-error-messages: - "no such album" "/api/assistant": post: operationId: "postAssistant" tags: - "Assistant" summary: "POST /api/assistant" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-assistant" x-auth: "a registered device of an active member, by its device token. In developer mode also the admin page's web" x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AssistantRequest" example: text: "back up all photos from my last Chicago trip" today: "2026-10-14" context: places: - name: "Chicago" count: 412 trips: - name: "Chicago, Sep 2026" place: "Chicago" from: "2026-09-03" to: "2026-09-06" count: 412 kinds: photo: 5000 video: 300 x-field-rules: text: "1–1,000 characters; line breaks become spaces" today: "the phone's local date, `YYYY-MM-DD` (relative dates count from it)" mode: "`developer`: a developer's question about the APIs (see below); `today` may then be left out. `select-assist`: a computer's photo selection box; planned exactly as a phone's request, counted apart in the usage" language: "the code sample's language in developer mode: `curl` (default), `python`, `swift` or `csharp`" context: "the phone's place names and found trips, newest first. At most 200 places and 100 trips are used; names are cut to 80 characters; dates that are not `YYYY-MM-DD` are dropped. `kinds` is any small JSON value (up to 2,000 characters, else left out). `appCommands` (`[{\"id\", \"what\"}]`, at most 100) are the app's own commands it runs as an `app_command` action, and `pcs` (names, at most 50) the company's computers, for `pc_space`. `history` (`[{\"q\", \"a\"}]`, the chat's exchanges before this request, oldest first; the last 3 are used, `a` cut at 800 characters) makes the request a follow-up: it is read, searched in the manual and cached with them. `appSettings` (names, at most 100) are the app's own settings; an answer about one names it exactly so. `languages` (codes, first first, at most 3 of the 14 of `me/settings`; unknown ones dropped) are the asker's languages, which the answer is in; absent: the member's own `me/settings` languages. `geo`: `1` when the app reads `show_items`' `geo` filter (below); the bare `place` is then left out wherever `geo` has it" responses: "200": description: "Or only {...} when nothing fits (no `actions` key). `say` is one plain line, at most 300 characters" content: "application/json": schema: $ref: "#/components/schemas/AssistantReply" example: actions: - tool: "add_backup_rule" input: type: "picked" place: "Chicago" from: "2026-09-03" to: "2026-09-06" kind: "photo" - tool: "start_backup" input: {} say: "Back up the photos from your Chicago trip, 3 to 6 Sep 2026." "400": description: "text is required, text is too long (at most 1000 characters), today must be a date (YYYY-MM-DD), mode must be developer, select-assist or left out, language must be curl, python, swift or csharp" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "mode must be developer, select-assist or left out" x-error-messages: - "mode must be developer, select-assist or left out" - "language must be curl, python, swift or csharp" - "today must be a date (YYYY-MM-DD)" - "text is required" - "text is too long (at most 1000 characters)" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "the assistant is for signed-in devices, not an active member of a company, this device is not registered (devices/register)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "the assistant is for signed-in devices" - "this device is not registered (devices/register)" - "missing CSRF token" "429": description: "Too many assistant requests in a short time (at most 20 a minute from one device and 200 an hour for a company). Please wait a minute and try again. There is no daily limit: this is an abuse guard a person never reaches (assistant.devicePerMinute, assistant.companyPerHour; every request counts, one the app gave up on too)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "Too Many Requests" "503": description: "The assistant is not available on this server., The assistant is busy right now. Please try again in a minute" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "The assistant is not available on this server." x-error-messages: - "The assistant is not available on this server." - "The assistant is busy right now. Please try again in a minute." "/api/assistant/jobs/album": post: operationId: "postAssistantJobsAlbum" tags: - "Assistant" summary: "The PC running a phone's assistant job (iOS request #61; peer op assistant.job) makes the album the job asked for, owned by the member of that phone. When the member already has an album of their own " description: "The PC running a phone's assistant job (iOS request #61; peer op assistant.job) makes the album the job asked for, owned by the member of that phone. When the member already has an album of their own of that name (trimmed, in any case), the job fills that one instead, as the phone does: its name stays as it is, its own standing filter stays (the job's is set only when it has none), and the calling PC is added to its drives when it is not one. An album of that name someone else shared with the member is never filled this way; a public album neither." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-assistant-jobs-album" x-auth: "registered device of the company (the PC holding the phone's backups; any member's PC)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AssistantAlbumRequest" example: device: "d_7k2mq9pa4zw3n5cx" job: "aj_3f9a1c07b2e4d5c6a7b8c9d0" jobTicket: "jt_…" name: "Night Chicago Views" dest: "e3b0c442" label: "E:\\" filter: words: "Make an album of my night Chicago views" content: "view" night: true kind: "photos" share: - "anna@acme.com" responses: "201": description: "`ticket`: access `filter` for this PC and the phone's items only (`filterMachines: [the phone]`), an hour" content: "application/json": schema: $ref: "#/components/schemas/AssistantAlbumView" example: album: "al_x7k2mq9pa4zw3n5c" name: "Night Chicago Views" ticket: "at_…" expires: "2026-10-22T16:05:00+00:00" filter: true shared: - "anna@acme.com" invited: false "400": description: "name is required, dest is required, device is required, job is required, a filter's error, too many emails to share with (at most 100)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many emails to share with (at most 100)" x-error-messages: - "too many emails to share with (at most 100)" - " is required" - " is too long" - " must not contain control characters" - "filter must be an object or null" - "filter: " - "filter. is too long (at most )" - "filter.kind must be all, photos or videos" - "filter.timeFrom and filter.timeTo go together" - "filter.night and filter.day exclude each other" - "filter.timeFrom and timeTo are minutes after midnight (0-1440)" - "filter.place needs lat (-90 to 90) and lon (-180 to 180)" - "filter.place.radiusKm must be above 0 (at most 20000)" - "filter.machines: a name is too long" - "filter.machines: at most 20" - "filter.machines must name the devices whose new items are judged" - " must be a string" - "emails must not be empty" - "too many emails (at most 100)" - "the album is already 's" - "not a valid email address" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "no job ticket bound to this job of that phone on this PC (assistant/jobs/redeem; for the job's 24 hours) (missing, not redeemed, bound to another job, PC or phone, or the 24 hours over), the job's ticket is for show: it makes no album, this job has made its album already" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the job's ticket is for show: it makes no album" x-error-messages: - "the job's ticket is for show: it makes no album" - "this job has made its album already" - "not an active member of a company" - "this device is not registered (devices/register)" - "only the album's owner or an admin can share it" "404": description: "no such device (not of the caller's company, or removed), the device's member is not active" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" - "the device's member is not active" - " is not a member of your company (invite them to the company first)" - "no such album" "409": description: "the album \"\" has 8 drives already, none on this PC (the member's own album of that name, which this PC cannot be added to)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the album \"\" has 8 drives already, none on this PC" x-error-messages: - "the album \"\" has 8 drives already, none on this PC" "429": description: "too many invitations today (at most 200 a day) (the share's invitations to people outside the company, as [POST albums/{id}/shares](#post-api-albums-id-shares))" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many invitations today (at most 200 a day)" x-error-messages: - "too many invitations today (at most 200 a day)" "/api/assistant/jobs/done": post: operationId: "postAssistantJobsDone" tags: - "Assistant" summary: "The PC finished an assistant job: the phone's member gets one alert, and their devices re-read the album." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-assistant-jobs-done" x-auth: "registered device of the company." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AssistantDoneRequest" example: device: "d_7k2mq9pa4zw3n5cx" job: "aj_…" jobTicket: "jt_…" album: "al_…" added: 23 found: 25 needsPhone: 2 kind: "photos" failed: false responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/AssistantDoneView" example: title: "Night Chicago Views" body: "23 photos added · 2 more when your phone backs them up" notification: 1042 "400": description: "job is required, device is required" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "no job ticket bound to this job of that phone on this PC (assistant/jobs/redeem; for the job's 24 hours)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such device, no such album of that device's member on this PC (the album is not the job's or the member's, or the caller is not one of its drives)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album of that device's member on this PC" x-error-messages: - "no such album of that device's member on this PC" - "no such device" - "the device's member is not active" "/api/assistant/jobs/redeem": post: operationId: "postAssistantJobsRedeem" tags: - "Assistant" summary: "The PC accepts a phone's assistant job: it redeems the phone's job ticket before it answers assistant.job, so a ticket that is no good refuses the job at once instead of failing it late (a job queued " description: "The PC accepts a phone's assistant job: it redeems the phone's job ticket before it answers assistant.job, so a ticket that is no good refuses the job at once instead of failing it late (a job queued behind another, or a long selection, no longer outlasts its ticket)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-assistant-jobs-redeem" x-auth: "registered device of the company (the PC the ticket names)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AssistantRedeemRequest" example: jobTicket: "jt_…" job: "aj_3f9a1c07b2e4d5c6a7b8c9d0" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/AssistantRedeemView" example: job: "aj_…" device: "d_7k2mq9pa4zw3n5cx" action: "shareAlbum" until: "2026-10-23T15:05:00+00:00" "400": description: "job is required" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "no valid job ticket from a phone for this PC (assistant/jobs/ticket; 15 minutes, redeemed once) (missing, unknown, for another PC, redeemed already, or expired; the ticket stays as it was)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such device, the device's member is not active (the phone)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" - "the device's member is not active" "/api/assistant/jobs/ticket": post: operationId: "postAssistantJobsTicket" tags: - "Assistant" summary: "The phone takes a ticket for one assistant job before it sends assistant.job to a PC: without it no PC can make an album for it (POST assistant/jobs/album) or alert its member about the job (POST assi" description: "The phone takes a ticket for one assistant job before it sends assistant.job to a PC: without it no PC can make an album for it (POST assistant/jobs/album) or alert its member about the job (POST assistant/jobs/done)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-assistant-jobs-ticket" x-auth: "registered device of the company (the phone)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AssistantTicketRequest" example: pc: "d_4hq8xw2mz7rk3n9p" action: "shareAlbum" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/AssistantTicketView" example: ticket: "jt_…" expires: "2026-10-22T15:20:00+00:00" "400": description: "pc is required, action is required, action is show, makeAlbum or shareAlbum, pc is another device than the phone" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "action is show, makeAlbum or shareAlbum" x-error-messages: - "action is show, makeAlbum or shareAlbum" - "device is too long" - "pc is another device than the phone" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "this device is not registered (devices/register), a job ticket for another device is taken only for a device of your own (device of another member)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "a job ticket for another device is taken only for a device of your own" x-error-messages: - "a job ticket for another device is taken only for a device of your own" - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such device (pc or device not of the phone's company, or removed)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" "/api/company/join": post: operationId: "postCompanyJoin" tags: - "Session & company" summary: "Puts the signed-in email into a company: finds the right one, or makes a new one. Call it after every sign-in." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-company-join" x-auth: "signed in." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/JoinRequest" example: keyProof: "MCowBQYDK2VwAyEA8Jx…" create: true name: "Anna Smith" x-example: "generated" x-field-rules: keyProof: "the proof of a company key this device already holds (a PC upgrading from before accounts)" create: "`true`: \"Create my own company\" when no company matches" name: "the new company's name (1–100 characters); default: the email's domain, or \"'s company\" for a personal address" responses: "200": description: "Session, plus `\"created\": true` for a new company, and `\"keyMatched\": true` when `keyProof` is the current key proof of the caller's company after the join (the registered device is then recorded as holding the current key version)" content: "application/json": schema: $ref: "#/components/schemas/SessionView" example: email: "bob@acme.com" memberId: "m_9xk2qa7mz3wp4n5c" deviceId: null company: id: "c_k3xq7m2pa9fz4w8r" name: "Acme" role: "member" status: "pending" keyVersion: 3 rotationNeeded: false autoJoin: false domain: "acme.com" name: "" firstName: "" lastName: "" "400": description: "name is too long, name must not contain control characters. -" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "409": description: "{\"error\": \"Ask your company's admin to invite anna@gmail.com, or create your own company.\", \"code\": \"invite_needed\"}: show **Check again** and **Create my own company** (which sends create: true). -" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "Ask your company's admin to invite , or create your own company." x-error-messages: - "Ask your company's admin to invite , or create your own company." - "device name is already used in : rename this device, then join again" "/api/company/key": post: operationId: "postCompanyKey" tags: - "Session & company" summary: "Sets the company's first key (`version` 1) or rotates it (`version` = current + 1). Compare-and-set: of two PCs rotating at once one wins and the other gets 409 and takes the winner's keyring from its" description: "Sets the company's first key (`version` 1) or rotates it (`version` = current + 1). Compare-and-set: of two PCs rotating at once one wins and the other gets 409 and takes the winner's keyring from its deliveries." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-company-key" x-auth: "registered device that holds the current version (any version for the first key)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/CompanyKeyRequest" example: version: 3 keyProof: "MCowBQYDK2VwAyEA8Jx…" recovery: "…" x-example: "generated" x-field-rules: version: "current + 1" keyProof: "a proof derived from the new key (the service stores its hash; it lets other PCs that hold the key join by `keyProof`)" recovery: "the whole new keyring sealed to the service's recovery public key (`GET /api/recovery-key`); a sealed box starting with `SBK1`, base64, at most 64 KB" responses: "204": description: "No Content" "400": description: "recovery must be a sealed box (DeviceKey.Seal to the recovery key), keyProof is required" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "recovery must be a sealed box (DeviceKey.Seal to the recovery key)" x-error-messages: - "recovery must be a sealed box (DeviceKey.Seal to the recovery key)" - " is required" - " is too long" - " must not contain control characters" - " must be base64" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "409": description: "{\"error\": \"the first key must be version 1\", \"keyVersion\": 0}, {\"error\": \"the company key changed; take the current one from your deliveries\", \"keyVersion\": 4}" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the first key must be version 1" x-error-messages: - "the first key must be version 1" - "the company key changed; take the current one from your deliveries" - "the company key changed" "/api/company/settings": post: operationId: "postCompanySettings" tags: - "Session & company" summary: "Changes the company's name, auto-join and recognising faces, as the admin page's settings form does (Renaming the company)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-company-settings" x-auth: "owner/admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/CompanySettingsRequest" example: name: "Acme Inc." autoJoin: true faces: false responses: "200": description: "Session with the updated company" content: "application/json": schema: $ref: "#/components/schemas/SessionView" example: email: "anna@acme.com" memberId: "m_7hd2kq9wz3xa5npe" deviceId: "d_4f2a7cqm3xk9wz2b" company: id: "c_k3xq7m2pa9fz4w8r" name: "Acme" role: "member" status: "active" keyVersion: 3 rotationNeeded: false autoJoin: true domain: null faces: true languages: - "…" name: "Anna Smith" firstName: "ANNA-PC" lastName: "ANNA-PC" languages: - "…" born: born: null age: null "on": null picture: "…" created: true keyMatched: true moved: from: "…" x-example: "generated" "400": description: "name is required, name is too long, name must not contain control characters, auto-join needs a company domain; this company has none" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "auto-join needs a company domain; this company has none" x-error-messages: - "auto-join needs a company domain; this company has none" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the company's owner or an admin may do this" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin may do this" x-error-messages: - "only the company's owner or an admin may do this" "/api/datakey": put: operationId: "putDatakey" tags: - "Data keys" summary: "Stores (or replaces) the calling device's wrapped data key, or the data key of an iCloud Photos source it hosts." externalDocs: url: "https://spacebackup.net/manual/api-account/#put-api-datakey" x-auth: "registered device." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/DataKeyPut" example: keyId: "dk-5c2e…" keyVersion: 3 wrapped: "" responses: "204": description: "No Content" "400": description: "no such key version, wrapped must be base64, keyId is required" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such key version" x-error-messages: - "no such key version" - " is required" - " is too long" - " must not contain control characters" - " must be base64" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the PC hosting an iCloud source puts its data key" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" - "only the PC hosting an iCloud source puts its data key" "404": description: "no such iCloud source (also once it is removed)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such iCloud source" x-error-messages: - "no such iCloud source" "/api/datakey-requests": post: operationId: "postDatakeyRequests" tags: - "Data keys" summary: "Asks to restore another device's backups. The device's own member and the owner and admins get a mail with Approve and Deny links and a `restore-approval` notification (target `approval` for the devic" description: "Asks to restore another device's backups. The device's own member and the owner and admins get a mail with Approve and Deny links and a `restore-approval` notification (target `approval` for the device's member, `datakey-request` for the admins)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-datakey-requests" x-auth: "registered device." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/DataKeyRequestCreate" example: sourceDevice: "d_7pz4wn5cq2am3k9x" responses: "200": description: "(`\"approved\"` for the caller's own device, above)" content: "application/json": schema: $ref: "#/components/schemas/DataKeyRequestStarted" example: id: "dr_z3k7xq2ma9pw4n5c" state: "waiting" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no data key of that device to ask for (not one the caller may ask for, or no copy stored)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no data key of that device to ask for" x-error-messages: - "no data key of that device to ask for" "/api/datakey-requests/{id}": get: operationId: "getDatakeyRequestsId" tags: - "Data keys" summary: "GET /api/datakey-requests/{id}" externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-datakey-requests-id" x-auth: "the requesting device, or an owner/admin (who see it without the key). Anyone else: 404." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`state` is `waiting`, `approved` or `denied`. `wrapped` and `former` (the source's older data keys) are *optional*: only when `approved`, and only to the requesting device. `keyId`/`keyVersion` are those of the source's current copy" content: "application/json": schema: $ref: "#/components/schemas/DataKeyRequestView" example: id: "dr_z3k7xq2ma9pw4n5c" state: "approved" sourceDevice: "d_7pz4wn5cq2am3k9x" keyId: "dk-91fe…" keyVersion: 3 wrapped: "AAECAwQF…" former: - keyId: "dk-0a3b…" keyVersion: 2 wrapped: "BgcICQoL…" current: false "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " must be a string" x-error-messages: - " must be a string" - " is too long" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such data-key request (also when the caller may not see it)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such data-key request" x-error-messages: - "no such data-key request" "/api/datakeys": get: operationId: "getDatakeys" tags: - "Data keys" summary: "The source devices whose keys the caller may ask for: devices of the caller's email (all of the company for owners and admins), not the caller itself, that have a stored copy." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-datakeys" x-auth: "active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`removed` is `true` for a removed device (a lost one usually is)" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/DataKeySource" example: - deviceId: "d_7pz4wn5cq2am3k9x" name: "OLD-LAPTOP" email: "anna@acme.com" keyId: "dk-91fe…" removed: true "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "/api/devices": get: operationId: "getDevices" tags: - "Devices" summary: "All devices of the caller's company, removed ones too." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-devices" x-auth: "active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`[Device]` (Device), active ones first, by email and name" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/DeviceView" example: {} x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "/api/devices/changed": post: operationId: "postDevicesChanged" tags: - "Devices" summary: "A PC reports what it finished for a device, so that device's app updates at once (a `changed` push, above)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-devices-changed" x-auth: "a device token of an active member (a web session gets 403 `only a device reports its changes`)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/DeviceChangedRequest" example: topics: - "backups" device: "d_…" responses: "204": description: "Also when push is off (nothing is kept then)" "400": description: "topics is required, unknown topic x (one of backups, vision, forms, faces, destinations, computers), from goes with the topic faces alone, company goes with the topics faces, destinations, computers alone, destinations goes with company: true (or computers …), v is required as \":\", unknown topic x (backups: or album:)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "topics is required" x-error-messages: - "topics is required" - "device too long" - "from too long" - "from goes with the topic faces alone" - " goes with company: true" - "v is required as \":\"" - "unknown topic (backups: or album:)" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only a device reports its changes" x-error-messages: - "only a device reports its changes" - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such album (unknown, deleted, or of another company)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" - "no such album" "429": description: "too many change reports (at most 30 a minute) (per calling device, push.changedCallsPerMinute)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many change reports (at most a minute)" x-error-messages: - "too many change reports (at most a minute)" "/api/devices/changed/wait": post: operationId: "postDevicesChangedWait" tags: - "Devices" summary: "The changed pushes for a PC: a computer has no APNs or FCM token, so while its Space Backup window is open (the window's own long poll on the PC, `GET /api/changed/wait`; the desktop app) the PC keeps" description: "The changed pushes for a PC: a computer has no APNs or FCM token, so while its Space Backup window is open (the window's own long poll on the PC, `GET /api/changed/wait`; the desktop app) the PC keeps this long poll open, as an open TV keeps `tv/changed/wait`. The service holds the request up to 25 seconds and answers as soon as something its member's devices are pushed changes (the same topics, coalesced the same way; `forms` excepted); the changes this PC made or reported itself are left out (it knows them). The PC asks again at once and its window re-reads those parts. A newer wait of the same device ends the older (204). Changes are queued for a PC only while it listens (a wait open, or one ended within the last 40 seconds); a PC whose window is closed gets nothing, and the window reads everything when it opens. Kept in memory only." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-devices-changed-wait" x-auth: "a device's token (a TV's: 403)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "Or 204 when nothing changed" "204": description: "200 {...}, or 204 when nothing changed" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "for a device's token only;" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "for a device's token only" x-error-messages: - "for a device's token only" - "this device is not registered (devices/register)" "/api/devices/commands/{id}": post: operationId: "postDevicesCommandsId" tags: - "Devices" summary: "The PC's answer to a command from `sync.commands`: `started` when its backup began, then `done` or `failed` when that run ended (or `failed` at once, with the reason). A late `started` after an end ch" description: "The PC's answer to a command from `sync.commands`: `started` when its backup began, then `done` or `failed` when that run ended (or `failed` at once, with the reason). A late `started` after an end changes nothing." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-devices-commands-id" x-auth: "registered device: only the device the command is for (a device token; not a web session)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/CommandAnswer" example: state: "started" message: "backup started" responses: "204": description: "No Content" "400": description: "state must be started, done or failed" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "state must be started, done or failed" x-error-messages: - "state must be started, done or failed" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the device answers its commands, this device is not registered (devices/register)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the device answers its commands" x-error-messages: - "only the device answers its commands" - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such command (another device's, or unknown)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such command" x-error-messages: - "no such command" "/api/devices/icloud": post: operationId: "postDevicesIcloud" tags: - "Devices" summary: "The calling PC backs up its member's iCloud Photos library (the folder iCloud for Windows keeps). The library is then listed by `GET /api/devices` as a device of the member with `\"kind\": \"icloud\"`, `\"" description: "The calling PC backs up its member's iCloud Photos library (the folder iCloud for Windows keeps). The library is then listed by `GET /api/devices` as a device of the member with `\"kind\": \"icloud\"`, `\"host\"`: this PC's device id, `\"os\"`: `\"icloud\"`. Its `name` is a machine name, its folder on the drives (laid out like a phone's), in the peer protocol, the Photos tab and Space Vision: `-iCloud-Photos`, from the first word of the member's display name (else the part of their email before the @) without what a machine name refuses (`iCloud-Photos` when nothing is left), with `-2`, `-3`... when a device or another iCloud source of the company (removed ones too) has it; given once and kept. Its `label` is what the apps show: `'s iCloud Photos`. A device cannot register under a live source's name (409)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-devices-icloud" x-auth: "registered device of an active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/ICloudSourceView" example: id: "ic_8wq3zx2mka7p4n5c" name: "Anna-iCloud-Photos" label: "Anna's iCloud Photos" email: "anna@acme.com" host: "d_…" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "/api/devices/icloud/{id}/remove": post: operationId: "postDevicesIcloudIdRemove" tags: - "Devices" summary: "Stops an iCloud Photos source; it stays listed with `\"removed\": true`, and its backups stay on the drives. Its key leaves the member's `sync.shared` (see PUT /api/datakey)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-devices-icloud-id-remove" x-auth: "its member, the PC that hosts it, or an owner/admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "No Content" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only its member, its PC or an admin can remove an iCloud source" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only its member, its PC or an admin can remove an iCloud source" x-error-messages: - "only its member, its PC or an admin can remove an iCloud source" - "not an active member of a company" "404": description: "no such iCloud source" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such iCloud source" x-error-messages: - "no such iCloud source" "/api/devices/key": get: operationId: "getDevicesKey" tags: - "Devices" summary: "The public key of a device of the company, by its name. PCs use it to check another PC's signed replication grants (Replication)." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-devices-key" x-auth: "registered device." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "name" in: "query" required: false schema: type: "string" nullable: true - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`signingKey` is *optional*: present when the device registered a separate signing key (below)" content: "application/json": schema: $ref: "#/components/schemas/DeviceKeyView" example: deviceId: "d_8wq3zx2mka7p4n5c" name: "OFFICE-NAS" publicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE…" signingKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE…" "400": description: "name is required" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no active device of that name in this company, code no_device" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no active device of that name in this company" x-error-messages: - "no active device of that name in this company" "410": description: "device was removed from this company, code removed (only removed devices have that name; a removed member's devices are removed too), or device 's member is not an active member of this company: its key is revoked, code revoked. 404 and 410 with a code are the definite \"no\": a PC that kept the device's key (a Space Vision worker's, a day) drops it and refuses; a 401/403 or a 404 without a code is not that answer (try again)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "device was removed from this company" x-error-messages: - "device was removed from this company" - "device 's member is not an active member of this company: its key is revoked" "/api/devices/notify": post: operationId: "postDevicesNotify" tags: - "Devices" summary: "A PC says that one of its drives a device backs up to is nearly full (nearly full drives): the device's member gets one alert, in the inbox and as an APNs push to their devices." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-devices-notify" x-auth: "a device token of an active member (a web session gets 403 `only a device reports its drives`)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/DeviceNotifyRequest" example: device: "d_…" kind: "drive-nearly-full" drive: "mars-001 /home/space" freeBytes: 65485598720 totalBytes: 2000398934016 text: "Space Backup: mars-001 /home/space is nearly full (61 GB left). New backups go to your other drives until space is freed." responses: "204": description: "No Content" "400": description: "unknown kind x (one of drive-nearly-full, vision-coverage, vision-attention, vision-open), device is required, drive is required" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "unknown kind (one of , , , )" x-error-messages: - "unknown kind (one of , , , )" - "device is required" - "drive is required" - "drive (the host PC) is required" - "text is required" - "drive (the finding's key) is required" - "open (the findings that still stand) is required" - " must be a string" - " is too long" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only a device reports its drives" x-error-messages: - "only a device reports its drives" - "not an active member of a company" - "only a device reports its coverage" - "this device is not registered (devices/register)" - "only a device reports what its photo analysis needs" "404": description: "no such device (unknown, removed, or of another company)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" "429": description: "too many change reports (at most 30 a minute) (shared with devices/changed)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many change reports (at most a minute)" x-error-messages: - "too many change reports (at most a minute)" "/api/devices/push": put: operationId: "putDevicesPush" tags: - "Devices" summary: "Sets the calling device's push token: an iPhone's or iPad's Apple push (APNs) token, or an Android phone's Firebase Cloud Messaging (FCM) registration token." externalDocs: url: "https://spacebackup.net/manual/api-account/#put-api-devices-push" x-auth: "the device's own device token (a registered device, or a guest device). A web session gets 401; an" x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/PushTokenRequest" example: token: "" env: "production" app: "net.spacebackup.ios" tz: "America/Chicago" responses: "204": description: "No Content" "400": description: "token must be the APNs device token in hex, env must be sandbox or production, app must be the app's bundle id, provider must be apns or fcm, token must be the FCM registration token (URL-safe text, at most 4096 characters)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "token must be the FCM registration token (URL-safe text, at most 4096 characters)" x-error-messages: - "token must be the FCM registration token (URL-safe text, at most 4096 characters)" - "token must be the APNs device token in hex" - "env must be sandbox or production" - "provider must be apns or fcm" - "app must be the app's bundle id" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register, or guest/devices/register outside a company)" - "this device is not registered (devices/register)" "/api/devices/register": post: operationId: "postDevicesRegister" tags: - "Devices" summary: "Ties the calling token to a device and records its public key. Call it after `company/join`, and again whenever the device's name, OS, app version or key changes." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-devices-register" x-auth: "signed in, with a company (active or pending)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/RegisterRequest" example: name: "ANNA-PC" os: "Windows 11 Pro 23H2" version: "1.8.2" publicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE…" x-field-rules: name: "the machine name (below)" os: "free text, at most 100 characters (\"Windows 11 Pro 23H2\", \"iOS 26.0\")" version: "the app version, at most 40 characters" publicKey: "the device's P-256 public key, base64 SubjectPublicKeyInfo" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/DeviceRegistered" example: deviceId: "d_4f2a7cqm3xk9wz2b" "400": description: "{\"error\": \"name must be a machine name: …\", \"code\": \"name_invalid\"}, {\"error\": \"Albums is a reserved name (the albums' folder on the hosts); choose another name\", \"code\": \"name_invalid\"}, publicKey must be a base64 P-256 SubjectPublicKeyInfo. -" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "name must be a machine name: 1-64 ASCII letters, digits, '-', '_' or '.', starting with a letter or digit, not ending in '.', no '..', not a Windows reserved name (CON, NUL, COM1...)" x-error-messages: - "name must be a machine name: 1-64 ASCII letters, digits, '-', '_' or '.', starting with a letter or digit, not ending in '.', no '..', not a Windows reserved name (CON, NUL, COM1...)" - "Albums is a reserved name (the albums' folder on the hosts); choose another name" - "publicKey must be a base64 P-256 SubjectPublicKeyInfo" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "409": description: "join a company first (company/join); {\"error\": \"device name ANNA-PC is already used in this company\", \"code\": \"name_taken\"}" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "join a company first (company/join)" x-error-messages: - "join a company first (company/join)" - "device name is already used in this company" - "device name is an iCloud Photos library's in this company" "/api/devices/state": put: operationId: "putDevicesState" tags: - "Devices" summary: "PUT /api/devices/state" externalDocs: url: "https://spacebackup.net/manual/api-account/#put-api-devices-state" x-auth: "registered device." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/DeviceStatePut" example: sealed: "" updated: "2026-10-18T09:12:00+02:00" responses: "204": description: "No Content" "400": description: "sealed is required, sealed must be base64, updated must be an ISO-8601 time. -" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "bad request: " x-error-messages: - "bad request: " - "a JSON body is required" - "sealed is required" - "sealed must be base64" - "updated must be an ISO-8601 time" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "409": description: "{\"error\": \"Another device with this name keeps its state here. Rename this device.\", \"code\": \"name_clash\"}: another, still registered device of the same member wrote the state under this name. A removed device's state is taken over by the next PUT. -" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "Conflict" "413": description: "sealed is larger than 8 MB, request larger than 12 MB (sealed up to 8 MB). -" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "request larger than 12 MB (sealed up to 8 MB)" x-error-messages: - "request larger than 12 MB (sealed up to 8 MB)" - "sealed is larger than 8 MB" "415": description: "the body must be JSON (Content-Type: application/json)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the body must be JSON (Content-Type: application/json)" x-error-messages: - "the body must be JSON (Content-Type: application/json)" get: operationId: "getDevicesState" tags: - "Devices" summary: "GET /api/devices/state" externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-devices-state" x-auth: "registered device." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "device" in: "query" required: false schema: type: "string" nullable: true - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "For the caller's company, member and device name" content: "application/json": schema: $ref: "#/components/schemas/DeviceStateView" example: sealed: "" updated: "2026-10-18T09:12:00+02:00" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no state kept for this device; with device: no state kept for that device (also when the caller may not read it)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no state kept for this device" x-error-messages: - "no state kept for this device" - "no state kept for that device" "/api/devices/status": put: operationId: "putDevicesStatus" tags: - "Devices" summary: "The calling PC's own status, replacing the last one. Sent when it changes, at least every 15 minutes and just after a run." externalDocs: url: "https://spacebackup.net/manual/api-account/#put-api-devices-status" x-auth: "registered device (a device token)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/DeviceStatusReport" example: running: false lastRunStarted: "2026-10-30T11:00:00Z" lastRunEnded: "2026-10-30T11:05:00Z" lastResult: "ok" lastError: null lastFiles: 12 lastBytes: 3456 nextRun: "2026-10-30T13:00:00Z" folders: 2 destinations: 1 paused: null responses: "204": description: "No Content" "400": description: "lastResult must be one of ok, errors, failed, cancelled, lastRunStarted must be an ISO-8601 time (and the other times), counts out of range" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "lastResult must be one of " x-error-messages: - "lastResult must be one of " - "counts out of range" - " must be an ISO-8601 time" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only a device reports its status, this device is not registered (devices/register)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only a device reports its status" x-error-messages: - "only a device reports its status" - "not an active member of a company" - "this device is not registered (devices/register)" "/api/devices/viewer-key": post: operationId: "postDevicesViewerKey" tags: - "Devices" summary: "A PC registers its viewer key: the P-256 key of the self-signed TLS certificate it serves the TV app with (made once, kept with the PC's identity). Sent at each start; unchanged keys change nothing." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-devices-viewer-key" x-auth: "registered device (a PC)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/ViewerKeyRequest" example: publicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE…" responses: "204": description: "No Content" "400": description: "publicKey must be a base64 P-256 SubjectPublicKeyInfo" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "publicKey must be a base64 P-256 SubjectPublicKeyInfo" x-error-messages: - "publicKey must be a base64 P-256 SubjectPublicKeyInfo" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "/api/devices/{id}/backup-now": post: operationId: "postDevicesIdBackupNow" tags: - "Devices" summary: "Asks a PC to back up now (what the agent's `backup_now` does). One open request per PC: asked again while one waits (or the PC started it within the last minute), that one is answered. Not picked up w" description: "Asks a PC to back up now (what the agent's `backup_now` does). One open request per PC: asked again while one waits (or the PC started it within the last minute), that one is answered. Not picked up within an hour, it reads `expired`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-devices-id-backup-now" x-auth: "active member: the device's own member, or an owner/admin; a bearer token or the web session + CSRF." x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "The request: {...}" content: "application/json": schema: $ref: "#/components/schemas/DeviceCommandView" example: id: "cmd_…" device: "d_…" kind: "backup-now" requestedBy: "anna@acme.com" requested: "…" state: "pending" stateAt: "…" message: null "400": description: "Anna-iPhone is not a computer (iOS 26.5): a phone backs up from its own app" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is not a computer (): a phone backs up from its own app" x-error-messages: - " is not a computer (): a phone backs up from its own app" - " must be a string" - " is too long" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the device's member or the company's owner or an admin may start its backup" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the device's member or the company's owner or an admin may start its backup" x-error-messages: - "only the device's member or the company's owner or an admin may start its backup" - "not an active member of a company" - "missing CSRF token" "404": description: "no such device" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" "/api/devices/{id}/label": post: operationId: "postDevicesIdLabel" tags: - "Devices" summary: "Gives a device a friendly name for showing (\"Bob's laptop\"). The machine name does not change." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-devices-id-label" x-auth: "active member: the device's own member, or an owner/admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/DeviceLabelRequest" example: label: "Anna's desk PC" responses: "200": description: "OK" content: "application/json": schema: type: "object" properties: label: type: "string" required: - "label" example: label: "Anna's desk PC" "400": description: "the name is too long (at most 64 characters), the name must not contain control characters" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the name is too long (at most 64 characters)" x-error-messages: - "the name is too long (at most 64 characters)" - "the name must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "404": description: "no such device (removed, another company's, or another member's for a plain member)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" "/api/devices/{id}/remove": post: operationId: "postDevicesIdRemove" tags: - "Devices" summary: "Removes a device: it is signed out, its waiting key deliveries are dropped, its shares end, and the company key is replaced by the next PC online (`rotationNeeded`, once the company has a key). The ow" description: "Removes a device: it is signed out, its waiting key deliveries are dropped, its shares end, and the company key is replaced by the next PC online (`rotationNeeded`, once the company has a key). The owner and admins get a mail." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-devices-id-remove" x-auth: "active member: an owner/admin, the device itself, or another device of the device's member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "(also when it was removed already)" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the company's owner or an admin (or the device's member) may remove a device" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin (or the device's member) may remove a device" x-error-messages: - "only the company's owner or an admin (or the device's member) may remove a device" - "not an active member of a company" "404": description: "no such device" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" "/api/devices/{id}/signing-key": post: operationId: "postDevicesIdSigningKey" tags: - "Devices" summary: "Registers the key a device signs its replication grants with, for a device whose registered key cannot sign (an iPhone's Secure Enclave key-agreement key). Calling it again replaces the key; removing " description: "Registers the key a device signs its replication grants with, for a device whose registered key cannot sign (an iPhone's Secure Enclave key-agreement key). Calling it again replaces the key; removing the device clears it." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-devices-id-signing-key" x-auth: "only that device's own device token (`{id}` must be the caller's device). Another device, even of the" x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/SigningKeyRequest" example: publicKey: "" responses: "204": description: "No Content" "400": description: "publicKey must be a base64 P-256 SubjectPublicKeyInfo" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "publicKey must be a base64 P-256 SubjectPublicKeyInfo" x-error-messages: - "publicKey must be a base64 P-256 SubjectPublicKeyInfo" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the device itself sets its signing key, this device is not registered (devices/register)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the device itself sets its signing key" x-error-messages: - "only the device itself sets its signing key" - "not an active member of a company" - "this device is not registered (devices/register)" "/api/devices/{id}/status": get: operationId: "getDevicesIdStatus" tags: - "Devices" summary: "One device as the agent's `device_status` shows it: the Device row, the PC's last status (null until it sent one), when a phone last saved its state (never the state), and its newest five requests." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-devices-id-status" x-auth: "active member: their own devices; an owner/admin: every device of the company." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/DeviceStatusView" example: device: id: "d_4f2a7cqm3xk9wz2b" name: "ANNA-PC" email: "anna@acme.com" os: "windows" version: "1.8.2" created: "2026-10-18T09:12:00.123+00:00" lastSeen: "2026-10-18T09:12:00.123+00:00" removed: false keyVersion: 3 isMe: true fingerprint: "MCowBQYDK2VwAyEA8Jx…" ownerName: null label: null kind: null host: null status: reported: "2026-10-18T09:12:00.123+00:00" running: null paused: null lastRunStarted: null lastRunEnded: null lastResult: null lastError: null lastFiles: null lastBytes: null nextRun: null folders: null destinations: null phoneStateSaved: "…" requests: - id: "d_4f2a7cqm3xk9wz2b" device: "d_4f2a7cqm3xk9wz2b" kind: "…" requestedBy: "…" requested: "2026-10-18T09:12:00.123+00:00" state: "waiting" stateAt: "2026-10-18T09:12:00.123+00:00" message: null x-example: "generated" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " must be a string" x-error-messages: - " must be a string" - " is too long" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "404": description: "no such device" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" "/api/faces/names": get: operationId: "getFacesNames" tags: - "faces" summary: "GET /api/faces/names" externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-faces-names" x-auth: "active member (a device or the web)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "q" in: "query" required: false schema: type: "string" nullable: true - name: "limit" in: "query" required: false schema: type: "integer" format: "int32" nullable: true - name: "groups" in: "query" required: false schema: type: "string" nullable: true - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/FaceNamesView" example: "on": true names: - name: "Marina" source: "name" email: "marina@acme.com" member: true uses: 214 last: 1793462400123 - name: "Ivan" source: "name" uses: 3 last: 1793001200000 also: - "Vanya" - name: "Vanya" source: "name" uses: 3 last: 1793001200000 also: - "Ivan" - name: "Bob Jones" source: "member" email: "bob@acme.com" member: true uses: 0 - name: "zoe@elsewhere.org" source: "group" email: "zoe@elsewhere.org" group: "Family" uses: 0 "400": description: "q is too long (at most 200 characters)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "q is too long (at most 200 characters)" x-error-messages: - "q is too long (at most 200 characters)" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not an active member, or only the company's members' devices see the faces' names" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's members' devices see the faces' names" x-error-messages: - "only the company's members' devices see the faces' names" - "not an active member of a company" "429": description: "too many requests; try again in a minute (120 a minute per member, reads and records together)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many requests; try again in a minute" x-error-messages: - "too many requests; try again in a minute" post: operationId: "postFacesNames" tags: - "faces" summary: "A name was given (a group named, a person renamed or split off, a face named): added to the company's names, or used once more (`uses` + 1, `last` now, the newest spelling kept; the same name ignoring" description: "A name was given (a group named, a person renamed or split off, a face named): added to the company's names, or used once more (`uses` + 1, `last` now, the newest spelling kept; the same name ignoring case and accents is one row)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-faces-names" x-auth: "active member (a device or the web)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/FaceNameRequest" example: name: "Marina" email: "marina@acme.com" aka: - "Mo" - "marina@example.com" responses: "200": description: "FaceName (`source: \"name\"`, `also` its `aka`)" content: "application/json": schema: $ref: "#/components/schemas/FaceNameView" example: name: "Anna Smith" source: "…" email: "anna@acme.com" member: true group: "gr_q8w3zx5m2ka7np4c" uses: 1 last: 1 also: - "…" x-example: "generated" "400": description: "name is required, name is too long (at most 60 characters, or an email), name must not contain control characters, aka: at most 10 other names, aka: Mo is already one of this person's names, the same aka: … as name's, not a valid email address, email: not a member of this company" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "email: not a member of this company" x-error-messages: - "email: not a member of this company" - " is required" - " is too long (at most 60 characters, or an email)" - " must not contain control characters" - "not a valid email address" - "aka: at most 10 other names" - "aka: is already one of this person's names" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not an active member" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's members' devices see the faces' names" x-error-messages: - "only the company's members' devices see the faces' names" - "not an active member of a company" "409": description: "Recognize faces is off for this company" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "Recognize faces is off for this company" x-error-messages: - "Recognize faces is off for this company" "429": description: "too many requests; try again in a minute" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many requests; try again in a minute" x-error-messages: - "too many requests; try again in a minute" delete: operationId: "deleteFacesNames" tags: - "faces" summary: "DELETE /api/faces/names" externalDocs: url: "https://spacebackup.net/manual/api-account/#delete-api-faces-names" x-auth: "active member (a device or the web); without `name`: the company's owner or an admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "name" in: "query" required: false schema: type: "string" nullable: true - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "No Content" "400": description: "name is too long (at most 60 characters, or an email)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long (at most 60 characters, or an email)" - " must not contain control characters" - "not a valid email address" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not an active member; only the company's owner or an admin may do this (every name)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's members' devices see the faces' names" x-error-messages: - "only the company's members' devices see the faces' names" - "not an active member of a company" - "only the company's owner or an admin may do this" "/api/geo/resolve": get: operationId: "getGeoResolve" tags: - "geo" summary: "GET /api/geo/resolve" externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-geo-resolve" x-auth: "a registered device of an active member (or the web session)." x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "words" in: "query" required: false schema: type: "string" nullable: true - name: "langs" in: "query" required: false schema: type: "string" nullable: true - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not an active member of a company, this device is not registered (devices/register)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "missing CSRF token" x-error-messages: - "missing CSRF token" "/api/groups": get: operationId: "getGroups" tags: - "Groups" summary: "GET /api/groups" externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-groups" x-auth: "active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`[Group]` (Group): Coworkers first (when there is one), then the caller's groups by name" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/GroupView" example: {} x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" post: operationId: "postGroups" tags: - "Groups" summary: "POST /api/groups" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-groups" x-auth: "active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/GroupRequest" example: name: "Design team" members: - "bob@acme.com" - "zoe@acme.com" hidden: false responses: "201": description: "Group" content: "application/json": schema: $ref: "#/components/schemas/GroupView" example: id: "gr_q8w3zx5m2ka7np4c" name: "Family" members: - "anna@acme.com" hidden: true automatic: "…" x-example: "generated" "400": description: "name is required, name is too long (at most 40 characters), name must not contain control characters, not a valid email address, too many members (at most 500)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "name is required" x-error-messages: - "name is required" - "name is too long (at most 40 characters)" - "name must not contain control characters" - "too many members (at most 500)" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "409": description: "too many groups (at most 200)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many groups (at most 200)" x-error-messages: - "too many groups (at most 200)" "/api/groups/{id}": put: operationId: "putGroupsId" tags: - "Groups" summary: "PUT /api/groups/{id}" externalDocs: url: "https://spacebackup.net/manual/api-account/#put-api-groups-id" x-auth: "active member (the group's owner)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/GroupRequest" example: name: "Family" members: - "anna@acme.com" hidden: true x-example: "generated" responses: "200": description: "Group" content: "application/json": schema: $ref: "#/components/schemas/GroupView" example: id: "gr_q8w3zx5m2ka7np4c" name: "Family" members: - "anna@acme.com" hidden: true automatic: "…" x-example: "generated" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "name is required" x-error-messages: - "name is required" - "name is too long (at most 40 characters)" - "name must not contain control characters" - "too many members (at most 500)" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "the service keeps Coworkers; you can only hide it" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the service keeps Coworkers; you can only hide it" x-error-messages: - "the service keeps Coworkers; you can only hide it" - "not an active member of a company" "404": description: "no such group (not the caller's, or coworkers while auto-join is off)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such group" x-error-messages: - "no such group" delete: operationId: "deleteGroupsId" tags: - "Groups" summary: "DELETE /api/groups/{id}" externalDocs: url: "https://spacebackup.net/manual/api-account/#delete-api-groups-id" x-auth: "active member (the group's owner)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "No Content" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "the service keeps Coworkers; you can hide it instead" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the service keeps Coworkers; you can hide it instead" x-error-messages: - "the service keeps Coworkers; you can hide it instead" - "not an active member of a company" "404": description: "no such group" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such group" x-error-messages: - "no such group" "/api/guest/albums/{id}/leave": post: operationId: "postGuestAlbumsIdLeave" tags: - "Guests" summary: "POST /api/guest/albums/{id}/leave" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-guest-albums-id-leave" x-auth: "signed in (the guest)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "(also when not a guest of it)" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "/api/guest/devices/register": post: operationId: "postGuestDevicesRegister" tags: - "Guests" summary: "Registers the device of someone in no company, so it can read albums it is a guest of. (A device in a company uses `POST /api/devices/register` and needs nothing else.)" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-guest-devices-register" x-auth: "a device token (not a web session) whose email is not an active member of a company." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/GuestDeviceRequest" example: name: "Carols-iPhone" publicKey: "" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/GuestDeviceRegistered" example: deviceId: "gd_n5c7xq2m4ka9pz3w" "400": description: "name must be a machine name: …, publicKey must be a base64 P-256 SubjectPublicKeyInfo" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "name must be a machine name: 1-64 ASCII letters, digits, '-', '_' or '.'" x-error-messages: - "name must be a machine name: 1-64 ASCII letters, digits, '-', '_' or '.'" - "publicKey must be a base64 P-256 SubjectPublicKeyInfo" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only a device's own session registers it" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only a device's own session registers it" x-error-messages: - "only a device's own session registers it" "409": description: "you are in a company: register the device there (devices/register)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "you are in a company: register the device there (devices/register)" x-error-messages: - "you are in a company: register the device there (devices/register)" "/api/guest/pass": post: operationId: "postGuestPass" tags: - "Guests" summary: "Everything a guest's device needs to reach the albums it is a guest of: per album a ticket and the album's PCs with their public keys, and per company a relay pass for Space Relay. Valid 1 hour; ask a" description: "Everything a guest's device needs to reach the albums it is a guest of: per album a ticket and the album's PCs with their public keys, and per company a relay pass for Space Relay. Valid 1 hour; ask again when less than 10 minutes are left, or after a refusal." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-guest-pass" x-auth: "a registered device (a guest device, or a device registered in a company)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`shown: false`: the guest turned it off (show)" content: "application/json": schema: $ref: "#/components/schemas/GuestPassView" example: expires: "2026-10-18T10:20:00.000+00:00" companies: - id: "c_k3xq7m2pa9fz4w8r" name: "Acme" relay: "gp1.9xQ2…" albums: - id: "al_x7k2mq9pa4zw3n5c" name: "Las Vegas" ownerEmail: "anna@acme.com" company: "c_k3xq7m2pa9fz4w8r" itemCount: 42 updated: "2026-10-17T21:02:45.930+00:00" ticket: "at_Q9xV2b…" expires: "2026-10-18T10:20:00.000+00:00" pcs: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" publicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE…" dests: - "e3b0c442" ownerName: "Anna Smith" cover: null shown: true "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "this device is not registered (devices/register, or guest/devices/register outside a company)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this device is not registered (devices/register, or guest/devices/register outside a company)" x-error-messages: - "this device is not registered (devices/register, or guest/devices/register outside a company)" "/api/health": get: operationId: "getHealth" tags: - "Health" summary: "Whether the service is up: the apps' probe. It reads no database and calls nothing else, so it is cheap to call often." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-health" x-auth: "none." x-auth-scheme: "none" security: [] responses: "204": description: "No body" "/api/key-recovery/request": post: operationId: "postKeyRecoveryRequest" tags: - "Company-key recovery" summary: "POST /api/key-recovery/request" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-key-recovery-request" x-auth: "owner/admin with a registered device that holds no current key." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/KeyRecoveryStarted" example: id: "kr_p4xq9m2ka7zw3n5c" releaseAt: "2026-10-19T09:15:00.000+00:00" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "a plain member, or this device is not registered (devices/register)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin may do this" x-error-messages: - "only the company's owner or an admin may do this" - "this device is not registered (devices/register)" "409": description: "the company has no key to recover yet, this device already has the company key" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the company has no key to recover yet" x-error-messages: - "the company has no key to recover yet" - "this device already has the company key" "/api/key-recovery/{id}": get: operationId: "getKeyRecoveryId" tags: - "Company-key recovery" summary: "GET /api/key-recovery/{id}" externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-key-recovery-id" x-auth: "the registered device that asked (any other: 404)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/KeyRecoveryView" example: id: "kr_p4xq9m2ka7zw3n5c" state: "released" releaseAt: "2026-10-19T09:15:00.000+00:00" sealed: "U0JLMQ…" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only an admin's device gets the recovery copy (the requester is no longer an admin)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only an admin's device gets the recovery copy" x-error-messages: - "only an admin's device gets the recovery copy" - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such key recovery request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such key recovery request" x-error-messages: - "no such key recovery request" "503": description: "the recovery copy cannot be opened with this service's recovery key; try again after the operator has fixed it (the request is released but the service runs with another recovery key than the copy was sealed to; ask again later)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the recovery copy cannot be opened with this service's recovery key; try again after the operator has fixed it" x-error-messages: - "the recovery copy cannot be opened with this service's recovery key; try again after the operator has fixed it" "/api/key-recovery/{id}/cancel": post: operationId: "postKeyRecoveryIdCancel" tags: - "Company-key recovery" summary: "POST /api/key-recovery/{id}/cancel" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-key-recovery-id-cancel" x-auth: "owner/admin, by bearer token or web session + CSRF." x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "(also when cancelled already)" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not owner/admin" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin may do this" x-error-messages: - "only the company's owner or an admin may do this" - "missing CSRF token" "404": description: "no such key recovery request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such key recovery request" x-error-messages: - "no such key recovery request" "409": description: "the recovery copy was already released" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the recovery copy was already released" x-error-messages: - "the recovery copy was already released" "/api/key-release": get: operationId: "getKeyRelease" tags: - "Waiting for the company key" summary: "The devices waiting for an approval: mailed, not removed, still without a key; not the caller's own device." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-key-release" x-auth: "owner/admin, by bearer token or web session + CSRF." x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "The same list is `keyReleaseRequests` in an owner's or admin's `sync`" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/KeyReleaseRequestView" example: - id: "kq_w2m7zx4qa9k3pn5c" deviceId: "d_2kq9wz3xa5npe7hd" name: "ANNA-LAPTOP" email: "anna@acme.com" os: "macOS 26.0" since: "2026-10-18T09:00:03.120+00:00" mailedAt: "2026-10-18T09:02:05.884+00:00" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the company's owner or an admin may do this" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin may do this" x-error-messages: - "only the company's owner or an admin may do this" - "missing CSRF token" "/api/key-release/{id}/approve": post: operationId: "postKeyReleaseIdApprove" tags: - "Waiting for the company key" summary: "Approves a waiting device: the newest recovery copy of the keyring is opened with the service's recovery key and sealed to the waiting device's public key, as a delivery with `fromDevice: \"service\"`. " description: "Approves a waiting device: the newest recovery copy of the keyring is opened with the service's recovery key and sealed to the waiting device's public key, as a delivery with `fromDevice: \"service\"`. The device takes it with its next `sync` and acknowledges it." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-key-release-id-approve" x-auth: "owner/admin, by bearer token or web session + CSRF; not the waiting device itself." x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "(also when it was approved already)" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "a device cannot approve itself: approve it from the email we sent, or from another signed-in device or the admin page; only the company's owner or an admin may approve this" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "a device cannot approve itself: approve it from the email we sent, or from another signed-in device or the admin page" x-error-messages: - "a device cannot approve itself: approve it from the email we sent, or from another signed-in device or the admin page" - "only the company's owner or an admin may do this" - "only the company's owner or an admin may approve this" - "missing CSRF token" "404": description: "no such key request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such key request" x-error-messages: - "no such key request" "409": description: "ANNA-LAPTOP already has the company key, that device was removed, the company has no recovery copy of its key" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "that device was removed" x-error-messages: - "that device was removed" - " already has the company key" - "the company has no recovery copy of its key" "503": description: "the recovery copy cannot be opened with this service's recovery key; try again after the operator has fixed it (the service runs with another recovery key than the copy was sealed to; nothing changed, try again later)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the recovery copy cannot be opened with this service's recovery key; try again after the operator has fixed it" x-error-messages: - "the recovery copy cannot be opened with this service's recovery key; try again after the operator has fixed it" "/api/key/ack": post: operationId: "postKeyAck" tags: - "Company key" summary: "Says this device now has a key version. Its deliveries up to that version are dropped; the acknowledged version never goes down. It also ends a wait for the company key." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-key-ack" x-auth: "registered device." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/AckRequest" example: version: 3 keyProof: "" responses: "204": description: "No Content" "400": description: "no such key version, keyProof is not the proof of the company's current key version" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such key version" x-error-messages: - "no such key version" - "keyProof is not the proof of the company's current key version" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "/api/key/deliver": post: operationId: "postKeyDeliver" tags: - "Company key" summary: "Leaves a sealed keyring in another device's mailbox." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-key-deliver" x-auth: "registered device that holds the company's current key version." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/DeliverRequest" example: toDevice: "d_9pz4wn5cm3k9xq2a" version: 3 sealed: "" responses: "204": description: "No Content" "400": description: "sealed must be base64, sealed is too long" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - " must be base64" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such device (not an active device of the company)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" "409": description: "{\"error\": \"only the company's current key version can be delivered\", \"keyVersion\": 3}, {\"error\": \"this device does not have the current key\", \"keyVersion\": 3}" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's current key version can be delivered" x-error-messages: - "only the company's current key version can be delivered" - "this device does not have the current key" "/api/links": post: operationId: "postLinks" tags: - "links" summary: "Makes a public link." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-links" x-auth: "a registered device of an active member (the link's device)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/LinkCreate" example: items: - album: "al_x7k2mq9pa4zw3n5c" id: "4F2A-77B1" - id: "9C1D-0E3F" date: "2026-10-18" kind: "selection" expiresDays: 7 title: "Las Vegas, day 2" responses: "201": description: "`expires`: when the link stops" content: "application/json": schema: $ref: "#/components/schemas/LinkView" example: id: "id_k3xq7m2pa9fz4w8r" url: "https://spacebackup.net/account/admin" kind: "…" title: "…" device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" email: "anna@acme.com" created: "2026-10-18T09:12:00.123+00:00" expires: "2026-10-18T09:12:00.123+00:00" revoked: "2026-10-18T09:12:00.123+00:00" views: 1 lastView: "2026-10-18T09:12:00.123+00:00" state: "waiting" items: - album: null id: "id_k3xq7m2pa9fz4w8r" date: null token: "Yk3Qm9xP2aZ7wC4nV8bT1rL6sD0fH5jK9eG3uI7oA2c" albumName: "ANNA-PC" x-example: "generated" "400": description: "items (or ids) is required, give album or date, not both, items must name at least one item, a link holds at most 200 items, kind must be item, selection or album, a link of kind item names exactly one item, expiresDays must be 1 to 90, give only one of never, until or expiresDays, until must be a date, yyyy-MM-dd, or an ISO 8601 time with an offset, until must be today or later, until must be later than now, until must be at most 10 years ahead, items[].date must be a date folder, yyyy-MM-dd, album is required for a link of kind album, a link of kind album names the album only (no items, ids or date)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "give album or date, not both" x-error-messages: - "give album or date, not both" - "items (or ids) is required" - "items must name at least one item" - "a link holds at most 200 items" - "kind must be item, selection or album" - "a link of kind item names exactly one item" - "items[].date must be a date folder, yyyy-MM-dd" - "album is required for a link of kind album" - "a link of kind album names the album only (no items, ids or date)" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "this device is not registered (devices/register), the album … is not shared with you, only the album's owner or the company's owner or an admin may make a public link to the whole album" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the album is not shared with you" x-error-messages: - "the album is not shared with you" - "not an active member of a company" - "only the album's owner or the company's owner or an admin may make a public link to the whole album" - "this device is not registered (devices/register)" "404": description: "no such album: …" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such album: " x-error-messages: - "no such album: " get: operationId: "getLinks" tags: - "links" summary: "The calling device's links, newest first; `?all=1`: every link of the company (owner and admins only). Revoked and expired links stay listed (with their `state`) for 30 days. A link that never ends ha" description: "The calling device's links, newest first; `?all=1`: every link of the company (owner and admins only). Revoked and expired links stay listed (with their `state`) for 30 days. A link that never ends has `\"expires\": null`, `\"never\": true` and stays `active` until it is revoked. The company's admin page lists the same links (Public links: Expires Never for those), with a Revoke button." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-links" x-auth: "a registered device of an active member; `all=1` an owner or admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "all" in: "query" required: false schema: type: "string" nullable: true - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/LinkListView" example: links: - id: "id_k3xq7m2pa9fz4w8r" url: "https://spacebackup.net/account/admin" kind: "…" title: null device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" email: "anna@acme.com" created: "2026-10-18T09:12:00.123+00:00" expires: null revoked: null views: 1 lastView: null state: "waiting" items: - album: null id: "id_k3xq7m2pa9fz4w8r" date: null token: "Yk3Qm9xP2aZ7wC4nV8bT1rL6sD0fH5jK9eG3uI7oA2c" albumName: null x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the company's owner or an admin may list every link" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin may list every link" x-error-messages: - "only the company's owner or an admin may list every link" - "not an active member of a company" - "this device is not registered (devices/register)" "/api/links/{id}": patch: operationId: "patchLinksId" tags: - "links" summary: "A new end for an existing link (iOS request #50). Takes the link's `id` or its `token`. An expired link works again (while it is still listed, 30 days); a revoked link stays revoked." externalDocs: url: "https://spacebackup.net/manual/api-account/#patch-api-links-id" x-auth: "the link's member (any of their devices), or the company's owner or an admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/LinkExpiryChange" example: never: true responses: "200": description: "The link as in POST /api/links with its new `expires` (`null` for never), `never` and `state`" content: "application/json": schema: $ref: "#/components/schemas/LinkView" example: id: "id_k3xq7m2pa9fz4w8r" url: "https://spacebackup.net/account/admin" kind: "…" title: "…" device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" email: "anna@acme.com" created: "2026-10-18T09:12:00.123+00:00" expires: "2026-10-18T09:12:00.123+00:00" revoked: "2026-10-18T09:12:00.123+00:00" views: 1 lastView: "2026-10-18T09:12:00.123+00:00" state: "waiting" items: - album: null id: "id_k3xq7m2pa9fz4w8r" date: null token: "Yk3Qm9xP2aZ7wC4nV8bT1rL6sD0fH5jK9eG3uI7oA2c" albumName: "ANNA-PC" x-example: "generated" "400": description: "give one of never, until or expiresDays, give only one of never, until or expiresDays, until must be a date, yyyy-MM-dd, or an ISO 8601 time with an offset, until must be today or later, until must be later than now, until must be at most 10 years ahead, expiresDays must be 1 to 90" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "give only one of never, until or expiresDays" x-error-messages: - "give only one of never, until or expiresDays" - "until must be later than now" - "until must be at most 10 years ahead" - "until must be today or later" - "give one of never, until or expiresDays" - "expiresDays must be 1 to " - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "404": description: "no such link" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such link" x-error-messages: - "no such link" "409": description: "the link is revoked; make a new one" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the link is revoked; make a new one" x-error-messages: - "the link is revoked; make a new one" delete: operationId: "deleteLinksId" tags: - "links" summary: "The same as POST /api/links/{id}/revoke. Both take the link's `id` or its `token`." externalDocs: url: "https://spacebackup.net/manual/api-account/#delete-api-links-id" x-auth: "the link's member (any of their devices), or the company's owner or an admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "(also when it was revoked already)" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "404": description: "no such link" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such link" x-error-messages: - "no such link" "/api/links/{id}/revoke": post: operationId: "postLinksIdRevoke" tags: - "links" summary: "Stops a link at once (its URL answers 404 from then on, and the PCs refuse its ticket at their next check)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-links-id-revoke" x-auth: "the link's member (any of their devices), or the company's owner or an admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "(also when it was revoked already)" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "404": description: "no such link" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such link" x-error-messages: - "no such link" "/api/matchkey/claim": post: operationId: "postMatchkeyClaim" tags: - "matchkey" summary: "The right to make the member's matching key (iOS request #68), for one device only: the service never makes, holds or sees the key. The winner makes 32 random bytes, keeps them and hands them over sea" description: "The right to make the member's matching key (iOS request #68), for one device only: the service never makes, holds or sees the key. The winner makes 32 random bytes, keeps them and hands them over sealed (`POST /api/matchkey/deliver`)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-matchkey-claim" x-auth: "registered device of an active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "To the first device that asks while no device of the member holds a key, and again to that same device while its claim is live (it lost the key before keeping it)" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "409": description: "a device of this member already holds the matching key; it is handed to this device, another device of this member makes the matching key" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "a device of this member already holds the matching key; it is handed to this device" x-error-messages: - "a device of this member already holds the matching key; it is handed to this device" - "another device of this member makes the matching key" "/api/matchkey/deliver": post: operationId: "postMatchkeyDeliver" tags: - "matchkey" summary: "A device holding the member's matching key (it won the claim, or one was handed to it) leaves it sealed for one of the devices in `matchKeyHandovers` (`DeviceKey.Seal`, purpose `member-match-key`); th" description: "A device holding the member's matching key (it won the claim, or one was handed to it) leaves it sealed for one of the devices in `matchKeyHandovers` (`DeviceKey.Seal`, purpose `member-match-key`); that device drops out of the list and gets the box as `sync.matchKey` (a PC hosting another member's iCloud Photos: in `memberMatchKeys`). The box is opaque; the service stores only sealed boxes." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-matchkey-deliver" x-auth: "registered device of an active member that holds the matching key." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/MatchKeyDeliverRequest" example: toDevice: "d_9pz4wn5cm3k9xq2a" sealed: "" responses: "204": description: "No Content" "400": description: "the matching key is handed to another device (toDevice is the caller), sealed must be base64" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the matching key is handed to another device" x-error-messages: - "the matching key is handed to another device" - " is required" - " is too long" - " must not contain control characters" - " must be base64" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "a target that is neither the member's own device nor a PC hosting their iCloud Photos" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "a matching key goes only to the member's own devices and the PCs hosting their iCloud Photos" x-error-messages: - "a matching key goes only to the member's own devices and the PCs hosting their iCloud Photos" - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no such device" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" "409": description: "this device does not hold the member's matching key" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this device does not hold the member's matching key" x-error-messages: - "this device does not hold the member's matching key" "/api/me": get: operationId: "getMe" tags: - "Session & company" summary: "The caller's Session." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-me" x-auth: "signed in (any token, in a company or not)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "Session" content: "application/json": schema: $ref: "#/components/schemas/SessionView" example: email: "anna@acme.com" memberId: "m_7hd2kq9wz3xa5npe" deviceId: "d_4f2a7cqm3xk9wz2b" company: id: "c_k3xq7m2pa9fz4w8r" name: "Acme" role: "member" status: "active" keyVersion: 3 rotationNeeded: false autoJoin: true domain: null faces: true languages: - "…" name: "Anna Smith" firstName: "ANNA-PC" lastName: "ANNA-PC" languages: - "…" born: born: null age: null "on": null picture: "…" created: true keyMatched: true moved: from: "…" x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" put: operationId: "putMe" tags: - "Session & company" summary: "Sets or clears the caller's own first and last name in their company, and/or their own birth (requests #121). The name is shown only inside the company (and to the owners of albums the caller accepted" description: "Sets or clears the caller's own first and last name in their company, and/or their own birth (requests #121). The name is shown only inside the company (and to the owners of albums the caller accepted as a guest). The birth is the caller's alone: only their own Session reads it back (the apps' assistant uses it for \"my photos when I was 30\"); nobody in the company sees it." externalDocs: url: "https://spacebackup.net/manual/api-account/#put-api-me" x-auth: "active member for the name; signed in (in a company or not) for a birth alone." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/MeRequest" example: firstName: "Anna" lastName: "Smith" responses: "200": description: "Session (with the new `name`, `firstName`, `lastName`, `born`)" content: "application/json": schema: $ref: "#/components/schemas/SessionView" example: email: "anna@acme.com" memberId: "m_7hd2kq9wz3xa5npe" deviceId: "d_4f2a7cqm3xk9wz2b" company: id: "c_k3xq7m2pa9fz4w8r" name: "Acme" role: "member" status: "active" keyVersion: 3 rotationNeeded: false autoJoin: true domain: null faces: true languages: - "…" name: "Anna Smith" firstName: "ANNA-PC" lastName: "ANNA-PC" languages: - "…" born: born: null age: null "on": null picture: "…" created: true keyMatched: true moved: from: "…" x-example: "generated" "400": description: "first name is too long (at most 40 characters), last name must not contain control characters, first name is required with a last name, born must be \"YYYY\", \"YYYY-MM\" or \"YYYY-MM-DD\", born is not a real date, born is before 1900, born is in the future, age must be a whole number from 0 to 130, on must be a date, \"YYYY-MM-DD\", on is in the future, age and on put the birth before 1900, give born or age, not both, on goes with age" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "on goes with age" x-error-messages: - "on goes with age" - "first name is required with a last name" - "give born or age, not both" - "born must be \"YYYY\", \"YYYY-MM\" or \"YYYY-MM-DD\"" - "born is not a real date" - "born is before 1900" - "born is in the future" - "age must be a whole number from 0 to 130" - "on must be a date, \"YYYY-MM-DD\"" - "on is in the future" - "age and on put the birth before 1900" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not an active member of a company (a name)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "/api/me/approvals": get: operationId: "getMeApprovals" tags: - "Session & company" summary: "Every request to restore a device of the caller's email, any state, newest first: what the iPhone app's Approvals screen and Restore requests on `/account/me` show. For an owner or admin it also holds" description: "Every request to restore a device of the caller's email, any state, newest first: what the iPhone app's Approvals screen and Restore requests on `/account/me` show. For an owner or admin it also holds the company's other members' requests (those they get a `datakey-request` notification for): every one that waits, and those decided in the last 30 days." externalDocs: url: "https://spacebackup.net/manual/api-account/#api-me-approvals" x-auth: "registered device of an active member (any role); a plain member never sees other members' requests." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`state` is `waiting`, `approved` or `denied`" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/ApprovalView" example: - id: "dr_z3k7xq2ma9pw4n5c" state: "waiting" sourceDevice: "d_7pz4wn5cq2am3k9x" sourceName: "ANNA-PC" sourceEmail: "anna@acme.com" requester: "bob@acme.com" requesterName: "Bob Jones" requestingDevice: "BOB-PC" created: "2026-10-18T12:00:00+00:00" canDecide: true decidedBy: null decided: null "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " must be a string" x-error-messages: - " must be a string" - " is too long" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "/api/me/approvals/{id}/approve": post: operationId: "postMeApprovalsIdApprove" tags: - "Session & company" summary: "The same decision as the mailed link, from any of the caller's signed-in devices, whatever their role: the device's member decides requests for their devices; an owner or admin also decides other memb" description: "The same decision as the mailed link, from any of the caller's signed-in devices, whatever their role: the device's member decides requests for their devices; an owner or admin also decides other members' requests (the same decision as on the admin page)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-me-approvals-id-approve-post-api-me-approvals-id-deny" x-auth: "registered device of an active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "No Content" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not for them to decide (their own request from another device, not being an owner or admin; an owner's or admin's own request for another member's device);" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "404": description: "no such request to restore a device of yours (unknown, or another member's device and the caller is not an owner or admin);" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such request to restore a device of yours" x-error-messages: - "no such request to restore a device of yours" - "no such data-key request" "409": description: "this request was already approved|denied" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this request was already " x-error-messages: - "this request was already " "/api/me/approvals/{id}/deny": post: operationId: "postMeApprovalsIdDeny" tags: - "Session & company" summary: "The same decision as the mailed link, from any of the caller's signed-in devices, whatever their role: the device's member decides requests for their devices; an owner or admin also decides other memb" description: "The same decision as the mailed link, from any of the caller's signed-in devices, whatever their role: the device's member decides requests for their devices; an owner or admin also decides other members' requests (the same decision as on the admin page)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-me-approvals-id-approve-post-api-me-approvals-id-deny" x-auth: "registered device of an active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "No Content" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not for them to decide (their own request from another device, not being an owner or admin; an owner's or admin's own request for another member's device);" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "404": description: "no such request to restore a device of yours (unknown, or another member's device and the caller is not an owner or admin);" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such request to restore a device of yours" x-error-messages: - "no such request to restore a device of yours" - "no such data-key request" "409": description: "this request was already approved|denied" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this request was already " x-error-messages: - "this request was already " "/api/me/notifications": get: operationId: "getMeNotifications" tags: - "Session & company" summary: "Which kinds are pushed and popped up (the history keeps everything)." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-me-notifications" x-auth: "signed in (for someone in no company the setting is kept per email)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "All kinds default to on. `albumAdds` is the same setting as `kinds[\"album-added\"]`" content: "application/json": schema: $ref: "#/components/schemas/NotificationsView" example: albumAdds: true kinds: album-added: true shared: true key-waiting: true device-joined: false restore-approval: true relay-credit: true invitation-accepted: true remove-request: true album-auto-added: true assistant-job: true album-job: true drive-nearly-full: true vision-coverage: true vision-attention: true "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" put: operationId: "putMeNotifications" tags: - "Session & company" summary: "PUT /api/me/notifications" externalDocs: url: "https://spacebackup.net/manual/api-account/#put-api-me-notifications" x-auth: "signed in." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/NotificationsRequest" example: albumAdds: false kinds: device-joined: false responses: "200": description: "The same shape as GET" content: "application/json": schema: $ref: "#/components/schemas/NotificationsView" example: albumAdds: true kinds: photo: true x-example: "generated" "400": description: "albumAdds or kinds is required, unknown notification kind x (one of album-added, shared, …), albumAdds and kinds[\"album-added\"] disagree" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "albumAdds and kinds[\"album-added\"] disagree" x-error-messages: - "albumAdds and kinds[\"album-added\"] disagree" - "albumAdds or kinds is required" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "/api/me/picture": put: operationId: "putMePicture" tags: - "Session & company" summary: "Sets the caller's own picture (requests #125), shown to them and to their colleagues (the active members of their company) next to their name. Kept with the account by email, like the birth, so it sta" description: "Sets the caller's own picture (requests #125), shown to them and to their colleagues (the active members of their company) next to their name. Kept with the account by email, like the birth, so it stays through a company change; only the current company's active members read it." externalDocs: url: "https://spacebackup.net/manual/api-account/#put-api-me-picture" x-auth: "signed in (any token, in a company or not)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "Session (with the new `picture` version)" content: "application/json": schema: $ref: "#/components/schemas/SessionView" example: email: "anna@acme.com" memberId: "m_7hd2kq9wz3xa5npe" deviceId: "d_4f2a7cqm3xk9wz2b" company: id: "c_k3xq7m2pa9fz4w8r" name: "Acme" role: "member" status: "active" keyVersion: 3 rotationNeeded: false autoJoin: true domain: null faces: true languages: - "…" name: "Anna Smith" firstName: "ANNA-PC" lastName: "ANNA-PC" languages: - "…" born: born: null age: null "on": null picture: "…" created: true keyMatched: true moved: from: "…" x-example: "generated" "400": description: "the picture is empty, the body is not a JPEG image, the body is not a PNG image" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the picture is empty" x-error-messages: - "the picture is empty" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "413": description: "the picture is larger than 512 KB" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the picture is larger than KB" x-error-messages: - "the picture is larger than KB" "415": description: "the picture must be image/jpeg or image/png" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the picture must be image/jpeg or image/png" x-error-messages: - "the picture must be image/jpeg or image/png" delete: operationId: "deleteMePicture" tags: - "Session & company" summary: "Removes the caller's own picture (none already: the same answer)." externalDocs: url: "https://spacebackup.net/manual/api-account/#delete-api-me-picture" x-auth: "signed in (any token, in a company or not)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "Session (no `picture`)" content: "application/json": schema: $ref: "#/components/schemas/SessionView" example: email: "anna@acme.com" memberId: "m_7hd2kq9wz3xa5npe" deviceId: "d_4f2a7cqm3xk9wz2b" company: id: "c_k3xq7m2pa9fz4w8r" name: "Acme" role: "member" status: "active" keyVersion: 3 rotationNeeded: false autoJoin: true domain: null faces: true languages: - "…" name: "Anna Smith" firstName: "ANNA-PC" lastName: "ANNA-PC" languages: - "…" born: born: null age: null "on": null picture: "…" created: true keyMatched: true moved: from: "…" x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" get: operationId: "getMePicture" tags: - "Session & company" summary: "The caller's own picture: the image bytes with their `Content-Type` (`image/jpeg` or `image/png`)." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-me-picture" x-auth: "signed in (any token, in a company or not)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not a valid email address" x-error-messages: - "not a valid email address" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "404": description: "no picture" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no picture" x-error-messages: - "no picture" "/api/me/settings": get: operationId: "getMeSettings" tags: - "Session & company" summary: "The member's own settings (Vladimir 2026-10-31)." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-me-settings" x-auth: "signed in (someone who is not an active member of a company gets the defaults)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`autoAcceptCompany` (default `true`): Automatically accept albums shared by people in my company" content: "application/json": schema: $ref: "#/components/schemas/MeSettingsView" example: autoAcceptCompany: true languages: - "ru" - "en" companyLanguages: - "en" - "ru" - "fr" selectAllSkipsWork: false "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" put: operationId: "putMeSettings" tags: - "Session & company" summary: "PUT /api/me/settings" externalDocs: url: "https://spacebackup.net/manual/api-account/#put-api-me-settings" x-auth: "an active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/MeSettingsRequest" example: autoAcceptCompany: false languages: - "ru" - "en" selectAllSkipsWork: true responses: "200": description: "The same shape as GET" content: "application/json": schema: $ref: "#/components/schemas/MeSettingsView" example: autoAcceptCompany: true languages: - "…" companyLanguages: - "…" selectAllSkipsWork: true x-example: "generated" "400": description: "unknown language \"ko\" (one of en, fr, …), \"ru\" is given twice, at most 3 languages a member" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "bad request: " x-error-messages: - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only an active member of a company has these settings" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only an active member of a company has these settings" x-error-messages: - "only an active member of a company has these settings" "/api/me/trusted-senders": get: operationId: "getMeTrustedSenders" tags: - "Session & company" summary: "GET /api/me/trusted-senders" externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-me-trusted-senders" x-auth: "signed in." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`[{\"email\": \"anna@acme.com\", \"since\": \"2026-10-17T10:05:00.000+00:00\", \"name\": \"Anna Smith\"}]` (`name` *optional*)" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/TrustedSenderView" example: {} x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "/api/me/trusted-senders/remove": post: operationId: "postMeTrustedSendersRemove" tags: - "Session & company" summary: "POST /api/me/trusted-senders/remove" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-me-trusted-senders-remove" x-auth: "signed in." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/TrustedSenderRequest" example: email: "anna@acme.com" responses: "204": description: "(also when not trusted)" "400": description: "not a valid email address" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not a valid email address" x-error-messages: - "not a valid email address" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "/api/members": get: operationId: "getMembers" tags: - "Members & people" summary: "GET /api/members" externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-members" x-auth: "owner/admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`[Member]` (Member): active, invited and pending members" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/MemberView" example: {} x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the company's owner or an admin may do this" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin may do this" x-error-messages: - "only the company's owner or an admin may do this" "/api/members/invite": post: operationId: "postMembersInvite" tags: - "Members & people" summary: "Invites an address (a personal one too) and mails the invitation. The person joins when they sign in with exactly that address and the app calls `company/join`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-members-invite" x-auth: "owner/admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/MemberInviteRequest" example: email: "bob@acme.com" role: "member" responses: "200": description: "The new Member row (`status: \"invited\"`" content: "application/json": schema: $ref: "#/components/schemas/MemberView" example: id: "m_7hd2kq9wz3xa5npe" email: "anna@acme.com" name: "Anna Smith" firstName: "ANNA-PC" lastName: "ANNA-PC" role: "member" status: "active" invitedBy: "…" created: "2026-10-18T09:12:00.123+00:00" languages: - "…" x-example: "generated" "400": description: "not a valid email address, role must be admin or member" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "role must be admin or member" x-error-messages: - "role must be admin or member" - "not a valid email address" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin may do this" x-error-messages: - "only the company's owner or an admin may do this" "404": description: "no such member (only when the new row was removed again before the answer was read back)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such member" x-error-messages: - "no such member" "409": description: "bob@acme.com is already a member, bob@acme.com belongs to another company (a company of their own that nothing depends on does not count)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is already a member" x-error-messages: - " is already a member" - " belongs to another company" "/api/members/{id}/approve": post: operationId: "postMembersIdApprove" tags: - "Members & people" summary: "Lets a pending person in. They get a \"You joined Acme\" mail." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-members-id-approve" x-auth: "owner/admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "The member's row (`status: \"active\"`)" content: "application/json": schema: $ref: "#/components/schemas/MemberView" example: id: "m_7hd2kq9wz3xa5npe" email: "anna@acme.com" name: "Anna Smith" firstName: "ANNA-PC" lastName: "ANNA-PC" role: "member" status: "active" invitedBy: "…" created: "2026-10-18T09:12:00.123+00:00" languages: - "…" x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin may do this" x-error-messages: - "only the company's owner or an admin may do this" "404": description: "no such member" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such member" x-error-messages: - "no such member" "409": description: "bob@acme.com is active, not waiting for approval, bob@acme.com belongs to another company now" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is , not waiting for approval" x-error-messages: - " is , not waiting for approval" - " belongs to another company now" "/api/members/{id}/deny": post: operationId: "postMembersIdDeny" tags: - "Members & people" summary: "POST /api/members/{id}/deny" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-members-id-deny" x-auth: "owner/admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "The member's row (`status: \"removed\"`)" content: "application/json": schema: $ref: "#/components/schemas/MemberView" example: id: "m_7hd2kq9wz3xa5npe" email: "anna@acme.com" name: "Anna Smith" firstName: "ANNA-PC" lastName: "ANNA-PC" role: "member" status: "active" invitedBy: "…" created: "2026-10-18T09:12:00.123+00:00" languages: - "…" x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin may do this" x-error-messages: - "only the company's owner or an admin may do this" "404": description: "no such member" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such member" x-error-messages: - "no such member" "409": description: "bob@acme.com is active, not waiting for approval (any status but pending), bob@acme.com belongs to another company now" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is , not waiting for approval" x-error-messages: - " is , not waiting for approval" - " belongs to another company now" "/api/members/{id}/name": post: operationId: "postMembersIdName" tags: - "Members & people" summary: "Sets or clears any member's first and last name (the owner's too). Whoever wrote last wins." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-members-id-name" x-auth: "owner/admin, by bearer token or web session + CSRF." x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/MemberNameRequest" example: name: "Anna Smith" firstName: "ANNA-PC" lastName: "ANNA-PC" x-example: "generated" responses: "200": description: "(all `\"\"` after clearing)" content: "application/json": schema: type: "object" properties: name: type: "string" firstName: type: "string" lastName: type: "string" required: - "name" - "firstName" - "lastName" example: name: "Bob Jones" firstName: "Bob" lastName: "Jones" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "first name is required with a last name" x-error-messages: - "first name is required with a last name" - " is too long (at most 40 characters)" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "a plain member (they use PUT /api/me)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin may do this" x-error-messages: - "only the company's owner or an admin may do this" - "missing CSRF token" "404": description: "no such member (also a removed one)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such member" x-error-messages: - "no such member" "/api/members/{id}/remove": post: operationId: "postMembersIdRemove" tags: - "Members & people" summary: "Removes a member: their sessions are revoked, their devices removed, their shares ended, their phones' saved state deleted, and the company key must be replaced (`rotationNeeded`). The owner and admin" description: "Removes a member: their sessions are revoked, their devices removed, their shares ended, their phones' saved state deleted, and the company key must be replaced (`rotationNeeded`). The owner and admins get a mail." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-members-id-remove" x-auth: "owner/admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "The member's row (`status: \"removed\"`)" content: "application/json": schema: $ref: "#/components/schemas/MemberView" example: id: "m_7hd2kq9wz3xa5npe" email: "anna@acme.com" name: "Anna Smith" firstName: "ANNA-PC" lastName: "ANNA-PC" role: "member" status: "active" invitedBy: "…" created: "2026-10-18T09:12:00.123+00:00" languages: - "…" x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin may do this" x-error-messages: - "only the company's owner or an admin may do this" "404": description: "no such member" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such member" x-error-messages: - "no such member" "409": description: "the owner cannot be removed" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the owner cannot be removed" x-error-messages: - "the owner cannot be removed" "/api/members/{id}/role": post: operationId: "postMembersIdRole" tags: - "Members & people" summary: "POST /api/members/{id}/role" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-members-id-role" x-auth: "owner/admin." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/MemberRoleRequest" example: role: "admin" responses: "200": description: "The member's row after the change" content: "application/json": schema: $ref: "#/components/schemas/MemberView" example: id: "m_7hd2kq9wz3xa5npe" email: "anna@acme.com" name: "Anna Smith" firstName: "ANNA-PC" lastName: "ANNA-PC" role: "member" status: "active" invitedBy: "…" created: "2026-10-18T09:12:00.123+00:00" languages: - "…" x-example: "generated" "400": description: "role must be admin or member" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "role must be admin or member" x-error-messages: - "role must be admin or member" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's owner or an admin may do this" x-error-messages: - "only the company's owner or an admin may do this" "404": description: "no such member" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such member" x-error-messages: - "no such member" "409": description: "the owner's role cannot be changed" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the owner's role cannot be changed" x-error-messages: - "the owner's role cannot be changed" "/api/notifications": get: operationId: "getNotifications" tags: - "Notifications" summary: "The history, newest first." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-notifications" x-auth: "signed in." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "before" in: "query" required: false schema: type: "integer" format: "int64" nullable: true - name: "limit" in: "query" required: false schema: type: "integer" format: "int32" nullable: true - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "Notification list" content: "application/json": schema: $ref: "#/components/schemas/NotificationList" example: notifications: - id: 1842 time: "2026-10-18T08:40:11.500+00:00" kind: "album-added" title: "Las Vegas" body: "Bob Jones added 12 photos and videos" target: type: "album" id: "al_x7k2mq9pa4zw3n5c" read: false quiet: false - id: 1839 time: "2026-10-18T07:02:30.000+00:00" kind: "device-joined" title: "New device ANNA-LAPTOP" body: "ANNA-LAPTOP (macOS 26.0) of anna@acme.com joined Acme" target: type: "device" id: "d_2kq9wz3xa5npe7hd" read: true quiet: false unread: 1 latest: 1842 "400": description: "limit must be 1 to 200" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "limit must be 1 to 200" x-error-messages: - "limit must be 1 to 200" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "/api/notifications/read": post: operationId: "postNotificationsRead" tags: - "Notifications" summary: "POST /api/notifications/read" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-notifications-read" x-auth: "signed in." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/NotificationsReadRequest" example: ids: - 1842 - 1839 responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/NotificationsUnread" example: unread: 0 "400": description: "ids or all is required, at most 1000 ids at a time" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "ids or all is required" x-error-messages: - "ids or all is required" - "at most 1000 ids at a time" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "/api/notifications/wait": get: operationId: "getNotificationsWait" tags: - "Notifications" summary: "The long-poll: answers as soon as there is a notification newer than `after`." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-notifications-wait" x-auth: "signed in." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "after" in: "query" required: false schema: type: "integer" format: "int64" nullable: true - name: "timeout" in: "query" required: false schema: type: "number" nullable: true - name: "update" in: "query" required: false schema: type: "integer" format: "int64" nullable: true - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "Notification list with the notifications newer than `after`, oldest first (up to 200), as soon as there is one" content: "application/json": schema: $ref: "#/components/schemas/NotificationList" example: notifications: - id: 41 time: "2026-10-18T09:12:00.123+00:00" kind: "…" title: "…" body: "…" target: type: "…" id: "id_k3xq7m2pa9fz4w8r" read: false quiet: false unread: 0 latest: 1 update: version: "1.8.2" published: 1 x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "/api/peer-tickets": post: operationId: "postPeerTickets" tags: - "Peer tickets" summary: "POST /api/peer-tickets" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-peer-tickets" x-auth: "registered device (the reader)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/PeerTicketCreate" example: sourceDevice: "d_4f2a7cqm3xk9wz2b" responses: "200": description: "`reason`: `share` (an active share of that source to the caller's email) or `restore` (an approved restore request of the calling device for that source" content: "application/json": schema: $ref: "#/components/schemas/PeerTicketView" example: ticket: "pt_Yk3Qm9xP2aZ7wC4nV8bT1rL6sD0fH5jK9eG3uI7oA2c" sourceDevice: "d_4f2a7cqm3xk9wz2b" sourceName: "ANNA-PC" reason: "share" expires: "2026-10-18T10:12:00.000+00:00" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not an active member, or the device is not registered" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no share or approved restore of that device for you" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no share or approved restore of that device for you" x-error-messages: - "no share or approved restore of that device for you" "/api/peer-tickets/check": post: operationId: "postPeerTicketsCheck" tags: - "Peer tickets" summary: "A host asks whether a reader's ticket is good now (the share or approval is checked at every call, not only when the ticket was made)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-peer-tickets-check" x-auth: "registered device of the same company (the host)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/PeerTicketCheck" example: ticket: "pt_…" responses: "200": description: "A host serves only when `requesterName` is the connection's peer name and `sourceName` the asked machine" content: "application/json": schema: $ref: "#/components/schemas/PeerTicketCheckView" example: requesterDevice: "d_7pz4wn5cq2am3k9x" requesterName: "BOB-PC" requesterEmail: "bob@acme.com" sourceDevice: "d_4f2a7cqm3xk9wz2b" sourceName: "ANNA-PC" reason: "share" expires: "2026-10-18T10:12:00.000+00:00" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no live share or approved restore for that ticket (unknown or expired ticket, the share ended, the restore no longer approved, the reader device or its member removed)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "Not Found" "/api/people": get: operationId: "getPeople" tags: - "Members & people" summary: "Finds colleagues to share with, by name or email." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-people" x-auth: "active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "q" in: "query" required: false schema: type: "string" nullable: true - name: "all" in: "query" required: false schema: type: "string" nullable: true - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`[Person]` (Person), by first name, last name, email (people without a name last)" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/PersonView" example: - email: "zoe@acme.com" firstName: "Zoë" lastName: "Martin" - email: "zack@acme.com" firstName: "" lastName: "" "400": description: "q is too long (at most 200 characters)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "q is too long (at most 200 characters)" x-error-messages: - "q is too long (at most 200 characters)" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not an active member" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "429": description: "too many searches; try again in a minute (60 a minute per member, both forms together)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many searches; try again in a minute" x-error-messages: - "too many searches; try again in a minute" "/api/people/picture": get: operationId: "getPeoplePicture" tags: - "Members & people" summary: "A colleague's own picture (requests #125), as they set it with PUT /api/me/picture." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-people-picture" x-auth: "active member (the caller's own email: signed in)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "email" in: "query" required: false schema: type: "string" nullable: true - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "400": description: "email is required, not a valid email address" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "email is required" x-error-messages: - "email is required" - "not a valid email address" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not an active member" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "404": description: "no picture: they have none, or are not an active member of the caller's company (the same answer, so it tells nothing about other companies)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no picture" x-error-messages: - "no picture" "/api/recovery-key": get: operationId: "getRecoveryKey" tags: - "Company key" summary: "The service's recovery public key, to seal the `recovery` copy to." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-recovery-key" x-auth: "none." x-auth-scheme: "none" security: [] responses: "200": description: "(P-256, base64 SubjectPublicKeyInfo)" content: "application/json": schema: $ref: "#/components/schemas/RecoveryKeyView" example: publicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE…" "/api/relay/balance": get: operationId: "getRelayBalance" tags: - "Space Relay billing" summary: "GET /api/relay/balance" externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-relay-balance" x-auth: "active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "| Field | Meaning | |---|---| | `month` | the current month, `YYYY-MM` (UTC) | | `freeBytes` | the free allowance per month" content: "application/json": schema: $ref: "#/components/schemas/RelayBalanceView" example: month: "2026-10" freeBytes: 5000000000 freeUsedBytes: 3210000000 prepaidBytes: 87000000000 activationNeeded: false autoTopUp: true autoTopUpPack: "sb_pack_500" paymentsEnabled: true prepaidTotalBytes: 500000000000 lowBytes: 50000000000 usedBytes: 3210000000 unlimitedUntil: null usageLine: "Space Relay this month: 3.2 GB used · 1.8 GB of 5 GB free left · balance 87 GB" packs: - id: "sb_pack_500" bytes: 500000000000 cents: 900 currency: "usd" name: "Space Relay 500 GB" - id: "sb_pack_2000" bytes: 2000000000000 cents: 2500 currency: "usd" name: "Space Relay 2 TB" - id: "sb_pack_5000" bytes: 5000000000000 cents: 4900 currency: "usd" name: "Space Relay 5 TB" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "/api/relay/buy-link": post: operationId: "postRelayBuyLink" tags: - "Space Relay billing" summary: "A one-time link that opens the buy screen in a browser, already signed in as the device's user." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-relay-buy-link" x-auth: "active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/BuyLinkView" example: url: "https://spacebackup.net/account/relay/open?t=Mq7…" expiresAt: "2026-10-18T09:42:00.000+00:00" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "/api/relay/group": post: operationId: "postRelayGroup" tags: - "Space Relay billing" summary: "Links the device's relay group to the caller's company, so its relayed bytes are counted to the company. The group id is derived from the company key (only a holder of the key knows it). The apps call" description: "Links the device's relay group to the caller's company, so its relayed bytes are counted to the company. The group id is derived from the company key (only a holder of the key knows it). The apps call it after sign-in and whenever the company key changes." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-relay-group" x-auth: "active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/RelayGroupRequest" example: groupId: "<64 lower-case hex digits>" responses: "204": description: "(also when it was linked already)" "400": description: "groupId must be 64 lower-case hex digits" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "groupId must be 64 lower-case hex digits" x-error-messages: - "groupId must be 64 lower-case hex digits" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "409": description: "this relay group belongs to another company" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this relay group belongs to another company" x-error-messages: - "this relay group belongs to another company" "/api/shares": post: operationId: "postShares" tags: - "Shares" summary: "POST /api/shares" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-shares" x-auth: "active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/ShareCreate" example: sourceDevice: "d_4f2a7cqm3xk9wz2b" email: "bob@acme.com" responses: "200": description: "201 Share, or 200 with the existing share when it was shared already" content: "application/json": schema: $ref: "#/components/schemas/ShareView" example: id: "sh_m3k9xq2a7pz4wn5c" sourceDevice: "d_4f2a7cqm3xk9wz2b" sourceName: "ANNA-PC" ownerEmail: "anna@acme.com" recipientEmail: "anna@acme.com" sharedBy: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" scope: "…" x-example: "generated" "201": description: "Share, or 200 with the existing share when it was shared already" content: "application/json": schema: $ref: "#/components/schemas/ShareView" example: id: "sh_m3k9xq2a7pz4wn5c" sourceDevice: "d_4f2a7cqm3xk9wz2b" sourceName: "ANNA-PC" ownerEmail: "anna@acme.com" recipientEmail: "anna@acme.com" sharedBy: "anna@acme.com" since: "2026-10-18T09:12:00.123+00:00" scope: "…" x-example: "generated" "400": description: "these backups are already bob@acme.com's (the recipient is the device's owner)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "these backups are already 's" x-error-messages: - "these backups are already 's" - " is required" - " is too long" - " must not contain control characters" - "not a valid email address" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "only the device's owner or an admin can share its backups" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the device's owner or an admin can share its backups" x-error-messages: - "only the device's owner or an admin can share its backups" - "you cannot share 's backups with yourself: ask to restore them instead, which or another owner or admin approves" - "not an active member of a company" "404": description: "no such device, bob@acme.com is not a member of your company" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such device" x-error-messages: - "no such device" - " is not a member of your company" get: operationId: "getShares" tags: - "Shares" summary: "Active shares the caller may see: of the devices with the caller's email; owners and admins: all of the company." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-shares" x-auth: "active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "device" in: "query" required: false schema: type: "string" nullable: true - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`[Share]`, by device name and recipient" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/ShareView" example: {} x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "/api/shares/with-me": get: operationId: "getSharesWithMe" tags: - "Shares" summary: "Active shares whose recipient is the caller." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-shares-with-me" x-auth: "active member." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "`[Share]`" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/ShareView" example: {} x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "/api/shares/{id}/remove": post: operationId: "postSharesIdRemove" tags: - "Shares" summary: "Stops a share. Backups that the recipient's devices could already read stay readable to them; new backups are not shared (the source makes a new data key at its next sync when the keys had been handed" description: "Stops a share. Backups that the recipient's devices could already read stay readable to them; new backups are not shared (the source makes a new data key at its next sync when the keys had been handed out)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-shares-id-remove" x-auth: "active member: the device's owner, an owner/admin, whoever shared it, or the recipient (removing it from" x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "(also when already removed)" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" "404": description: "no such share (also for anyone not allowed)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such share" x-error-messages: - "no such share" "/api/signin/code": post: operationId: "postSigninCode" tags: - "Sign-in" summary: "Redeems the 6-digit code from the mail." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-signin-code" x-auth: "none (the `secret` is the proof)." x-auth-scheme: "none" security: [] requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/SignInCodeRequest" example: requestId: "r_…" secret: "" code: "481920" responses: "200": description: "Approved: `token` is the new device token. `memberId` and `company` are `null` while the email belongs to no company" content: "application/json": schema: oneOf: - $ref: "#/components/schemas/SignInApproved" - type: "object" properties: status: type: "string" enum: - "pending" required: - "status" example: status: "approved" token: "Yk3Qm9xP2aZ7wC4nV8bT1rL6sD0fH5jK9eG3uI7oA2c" email: "anna@acme.com" memberId: "m_7hd2kq9wz3xa5npe" deviceId: null company: id: "c_k3xq7m2pa9fz4w8r" name: "Acme" role: "owner" status: "active" keyVersion: 3 rotationNeeded: false autoJoin: false domain: "acme.com" "400": description: "wrong code, with \"attemptsLeft\": 3. The 5th wrong code kills the request. -" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "wrong code" x-error-messages: - "wrong code" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "404": description: "no such sign-in request: an unknown requestId **or a wrong secret** (the two cannot be told apart). -" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such sign-in request" x-error-messages: - "no such sign-in request" "410": description: "this sign-in was already used, this sign-in has expired; start again (after 15 minutes), too many wrong codes; start again" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this sign-in was already used" x-error-messages: - "this sign-in was already used" - "this sign-in has expired; start again" - "too many wrong codes; start again" "/api/signin/poll": post: operationId: "postSigninPoll" tags: - "Sign-in" summary: "Asks whether the mailed link was confirmed. Call it every 2 seconds while the person may click the link." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-signin-poll" x-auth: "none." x-auth-scheme: "none" security: [] requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/SignInPollRequest" example: requestId: "r_…" secret: "" responses: "200": description: "Either {...} or the same approved answer as `POST /api/signin/code`" content: "application/json": schema: oneOf: - $ref: "#/components/schemas/SignInApproved" - type: "object" properties: status: type: "string" enum: - "pending" required: - "status" example: status: "pending" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "wrong code" x-error-messages: - "wrong code" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "404": description: "no such sign-in request (an unknown requestId or a wrong secret)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such sign-in request" x-error-messages: - "no such sign-in request" "410": description: "this sign-in was already used, this sign-in has expired; start again, too many wrong codes; start again. Stop polling on either and start again" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this sign-in was already used" x-error-messages: - "this sign-in was already used" - "this sign-in has expired; start again" - "too many wrong codes; start again" "/api/signin/start": post: operationId: "postSigninStart" tags: - "Sign-in" summary: "Starts a sign-in and mails the link and the code." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-signin-start" x-auth: "none." x-auth-scheme: "none" security: [] requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/SignInStartRequest" example: email: "anna@acme.com" deviceName: "ANNA-PC" secretHash: "q1nN0w0yQm1pCk7n6Wl1fW6m4dH0Yk3x8bT1rL6sD0E=" x-field-rules: email: "a valid address (trimmed, lower-cased; at most 254 characters)" deviceName: "shown in the mail and on the confirm page (\"Sign in ANNA-PC?\"); at most 100 characters; default \"a device\"" secretHash: "base64 of a 32-byte SHA-256 of the secret" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/SignInStarted" example: requestId: "r_2mxq7k4a9fz3wn5c" expiresAt: "2026-10-18T09:27:00.481+00:00" "400": description: "not a valid email address, secretHash must be base64 of a SHA-256, deviceName is too long. -" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "secretHash must be base64 of a SHA-256" x-error-messages: - "secretHash must be base64 of a SHA-256" - "not a valid email address" - " is required" - " is too long" - " must not contain control characters" - "bad request: " "429": description: "too many sign-in requests; try again later (per email: 5 per 15 minutes and 20 per day; per client IP: 30 per hour). -" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many sign-in requests; try again later" x-error-messages: - "too many sign-in requests; try again later" "503": description: "could not send the sign-in mail; try again later (the request is dropped; start again)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "could not send the sign-in mail; try again later" x-error-messages: - "could not send the sign-in mail; try again later" "/api/sync": get: operationId: "getSync" tags: - "Company key" summary: "The app's heartbeat: call it right after sign-in and then every 60 seconds. It records the device's last-seen time and app version, and returns everything the device must act on." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-sync" x-auth: "signed in (fields are empty or `null` while there is no company or no registered device)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "| Field | Meaning | |---|---| | `company` | as in the Session" content: "application/json": schema: $ref: "#/components/schemas/SyncView" example: company: id: "c_k3xq7m2pa9fz4w8r" name: "Acme" role: "owner" status: "active" keyVersion: 3 rotationNeeded: false autoJoin: false domain: "acme.com" device: id: "d_4f2a7cqm3xk9wz2b" removed: false keyVersion: 3 deliveries: [] handovers: - deviceId: "d_9pz4wn5cm3k9xq2a" name: "Annas-MacBook" email: "anna@acme.com" publicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE…" keyRecovery: null datakeyRequests: [] dataKeyRotation: false keyRelease: null keyReleaseRequests: [] shared: - shareId: "sh_q2a7pz4wn5cm3k9x" sourceDeviceId: "d_7pz4wn5cq2am3k9x" sourceName: "BOB-PC" ownerEmail: "bob@acme.com" since: "2026-10-13T09:12:00.000+00:00" keys: - keyId: "dk-5c2e…" keyVersion: 3 wrapped: "AAECAwQF…" current: true notifications: latest: 1842 unread: 2 albums: - id: "al_x7k2mq9pa4zw3n5c" name: "Las Vegas" ownerEmail: "anna@acme.com" mine: true itemCount: 42 updated: "2026-10-17T21:02:45.930+00:00" destinations: - device: "d_4f2a7cqm3xk9wz2b" deviceName: "ANNA-PC" dest: "e3b0c442" label: "Backup disk" ownerName: "Anna Smith" created: "2026-10-15T18:20:04.112+00:00" membersCanAdd: false cover: null deletedAlbums: [] "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " must be a string" x-error-messages: - " must be a string" - " is too long" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "/api/tv-tickets/check": post: operationId: "postTvTicketsCheck" tags: - "tv-tickets" summary: "A PC asks whether a TV's ticket lets it view through this PC now." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-tv-tickets-check" x-auth: "registered device of the same company (the PC the ticket was made for)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/TvTicketCheck" example: ticket: "vt_Q2k8w3m7x1c9v4b6n2z5r8t1h3j7f0p" responses: "200": description: "`access`: `member` (the PC's own member's TV: it sees what that PC's Photos shows)" content: "application/json": schema: $ref: "#/components/schemas/TvTicketCheckView" example: tvDevice: "tv_3k9w2q7x4m1c8v5b" tvName: "Living room TV" email: "anna@acme.com" expires: "2026-10-28T06:01:00.000+00:00" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "this device is not registered (devices/register)" "404": description: "no TV may view through this PC with that ticket (unknown or expired, made for another PC, the TV removed, its member no longer active or not this PC's member; a guest ticket: no album of this PC's company kept on this PC that the member is still a guest of)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "Not Found" "/api/tv/changed/wait": post: operationId: "postTvChangedWait" tags: - "tv" summary: "The changed pushes for a TV: a Fire TV has no Google Play services, so FCM cannot reach it, and the TV app keeps this long poll open while it is on the screen instead. The service holds the request up" description: "The changed pushes for a TV: a Fire TV has no Google Play services, so FCM cannot reach it, and the TV app keeps this long poll open while it is on the screen instead. The service holds the request up to 25 seconds and answers as soon as something its member's devices are pushed changes (the same topics, coalesced the same way; `forms` excepted); the TV asks again at once and re-reads those parts (`tv/pass`, and its page's `window.tvChanged(topics)`). A newer wait of the same TV ends the older one (204). Changes are queued for a TV only while it listens (a wait open, or one ended within the last 40 seconds); a TV not open gets nothing and reads everything when it opens. Kept in memory only." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-tv-changed-wait" x-auth: "the TV's token." x-auth-scheme: "none" security: [] responses: "200": description: "(`v`: the #70 change counter per versioned topic, as in the push), or 204 when nothing changed" "204": description: "200 {...} (`v`: the #70 change counter per versioned topic, as in the push), or 204 when nothing changed" "401": description: "this TV was removed; pair it again" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this TV was removed; pair it again" x-error-messages: - "this TV was removed; pair it again" "403": description: "for a TV's token only;" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "for a TV's token only" x-error-messages: - "for a TV's token only" - "only a TV's own token" "/api/tv/languages": put: operationId: "putTvLanguages" tags: - "tv" summary: "The TV's Menu → Language picker writes its member's languages (2026-11-05: the account's language wins, never the device's). The same as PUT /api/me/settings `languages` for the TV's member, and only " description: "The TV's Menu → Language picker writes its member's languages (2026-11-05: the account's language wins, never the device's). The same as PUT /api/me/settings `languages` for the TV's member, and only that." externalDocs: url: "https://spacebackup.net/manual/api-account/#put-api-tv-languages" x-auth: "the TV's own token (`tvt_…`), its member still an active member of the TV's company." x-auth-scheme: "none" security: [] requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/TvLanguagesRequest" example: languages: - "de" - "ru" responses: "200": description: "The member's languages as stored" content: "application/json": schema: $ref: "#/components/schemas/TvLanguagesView" example: languages: - "de" - "ru" "400": description: "languages is required, unknown language \"ko\" (one of en, fr, …), \"ru\" is given twice, at most 3 languages a member" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "languages is required" x-error-messages: - "languages is required" - "bad request: " "401": description: "this TV was removed; pair it again" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this TV was removed; pair it again" x-error-messages: - "this TV was removed; pair it again" "403": description: "only a TV's own token (a guest's, a phone's or a PC's token), not an active member of a company any more, this TV belongs to another company" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company any more" x-error-messages: - "not an active member of a company any more" - "this TV belongs to another company" - "only a TV's own token" "/api/tv/me": get: operationId: "getTvMe" tags: - "tv" summary: "The TV's own view of itself." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-tv-me" x-auth: "the TV's token." x-auth-scheme: "none" security: [] responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/TvMe" example: deviceId: "tv_3k9w2q7x4m1c8v5b" name: "Living room TV" email: "anna@acme.com" memberName: "Anna Smith" active: true company: id: "co_4kq8z2m7x3w9p5n1" name: "Acme" "401": description: "this TV was removed; pair it again;" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this TV was removed; pair it again" x-error-messages: - "this TV was removed; pair it again" "403": description: "only a TV's own token" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only a TV's own token" x-error-messages: - "only a TV's own token" "/api/tv/pair/poll": post: operationId: "postTvPairPoll" tags: - "tv" summary: "The TV asks whether it was approved. No sign-in." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-tv-pair-poll" x-auth: "none (`pairId` + `secret`)." x-auth-scheme: "none" security: [] requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/TvPairPoll" example: pairId: "tvp_8w2kq4zx7m3c5n9a" secret: "q0Vh3c2v6b1Kx9yQ0d3t8w5r2z7n4m1p6s9u2f5h8j1" responses: "200": description: "Waiting: {...}" content: "application/json": schema: $ref: "#/components/schemas/TvPairPolled" example: state: "approved" expires: "2026-10-27T18:10:00.000+00:00" token: "tvt_Yp3k9w2q7x4m1c8v5b2n6z0r3t7h1j4f" deviceId: "tv_3k9w2q7x4m1c8v5b" name: "Living room TV" email: "anna@acme.com" memberName: "Anna Smith" company: id: "co_4kq8z2m7x3w9p5n1" name: "Acme" "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: " is required" x-error-messages: - " is required" - " is too long" - " must not contain control characters" - " must be a string" - "bad request: " "404": description: "no such pairing (unknown, or the wrong secret); 410 (with state) → the code expired; show a new one (expired);" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such pairing" x-error-messages: - "no such pairing" "410": description: "the pairing was declined (denied);" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "the pairing was declined" x-error-messages: - "the pairing was declined" - "this pairing was already used" - "the code expired; show a new one" - "this TV was removed" "/api/tv/pair/start": post: operationId: "postTvPairStart" tags: - "tv" summary: "The TV asks for a pairing. No sign-in." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-tv-pair-start" x-auth: "none." x-auth-scheme: "none" security: [] requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/TvPairStart" example: name: "Fire TV Stick" model: "AFTSSS" os: "Fire OS 8 (Android 11)" version: "tv-1.0.0" responses: "200": description: "The TV shows `code` and `url` in words and `link` as a QR code (the iPhone's Camera opens it in the Space Backup app" content: "application/json": schema: $ref: "#/components/schemas/TvPairStarted" example: pairId: "tvp_8w2kq4zx7m3c5n9a" secret: "q0Vh3c2v6b1Kx9yQ0d3t8w5r2z7n4m1p6s9u2f5h8j1" code: "K7QM-3XRT" url: "https://spacebackup.net/tv" qrUrl: "https://spacebackup.net/tv?code=K7QM3XRT" expires: "2026-10-27T18:10:00.000+00:00" interval: 3 link: "https://spacebackup.net/tv/K7QM3XRT" "400": description: "name is required;" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "name is required" x-error-messages: - "name is required" - "bad request: " "429": description: "too many pairings from this network; try again later (10 per IP address and 10 minutes, 30 per day)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many pairings from this network; try again later" x-error-messages: - "too many pairings from this network; try again later" "/api/tv/pair/{code}": get: operationId: "getTvPairCode" tags: - "tv" summary: "What the approving screen shows before Approve: the TV's name and model, when it asked." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-tv-pair-code" x-auth: "device token (the iPhone app, a desktop app) or web session; an active member. Not a TV." x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "code" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "OK" content: "application/json": schema: $ref: "#/components/schemas/TvPairInfo" example: code: "K7QM-3XRT" name: "Fire TV Stick" model: "AFTSSS" os: "Fire OS 8 (Android 11)" version: "tv-1.0.0" created: "2026-10-27T18:00:00.000+00:00" expires: "2026-10-27T18:10:00.000+00:00" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "a TV cannot do this, not an active member of a company" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "a TV cannot do this" - "missing CSRF token" "404": description: "no TV is showing that code; check it, or show a new one on the TV (unknown, expired, already approved or declined);" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no TV is showing that code; check it, or show a new one on the TV" x-error-messages: - "no TV is showing that code; check it, or show a new one on the TV" "429": description: "too many wrong codes; wait a few minutes (10 wrong codes per member and 10 minutes, counting this route, approve and deny);" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many wrong codes; wait a few minutes" x-error-messages: - "too many wrong codes; wait a few minutes" "/api/tv/pair/{code}/approve": post: operationId: "postTvPairCodeApprove" tags: - "tv" summary: "The TV becomes the caller's (their member, their company); its next poll gets its token." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-tv-pair-code-approve" x-auth: "as `GET tv/pair/{code}`." x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "code" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: false content: "application/json": schema: $ref: "#/components/schemas/TvPairApprove" example: name: "Living room TV" responses: "200": description: "The TV: `approvedVia`: `device` (an app's token) or `web`" content: "application/json": schema: $ref: "#/components/schemas/TvView" example: id: "tv_3k9w2q7x4m1c8v5b" name: "Living room TV" model: "AFTSSS" os: "Fire OS 8 (Android 11)" version: "tv-1.0.0" email: "anna@acme.com" created: "2026-10-27T18:01:00.000+00:00" lastSeen: "2026-10-27T18:01:00.000+00:00" approvedBy: "anna@acme.com" approvedVia: "device" removed: false "400": description: "Bad Request" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "bad request: " x-error-messages: - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "a TV cannot do this, not an active member of a company" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "a TV cannot do this" - "missing CSRF token" "404": description: "no TV is showing that code; check it, or show a new one on the TV;" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no TV is showing that code; check it, or show a new one on the TV" x-error-messages: - "no TV is showing that code; check it, or show a new one on the TV" "429": description: "too many wrong codes; wait a few minutes;" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many wrong codes; wait a few minutes" x-error-messages: - "too many wrong codes; wait a few minutes" "/api/tv/pair/{code}/deny": post: operationId: "postTvPairCodeDeny" tags: - "tv" summary: "The TV's next poll says declined." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-tv-pair-code-deny" x-auth: "as `GET tv/pair/{code}`." x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "code" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "No Content" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "a TV cannot do this, not an active member of a company" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "a TV cannot do this" - "missing CSRF token" "404": description: "no TV is showing that code; check it, or show a new one on the TV;" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no TV is showing that code; check it, or show a new one on the TV" x-error-messages: - "no TV is showing that code; check it, or show a new one on the TV" "429": description: "too many wrong codes; wait a few minutes;" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many wrong codes; wait a few minutes" x-error-messages: - "too many wrong codes; wait a few minutes" "/api/tv/pass": post: operationId: "postTvPass" tags: - "tv" summary: "The PCs the TV can view through, now: its member's own PCs (not phones) that registered a viewer key, most recently seen first, each with a ticket for 12 hours (the PC asks the service again every 5 m" description: "The PCs the TV can view through, now: its member's own PCs (not phones) that registered a viewer key, most recently seen first, each with a ticket for 12 hours (the PC asks the service again every 5 minutes, so a removed TV stops at once); and a relay guest pass naming them (`relay` is null while the company's relay group is not known yet: then the LAN only). Asked again before `expires`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-tv-pass" x-auth: "the TV's token; its member still active." x-auth-scheme: "none" security: [] responses: "200": description: "`email`, `memberName`: who the TV is signed in as now (the TV refreshes its Menu's \"Signed in as\" from them). `languages`: the member's languages (me/settings, up to 3)" content: "application/json": schema: $ref: "#/components/schemas/TvPassView" example: expires: "2026-10-28T06:01:00.000+00:00" pcs: - deviceId: "d_4f2a7cqm3xk9wz2b" name: "ANNA-PC" label: "Anna's desktop" os: "Ubuntu 24.04" version: "0.15.0" lastSeen: "2026-10-27T18:00:40.000+00:00" viewerKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE…" ticket: "vt_Q2k8w3m7x1c9v4b6n2z5r8t1h3j7f0p" relay: pass: "gp1.Zk2…" address: "relay.spacebackup.net:47900" fingerprint: null email: "anna@acme.com" memberName: "Anna Smith" languages: - "ru" - "en" "401": description: "this TV was removed; pair it again;" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this TV was removed; pair it again" x-error-messages: - "this TV was removed; pair it again" "403": description: "not an active member of a company any more" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company any more" x-error-messages: - "not an active member of a company any more" - "this TV belongs to another company" - "only a TV's own token" "/api/tv/signout": post: operationId: "postTvSignout" tags: - "tv" summary: "The TV disconnects itself (its Sign out): as `POST tvs/{id}/remove`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-tv-signout" x-auth: "the TV's token." x-auth-scheme: "none" security: [] responses: "204": description: "No Content" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "this TV was removed; pair it again" x-error-messages: - "this TV was removed; pair it again" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only a TV's own token" x-error-messages: - "only a TV's own token" "/api/tv/voice/wait": post: operationId: "postTvVoiceWait" tags: - "tv" summary: "What was said to the Alexa skill for this TV: a long poll the TV app keeps open while it is on the screen. The service holds the request up to 25 seconds and answers as soon as a sentence comes; the T" description: "What was said to the Alexa skill for this TV: a long poll the TV app keeps open while it is on the screen. The service holds the request up to 25 seconds and answers as soon as a sentence comes; the TV asks again at once. A newer wait of the same TV ends the older one (204). A TV that waited within the last 40 seconds counts as having Space Backup open; the most recent of the member's TVs gets the words. Sentences are kept in memory only, 10 seconds at most, never logged." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-tv-voice-wait" x-auth: "the TV's token." x-auth-scheme: "none" security: [] responses: "200": description: "Or 204 when nothing came" "204": description: "200 {...}, or 204 when nothing came" "403": description: "for a TV's token only" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "for a TV's token only" x-error-messages: - "for a TV's token only" "/api/tvs": get: operationId: "getTvs" tags: - "tvs" summary: "The caller's TVs; the owner and admins get the company's." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-tvs" x-auth: "device token or web session; an active member. Not a TV." x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "A list of TVs as `POST tv/pair/{code}/approve` answers them (not removed ones)" content: "application/json": schema: type: "array" items: $ref: "#/components/schemas/TvView" example: {} x-example: "generated" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "a TV cannot do this" - "missing CSRF token" "/api/tvs/{id}/remove": post: operationId: "postTvsIdRemove" tags: - "tvs" summary: "Disconnects a TV: its token stops at once, its tickets with it. Its member, the owner or an admin. No key is replaced (a TV never had one)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-tvs-id-remove" x-auth: "as `GET tvs`." x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "id" in: "path" required: true schema: type: "string" - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "204": description: "No Content" "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not an active member of a company" x-error-messages: - "not an active member of a company" - "a TV cannot do this" - "missing CSRF token" "404": description: "no such TV" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "no such TV" x-error-messages: - "no such TV" "/api/usage": post: operationId: "postUsage" tags: - "usage" summary: "A batch of events, sent at most every few minutes and when the app goes to the background." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-usage" x-auth: "a registered device of an active member, by its device token (a web session gets 401)." x-auth-scheme: "Authorization: Bearer (POST /api/signin/code or /api/signin/poll gives it)" security: - bearer: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/UsageReport" example: events: - t: 1792058400000 kind: "open" - t: 1792058431000 kind: "backup_run" outcome: "tapped" ms: 93000 - t: 1792058431000 kind: "backup_items" n: 412 - t: "2026-10-22T09:21:07Z" kind: "select_job" n: 900 outcome: "done" ms: 5200 x-field-rules: events: "0–500 events (`usage.maxEvents`)" responses: "204": description: "No body" "400": description: "events is required, too many events (at most 500 in one report), events[1].kind must be one of open, backup_run, backup_items, album_create, album_add, share, link_create, restore, select_job, crash, events[0].t must be a time (Unix milliseconds or ISO 8601), events[0].n is required for crash, events[0]: open has no n, events[0].n must be a count from 0 to 1000000000000, events[0].ms is required for backup_run, events[0]: share has no ms, events[0].ms must be from 0 to 86400000, events[0].outcome is required for album_add, events[0]: open has no outcome, events[0].outcome of restore must be ok or problems or stopped, events[0].outcome must be a short word (letters, digits, _ and -, at most 32): the whole batch is refused; drop it rather than send it again" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "events is required" x-error-messages: - "events is required" - "too many events (at most in one report)" - "events[] is empty" - "events[].t must be a time (Unix milliseconds or ISO 8601)" - "events[].n is required for " - "events[]: has no n" - "events[].n must be a count from 0 to 1000000000000" - "events[].ms is required for " - "events[]: has no ms" - "events[].ms must be from 0 to 86400000" - "events[]: has no outcome" - "events[].outcome is required for " - "events[].outcome must be a short word (letters, digits, _ and -, at most 32)" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "usage is reported by signed-in devices, not an active member of a company, this device is not registered (devices/register)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "usage is reported by signed-in devices" x-error-messages: - "usage is reported by signed-in devices" - "not an active member of a company" - "this device is not registered (devices/register)" "429": description: "Too many usage reports from this device (at most 60 an hour). Send them batched, at most every few minutes. (usage.reportsPerHour; keep the batch and send it later)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "Too many usage reports from this device (at most an hour). Send them batched, at most every few minutes." x-error-messages: - "Too many usage reports from this device (at most an hour). Send them batched, at most every few minutes." "/api/work/marks": post: operationId: "postWorkMarks" tags: - "work" summary: "POST /api/work/marks" externalDocs: url: "https://spacebackup.net/manual/api-account/#post-api-work-marks" x-auth: "an active member, from a device of theirs (phone, tablet, PC) or the web; never a guest, a TV's or an" x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/WorkMarksRequest" example: marks: - source: null id: null work: "…" x-example: "generated" responses: "200": description: "`v` the company's version after the request, `changed` the marks that changed (a mark equal to the stored one changes nothing and is not counted)" content: "application/json": schema: $ref: "#/components/schemas/WorkMarksPosted" example: ok: true v: 1234 changed: 1 "400": description: "marks is required, marks is empty (1 to 500 marks), too many marks (at most 500 a request), marks[0].source is required, marks[0].id is too long (at most 200 characters), marks[0].source must not contain control characters, marks[0].work must be true or false" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "marks is required" x-error-messages: - "marks is required" - "marks is empty (1 to 500 marks)" - "too many marks (at most 500 a request)" - "marks[] is not a mark" - "marks[].work must be true or false" - "marks[]. is required" - "marks[]. is too long (at most 200 characters)" - "marks[]. must not contain control characters" - "bad request: " "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "not an active member, or only the company's members' devices and the web mark work (a TV's token: a TV's token is for the TV routes only)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the owner of a photo or video changes its work label: 's items are not yours" x-error-messages: - "only the owner of a photo or video changes its work label: 's items are not yours" - "only the company's members' devices and the web mark work" - "not an active member of a company" - "missing CSRF token" "429": description: "too many marks (at most 2000 a minute); try again in a minute (2,000 marks a minute per member, counted as sent; a refused request keeps nothing)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "too many marks (at most 2000 a minute); try again in a minute" x-error-messages: - "too many marks (at most 2000 a minute); try again in a minute" get: operationId: "getWorkMarks" tags: - "work" summary: "GET /api/work/marks" externalDocs: url: "https://spacebackup.net/manual/api-account/#get-api-work-marks" x-auth: "as POST." x-auth-scheme: "Authorization: Bearer , or the admin page's web session (cookie sa_session) plus X-CSRF-Token" security: - bearer: [] - webSession: [] csrfHeader: [] parameters: - name: "since" in: "query" required: false schema: type: "integer" format: "int64" nullable: true - name: "limit" in: "query" required: false schema: type: "integer" format: "int32" nullable: true - name: "X-SpaceBackup-Version" in: "header" required: false description: "The app's version (up to 40 characters), recorded as the device's app version." schema: type: "string" maxLength: 40 example: "1.8.2" responses: "200": description: "The company's marks, oldest first: `v`: the company's version now" content: "application/json": schema: $ref: "#/components/schemas/WorkMarksView" example: v: 1234 marks: - source: "Vlads-iPhone" id: "77ab…" work: false by: "vlad@acme.com" at: 1794000000123 v: 1233 - source: "Anna-PC" id: "c1d2…" work: true at: 1794000000456 v: 1234 more: false "401": description: "Unauthorized" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not signed in" x-error-messages: - "not signed in" - "not signed in (token unknown or revoked)" "403": description: "Forbidden" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "only the company's members' devices and the web mark work" x-error-messages: - "only the company's members' devices and the web mark work" - "not an active member of a company" - "missing CSRF token" "/internal/relay/report": post: operationId: "postInternalRelayReport" tags: - "Space Relay billing" summary: "The relay's usage report. Only the relay running on the same server calls it (it is not reachable through the public web server); integrators never do. Listed for completeness." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-internal-relay-report" x-auth: "the header `X-SpaceRelay-Signature: t=,v1=.\")>`, with the" x-auth-scheme: "X-SpaceRelay-Signature header (HMAC of the body with the relay secret; only from spacerelay on the same machine)" security: - relaySignature: [] requestBody: required: true content: "application/json": schema: $ref: "#/components/schemas/RelayReport" example: id: "rep-20261018-091200-0001" month: "2026-10" usage: - group: "<64 hex>" bytes: 12884901 groups: - "<64 hex>" - "<64 hex>" responses: "200": description: "The state of the linked groups only: `remainingBytes` = free bytes left + balance" content: "application/json": schema: $ref: "#/components/schemas/RelayReportAnswer" example: groups: "<64 hex>": company: "c_k3xq7m2pa9fz4w8r" activationNeeded: false remainingBytes: 88790000000 "400": description: "bad JSON: …, empty report, and the checks of the report's content (month must be YYYY-MM, too many groups, bytes must not be negative; these three come back as an HTML error page, since the route is not under /api)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "month must be YYYY-MM" x-error-messages: - "month must be YYYY-MM" - "too many groups" - "bytes must not be negative" - " is required" - " is too long" - " must not contain control characters" - "empty report" "401": description: "bad signature" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "bad signature" x-error-messages: - "bad signature" "404": description: "the call came through the public web server" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "not found" x-error-messages: - "not found" "503": description: "relay secret not set up (spaceaccount init)" content: "application/json": schema: $ref: "#/components/schemas/Error" example: error: "relay secret not set up (spaceaccount init)" x-error-messages: - "relay secret not set up (spaceaccount init)" "/stripe/webhook": post: operationId: "postStripeWebhook" tags: - "Space Relay billing" summary: "Stripe's events about payments. Only Stripe calls it." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-stripe-webhook" x-auth: "the `Stripe-Signature` header, checked with the endpoint's signing secret (HMAC-SHA256 of `t.payload`, any" x-auth-scheme: "Stripe-Signature header (Stripe's HMAC of the payload with the webhook secret)" security: - stripeSignature: [] requestBody: required: true content: "application/json": schema: description: "a Stripe event (checkout.session.completed, payment_intent.*)" responses: "200": description: "OK" content: "application/json": schema: type: "object" properties: received: type: "boolean" required: - "received" example: received: true "/": get: operationId: "get" tags: - "Web pages" summary: "The sign-in page (an email field). Signed in, it redirects to `/account/admin` for the owner and admins and to `/account/me` for everyone else; `?next=relay` redirects to the relay buy screen instead." externalDocs: url: "https://spacebackup.net/manual/api-account/#get" x-auth-scheme: "none" security: [] parameters: - name: "next" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" "/admin": get: operationId: "getAdmin" tags: - "Web pages" summary: "The owner's and admins' page: members (name, email, role, status), devices, shared backups, pending restore requests, devices waiting for the company key, key-recovery requests, the Space Relay panel " description: "The owner's and admins' page: members (name, email, role, status), devices, shared backups, pending restore requests, devices waiting for the company key, key-recovery requests, the Space Relay panel and the company settings. A plain member is redirected to `/account/me` (with its `msg`); not signed in: to `/account/`." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-admin" x-auth-scheme: "none" security: [] parameters: - name: "msg" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" "403": description: "Forbidden" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin may do this" - "only the company's owner or an admin may list every link" - "not an active member of a company" - "this device is not registered (devices/register)" "/admin/datakey-requests/{id}/approve": post: operationId: "postAdminDatakeyRequestsIdApprove" tags: - "Web pages" summary: "Approves a restore request: the requesting device (only) may then read the source's encrypted backups." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-datakey-requests-id-approve" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again., only the company's owner or an admin may do this" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin may do this" - "This form has expired. Go back, reload the page and try again." "404": description: "no such data-key request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such data-key request" "409": description: "this request was already approved|denied" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "this request was already " "/admin/datakey-requests/{id}/deny": post: operationId: "postAdminDatakeyRequestsIdDeny" tags: - "Web pages" summary: "Denies a restore request." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-datakey-requests-id-deny" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again., only the company's owner or an admin may do this" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin may do this" - "This form has expired. Go back, reload the page and try again." "404": description: "no such data-key request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such data-key request" "409": description: "this request was already approved|denied" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "this request was already " "/admin/devices/{id}/remove": post: operationId: "postAdminDevicesIdRemove" tags: - "Web pages" summary: "Remove device; the company key is then replaced. As `POST /api/devices/{id}/remove`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-devices-id-remove" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again., only the company's owner or an admin (or the device's member) may remove a device, not an active member of a company" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin (or the device's member) may remove a device" - "not an active member of a company" - "This form has expired. Go back, reload the page and try again." "404": description: "no such device" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such device" "/admin/invite": post: operationId: "postAdminInvite" tags: - "Web pages" summary: "Form: `email`, `role` (`member` or `admin`). As `POST /api/members/invite`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-invite" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" email: type: "string" role: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "not a valid email address, role must be admin or member" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "role must be admin or member" - "not a valid email address" "403": description: "This form has expired. Go back, reload the page and try again., only the company's owner or an admin may do this" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin may do this" - "This form has expired. Go back, reload the page and try again." "409": description: "bob@acme.com is already a member, bob@acme.com belongs to another company" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " is already a member" - " belongs to another company" "/admin/key-recovery/{id}/cancel": post: operationId: "postAdminKeyRecoveryIdCancel" tags: - "Web pages" summary: "Cancels a company-key recovery. As `POST /api/key-recovery/{id}/cancel`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-key-recovery-id-cancel" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again., only the company's owner or an admin may do this" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin may do this" - "This form has expired. Go back, reload the page and try again." "404": description: "no such key recovery request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such key recovery request" "409": description: "the recovery copy was already released" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "the recovery copy was already released" "/admin/key-release/{id}/approve": post: operationId: "postAdminKeyReleaseIdApprove" tags: - "Web pages" summary: "Approves a device waiting for the company key. As `POST /api/key-release/{id}/approve`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-key-release-id-approve" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "the 403s of POST /api/key-release/{id}/approve, This form has expired. Go back, reload the page and try again" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "a device cannot approve itself: approve it from the email we sent, or from another signed-in device or the admin page" - "only the company's owner or an admin may do this" - "only the company's owner or an admin may approve this" - "This form has expired. Go back, reload the page and try again." "404": description: "no such key request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such key request" "409": description: "ANNA-LAPTOP already has the company key, that device was removed, the company has no recovery copy of its key" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "that device was removed" - " already has the company key" - "the company has no recovery copy of its key" "503": description: "the recovery copy cannot be opened with this service's recovery key; try again after the operator has fixed it" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "the recovery copy cannot be opened with this service's recovery key; try again after the operator has fixed it" "/admin/links/{id}/revoke": post: operationId: "postAdminLinksIdRevoke" tags: - "Web pages" summary: "Revoke in the admin page's Public links: the link stops at once. As `POST /api/links/{id}/revoke`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-links-id-revoke" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" - "This form has expired. Go back, reload the page and try again." "404": description: "no such link" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such link" "/admin/members/{id}/approve": post: operationId: "postAdminMembersIdApprove" tags: - "Web pages" summary: "Lets a pending person join. As `POST /api/members/{id}/approve`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-members-id-approve" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again., only the company's owner or an admin may do this" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin may do this" - "This form has expired. Go back, reload the page and try again." "404": description: "no such member" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such member" "409": description: "bob@acme.com is active, not waiting for approval, bob@acme.com belongs to another company now" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " is , not waiting for approval" - " belongs to another company now" "/admin/members/{id}/deny": post: operationId: "postAdminMembersIdDeny" tags: - "Web pages" summary: "As `POST /api/members/{id}/deny`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-members-id-deny" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again., only the company's owner or an admin may do this" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin may do this" - "This form has expired. Go back, reload the page and try again." "404": description: "no such member" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such member" "409": description: "bob@acme.com is active, not waiting for approval, bob@acme.com belongs to another company now" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " is , not waiting for approval" - " belongs to another company now" "/admin/members/{id}/name": post: operationId: "postAdminMembersIdName" tags: - "Web pages" summary: "Form: `firstName`, `lastName`, or `name` alone (split at its first space); empty clears. As `POST /api/members/{id}/name`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-members-id-name" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" firstName: type: "string" lastName: type: "string" name: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "the name rules of POST /api/members/{id}/name" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "first name is required with a last name" - " is too long (at most 40 characters)" - " must not contain control characters" "403": description: "This form has expired. Go back, reload the page and try again., only the company's owner or an admin may do this" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin may do this" - "This form has expired. Go back, reload the page and try again." "404": description: "no such member" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such member" "/admin/members/{id}/remove": post: operationId: "postAdminMembersIdRemove" tags: - "Web pages" summary: "Removes a member with their devices (never the owner); the company key is then replaced. As `POST /api/members/{id}/remove`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-members-id-remove" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again., only the company's owner or an admin may do this" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin may do this" - "This form has expired. Go back, reload the page and try again." "404": description: "no such member" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such member" "409": description: "the owner cannot be removed" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "the owner cannot be removed" "/admin/members/{id}/role": post: operationId: "postAdminMembersIdRole" tags: - "Web pages" summary: "Form: `role` (`admin` or `member`; never the owner). As `POST /api/members/{id}/role`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-members-id-role" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" role: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "role must be admin or member" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "role must be admin or member" "403": description: "This form has expired. Go back, reload the page and try again., only the company's owner or an admin may do this" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin may do this" - "This form has expired. Go back, reload the page and try again." "404": description: "no such member" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such member" "409": description: "the owner's role cannot be changed" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "the owner's role cannot be changed" "/admin/relay/auto-topup": post: operationId: "postAdminRelayAutoTopup" tags: - "Space Relay billing" summary: "Form: `autoTopUp` (`on` when ticked), `pack` (`sb_pack_500`, `sb_pack_2000` or `sb_pack_5000`). Turns auto top-up on with that pack, or off. Turning it on needs a card saved by an earlier purchase; ot" description: "Form: `autoTopUp` (`on` when ticked), `pack` (`sb_pack_500`, `sb_pack_2000` or `sb_pack_5000`). Turns auto top-up on with that pack, or off. Turning it on needs a card saved by an earlier purchase; otherwise the page says \"Buy a pack once first: Stripe keeps that card for auto top-up.\" Returns to `/account/admin?msg=…#relay`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-relay-auto-topup" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: autoTopUp: type: "string" csrf: type: "string" pack: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "no such pack" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such pack" "403": description: "This form has expired. Go back, reload the page and try again., only the company's owner or an admin may do this. (Turning it on without a saved card is not an error: it returns to the page with that message.)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin may do this" - "This form has expired. Go back, reload the page and try again." "/admin/settings": post: operationId: "postAdminSettings" tags: - "Web pages" summary: "Form: `name`, `autoJoin` (`on` when ticked; ignored when the company has no domain). As `POST /api/company/settings`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-settings" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: autoJoin: type: "string" csrf: type: "string" faces: type: "string" name: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "auto-join needs a company domain; this company has none" - " is required" - " is too long" - " must not contain control characters" "403": description: "Forbidden" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the company's owner or an admin may do this" - "This form has expired. Go back, reload the page and try again." "/admin/shares": post: operationId: "postAdminShares" tags: - "Web pages" summary: "Form: `device` (any device of the company), `email`. Share a device's backups, as `POST /api/shares`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-shares" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" device: type: "string" email: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "not a valid email address, these backups are already 's" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "these backups are already 's" - " is required" - " is too long" - " must not contain control characters" - "not a valid email address" "403": description: "This form has expired. Go back, reload the page and try again.; the 403s of POST /api/shares" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only the device's owner or an admin can share its backups" - "you cannot share 's backups with yourself: ask to restore them instead, which or another owner or admin approves" - "not an active member of a company" - "This form has expired. Go back, reload the page and try again." "404": description: "no such device, is not a member of your company" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such device" - " is not a member of your company" "/admin/shares/{id}/remove": post: operationId: "postAdminSharesIdRemove" tags: - "Web pages" summary: "Stop sharing, as `POST /api/shares/{id}/remove`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-admin-shares-id-remove" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf); not an active member of a company" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" - "This form has expired. Go back, reload the page and try again." "404": description: "no such share" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such share" "/admin/usage": get: operationId: "getAdminUsage" tags: - "Web pages" summary: "The company's usage, for its owner and admins: the assistant's requests by outcome, tokens and cost, by day and by device; the apps' events by day (with the active devices) and by device. Query: `days" description: "The company's usage, for its owner and admins: the assistant's requests by outcome, tokens and cost, by day and by device; the apps' events by day (with the active devices) and by device. Query: `days` = `7`, `30` (default), `90` or `395` (13 months). Days are UTC. A plain member is redirected to `/account/me`; not signed in: to `/account/`. It shows counts only: nothing anyone asked the assistant, nothing in the photos." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-admin-usage" x-auth-scheme: "none" security: [] parameters: - name: "days" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" "/alexa": post: operationId: "postAlexa" tags: - "Web pages" summary: "The skill's endpoint (the developer console's Endpoint, HTTPS, \"a certificate from a trusted certificate authority\"). Every request is checked as Amazon requires before anything else: `SignatureCertCh" description: "The skill's endpoint (the developer console's Endpoint, HTTPS, \"a certificate from a trusted certificate authority\"). Every request is checked as Amazon requires before anything else: `SignatureCertChainUrl` is https, host `s3.amazonaws.com`, port 443, a path under `/echo.api/` once normalized; the chain there (kept 12 hours) is valid now, its leaf names `echo-api.amazon.com` and it leads to a trusted root; `Signature-256` is the RSA SHA-256 signature of the body by that leaf; `request.timestamp` is within 150 seconds; the skill id is one of `alexa.skillIds`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-alexa" x-auth: "Amazon's signature; the member is the one the request's `context.System.user.accessToken` was issued to." x-auth-scheme: "none" security: [] responses: "200": description: "Alexa's response envelope: `ShowIntent` sends \"show \", `PlayIntent` \"play \" to the member's TV that has Space Backup open (POST /api/tv/voice/wait) and waits up to 4 seconds for it to take the words" content: "application/json": schema: description: "(JsonObject)" example: {} x-example: "generated" "400": description: "not a request of this skill (not Amazon's, or not this skill's: the reason is in the service's log);" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not a request of this skill" "413": description: "the request is larger than 128 KB" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "the request is larger than 128 KB" "/approve": get: operationId: "getApprove" tags: - "Web pages" summary: "Query: `t`, `d`? Shows what the link is about (\"Restore OLD-LAPTOP's backups?\", \"Let bob@acme.com join Acme?\") with its buttons, or that it can no longer be used (decided, used or expired). An unknown" description: "Query: `t`, `d`? Shows what the link is about (\"Restore OLD-LAPTOP's backups?\", \"Let bob@acme.com join Acme?\") with its buttons, or that it can no longer be used (decided, used or expired). An unknown token: \"Link not valid\"." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-approve" x-auth-scheme: "none" security: [] parameters: - name: "t" in: "query" required: false schema: type: "string" nullable: true - name: "d" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" post: operationId: "postApprove" tags: - "Web pages" summary: "Form: `t`, `d` (`approve`, `deny` or `cancel`), `csrf`. Decides and shows the result (\"Approved: the requesting device can now restore those backups.\")." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-approve" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" d: type: "string" t: type: "string" required: - "csrf" responses: "200": description: "OK" content: "text/html": schema: type: "string" "400": description: "unknown decision (not one of this kind of link's buttons)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "unknown decision" "403": description: "This form has expired. Go back, reload the page and try again.; only the company's owner or an admin may do this (the link's email is no longer the owner or an admin)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." - "only the company's owner or an admin may do this" - "only the company's owner or an admin may approve this" "404": description: "this link is not valid; or the request is gone: no such data-key request, no such member, no such key request, no such key recovery request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "this link is not valid" - "no such data-key request" - "no such member" - "no such key request" - "no such key recovery request" "409": description: "already decided or no longer possible: this request was already approved|denied, the 409s of the approve routes above (bob@acme.com is active, not waiting for approval, that device was removed, the recovery copy was already released, …)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "this request was already " - " is , not waiting for approval" - " belongs to another company now" - "that device was removed" - " already has the company key" - "the company has no recovery copy of its key" - "the recovery copy was already released" "410": description: "this link was already used or has expired" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "this link was already used or has expired" "503": description: "the recovery copy cannot be opened with this service's recovery key; try again after the operator has fixed it (a device waiting for the company key)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "the recovery copy cannot be opened with this service's recovery key; try again after the operator has fixed it" "/invite/{id}": get: operationId: "getInviteId" tags: - "Web pages" summary: "The link in an album invitation mail. A page with Open in Space Backup (`spacebackup://invite/`, which opens the app) and a link to get the app. It shows nothing about the invitation itself: the a" description: "The link in an album invitation mail. A page with Open in Space Backup (`spacebackup://invite/`, which opens the app) and a link to get the app. It shows nothing about the invitation itself: the app fetches it with the invitee's own sign-in (`GET /api/albums/invitations`)." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-invite-id" x-auth-scheme: "none" security: [] parameters: - name: "id" in: "path" required: true schema: type: "string" responses: "200": description: "OK" content: "text/html": schema: type: "string" "/me": get: operationId: "getMe" tags: - "Web pages" summary: "The member's own page, for any signed-in email: first and last name, Your devices (rename, remove), Shared backups (the shares of their own devices only, also for the owner and admins), Shared with me" description: "The member's own page, for any signed-in email: first and last name, Your devices (rename, remove), Shared backups (the shares of their own devices only, also for the owner and admins), Shared with me, Shared albums (the setting \"Automatically accept albums shared by people in my company\", the invitations waiting with Accept / Decline, declined ones with Accept, and the albums shared with them, of their company and as a guest of others, each On or Off with Turn off / Turn on), Your groups (read-only), Space Relay credit and Sign out. Someone who is not an active member sees why (not in a company yet, or waiting for approval), and their Shared albums without the setting. Not signed in: redirects to `/account/`." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-me" x-auth-scheme: "none" security: [] parameters: - name: "msg" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" "403": description: "Forbidden" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" "/me/agents/{id}/remove": post: operationId: "postMeAgentsIdRemove" tags: - "Web pages" summary: "Disconnects an AI agent the caller allowed (AI agents on `/me`, the page asks first): its access and refresh tokens end at once, and the company's audit log gets a line. The OAuth endpoints themselves" description: "Disconnects an AI agent the caller allowed (AI agents on `/me`, the page asks first): its access and refresh tokens end at once, and the company's audit log gets a line. The OAuth endpoints themselves (`/account/oauth/authorize`, `token`, `register`, `revoke`), the MCP endpoint `/account/mcp` and the discovery documents under `/.well-known/` are described in docs/mcp.md \"Remote\" and on spacebackup.net/developers." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-agents-id-remove" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." "404": description: "no such connection" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such connection" "/me/albums/{id}/show": post: operationId: "postMeAlbumsIdShow" tags: - "Web pages" summary: "Form: `on` (`1` turns the album on, anything else off). Turn off / Turn on under Shared albums, as POST /api/albums/{id}/show." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-albums-id-show" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" "on": type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "on is required (true or false)" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." "404": description: "no such album" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such album" "/me/approvals/{id}/approve": post: operationId: "postMeApprovalsIdApprove" tags: - "Web pages" summary: "Approve / Deny under Restore requests: decides a request to restore one of the caller's own devices, as POST /api/me/approvals/{id}/approve|deny." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-approvals-id-approve-post-me-approvals-id-deny" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf); not an active member of a company" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" - "This form has expired. Go back, reload the page and try again." "404": description: "no such request to restore a device of yours, no such data-key request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such request to restore a device of yours" - "no such data-key request" "409": description: "this request was already approved|denied" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "this request was already " "/me/approvals/{id}/deny": post: operationId: "postMeApprovalsIdDeny" tags: - "Web pages" summary: "Approve / Deny under Restore requests: decides a request to restore one of the caller's own devices, as POST /api/me/approvals/{id}/approve|deny." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-approvals-id-approve-post-me-approvals-id-deny" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf); not an active member of a company" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" - "This form has expired. Go back, reload the page and try again." "404": description: "no such request to restore a device of yours, no such data-key request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such request to restore a device of yours" - "no such data-key request" "409": description: "this request was already approved|denied" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "this request was already " "/me/devices/{id}/label": post: operationId: "postMeDevicesIdLabel" tags: - "Web pages" summary: "Form: `label` (empty resets). Renames one of the caller's own devices, as `POST /api/devices/{id}/label`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-devices-id-label" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" label: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "the name is too long (at most 64 characters), the name must not contain control characters" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "the name is too long (at most 64 characters)" - "the name must not contain control characters" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf); not an active member of a company" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" - "This form has expired. Go back, reload the page and try again." "404": description: "no such device (not one of the caller's own)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such device" "/me/devices/{id}/remove": post: operationId: "postMeDevicesIdRemove" tags: - "Web pages" summary: "Removes one of the caller's own active devices (the page asks first); the company key is then replaced, as `POST /api/devices/{id}/remove`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-devices-id-remove" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf); not an active member of a company" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" - "only the company's owner or an admin (or the device's member) may remove a device" - "This form has expired. Go back, reload the page and try again." "404": description: "no such device (not one of the caller's own active devices)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such device" "/me/invitations/{id}/accept": post: operationId: "postMeInvitationsIdAccept" tags: - "Web pages" summary: "Accept under Shared albums: accepts a pending or declined invitation, as POST /api/albums/invitations/{id}/accept (without trusting the sender)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-invitations-id-accept" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." "404": description: "no such invitation (accepted already, withdrawn, or the album was deleted)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such invitation (accepted already, withdrawn, or the album was deleted)" "/me/invitations/{id}/decline": post: operationId: "postMeInvitationsIdDecline" tags: - "Web pages" summary: "Decline under Shared albums, as POST /api/albums/invitations/{id}/decline; it stays listed, declined, with Accept." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-invitations-id-decline" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." "404": description: "no such invitation (accepted already, withdrawn, or the album was deleted)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such invitation (accepted already, withdrawn, or the album was deleted)" "/me/languages": post: operationId: "postMeLanguages" tags: - "Web pages" summary: "Form: `lang1`, `lang2`, `lang3` (codes; an empty one is left out). Your languages on the account page, as PUT /api/me/settings `languages`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-languages" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" lang1: type: "string" lang2: type: "string" lang3: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf); only an active member of a company has these settings" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only an active member of a company has these settings" - "This form has expired. Go back, reload the page and try again." "/me/name": post: operationId: "postMeName" tags: - "Web pages" summary: "Form: `firstName`, `lastName` (empty clears). The rules of `PUT /api/me`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-name" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" firstName: type: "string" lastName: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "first name is required with a last name" - " is too long (at most 40 characters)" - " must not contain control characters" "403": description: "Forbidden" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" - "This form has expired. Go back, reload the page and try again." "/me/settings": post: operationId: "postMeSettings" tags: - "Web pages" summary: "Form: `autoAcceptCompany` (`on` when ticked; an unticked box sends nothing, which turns it off). As PUT /api/me/settings." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-settings" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: autoAcceptCompany: type: "string" csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf); only an active member of a company has these settings" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "only an active member of a company has these settings" - "This form has expired. Go back, reload the page and try again." "/me/shares": post: operationId: "postMeShares" tags: - "Web pages" summary: "Form: `device` (one of the caller's own devices), `email`. Shares that device's backups, as `POST /api/shares`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-shares" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" device: type: "string" email: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "not a valid email address, these backups are already 's" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "these backups are already 's" - " is required" - " is too long" - " must not contain control characters" - "not a valid email address" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf); the 403s of POST /api/shares" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" - "only the device's owner or an admin can share its backups" - "you cannot share 's backups with yourself: ask to restore them instead, which or another owner or admin approves" - "This form has expired. Go back, reload the page and try again." "404": description: "no such device, is not a member of your company" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such device" - " is not a member of your company" "/me/shares/{id}/remove": post: operationId: "postMeSharesIdRemove" tags: - "Web pages" summary: "Stops a share of the caller's own device, or removes a share from Shared with me, as `POST /api/shares/{id}/remove`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-shares-id-remove" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf); not an active member of a company" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" - "This form has expired. Go back, reload the page and try again." "404": description: "no such share" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such share" "/me/tvs/{id}/remove": post: operationId: "postMeTvsIdRemove" tags: - "Web pages" summary: "Disconnects one of the caller's TVs (Your TVs on `/me`, the page asks first), as `POST /api/tvs/{id}/remove`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-me-tvs-id-remove" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] parameters: - name: "id" in: "path" required: true schema: type: "string" requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" - "a TV cannot do this" - "This form has expired. Go back, reload the page and try again." "404": description: "no such TV" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such TV" "/operator": get: operationId: "getOperator" tags: - "Web pages" summary: "All companies' usage, for the operator accounts named in the service settings (`usage.operators`) only: the assistant's requests and cost, active devices and companies by day, and per company its acti" description: "All companies' usage, for the operator accounts named in the service settings (`usage.operators`) only: the assistant's requests and cost, active devices and companies by day, and per company its active devices, requests, tokens, cost and app events. Query: `days` as above. Anyone else, signed in or not, gets 404, the same answer as an address that does not exist; the link to it shows only in an operator's page header. Its Unlimited Space Relay panel lists the unlimited relay months of this month or later, with Revoke on each, and gives more (the two forms below)." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-operator" x-auth-scheme: "none" security: [] parameters: - name: "days" in: "query" required: false schema: type: "string" nullable: true - name: "msg" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" "/operator/relay/grant": post: operationId: "postOperatorRelayGrant" tags: - "Web pages" summary: "Form `company` (a company's id, name or domain, or a member's email), `months` (1–120), `note` (optional), `csrf`; the operator accounts only (anyone else: 404). Gives the company unlimited Space Rela" description: "Form `company` (a company's id, name or domain, or a member's email), `months` (1–120), `note` (optional), `csrf`; the operator accounts only (anyone else: 404). Gives the company unlimited Space Relay for whole UTC months: from this month, or on from the end of the months it already has. The same as `spaceaccount relay grant` on the server. Redirects to `/account/operator` with the outcome, an error too (\"Not done: …\", below)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-operator-relay-grant" x-auth-scheme: "none" security: [] responses: "400": description: "months must be 1 to 120. Not an operator: 404 (no page)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "months must be a whole number" "403": description: "Forbidden" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." "404": description: "no company \"\". A name two companies share: more than one company is called \"\": use its id" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no company \"\"" "/operator/relay/revoke": post: operationId: "postOperatorRelayRevoke" tags: - "Web pages" summary: "Form `what` (a grant's id `rg_…`, or a company as above: all its grants of this month or later), `csrf`; the operator accounts only (anyone else: 404). The company is back on its free allowance and ba" description: "Form `what` (a grant's id `rg_…`, or a company as above: all its grants of this month or later), `csrf`; the operator accounts only (anyone else: 404). The company is back on its free allowance and balance at once. The same as `spaceaccount relay revoke`. Redirects to `/account/operator` with the outcome (\"Nothing to revoke\" when none is left)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-operator-relay-revoke" x-auth-scheme: "none" security: [] responses: "403": description: "Forbidden" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." "404": description: "no company or grant \"\". A name two companies share: more than one company is called \"\": use its id. Not an operator: 404 (no page)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no company or grant \"\"" "/relay": get: operationId: "getRelay" tags: - "Space Relay billing" summary: "The buy screen, for any active member: the balance, a warning when activation is needed, the three packs with a Buy button each and the box \"Buy this pack again automatically when the balance drops be" description: "The buy screen, for any active member: the balance, a warning when activation is needed, the three packs with a Buy button each and the box \"Buy this pack again automatically when the balance drops below 10 %\". Not signed in: redirects to `/account/?next=relay`." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-relay" x-auth-scheme: "none" security: [] parameters: - name: "msg" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "403": description: "Forbidden" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" "/relay/activate": get: operationId: "getRelayActivate" tags: - "Space Relay billing" summary: "The relay's \"activation needed\" link (`?group=`) for devices not signed in and older apps. Signed in, it redirects to `/account/relay`; otherwise it explains how to sign in." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-relay-activate" x-auth-scheme: "none" security: [] parameters: - name: "group" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "/relay/cancel": get: operationId: "getRelayCancel" tags: - "Space Relay billing" summary: "Stripe's return address after cancelling (`?p=`): \"Payment cancelled. Nothing was charged.\"" externalDocs: url: "https://spacebackup.net/manual/api-account/#get-relay-cancel" x-auth-scheme: "none" security: [] parameters: - name: "p" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" "/relay/checkout": post: operationId: "postRelayCheckout" tags: - "Space Relay billing" summary: "Form: `pack`, `autoTopUp` (`on` when ticked). Starts a Stripe Checkout payment for the company and redirects (302) to Stripe." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-relay-checkout" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: autoTopUp: type: "string" csrf: type: "string" pack: type: "string" required: - "csrf" responses: "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "no such pack" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such pack" "403": description: "This form has expired. Go back, reload the page and try again., not an active member of a company" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" - "This form has expired. Go back, reload the page and try again." "502": description: "The payment page could not be opened (Stripe: ). Please try again in a minute" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "The payment page could not be opened (Stripe: ). Please try again in a minute." "503": description: "Payments are not set up yet. Please try again later" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "Payments are not set up yet. Please try again later." "/relay/open": get: operationId: "getRelayOpen" tags: - "Space Relay billing" summary: "The app's buy link (`?t=` from `POST /api/relay/buy-link`). Signs the browser in as the device's user and redirects to `/account/relay`. A used or expired link shows \"Link expired\"." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-relay-open" x-auth-scheme: "none" security: [] parameters: - name: "t" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "/relay/success": get: operationId: "getRelaySuccess" tags: - "Space Relay billing" summary: "Stripe's return address after paying (`?session_id=`). Credits the purchase if the webhook has not yet, and says \"Space Relay 500 GB was added to your relay credit\" (or that the payment is being confi" description: "Stripe's return address after paying (`?session_id=`). Credits the purchase if the webhook has not yet, and says \"Space Relay 500 GB was added to your relay credit\" (or that the payment is being confirmed), with the new balance." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-relay-success" x-auth-scheme: "none" security: [] parameters: - name: "session_id" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" "403": description: "Forbidden" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "not an active member of a company" "/signin": post: operationId: "postSignin" tags: - "Web pages" summary: "Form: `email`. Starts a sign-in for \"a web browser (Firefox)\" and the like, keeps the browser's secret in the `sa_signin` cookie, and redirects to `/account/signin/wait`. A bad address (400), too many" description: "Form: `email`. Starts a sign-in for \"a web browser (Firefox)\" and the like, keeps the browser's secret in the `sa_signin` cookie, and redirects to `/account/signin/wait`. A bad address (400), too many requests (429) or a mail failure (503) shows the sign-in page again with the error." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-signin" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" email: type: "string" required: - "csrf" responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "not a valid email address" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "secretHash must be base64 of a SHA-256" - "not a valid email address" - " is required" - " is too long" - " must not contain control characters" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." "429": description: "too many sign-in requests; try again later" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "too many sign-in requests; try again later" "503": description: "could not send the sign-in mail; try again later" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "could not send the sign-in mail; try again later" "/signin/code": post: operationId: "postSigninCode" tags: - "Web pages" summary: "Form: `code`. A right code signs the browser in (sets `sa_session`) and redirects to `/account/`; a wrong one shows the waiting page with \"Wrong code; 3 attempt(s) left.\" (400). Without a sign-in in p" description: "Form: `code`. A right code signs the browser in (sets `sa_session`) and redirects to `/account/`; a wrong one shows the waiting page with \"Wrong code; 3 attempt(s) left.\" (400). Without a sign-in in progress it redirects to `/account/`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-signin-code" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: code: type: "string" csrf: type: "string" required: - "csrf" responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "the waiting page with Wrong code; 3 attempt(s) left" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "wrong code" - " is required" - " is too long" - " must not contain control characters" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." "404": description: "no such sign-in request (the browser's sign-in is gone)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no such sign-in request" "410": description: "this sign-in was already used, this sign-in has expired; start again, too many wrong codes; start again. 404 and 410 are error pages; start the sign-in again" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "this sign-in was already used" - "this sign-in has expired; start again" - "too many wrong codes; start again" "/signin/confirm": get: operationId: "getSigninConfirm" tags: - "Web pages" summary: "The mailed link: `?r=&t=`. Shows \"Sign in ?\" with the email, when it was asked, and a Sign in button (it does not sign in by itself, so mail scanners cannot use th" description: "The mailed link: `?r=&t=`. Shows \"Sign in ?\" with the email, when it was asked, and a Sign in button (it does not sign in by itself, so mail scanners cannot use the link up). An expired or used link shows \"Link expired\"." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-signin-confirm" x-auth-scheme: "none" security: [] parameters: - name: "r" in: "query" required: false schema: type: "string" nullable: true - name: "t" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" post: operationId: "postSigninConfirm" tags: - "Web pages" summary: "Form: `r`, `t`. Approves the sign-in. In the browser that asked, it signs in at once and redirects to `/account/`; anywhere else it says \"ANNA-PC is signed in as anna@acme.com now. You can close this " description: "Form: `r`, `t`. Approves the sign-in. In the browser that asked, it signs in at once and redirects to `/account/`; anywhere else it says \"ANNA-PC is signed in as anna@acme.com now. You can close this tab.\" and the device (or the original browser tab) picks up its token with its next poll. An unknown, expired or used link shows \"Link expired\" (200)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-signin-confirm" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" r: type: "string" t: type: "string" required: - "csrf" responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "wrong code" - " is required" - " is too long" - " must not contain control characters" "403": description: "This form has expired. Go back, reload the page and try again. (a missing or wrong csrf)" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." "/signin/poll": post: operationId: "postSigninPoll" tags: - "Web pages" summary: "The waiting page's poll. Header `X-CSRF-Token` (else 403 `{\"error\": \"missing CSRF token\"}`); no body. Answers JSON `{\"status\": \"pending\"}`, `{\"status\": \"approved\"}` (the session cookie is set; reload)" description: "The waiting page's poll. Header `X-CSRF-Token` (else 403 `{\"error\": \"missing CSRF token\"}`); no body. Answers JSON `{\"status\": \"pending\"}`, `{\"status\": \"approved\"}` (the session cookie is set; reload), `{\"status\": \"expired\"}` (start again) or `{\"status\": \"none\"}` (no sign-in in progress)." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-signin-poll" x-auth-scheme: "the sign-in cookie sa_signin plus the header X-CSRF-Token" security: - signInCookie: [] csrfHeader: [] responses: "200": description: "OK" content: "application/json": schema: type: "object" properties: status: type: "string" required: - "status" example: status: "active" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "wrong code" - " is required" - " is too long" - " must not contain control characters" "403": description: "Forbidden" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "missing CSRF token" "/signin/wait": get: operationId: "getSigninWait" tags: - "Web pages" summary: "The waiting page: \"Check your email\", a field for the 6-digit code, and a script that polls `POST /account/signin/poll` every 2 seconds. Without a sign-in in progress it redirects to `/account/`." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-signin-wait" x-auth-scheme: "none" security: [] responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "/signout": post: operationId: "postSignout" tags: - "Web pages" summary: "Form: only `csrf`. Ends the web session and redirects to `/account/`." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-signout" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: csrf: type: "string" required: - "csrf" responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" "403": description: "Forbidden" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." "/tv": get: operationId: "getTv" tags: - "Web pages" summary: "The TV code page (the TV shows `https://spacebackup.net/tv`, which nginx sends here; `?code=` from its QR code fills the code in). Not signed in: the sign-in page (\"Sign in to connect your TV.\"), whic" description: "The TV code page (the TV shows `https://spacebackup.net/tv`, which nginx sends here; `?code=` from its QR code fills the code in). Not signed in: the sign-in page (\"Sign in to connect your TV.\"), which comes back here with the code after the sign-in. Signed in: the code box and Continue." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-tv" x-auth-scheme: "none" security: [] parameters: - name: "code" in: "query" required: false schema: type: "string" nullable: true responses: "200": description: "OK" content: "text/html": schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" post: operationId: "postTv" tags: - "Web pages" summary: "The code typed (form `code`, `csrf`): the TV it names (name, model, when it asked) with a name box, Approve and Not my TV." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-tv" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: code: type: "string" csrf: type: "string" required: - "csrf" responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" "403": description: "This form has expired. Go back, reload the page and try again" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." - "not an active member of a company" - "a TV cannot do this" "404": description: "no TV is showing that code; check it, or show a new one on the TV;" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no TV is showing that code; check it, or show a new one on the TV" "429": description: "too many wrong codes; wait a few minutes (the code page again, with the message);" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "too many wrong codes; wait a few minutes" "/tv/approve": post: operationId: "postTvApprove" tags: - "Web pages" summary: "Form `code`, `name`, `csrf`: approves the pairing (as `POST /api/tv/pair/{code}/approve`); \"<name> is connected\"." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-tv-approve" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: code: type: "string" csrf: type: "string" name: type: "string" required: - "csrf" responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" "403": description: "This form has expired. Go back, reload the page and try again" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." - "not an active member of a company" - "a TV cannot do this" "404": description: "no TV is showing that code; check it, or show a new one on the TV;" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "no TV is showing that code; check it, or show a new one on the TV" "429": description: "too many wrong codes; wait a few minutes (the code page again, with the message);" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "too many wrong codes; wait a few minutes" "/tv/deny": post: operationId: "postTvDeny" tags: - "Web pages" summary: "Form `code`, `csrf`: declines it (as `POST /api/tv/pair/{code}/deny`); the TV shows that it was declined." externalDocs: url: "https://spacebackup.net/manual/api-account/#post-tv-deny" x-auth-scheme: "the web session (cookie sa_session) and the form field csrf (the value of the sa_csrf cookie)" security: - webSession: [] requestBody: required: true content: "application/x-www-form-urlencoded": schema: type: "object" properties: code: type: "string" csrf: type: "string" required: - "csrf" responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" "403": description: "This form has expired. Go back, reload the page and try again" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - "This form has expired. Go back, reload the page and try again." - "not an active member of a company" - "a TV cannot do this" "/tv/{code}": get: operationId: "getTvCode" tags: - "Web pages" summary: "The TV's QR code (`https://spacebackup.net/tv/`, a universal link the iPhone app claims; without the app the service redirects it here). Signed in on the web: the code page with the code filled " description: "The TV's QR code (`https://spacebackup.net/tv/`, a universal link the iPhone app claims; without the app the service redirects it here). Signed in on the web: the code page with the code filled in, as `GET /tv?code=`. Not signed in: only \"Open Space Backup on your iPhone to sign in this TV\", the code, and where to get the app (Android: the Android app's link when there is one). No sign-in form, and the code is not looked up. Not a code: redirects to `/tv`. The site's `/.well-known/apple-app-site-association` (`application/json`) claims `/tv/*` for the iPhone app." externalDocs: url: "https://spacebackup.net/manual/api-account/#get-tv-code" x-auth-scheme: "none" security: [] parameters: - name: "code" in: "path" required: true schema: type: "string" responses: "200": description: "OK" content: "text/html": schema: type: "string" "302": description: "Found (redirect)" headers: Location: schema: type: "string" "400": description: "Bad Request" content: "text/html": schema: type: "string" description: "a page saying the message" x-error-messages: - " must be a string" - " is too long" components: securitySchemes: bearer: type: "http" scheme: "bearer" description: "The device token (Authorization: Bearer ): 43 characters (32 random bytes, base64url). How to obtain the Bearer token: POST /api/signin/start {email, deviceName, secretHash = base64 SHA-256 of a random secret} mails a link and a 6-digit code; then POST /api/signin/code {requestId, secret, code}, or poll POST /api/signin/poll {requestId, secret} every 2 s until the link is clicked; the approved answer is {status: approved, token, email, memberId, deviceId, company}. No expiry; revoked when the device or its member is removed or the session signs out (then 401)." webSession: type: "apiKey" in: "cookie" name: "sa_session" description: "The web pages' session (12 hours idle)." signInCookie: type: "apiKey" in: "cookie" name: "sa_signin" description: "A browser sign-in in progress." csrfHeader: type: "apiKey" in: "header" name: "X-CSRF-Token" description: "The value of the sa_csrf cookie." stripeSignature: type: "apiKey" in: "header" name: "Stripe-Signature" relaySignature: type: "apiKey" in: "header" name: "X-SpaceRelay-Signature" description: "t=,v1=.' with the relay secret>" schemas: AckRequest: type: "object" properties: version: type: "integer" format: "int32" keyProof: type: "string" nullable: true required: - "version" - "keyProof" AlbumAddedRequest: type: "object" properties: count: type: "integer" format: "int32" nullable: true job: type: "string" nullable: true required: - "count" - "job" AlbumAutoAdded: type: "object" properties: machine: type: "string" nullable: true added: type: "array" items: type: "string" nullable: true encrypted: type: "integer" format: "int32" nullable: true required: - "machine" - "added" - "encrypted" AlbumAutoAddedView: type: "object" properties: album: type: "string" added: type: "integer" format: "int32" already: type: "integer" format: "int32" encrypted: type: "integer" format: "int32" required: - "album" - "added" - "already" - "encrypted" AlbumAutoList: type: "object" properties: machine: type: "string" albums: type: "array" items: $ref: "#/components/schemas/AlbumAutoView" required: - "machine" - "albums" AlbumAutoRequest: type: "object" properties: machine: type: "string" nullable: true required: - "machine" AlbumAutoView: type: "object" properties: album: type: "string" name: type: "string" ownerEmail: type: "string" filter: $ref: "#/components/schemas/AlbumFilter" destinations: type: "array" items: $ref: "#/components/schemas/AlbumDestinationView" added: type: "array" items: type: "string" removed: type: "array" items: type: "string" lastChecked: type: "string" format: "date-time" nullable: true ticket: type: "string" expires: type: "string" format: "date-time" required: - "album" - "name" - "ownerEmail" - "filter" - "destinations" - "added" - "removed" - "lastChecked" - "ticket" - "expires" AlbumBriefView: type: "object" properties: id: type: "string" name: type: "string" ownerEmail: type: "string" mine: type: "boolean" itemCount: type: "integer" format: "int32" updated: type: "string" format: "date-time" destinations: type: "array" items: $ref: "#/components/schemas/AlbumDestinationView" ownerName: type: "string" nullable: true created: type: "string" format: "date-time" nullable: true membersCanAdd: type: "boolean" faces: type: "boolean" cover: type: "string" nullable: true filter: allOf: - $ref: "#/components/schemas/AlbumFilter" nullable: true public: type: "boolean" publicDevice: type: "string" nullable: true shown: type: "boolean" archived: type: "string" format: "date-time" nullable: true mergedFrom: type: "array" items: type: "string" nullable: true deletedAt: type: "string" format: "date-time" nullable: true deletedBy: type: "string" nullable: true purgeAt: type: "string" format: "date-time" nullable: true required: - "id" - "name" - "ownerEmail" - "mine" - "itemCount" - "updated" - "destinations" - "membersCanAdd" - "faces" - "cover" - "filter" - "shown" AlbumCanAddRequest: type: "object" properties: email: type: "string" nullable: true canAdd: type: "boolean" nullable: true required: - "email" - "canAdd" AlbumCreate: type: "object" properties: name: type: "string" nullable: true destinations: type: "array" items: $ref: "#/components/schemas/AlbumDestinationSet" nullable: true public: type: "boolean" nullable: true required: - "name" - "destinations" - "public" AlbumDestinationSet: type: "object" properties: device: type: "string" nullable: true dest: type: "string" nullable: true label: type: "string" nullable: true required: - "device" - "dest" - "label" AlbumDestinationView: type: "object" properties: device: type: "string" deviceName: type: "string" dest: type: "string" label: type: "string" nullable: true required: - "device" - "deviceName" - "dest" - "label" AlbumDestinationsRequest: type: "object" properties: destinations: type: "array" items: $ref: "#/components/schemas/AlbumDestinationSet" nullable: true required: - "destinations" AlbumFilter: type: "object" properties: words: type: "string" content: type: "string" nullable: true night: type: "boolean" nullable: true day: type: "boolean" nullable: true place: allOf: - $ref: "#/components/schemas/AlbumFilterPlace" nullable: true kind: type: "string" timeFrom: type: "integer" format: "int32" nullable: true timeTo: type: "integer" format: "int32" nullable: true machines: type: "array" items: type: "string" since: type: "string" format: "date-time" active: type: "boolean" required: - "words" - "content" - "night" - "day" - "place" - "kind" - "timeFrom" - "timeTo" - "machines" - "since" - "active" AlbumFilterPlace: type: "object" properties: name: type: "string" nullable: true lat: type: "number" lon: type: "number" radiusKm: type: "number" required: - "name" - "lat" - "lon" - "radiusKm" AlbumFilterRequest: type: "object" properties: filter: description: "any JSON value" required: - "filter" AlbumInvitedView: type: "object" properties: email: type: "string" since: type: "string" format: "date-time" state: type: "string" name: type: "string" nullable: true decided: type: "string" format: "date-time" nullable: true required: - "email" - "since" - "state" AlbumJobAcceptRequest: type: "object" properties: ticket: type: "string" nullable: true job: type: "string" nullable: true op: type: "string" nullable: true required: - "ticket" - "job" - "op" AlbumJobAcceptView: type: "object" properties: job: type: "string" device: type: "string" album: type: "string" until: type: "string" format: "date-time" required: - "job" - "device" - "album" - "until" AlbumJobDoneRequest: type: "object" properties: job: type: "string" nullable: true ticket: type: "string" nullable: true added: type: "integer" format: "int32" nullable: true already: type: "integer" format: "int32" nullable: true failed: type: "integer" format: "int32" nullable: true kind: type: "string" nullable: true error: type: "string" nullable: true required: - "job" - "ticket" - "added" - "already" - "failed" - "kind" - "error" AlbumJobDoneView: type: "object" properties: title: type: "string" body: type: "string" notification: type: "integer" format: "int64" counted: type: "boolean" required: - "title" - "body" - "notification" - "counted" AlbumMemberView: type: "object" properties: email: type: "string" since: type: "string" format: "date-time" name: type: "string" nullable: true guest: type: "boolean" canAdd: type: "boolean" shown: type: "boolean" required: - "email" - "since" - "canAdd" - "shown" AlbumMergeRequest: type: "object" properties: albums: type: "array" items: type: "string" nullable: true nullable: true name: type: "string" nullable: true destinations: type: "array" items: $ref: "#/components/schemas/AlbumDestinationSet" nullable: true required: - "albums" - "name" - "destinations" AlbumMergeView: type: "object" properties: album: $ref: "#/components/schemas/AlbumView" archived: type: "array" items: $ref: "#/components/schemas/AlbumView" required: - "album" - "archived" AlbumRemoveRequest: type: "object" properties: item: type: "string" nullable: true source: type: "string" nullable: true required: - "item" - "source" AlbumRemoveRequestView: type: "object" properties: album: type: "string" item: type: "string" required: - "album" - "item" AlbumShareRequest: type: "object" properties: email: type: "string" nullable: true emails: type: "array" items: type: "string" nullable: true required: - "email" - "emails" AlbumShowRequest: type: "object" properties: "on": type: "boolean" nullable: true required: - "on" AlbumTicketCheck: type: "object" properties: ticket: type: "string" nullable: true required: - "ticket" AlbumTicketCheckView: type: "object" properties: requesterDevice: type: "string" requesterName: type: "string" requesterEmail: type: "string" album: type: "string" albumName: type: "string" ownerEmail: type: "string" access: type: "string" destinations: type: "array" items: $ref: "#/components/schemas/AlbumDestinationView" expires: type: "string" format: "date-time" requesterKey: type: "string" nullable: true deleted: type: "boolean" member: type: "string" nullable: true filterMachines: type: "array" items: type: "string" nullable: true memberDevices: type: "array" items: type: "string" nullable: true link: allOf: - $ref: "#/components/schemas/LinkScopeView" nullable: true public: type: "boolean" publicDevice: type: "string" nullable: true faces: type: "boolean" required: - "requesterDevice" - "requesterName" - "requesterEmail" - "album" - "albumName" - "ownerEmail" - "access" - "destinations" - "expires" - "deleted" - "faces" AlbumTicketView: type: "object" properties: ticket: type: "string" album: type: "string" name: type: "string" access: type: "string" expires: type: "string" format: "date-time" required: - "ticket" - "album" - "name" - "access" - "expires" AlbumUpdate: type: "object" properties: name: type: "string" nullable: true itemCount: type: "integer" format: "int32" nullable: true membersCanAdd: type: "boolean" nullable: true cover: description: "any JSON value" removed: type: "array" items: type: "string" nullable: true faces: type: "boolean" nullable: true required: - "name" - "itemCount" - "membersCanAdd" - "cover" - "removed" - "faces" AlbumView: type: "object" properties: id: type: "string" name: type: "string" ownerEmail: type: "string" mine: type: "boolean" created: type: "string" format: "date-time" updated: type: "string" format: "date-time" itemCount: type: "integer" format: "int32" destinations: type: "array" items: $ref: "#/components/schemas/AlbumDestinationView" members: type: "array" items: $ref: "#/components/schemas/AlbumMemberView" ownerName: type: "string" nullable: true membersCanAdd: type: "boolean" faces: type: "boolean" cover: type: "string" nullable: true filter: allOf: - $ref: "#/components/schemas/AlbumFilter" nullable: true invited: type: "array" items: $ref: "#/components/schemas/AlbumInvitedView" shown: type: "boolean" public: type: "boolean" publicDevice: type: "string" nullable: true archived: type: "string" format: "date-time" nullable: true mergedFrom: type: "array" items: type: "string" nullable: true deletedAt: type: "string" format: "date-time" nullable: true deletedBy: type: "string" nullable: true deletedByName: type: "string" nullable: true purgeAt: type: "string" format: "date-time" nullable: true required: - "id" - "name" - "ownerEmail" - "mine" - "created" - "updated" - "itemCount" - "destinations" - "members" - "membersCanAdd" - "faces" - "cover" - "filter" - "invited" - "shown" ApprovalView: type: "object" properties: id: type: "string" state: type: "string" sourceDevice: type: "string" sourceName: type: "string" requester: type: "string" requesterName: type: "string" nullable: true requestingDevice: type: "string" created: type: "string" format: "date-time" canDecide: type: "boolean" decidedBy: type: "string" nullable: true decided: type: "string" format: "date-time" nullable: true sourceEmail: type: "string" required: - "id" - "state" - "sourceDevice" - "sourceName" - "requester" - "requesterName" - "requestingDevice" - "created" - "canDecide" - "decidedBy" - "decided" - "sourceEmail" AssistantAction: type: "object" properties: tool: type: "string" input: description: "any JSON value" required: - "tool" - "input" AssistantAlbumRequest: type: "object" properties: device: type: "string" nullable: true job: type: "string" nullable: true name: type: "string" nullable: true dest: type: "string" nullable: true label: type: "string" nullable: true filter: description: "any JSON value" share: type: "array" items: type: "string" nullable: true jobTicket: type: "string" nullable: true required: - "device" - "job" - "name" - "dest" - "label" - "filter" - "share" - "jobTicket" AssistantAlbumView: type: "object" properties: album: type: "string" name: type: "string" ticket: type: "string" expires: type: "string" format: "date-time" filter: type: "boolean" shared: type: "array" items: type: "string" invited: type: "boolean" shareError: type: "string" nullable: true existing: type: "boolean" nullable: true required: - "album" - "name" - "ticket" - "expires" - "filter" - "shared" - "invited" AssistantAppCommand: type: "object" properties: id: type: "string" nullable: true what: type: "string" nullable: true required: - "id" - "what" AssistantContext: type: "object" properties: places: type: "array" items: $ref: "#/components/schemas/AssistantPlace" nullable: true trips: type: "array" items: $ref: "#/components/schemas/AssistantTrip" nullable: true kinds: description: "any JSON value" nullable: true appCommands: type: "array" items: $ref: "#/components/schemas/AssistantAppCommand" nullable: true pcs: type: "array" items: type: "string" nullable: true albums: type: "array" items: type: "string" nullable: true people: type: "array" items: type: "string" nullable: true history: type: "array" items: $ref: "#/components/schemas/AssistantTurn" nullable: true appSettings: type: "array" items: type: "string" nullable: true languages: type: "array" items: type: "string" nullable: true geo: type: "integer" format: "int32" nullable: true required: - "places" - "trips" - "kinds" - "appCommands" - "pcs" - "albums" - "people" - "history" - "appSettings" - "languages" - "geo" AssistantDoneRequest: type: "object" properties: device: type: "string" nullable: true job: type: "string" nullable: true album: type: "string" nullable: true added: type: "integer" format: "int32" nullable: true found: type: "integer" format: "int32" nullable: true needsPhone: type: "integer" format: "int32" nullable: true kind: type: "string" nullable: true failed: type: "boolean" nullable: true jobTicket: type: "string" nullable: true required: - "device" - "job" - "album" - "added" - "found" - "needsPhone" - "kind" - "failed" - "jobTicket" AssistantDoneView: type: "object" properties: title: type: "string" body: type: "string" notification: type: "integer" format: "int64" required: - "title" - "body" - "notification" AssistantLink: type: "object" properties: title: type: "string" url: type: "string" required: - "title" - "url" AssistantPlace: type: "object" properties: name: type: "string" nullable: true count: type: "integer" format: "int64" nullable: true required: - "name" - "count" AssistantRedeemRequest: type: "object" properties: jobTicket: type: "string" nullable: true job: type: "string" nullable: true required: - "jobTicket" - "job" AssistantRedeemView: type: "object" properties: job: type: "string" device: type: "string" action: type: "string" until: type: "string" format: "date-time" required: - "job" - "device" - "action" - "until" AssistantReply: type: "object" properties: actions: type: "array" items: $ref: "#/components/schemas/AssistantAction" nullable: true say: type: "string" kind: type: "string" text: type: "string" nullable: true links: type: "array" items: $ref: "#/components/schemas/AssistantLink" nullable: true required: - "say" - "kind" AssistantRequest: type: "object" properties: text: type: "string" nullable: true today: type: "string" nullable: true context: allOf: - $ref: "#/components/schemas/AssistantContext" nullable: true mode: type: "string" nullable: true language: type: "string" nullable: true required: - "text" - "today" - "context" - "mode" - "language" AssistantTicketRequest: type: "object" properties: pc: type: "string" nullable: true action: type: "string" nullable: true device: type: "string" nullable: true required: - "pc" - "action" - "device" AssistantTicketView: type: "object" properties: ticket: type: "string" expires: type: "string" format: "date-time" required: - "ticket" - "expires" AssistantTrip: type: "object" properties: name: type: "string" nullable: true place: type: "string" nullable: true from: type: "string" nullable: true to: type: "string" nullable: true count: type: "integer" format: "int64" nullable: true required: - "name" - "place" - "from" - "to" - "count" AssistantTurn: type: "object" properties: q: type: "string" nullable: true a: type: "string" nullable: true required: - "q" - "a" BirthView: type: "object" properties: born: type: "string" nullable: true age: type: "integer" format: "int32" nullable: true "on": type: "string" nullable: true BuyLinkView: type: "object" properties: url: type: "string" expiresAt: type: "string" format: "date-time" required: - "url" - "expiresAt" CommandAnswer: type: "object" properties: state: type: "string" nullable: true message: type: "string" nullable: true required: - "state" - "message" CompanyKeyRequest: type: "object" properties: version: type: "integer" format: "int32" keyProof: type: "string" nullable: true recovery: type: "string" nullable: true required: - "version" - "keyProof" - "recovery" CompanySettingsRequest: type: "object" properties: name: type: "string" nullable: true autoJoin: type: "boolean" nullable: true faces: type: "boolean" nullable: true required: - "name" - "autoJoin" - "faces" CompanyView: type: "object" properties: id: type: "string" name: type: "string" role: type: "string" status: type: "string" keyVersion: type: "integer" format: "int32" rotationNeeded: type: "boolean" autoJoin: type: "boolean" domain: type: "string" nullable: true faces: type: "boolean" languages: type: "array" items: type: "string" required: - "id" - "name" - "role" - "status" - "keyVersion" - "rotationNeeded" - "autoJoin" - "domain" - "faces" - "languages" DataKeyPut: type: "object" properties: keyId: type: "string" nullable: true keyVersion: type: "integer" format: "int32" wrapped: type: "string" nullable: true device: type: "string" nullable: true required: - "keyId" - "keyVersion" - "wrapped" DataKeyRequestBrief: type: "object" properties: id: type: "string" sourceDeviceId: type: "string" sourceName: type: "string" state: type: "string" required: - "id" - "sourceDeviceId" - "sourceName" - "state" DataKeyRequestCreate: type: "object" properties: sourceDevice: type: "string" nullable: true required: - "sourceDevice" DataKeyRequestStarted: type: "object" properties: id: type: "string" state: type: "string" required: - "id" - "state" DataKeyRequestView: type: "object" properties: id: type: "string" state: type: "string" sourceDevice: type: "string" keyId: type: "string" keyVersion: type: "integer" format: "int32" wrapped: type: "string" nullable: true former: type: "array" items: $ref: "#/components/schemas/WrappedKeyView" nullable: true required: - "id" - "state" - "sourceDevice" - "keyId" - "keyVersion" DataKeySource: type: "object" properties: deviceId: type: "string" name: type: "string" email: type: "string" keyId: type: "string" removed: type: "boolean" required: - "deviceId" - "name" - "email" - "keyId" - "removed" DeliverRequest: type: "object" properties: toDevice: type: "string" nullable: true version: type: "integer" format: "int32" sealed: type: "string" nullable: true required: - "toDevice" - "version" - "sealed" DeliveryView: type: "object" properties: id: type: "string" version: type: "integer" format: "int32" fromDevice: type: "string" sealed: type: "string" fromName: type: "string" nullable: true fromEmail: type: "string" nullable: true required: - "id" - "version" - "fromDevice" - "sealed" - "fromName" - "fromEmail" DeviceChangedRequest: type: "object" properties: topics: type: "array" items: type: "string" nullable: true device: type: "string" nullable: true topic: type: "string" nullable: true v: type: "string" nullable: true from: type: "string" nullable: true company: type: "boolean" nullable: true required: - "topics" - "device" - "topic" - "v" - "from" - "company" DeviceCommandView: type: "object" properties: id: type: "string" device: type: "string" kind: type: "string" requestedBy: type: "string" requested: type: "string" format: "date-time" state: type: "string" stateAt: type: "string" format: "date-time" message: type: "string" nullable: true required: - "id" - "device" - "kind" - "requestedBy" - "requested" - "state" - "stateAt" - "message" DeviceKeyView: type: "object" properties: deviceId: type: "string" name: type: "string" publicKey: type: "string" signingKey: type: "string" nullable: true required: - "deviceId" - "name" - "publicKey" DeviceLabelRequest: type: "object" properties: label: type: "string" nullable: true required: - "label" DeviceNotifyRequest: type: "object" properties: device: type: "string" nullable: true kind: type: "string" nullable: true drive: type: "string" nullable: true freeBytes: type: "integer" format: "int64" nullable: true totalBytes: type: "integer" format: "int64" nullable: true text: type: "string" nullable: true open: type: "array" items: type: "string" nullable: true required: - "device" - "kind" - "drive" - "freeBytes" - "totalBytes" - "text" - "open" DeviceRegistered: type: "object" properties: deviceId: type: "string" required: - "deviceId" DeviceStatePut: type: "object" properties: sealed: type: "string" nullable: true updated: type: "string" nullable: true required: - "sealed" - "updated" DeviceStateView: type: "object" properties: sealed: type: "string" updated: type: "string" required: - "sealed" - "updated" DeviceStatusReport: type: "object" properties: running: type: "boolean" nullable: true lastRunStarted: type: "string" nullable: true lastRunEnded: type: "string" nullable: true lastResult: type: "string" nullable: true lastError: type: "string" nullable: true lastFiles: type: "integer" format: "int64" nullable: true lastBytes: type: "integer" format: "int64" nullable: true nextRun: type: "string" nullable: true folders: type: "integer" format: "int32" nullable: true destinations: type: "integer" format: "int32" nullable: true paused: type: "boolean" nullable: true required: - "running" - "lastRunStarted" - "lastRunEnded" - "lastResult" - "lastError" - "lastFiles" - "lastBytes" - "nextRun" - "folders" - "destinations" - "paused" DeviceStatusView: type: "object" properties: device: $ref: "#/components/schemas/DeviceView" status: allOf: - $ref: "#/components/schemas/PcStatusView" nullable: true phoneStateSaved: type: "string" nullable: true requests: type: "array" items: $ref: "#/components/schemas/DeviceCommandView" required: - "device" - "status" - "requests" DeviceView: type: "object" properties: id: type: "string" name: type: "string" email: type: "string" os: type: "string" version: type: "string" created: type: "string" format: "date-time" lastSeen: type: "string" format: "date-time" removed: type: "boolean" keyVersion: type: "integer" format: "int32" isMe: type: "boolean" fingerprint: type: "string" ownerName: type: "string" nullable: true label: type: "string" nullable: true kind: type: "string" nullable: true host: type: "string" nullable: true required: - "id" - "name" - "email" - "os" - "version" - "created" - "lastSeen" - "removed" - "keyVersion" - "isMe" - "fingerprint" Error: type: "object" properties: error: type: "string" description: "one plain sentence" required: - "error" additionalProperties: true description: "Every error of /api/...; some carry extra fields (attemptsLeft, keyVersion)." FaceNameRequest: type: "object" properties: name: type: "string" nullable: true email: type: "string" nullable: true aka: type: "array" items: type: "string" nullable: true required: - "name" - "email" - "aka" FaceNameView: type: "object" properties: name: type: "string" source: type: "string" email: type: "string" nullable: true member: type: "boolean" group: type: "string" nullable: true uses: type: "integer" format: "int64" last: type: "integer" format: "int64" nullable: true also: type: "array" items: type: "string" nullable: true required: - "name" - "source" - "uses" FaceNamesView: type: "object" properties: "on": type: "boolean" names: type: "array" items: $ref: "#/components/schemas/FaceNameView" required: - "on" - "names" GroupRequest: type: "object" properties: name: type: "string" nullable: true members: type: "array" items: type: "string" nullable: true hidden: type: "boolean" nullable: true required: - "name" - "members" - "hidden" GroupView: type: "object" properties: id: type: "string" name: type: "string" members: type: "array" items: type: "string" hidden: type: "boolean" automatic: type: "string" nullable: true required: - "id" - "name" - "members" - "hidden" GuestAlbumView: type: "object" properties: id: type: "string" name: type: "string" ownerEmail: type: "string" company: type: "string" itemCount: type: "integer" format: "int32" updated: type: "string" format: "date-time" ticket: type: "string" expires: type: "string" format: "date-time" pcs: type: "array" items: $ref: "#/components/schemas/GuestPcView" ownerName: type: "string" nullable: true cover: type: "string" nullable: true shown: type: "boolean" required: - "id" - "name" - "ownerEmail" - "company" - "itemCount" - "updated" - "ticket" - "expires" - "pcs" - "cover" - "shown" GuestCompanyView: type: "object" properties: id: type: "string" name: type: "string" relay: type: "string" nullable: true required: - "id" - "name" - "relay" GuestDeviceRegistered: type: "object" properties: deviceId: type: "string" required: - "deviceId" GuestDeviceRequest: type: "object" properties: name: type: "string" nullable: true publicKey: type: "string" nullable: true required: - "name" - "publicKey" GuestPassView: type: "object" properties: expires: type: "string" format: "date-time" companies: type: "array" items: $ref: "#/components/schemas/GuestCompanyView" albums: type: "array" items: $ref: "#/components/schemas/GuestAlbumView" required: - "expires" - "companies" - "albums" GuestPcView: type: "object" properties: device: type: "string" deviceName: type: "string" publicKey: type: "string" dests: type: "array" items: type: "string" required: - "device" - "deviceName" - "publicKey" - "dests" HandoverView: type: "object" properties: deviceId: type: "string" name: type: "string" email: type: "string" publicKey: type: "string" required: - "deviceId" - "name" - "email" - "publicKey" ICloudSourceView: type: "object" properties: id: type: "string" name: type: "string" email: type: "string" host: type: "string" label: type: "string" nullable: true required: - "id" - "name" - "email" - "host" InvitationAnswer: type: "object" properties: trustSender: type: "boolean" nullable: true required: - "trustSender" InvitationView: type: "object" properties: id: type: "string" album: type: "string" albumName: type: "string" fromEmail: type: "string" created: type: "string" format: "date-time" state: type: "string" fromName: type: "string" nullable: true company: type: "string" nullable: true sameCompany: type: "boolean" decided: type: "string" format: "date-time" nullable: true required: - "id" - "album" - "albumName" - "fromEmail" - "created" - "state" JoinRequest: type: "object" properties: keyProof: type: "string" nullable: true create: type: "boolean" nullable: true name: type: "string" nullable: true required: - "keyProof" - "create" - "name" KeyHolderView: type: "object" properties: deviceId: type: "string" name: type: "string" os: type: "string" lastSeen: type: "string" format: "date-time" required: - "deviceId" - "name" - "os" - "lastSeen" KeyRecoveryBrief: type: "object" properties: id: type: "string" state: type: "string" releaseAt: type: "string" format: "date-time" required: - "id" - "state" - "releaseAt" KeyRecoveryStarted: type: "object" properties: id: type: "string" releaseAt: type: "string" format: "date-time" required: - "id" - "releaseAt" KeyRecoveryView: type: "object" properties: id: type: "string" state: type: "string" releaseAt: type: "string" format: "date-time" sealed: type: "string" nullable: true required: - "id" - "state" - "releaseAt" KeyReleaseRequestView: type: "object" properties: id: type: "string" deviceId: type: "string" name: type: "string" email: type: "string" os: type: "string" since: type: "string" format: "date-time" mailedAt: type: "string" format: "date-time" required: - "id" - "deviceId" - "name" - "email" - "os" - "since" - "mailedAt" KeyReleaseView: type: "object" properties: id: type: "string" state: type: "string" since: type: "string" format: "date-time" mailedAt: type: "string" format: "date-time" nullable: true approvers: type: "array" items: type: "string" holders: type: "array" items: $ref: "#/components/schemas/KeyHolderView" approverIsMe: type: "boolean" adminUrl: type: "string" required: - "id" - "state" - "since" - "mailedAt" - "approvers" - "holders" - "approverIsMe" - "adminUrl" LinkCreate: type: "object" properties: items: type: "array" items: $ref: "#/components/schemas/LinkItemRequest" nullable: true kind: type: "string" nullable: true expiresDays: type: "integer" format: "int32" nullable: true title: type: "string" nullable: true album: type: "string" nullable: true date: type: "string" nullable: true ids: type: "array" items: type: "string" nullable: true days: type: "integer" format: "int32" nullable: true never: type: "boolean" nullable: true until: type: "string" nullable: true required: - "items" - "kind" - "expiresDays" - "title" - "album" - "date" - "ids" - "days" - "never" - "until" LinkExpiryChange: type: "object" properties: never: type: "boolean" nullable: true until: type: "string" nullable: true expiresDays: type: "integer" format: "int32" nullable: true days: type: "integer" format: "int32" nullable: true required: - "never" - "until" - "expiresDays" - "days" LinkItemRequest: type: "object" properties: album: type: "string" nullable: true id: type: "string" nullable: true date: type: "string" nullable: true required: - "album" - "id" - "date" LinkItemView: type: "object" properties: album: type: "string" nullable: true id: type: "string" date: type: "string" nullable: true required: - "id" LinkListView: type: "object" properties: links: type: "array" items: $ref: "#/components/schemas/LinkView" required: - "links" LinkScopeView: type: "object" properties: id: type: "string" machine: type: "string" items: type: "array" items: $ref: "#/components/schemas/LinkItemView" album: type: "string" nullable: true required: - "id" - "machine" - "items" LinkView: type: "object" properties: id: type: "string" url: type: "string" kind: type: "string" title: type: "string" nullable: true device: type: "string" deviceName: type: "string" email: type: "string" created: type: "string" format: "date-time" expires: type: "string" format: "date-time" nullable: true revoked: type: "string" format: "date-time" nullable: true views: type: "integer" format: "int64" lastView: type: "string" format: "date-time" nullable: true state: type: "string" items: type: "array" items: $ref: "#/components/schemas/LinkItemView" token: type: "string" albumName: type: "string" nullable: true required: - "id" - "url" - "kind" - "title" - "device" - "deviceName" - "email" - "created" - "expires" - "revoked" - "views" - "lastView" - "state" - "items" - "token" MatchKeyDeliverRequest: type: "object" properties: toDevice: type: "string" nullable: true sealed: type: "string" nullable: true required: - "toDevice" - "sealed" MeRequest: type: "object" properties: name: type: "string" nullable: true firstName: type: "string" nullable: true lastName: type: "string" nullable: true born: description: "any JSON value" age: description: "any JSON value" "on": type: "string" nullable: true required: - "name" - "firstName" - "lastName" - "born" - "age" - "on" MeSettingsRequest: type: "object" properties: autoAcceptCompany: type: "boolean" nullable: true languages: type: "array" items: type: "string" nullable: true selectAllSkipsWork: type: "boolean" nullable: true required: - "autoAcceptCompany" - "languages" - "selectAllSkipsWork" MeSettingsView: type: "object" properties: autoAcceptCompany: type: "boolean" languages: type: "array" items: type: "string" companyLanguages: type: "array" items: type: "string" selectAllSkipsWork: type: "boolean" required: - "autoAcceptCompany" - "languages" - "companyLanguages" - "selectAllSkipsWork" MemberInviteRequest: type: "object" properties: email: type: "string" nullable: true role: type: "string" nullable: true required: - "email" - "role" MemberMatchKeyView: type: "object" properties: email: type: "string" sealed: type: "string" required: - "email" - "sealed" MemberNameRequest: type: "object" properties: name: type: "string" nullable: true firstName: type: "string" nullable: true lastName: type: "string" nullable: true required: - "name" - "firstName" - "lastName" MemberRoleRequest: type: "object" properties: role: type: "string" nullable: true required: - "role" MemberView: type: "object" properties: id: type: "string" email: type: "string" name: type: "string" firstName: type: "string" lastName: type: "string" role: type: "string" status: type: "string" invitedBy: type: "string" nullable: true created: type: "string" format: "date-time" languages: type: "array" items: type: "string" required: - "id" - "email" - "name" - "firstName" - "lastName" - "role" - "status" - "invitedBy" - "created" - "languages" MovedFrom: type: "object" properties: from: type: "string" required: - "from" NotificationList: type: "object" properties: notifications: type: "array" items: $ref: "#/components/schemas/NotificationView" unread: type: "integer" format: "int32" latest: type: "integer" format: "int64" update: allOf: - $ref: "#/components/schemas/UpdateNews" nullable: true required: - "notifications" - "unread" - "latest" NotificationTarget: type: "object" properties: type: type: "string" id: type: "string" required: - "type" - "id" NotificationView: type: "object" properties: id: type: "integer" format: "int64" time: type: "string" format: "date-time" kind: type: "string" title: type: "string" body: type: "string" target: allOf: - $ref: "#/components/schemas/NotificationTarget" nullable: true read: type: "boolean" quiet: type: "boolean" required: - "id" - "time" - "kind" - "title" - "body" - "target" - "read" - "quiet" NotificationsReadRequest: type: "object" properties: ids: type: "array" items: type: "integer" format: "int64" nullable: true all: type: "boolean" nullable: true required: - "ids" - "all" NotificationsRequest: type: "object" properties: albumAdds: type: "boolean" nullable: true kinds: type: "object" additionalProperties: type: "boolean" nullable: true required: - "albumAdds" - "kinds" NotificationsUnread: type: "object" properties: unread: type: "integer" format: "int32" required: - "unread" NotificationsView: type: "object" properties: albumAdds: type: "boolean" kinds: type: "object" additionalProperties: type: "boolean" required: - "albumAdds" - "kinds" PackView: type: "object" properties: id: type: "string" bytes: type: "integer" format: "int64" cents: type: "integer" format: "int64" currency: type: "string" name: type: "string" required: - "id" - "bytes" - "cents" - "currency" - "name" PcStatusView: type: "object" properties: reported: type: "string" format: "date-time" running: type: "boolean" nullable: true paused: type: "boolean" nullable: true lastRunStarted: type: "string" nullable: true lastRunEnded: type: "string" nullable: true lastResult: type: "string" nullable: true lastError: type: "string" nullable: true lastFiles: type: "integer" format: "int64" nullable: true lastBytes: type: "integer" format: "int64" nullable: true nextRun: type: "string" nullable: true folders: type: "integer" format: "int32" nullable: true destinations: type: "integer" format: "int32" nullable: true required: - "reported" - "running" - "paused" - "lastRunStarted" - "lastRunEnded" - "lastResult" - "lastError" - "lastFiles" - "lastBytes" - "nextRun" - "folders" - "destinations" PeerTicketCheck: type: "object" properties: ticket: type: "string" nullable: true required: - "ticket" PeerTicketCheckView: type: "object" properties: requesterDevice: type: "string" requesterName: type: "string" requesterEmail: type: "string" sourceDevice: type: "string" sourceName: type: "string" reason: type: "string" expires: type: "string" format: "date-time" required: - "requesterDevice" - "requesterName" - "requesterEmail" - "sourceDevice" - "sourceName" - "reason" - "expires" PeerTicketCreate: type: "object" properties: sourceDevice: type: "string" nullable: true required: - "sourceDevice" PeerTicketView: type: "object" properties: ticket: type: "string" sourceDevice: type: "string" sourceName: type: "string" reason: type: "string" expires: type: "string" format: "date-time" required: - "ticket" - "sourceDevice" - "sourceName" - "reason" - "expires" PersonView: type: "object" properties: email: type: "string" firstName: type: "string" lastName: type: "string" picture: type: "string" nullable: true required: - "email" - "firstName" - "lastName" PushTokenRequest: type: "object" properties: token: type: "string" nullable: true env: type: "string" nullable: true app: type: "string" nullable: true tz: type: "string" nullable: true provider: type: "string" nullable: true required: - "token" - "env" - "app" - "tz" - "provider" RecoveryKeyView: type: "object" properties: publicKey: type: "string" required: - "publicKey" RegisterRequest: type: "object" properties: name: type: "string" nullable: true os: type: "string" nullable: true version: type: "string" nullable: true publicKey: type: "string" nullable: true required: - "name" - "os" - "version" - "publicKey" RelayBalanceView: type: "object" properties: month: type: "string" freeBytes: type: "integer" format: "int64" nullable: true freeUsedBytes: type: "integer" format: "int64" prepaidBytes: type: "integer" format: "int64" activationNeeded: type: "boolean" autoTopUp: type: "boolean" autoTopUpPack: type: "string" nullable: true paymentsEnabled: type: "boolean" prepaidTotalBytes: type: "integer" format: "int64" lowBytes: type: "integer" format: "int64" packs: type: "array" items: $ref: "#/components/schemas/PackView" nullable: true usedBytes: type: "integer" format: "int64" unlimitedUntil: type: "string" nullable: true usageLine: type: "string" required: - "month" - "freeBytes" - "freeUsedBytes" - "prepaidBytes" - "activationNeeded" - "autoTopUp" - "autoTopUpPack" - "paymentsEnabled" - "prepaidTotalBytes" - "lowBytes" - "packs" - "usedBytes" - "unlimitedUntil" - "usageLine" RelayGroupRequest: type: "object" properties: groupId: type: "string" nullable: true required: - "groupId" RelayGroupState: type: "object" properties: company: type: "string" activationNeeded: type: "boolean" remainingBytes: type: "integer" format: "int64" nullable: true required: - "company" - "activationNeeded" - "remainingBytes" RelayReport: type: "object" properties: id: type: "string" nullable: true month: type: "string" nullable: true usage: type: "array" items: $ref: "#/components/schemas/RelayUsageDelta" nullable: true groups: type: "array" items: type: "string" nullable: true required: - "id" - "month" - "usage" - "groups" RelayReportAnswer: type: "object" properties: groups: type: "object" additionalProperties: $ref: "#/components/schemas/RelayGroupState" required: - "groups" RelayUsageDelta: type: "object" properties: group: type: "string" nullable: true bytes: type: "integer" format: "int64" required: - "group" - "bytes" RemoteCommandBrief: type: "object" properties: id: type: "string" kind: type: "string" requestedBy: type: "string" requested: type: "string" format: "date-time" required: - "id" - "kind" - "requestedBy" - "requested" SessionView: type: "object" properties: email: type: "string" memberId: type: "string" nullable: true deviceId: type: "string" nullable: true company: allOf: - $ref: "#/components/schemas/CompanyView" nullable: true name: type: "string" firstName: type: "string" lastName: type: "string" languages: type: "array" items: type: "string" born: allOf: - $ref: "#/components/schemas/BirthView" nullable: true picture: type: "string" nullable: true created: type: "boolean" nullable: true keyMatched: type: "boolean" nullable: true moved: allOf: - $ref: "#/components/schemas/MovedFrom" nullable: true required: - "email" - "memberId" - "deviceId" - "company" - "name" - "firstName" - "lastName" - "languages" ShareCreate: type: "object" properties: sourceDevice: type: "string" nullable: true email: type: "string" nullable: true required: - "sourceDevice" - "email" ShareView: type: "object" properties: id: type: "string" sourceDevice: type: "string" sourceName: type: "string" ownerEmail: type: "string" recipientEmail: type: "string" sharedBy: type: "string" since: type: "string" format: "date-time" scope: type: "string" required: - "id" - "sourceDevice" - "sourceName" - "ownerEmail" - "recipientEmail" - "sharedBy" - "since" - "scope" SharedKeysView: type: "object" properties: shareId: type: "string" sourceDeviceId: type: "string" sourceName: type: "string" ownerEmail: type: "string" since: type: "string" format: "date-time" keys: type: "array" items: $ref: "#/components/schemas/WrappedKeyView" sourceKind: type: "string" nullable: true required: - "shareId" - "sourceDeviceId" - "sourceName" - "ownerEmail" - "since" - "keys" SignInApproved: type: "object" properties: status: type: "string" token: type: "string" email: type: "string" memberId: type: "string" nullable: true deviceId: type: "string" nullable: true company: allOf: - $ref: "#/components/schemas/CompanyView" nullable: true required: - "status" - "token" - "email" - "memberId" - "deviceId" - "company" SignInCodeRequest: type: "object" properties: requestId: type: "string" nullable: true secret: type: "string" nullable: true code: type: "string" nullable: true required: - "requestId" - "secret" - "code" SignInPollRequest: type: "object" properties: requestId: type: "string" nullable: true secret: type: "string" nullable: true required: - "requestId" - "secret" SignInStartRequest: type: "object" properties: email: type: "string" nullable: true deviceName: type: "string" nullable: true secretHash: type: "string" nullable: true required: - "email" - "deviceName" - "secretHash" SignInStarted: type: "object" properties: requestId: type: "string" expiresAt: type: "string" format: "date-time" required: - "requestId" - "expiresAt" SigningKeyRequest: type: "object" properties: publicKey: type: "string" nullable: true signingKey: type: "string" nullable: true required: - "publicKey" - "signingKey" SyncDevice: type: "object" properties: id: type: "string" removed: type: "boolean" keyVersion: type: "integer" format: "int32" required: - "id" - "removed" - "keyVersion" SyncNotifications: type: "object" properties: latest: type: "integer" format: "int64" unread: type: "integer" format: "int32" required: - "latest" - "unread" SyncView: type: "object" properties: company: allOf: - $ref: "#/components/schemas/CompanyView" nullable: true device: allOf: - $ref: "#/components/schemas/SyncDevice" nullable: true deliveries: type: "array" items: $ref: "#/components/schemas/DeliveryView" handovers: type: "array" items: $ref: "#/components/schemas/HandoverView" keyRecovery: allOf: - $ref: "#/components/schemas/KeyRecoveryBrief" nullable: true datakeyRequests: type: "array" items: $ref: "#/components/schemas/DataKeyRequestBrief" dataKeyRotation: type: "boolean" keyRelease: allOf: - $ref: "#/components/schemas/KeyReleaseView" nullable: true keyReleaseRequests: type: "array" items: $ref: "#/components/schemas/KeyReleaseRequestView" shared: type: "array" items: $ref: "#/components/schemas/SharedKeysView" notifications: allOf: - $ref: "#/components/schemas/SyncNotifications" nullable: true update: allOf: - $ref: "#/components/schemas/UpdateNews" nullable: true albums: type: "array" items: $ref: "#/components/schemas/AlbumBriefView" deletedAlbums: type: "array" items: $ref: "#/components/schemas/AlbumBriefView" matchKey: type: "string" nullable: true matchKeyNeeded: type: "boolean" matchKeyHandovers: type: "array" items: $ref: "#/components/schemas/HandoverView" memberMatchKeys: type: "array" items: $ref: "#/components/schemas/MemberMatchKeyView" commands: type: "array" items: $ref: "#/components/schemas/RemoteCommandBrief" required: - "company" - "device" - "deliveries" - "handovers" - "keyRecovery" - "datakeyRequests" - "dataKeyRotation" - "keyRelease" - "keyReleaseRequests" - "shared" - "notifications" - "albums" - "deletedAlbums" - "matchKeyNeeded" - "matchKeyHandovers" - "memberMatchKeys" - "commands" TrustedSenderRequest: type: "object" properties: email: type: "string" nullable: true required: - "email" TrustedSenderView: type: "object" properties: email: type: "string" since: type: "string" format: "date-time" name: type: "string" nullable: true required: - "email" - "since" TvCompany: type: "object" properties: id: type: "string" name: type: "string" required: - "id" - "name" TvGuestAlbumView: type: "object" properties: id: type: "string" name: type: "string" ownerEmail: type: "string" ownerName: type: "string" nullable: true itemCount: type: "integer" format: "int32" cover: type: "string" nullable: true dests: type: "array" items: type: "string" required: - "id" - "name" - "ownerEmail" - "ownerName" - "itemCount" - "cover" - "dests" TvGuestCompanyView: type: "object" properties: id: type: "string" name: type: "string" pcs: type: "array" items: $ref: "#/components/schemas/TvGuestPcView" relay: allOf: - $ref: "#/components/schemas/TvRelayView" nullable: true required: - "id" - "name" - "pcs" - "relay" TvGuestPcView: type: "object" properties: deviceId: type: "string" name: type: "string" label: type: "string" nullable: true os: type: "string" version: type: "string" lastSeen: type: "string" format: "date-time" viewerKey: type: "string" ticket: type: "string" albums: type: "array" items: type: "string" required: - "deviceId" - "name" - "label" - "os" - "version" - "lastSeen" - "viewerKey" - "ticket" - "albums" TvLanguagesRequest: type: "object" properties: languages: type: "array" items: type: "string" nullable: true required: - "languages" TvLanguagesView: type: "object" properties: languages: type: "array" items: type: "string" required: - "languages" TvMe: type: "object" properties: deviceId: type: "string" name: type: "string" email: type: "string" active: type: "boolean" company: allOf: - $ref: "#/components/schemas/TvCompany" nullable: true memberName: type: "string" required: - "deviceId" - "name" - "email" - "active" - "company" - "memberName" TvPairApprove: type: "object" properties: name: type: "string" nullable: true required: - "name" TvPairInfo: type: "object" properties: code: type: "string" name: type: "string" model: type: "string" os: type: "string" version: type: "string" created: type: "string" format: "date-time" expires: type: "string" format: "date-time" required: - "code" - "name" - "model" - "os" - "version" - "created" - "expires" TvPairPoll: type: "object" properties: pairId: type: "string" nullable: true secret: type: "string" nullable: true required: - "pairId" - "secret" TvPairPolled: type: "object" properties: state: type: "string" expires: type: "string" format: "date-time" token: type: "string" nullable: true deviceId: type: "string" nullable: true name: type: "string" nullable: true email: type: "string" nullable: true memberName: type: "string" nullable: true company: allOf: - $ref: "#/components/schemas/TvCompany" nullable: true required: - "state" - "expires" TvPairStart: type: "object" properties: name: type: "string" nullable: true model: type: "string" nullable: true os: type: "string" nullable: true version: type: "string" nullable: true required: - "name" - "model" - "os" - "version" TvPairStarted: type: "object" properties: pairId: type: "string" secret: type: "string" code: type: "string" url: type: "string" qrUrl: type: "string" expires: type: "string" format: "date-time" interval: type: "integer" format: "int32" link: type: "string" required: - "pairId" - "secret" - "code" - "url" - "qrUrl" - "expires" - "interval" - "link" TvPassView: type: "object" properties: expires: type: "string" format: "date-time" pcs: type: "array" items: $ref: "#/components/schemas/TvPcView" relay: allOf: - $ref: "#/components/schemas/TvRelayView" nullable: true email: type: "string" memberName: type: "string" languages: type: "array" items: type: "string" guests: type: "array" items: $ref: "#/components/schemas/TvGuestCompanyView" required: - "expires" - "pcs" - "relay" - "email" - "memberName" - "languages" - "guests" TvPcView: type: "object" properties: deviceId: type: "string" name: type: "string" label: type: "string" nullable: true os: type: "string" version: type: "string" lastSeen: type: "string" format: "date-time" viewerKey: type: "string" ticket: type: "string" required: - "deviceId" - "name" - "label" - "os" - "version" - "lastSeen" - "viewerKey" - "ticket" TvRelayView: type: "object" properties: pass: type: "string" address: type: "string" fingerprint: type: "string" nullable: true required: - "pass" - "address" - "fingerprint" TvTicketCheck: type: "object" properties: ticket: type: "string" nullable: true guests: type: "boolean" nullable: true required: - "ticket" - "guests" TvTicketCheckView: type: "object" properties: tvDevice: type: "string" tvName: type: "string" email: type: "string" expires: type: "string" format: "date-time" access: type: "string" albums: type: "array" items: $ref: "#/components/schemas/TvGuestAlbumView" nullable: true company: type: "string" nullable: true required: - "tvDevice" - "tvName" - "email" - "expires" - "access" TvView: type: "object" properties: id: type: "string" name: type: "string" model: type: "string" os: type: "string" version: type: "string" email: type: "string" created: type: "string" format: "date-time" lastSeen: type: "string" format: "date-time" approvedBy: type: "string" approvedVia: type: "string" removed: type: "boolean" required: - "id" - "name" - "model" - "os" - "version" - "email" - "created" - "lastSeen" - "approvedBy" - "approvedVia" - "removed" UpdateNews: type: "object" properties: version: type: "string" published: type: "integer" format: "int64" required: - "version" - "published" UsageEvent: type: "object" properties: t: description: "any JSON value" nullable: true kind: type: "string" nullable: true n: type: "integer" format: "int64" nullable: true outcome: type: "string" nullable: true ms: type: "integer" format: "int64" nullable: true required: - "t" - "kind" - "n" - "outcome" - "ms" UsageReport: type: "object" properties: events: type: "array" items: allOf: - $ref: "#/components/schemas/UsageEvent" nullable: true nullable: true required: - "events" ViewerKeyRequest: type: "object" properties: publicKey: type: "string" nullable: true required: - "publicKey" WorkMarkIn: type: "object" properties: source: type: "string" nullable: true id: type: "string" nullable: true work: description: "any JSON value" required: - "source" - "id" - "work" WorkMarkView: type: "object" properties: source: type: "string" id: type: "string" work: type: "boolean" by: type: "string" nullable: true at: type: "integer" format: "int64" v: type: "integer" format: "int64" required: - "source" - "id" - "work" - "at" - "v" WorkMarksPosted: type: "object" properties: ok: type: "boolean" v: type: "integer" format: "int64" changed: type: "integer" format: "int32" required: - "ok" - "v" - "changed" WorkMarksRequest: type: "object" properties: marks: type: "array" items: allOf: - $ref: "#/components/schemas/WorkMarkIn" nullable: true nullable: true required: - "marks" WorkMarksView: type: "object" properties: v: type: "integer" format: "int64" marks: type: "array" items: $ref: "#/components/schemas/WorkMarkView" more: type: "boolean" required: - "v" - "marks" - "more" WrappedKeyView: type: "object" properties: keyId: type: "string" keyVersion: type: "integer" format: "int32" wrapped: type: "string" current: type: "boolean" required: - "keyId" - "keyVersion" - "wrapped" - "current"