album.alias.set

bearer

Set an album's public address

Sets or changes a public album alias atomically. Empty removes the alias; previous addresses redirect to the canonical UUID. Quota applies across all owner albums.

Parameters

Passed by name in the params object.

Name Type Required Description
album_id string yes
alias string yes

Result

Returns sharingDTO:

Field Type Description
album_id * string
alias_quota * aliasQuotaDTO
aliases * array<aliasDTO>
cover * coverDTO
last_published_mode string
links * sharingLinksDTO
mode * string
moderation sharingModerationDTO
policy * sharingPolicyDTO
published_at string
republish republishDTO
server_publishing * boolean
state * string
stats * sharingStatsDTO

Errors

Code Message When
2001 not_found No such resource owned by the caller.
1003 forbidden Not the owner, or outside a token's scope.
2002 validation_failed Malformed request; see error.data.
2004 taken_down Moderation prevents this operation on the resource.

See the error reference for the full catalog, including the authentication codes.

Example

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "album.alias.set",
  "params": {
    "album_id": "018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50",
    "alias": "coast-2026"
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "album_id": "018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50",
    "mode": "private",
    "state": "private",
    "links": {},
    "aliases": [],
    "alias_quota": {
      "used": 0,
      "limit": 20
    },
    "policy": {
      "show_location": false,
      "show_date": true,
      "show_camera": false,
      "allow_download": false,
      "feed": true,
      "order": "taken_asc",
      "cover_focus": "center"
    },
    "cover": {
      "is_default": true,
      "was_reset": false
    },
    "stats": {
      "visible": 0,
      "total": 0,
      "breakdown": {
        "processing": 0,
        "failed": 0,
        "too_small": 0,
        "taken_down": 0
      },
      "exif": {
        "location": {
          "visible": 0,
          "disabled_on_photo": 0
        },
        "date": {
          "visible": 0,
          "disabled_on_photo": 0
        },
        "camera": {
          "visible": 0,
          "disabled_on_photo": 0
        }
      },
      "captioned": 0,
      "exposing_location": 0
    },
    "server_publishing": true
  }
}

curl

curl -s https://peinture.gumeniuk.com/rpc \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"album.alias.set","params":{"album_id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50","alias":"coast-2026"}}'

JavaScript

const res = await fetch("https://peinture.gumeniuk.com/rpc", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${token}`,
  },
  body: JSON.stringify({
    jsonrpc: "2.0", id: 1, method: "album.alias.set", params: {"album_id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50","alias":"coast-2026"},
  }),
});
const { result, error } = await res.json();

Go

body := []byte(`{"jsonrpc":"2.0","id":1,"method":"album.alias.set","params":{"album_id":"018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50","alias":"coast-2026"}}`)
req, _ := http.NewRequest("POST", "https://peinture.gumeniuk.com/rpc", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)

Try it

Sends a real request to /rpc from your browser. Paste a bearer token above — a JWT access token or a personal access token (pnt_…).