Invite people to a gallery

Switch a gallery to People I Choose and email invitations to the addresses you give.

POST https://cotlet.dev/api/v1/smugmug/galleries/{gallery_id}/viewers/invite

write Confirm

Sends SmugMug invitation emails and returns the addresses invited and the total now invited to the gallery. Each guest accepts by email and signs up for a guest account if needed. One gallery, folder or page takes up to 200 invitations. Private sharing needs the Power plan or higher. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: invite_gallery_viewers
NameTypeDescription
gallery_id string required string Gallery ID from list_galleries.
emails array required array Email addresses to invite.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/smugmug/galleries/Xk4RtP/viewers/invite \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"emails":["anna@example.com","tom@example.com"]}'
Python
result = client.call("smugmug", "invite_gallery_viewers", {"gallery_id":"Xk4RtP","emails":["anna@example.com","tom@example.com"]})
Node.js
const result = await cotlet.call('smugmug', 'invite_gallery_viewers', {"gallery_id":"Xk4RtP","emails":["anna@example.com","tom@example.com"]});
CLI
cotlet call smugmug invite_gallery_viewers --data '{"gallery_id":"Xk4RtP","emails":["anna@example.com","tom@example.com"]}'

Example response

JSON

{
  "gallery_id": "Xk4RtP",
  "access": "people_i_choose",
  "invited": [
    "anna@example.com",
    "tom@example.com"
  ],
  "total_invited": 2
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.