{"openapi":"3.1.0","info":{"title":"Rollry Studio API","version":"5.0.0","description":"Scoped REST API for managing Rollry 5.0 photography studios: summaries, Smart Proposals (package picker + agreement + retainer), Automated Print-Sale Promos & Print Credits, client photo collections & collection presets, CRM clients, projects & private notes, Tiptap contracts & automated reminders, embeddable lead forms, invoices, payment links, gift cards, financial reports, bookings, mini-session drops & waitlists, print store orders & coupons, two-way studio inbox, email campaigns, and custom website pages. Authenticate with a studio API key (`Authorization: Bearer rr_live_...`)."},"servers":[{"url":"https://rollry.com","description":"Rollry Studio Server"}],"x-rollry-mcp":{"transport":"streamable-http","endpoint":"https://rollry.com/api/mcp"},"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"rr_live_...","description":"Create a scoped studio API key in /dashboard/settings/ai and pass it as `Authorization: Bearer rr_live_...`."}},"schemas":{"ErrorResponse":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true}}},"StudioSummary":{"type":"object","properties":{"studio":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"timezone":{"type":"string"},"currency":{"type":"string"},"venmoHandle":{"type":["string","null"]}}},"storageUsedBytes":{"type":"integer"},"storageFormatted":{"type":"string"},"collectionsCount":{"type":["integer","null"]},"publishedCollectionsCount":{"type":["integer","null"]},"totalPhotosCount":{"type":["integer","null"]},"unreviewedFavoriteListsCount":{"type":["integer","null"]},"unpaidInvoiceBalanceCents":{"type":["integer","null"]},"unpaidInvoiceBalanceFormatted":{"type":["string","null"]},"unpaidInvoicesCount":{"type":["integer","null"]},"upcomingBookingsCount":{"type":["integer","null"]},"waitlistCount":{"type":["integer","null"]},"pendingStoreOrdersCount":{"type":["integer","null"]},"unreadInboxThreadsCount":{"type":["integer","null"]},"unreadInboxMessagesCount":{"type":["integer","null"]},"openInquiriesCount":{"type":["integer","null"]},"clientsCount":{"type":["integer","null"]},"activeProjectsCount":{"type":["integer","null"]},"grantedScopes":{"type":"array","items":{"type":"string"}}}},"CreateCollectionRequest":{"type":"object","required":["title"],"properties":{"title":{"type":"string","maxLength":120},"subtitle":{"type":["string","null"],"maxLength":200},"eventDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"clientId":{"type":["string","null"]},"projectId":{"type":["string","null"]},"theme":{"type":"string","enum":["editorial-light","warm-linen","gallery-dark"],"default":"editorial-light"},"password":{"type":["string","null"]},"watermarkEnabled":{"type":"boolean","default":true},"downloadsEnabled":{"type":"boolean","default":true},"downloadPin":{"type":["string","null"]},"downloadLimit":{"type":["integer","null"],"minimum":1},"status":{"type":"string","enum":["draft","published"],"default":"published"}}},"CreateClientRequest":{"type":"object","required":["name","email"],"properties":{"name":{"type":"string","maxLength":120},"email":{"type":"string","format":"email"},"phone":{"type":["string","null"]},"address":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"notes":{"type":["string","null"]}}},"CreateProjectRequest":{"type":"object","required":["title"],"properties":{"title":{"type":"string","maxLength":160},"clientId":{"type":["string","null"]},"sessionTypeLabel":{"type":["string","null"]},"eventDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"eventLocation":{"type":["string","null"]},"stage":{"type":"string","enum":["inquiry","booked","shot","delivered","archived"],"default":"booked"},"notes":{"type":["string","null"]}}},"CreateInvoiceRequest":{"type":"object","required":["clientId","title","lineItems"],"properties":{"clientId":{"type":"string"},"projectId":{"type":["string","null"]},"kind":{"type":"string","enum":["invoice","quote"],"default":"invoice"},"title":{"type":"string","maxLength":160},"lineItems":{"type":"array","minItems":1,"items":{"type":"object","required":["description","unitPriceCents"],"properties":{"description":{"type":"string"},"quantity":{"type":"integer","minimum":1,"default":1},"unitPriceCents":{"type":"integer","minimum":0}}}},"discountCents":{"type":"integer","minimum":0,"default":0},"taxRateBps":{"type":"integer","minimum":0,"maximum":5000,"default":0},"notes":{"type":["string","null"]},"status":{"type":"string","enum":["draft","sent"],"default":"sent"},"installments":{"type":"array","items":{"type":"object","required":["label","amountCents","dueAt"],"properties":{"label":{"type":"string"},"amountCents":{"type":"integer","minimum":1},"dueAt":{"type":"string","format":"date-time"}}}}}},"CreateMiniSessionRequest":{"type":"object","required":["title","eventDate","startTime","priceCents"],"properties":{"title":{"type":"string","maxLength":140},"description":{"type":["string","null"]},"location":{"type":["string","null"]},"eventDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"startTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"endTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$"},"slotCount":{"type":"integer","minimum":1,"maximum":48},"durationMin":{"type":"integer","minimum":5,"maximum":240,"default":15},"bufferMin":{"type":"integer","minimum":0,"maximum":120,"default":5},"priceCents":{"type":"integer","minimum":0},"retainerCents":{"type":"integer","minimum":0,"default":0},"timezone":{"type":"string"},"contractTemplateId":{"type":["string","null"]},"questionnaireTemplateId":{"type":["string","null"]},"isActive":{"type":"boolean","default":true}}},"CreateCouponRequest":{"type":"object","required":["code","discountType"],"properties":{"code":{"type":"string","minLength":2,"maxLength":40},"description":{"type":["string","null"],"maxLength":240},"discountType":{"type":"string","enum":["percent","fixed","free_shipping"]},"discountValue":{"type":"integer","minimum":0,"default":0},"minOrderCents":{"type":"integer","minimum":0,"default":0},"appliesTo":{"type":"string","enum":["store","booking","invoice","all"],"default":"store"},"maxUses":{"type":["integer","null"],"minimum":1},"startsAt":{"type":["string","null"]},"expiresAt":{"type":["string","null"]},"isActive":{"type":"boolean","default":true}}},"IssueGiftCardRequest":{"type":"object","required":["amountCents"],"properties":{"amountCents":{"type":"integer","minimum":100,"maximum":5000000},"code":{"type":["string","null"],"minLength":4,"maxLength":32},"purchaserName":{"type":["string","null"],"maxLength":120},"purchaserEmail":{"type":["string","null"],"format":"email"},"recipientName":{"type":["string","null"],"maxLength":120},"recipientEmail":{"type":["string","null"],"format":"email"},"message":{"type":["string","null"],"maxLength":1000},"expiresAt":{"type":["string","null"]},"sendEmailToRecipient":{"type":"boolean","default":true}}},"NotifyWaitlistRequest":{"type":"object","required":["sessionTypeId"],"properties":{"sessionTypeId":{"type":"string"},"entryIds":{"type":"array","items":{"type":"string"}},"customMessage":{"type":["string","null"],"maxLength":600}}},"CreatePaymentLinkRequest":{"type":"object","required":["title"],"properties":{"title":{"type":"string","maxLength":160},"slug":{"type":["string","null"],"maxLength":80},"description":{"type":["string","null"],"maxLength":1000},"amountCents":{"type":["integer","null"],"minimum":100},"isOpenAmount":{"type":"boolean","default":false},"currency":{"type":"string"},"taxRateBps":{"type":"integer","minimum":0,"maximum":5000,"default":0},"allowTips":{"type":"boolean","default":false},"maxPayments":{"type":["integer","null"],"minimum":1},"isActive":{"type":"boolean","default":true}}},"SendInboxMessageRequest":{"type":"object","required":["bodyText"],"properties":{"threadId":{"type":"string"},"clientId":{"type":"string"},"projectId":{"type":["string","null"]},"participantEmail":{"type":"string","format":"email"},"participantName":{"type":["string","null"]},"subject":{"type":["string","null"],"maxLength":220},"bodyText":{"type":"string","maxLength":20000}}},"CreateEmailCampaignRequest":{"type":"object","required":["name","subject","bodyMarkdown"],"properties":{"name":{"type":"string","maxLength":160},"subject":{"type":"string","maxLength":220},"previewText":{"type":["string","null"],"maxLength":240},"coverPhotoId":{"type":["string","null"]},"bodyMarkdown":{"type":"string","maxLength":25000},"ctaLabel":{"type":["string","null"],"maxLength":80},"ctaUrl":{"type":["string","null"],"maxLength":500},"audienceFilter":{"type":"object","properties":{"mode":{"type":"string","enum":["all","client_tag","source"],"default":"all"},"tag":{"type":"string"},"source":{"type":"string"}}}}},"CreateCustomPageRequest":{"type":"object","required":["title"],"properties":{"title":{"type":"string","maxLength":120},"slug":{"type":"string","maxLength":80},"blocksJson":{"type":"array","items":{"type":"object"}},"password":{"type":["string","null"],"maxLength":120},"seoTitle":{"type":["string","null"],"maxLength":160},"seoDescription":{"type":["string","null"],"maxLength":320},"noIndex":{"type":"boolean","default":false},"status":{"type":"string","enum":["draft","published"],"default":"draft"}}},"CreateContractFromTemplateRequest":{"type":"object","properties":{"clientId":{"type":"string"},"projectId":{"type":["string","null"]},"starterTemplateId":{"type":"string","enum":["general-photography","wedding-photography","portrait-session","print-release","model-release","commercial-license","blank"]},"templateId":{"type":["string","null"]},"title":{"type":"string","maxLength":160},"autoFillFromProject":{"type":"boolean","default":true},"countersignMode":{"type":"string","enum":["auto","manual"],"default":"auto"},"remindersEnabled":{"type":"boolean","default":false},"expiresAt":{"type":["string","null"]}}},"ApplyCollectionPresetRequest":{"type":"object","required":["collectionId","presetId"],"properties":{"collectionId":{"type":"string"},"presetId":{"type":"string"}}},"AddProjectNoteRequest":{"type":"object","required":["body"],"properties":{"body":{"type":"string","maxLength":4000},"authorName":{"type":"string","maxLength":120}}},"CreateProposalRequest":{"type":"object","properties":{"starterId":{"type":["string","null"]},"clientId":{"type":["string","null"]},"projectId":{"type":["string","null"]},"title":{"type":"string","maxLength":180},"welcomeNote":{"type":["string","null"],"maxLength":2000},"clientName":{"type":"string","maxLength":160},"clientEmail":{"type":"string","format":"email"},"eventDate":{"type":["string","null"]},"currency":{"type":"string","default":"usd"},"packages":{"type":"array","minItems":1,"maxItems":4,"items":{"type":"object","required":["name","priceCents"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"priceCents":{"type":"integer","minimum":0},"deliverables":{"type":"array","items":{"type":"string"}},"recommended":{"type":"boolean"}}}},"addons":{"type":"array","items":{"type":"object","required":["name","unitPriceCents"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"unitPriceCents":{"type":"integer","minimum":0},"maxQuantity":{"type":"integer","minimum":1,"maximum":99}}}},"contractTemplateId":{"type":["string","null"]},"contractBodyMarkdown":{"type":["string","null"]},"paymentSchedule":{"type":"array","items":{"type":"object","required":["label","dueTrigger"],"properties":{"label":{"type":"string"},"percent":{"type":"integer","minimum":0,"maximum":100},"amountCents":{"type":"integer","minimum":0},"dueTrigger":{"type":"string","enum":["on_booking","days_after_booking","days_before_event","fixed_date"]},"offsetDays":{"type":"integer","minimum":0,"maximum":365},"dueDate":{"type":["string","null"]}}}},"taxRateBps":{"type":"integer","minimum":0,"maximum":5000},"allowTips":{"type":"boolean","default":false},"expiresAt":{"type":["string","null"]},"sendNow":{"type":"boolean","default":false},"customEmailMessage":{"type":["string","null"],"maxLength":1000}}},"SendProposalRequest":{"type":"object","properties":{"customMessage":{"type":["string","null"],"maxLength":1000}}},"CreatePrintPromoRequest":{"type":"object","required":["name","headline","discountKind","discountValue","startsAt","endsAt"],"properties":{"name":{"type":"string","maxLength":120},"presetKey":{"type":"string","enum":["early_bird_credit","mothers_day","holiday_wall_art","anniversary_credit","custom"],"default":"custom"},"headline":{"type":"string","maxLength":160},"subheadline":{"type":["string","null"],"maxLength":260},"discountKind":{"type":"string","enum":["percent","fixed","print_credit"],"default":"percent"},"discountValue":{"type":"integer","minimum":1,"description":"Percent (1–100) or integer cents for fixed/print_credit."},"minOrderCents":{"type":"integer","minimum":0,"default":0},"couponCode":{"type":["string","null"],"maxLength":40},"collectionIds":{"type":["array","null"],"items":{"type":"string"}},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"bannerEnabled":{"type":"boolean","default":true},"emailSchedule":{"type":"object","properties":{"sendOnLaunch":{"type":"boolean"},"remind48hBeforeEnd":{"type":"boolean"},"remind6hBeforeEnd":{"type":"boolean"}}},"launchNow":{"type":"boolean","default":false}}}}},"paths":{"/api/v1/summary":{"get":{"operationId":"getStudioSummary","summary":"Get studio summary","description":"Returns storage usage, collections count, submitted favorite lists, unpaid invoice balance, upcoming bookings, and open inquiries.","responses":{"200":{"description":"Studio overview metrics","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudioSummary"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Insufficient API key scopes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/collections":{"get":{"operationId":"listCollections","summary":"List photo gallery collections","description":"Requires scope: galleries:read.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["draft","published","archived"]}},{"name":"clientId","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"List of studio collections"},"401":{"description":"Unauthorized"},"403":{"description":"Missing galleries:read scope"}}},"post":{"operationId":"createCollection","summary":"Create a photo gallery collection","description":"Requires scope: galleries:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCollectionRequest"}}}},"responses":{"201":{"description":"Created collection with public gallery URL"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing galleries:write scope"}}}},"/api/v1/clients":{"get":{"operationId":"listClients","summary":"List CRM clients","description":"Requires scope: crm:read.","parameters":[{"name":"search","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"List of studio clients"},"401":{"description":"Unauthorized"},"403":{"description":"Missing crm:read scope"}}},"post":{"operationId":"createClient","summary":"Create a CRM client","description":"Requires scope: crm:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClientRequest"}}}},"responses":{"201":{"description":"Created client"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing crm:write scope"}}}},"/api/v1/projects":{"get":{"operationId":"listProjects","summary":"List studio projects","description":"Requires scope: crm:read.","parameters":[{"name":"stage","in":"query","schema":{"type":"string","enum":["inquiry","booked","shot","delivered","archived"]}},{"name":"clientId","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"List of studio projects"},"401":{"description":"Unauthorized"},"403":{"description":"Missing crm:read scope"}}},"post":{"operationId":"createProject","summary":"Create a studio project","description":"Requires scope: crm:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectRequest"}}}},"responses":{"201":{"description":"Created project"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing crm:write scope"}}}},"/api/v1/invoices":{"get":{"operationId":"listInvoices","summary":"List invoices and quotes","description":"Requires scope: billing:read.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["draft","sent","partial","paid","void"]}},{"name":"kind","in":"query","schema":{"type":"string","enum":["invoice","quote"]}},{"name":"clientId","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"List of studio invoices and installments"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:read scope"}}},"post":{"operationId":"createInvoice","summary":"Create an invoice or quote with installments","description":"Requires scope: billing:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceRequest"}}}},"responses":{"201":{"description":"Created invoice with public payment URL"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:write scope"}}}},"/api/v1/bookings":{"get":{"operationId":"listBookings","summary":"List client bookings","description":"Requires scope: bookings:read.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["held","confirmed","cancelled"]}},{"name":"upcomingOnly","in":"query","schema":{"type":"boolean","default":false}},{"name":"sessionTypeId","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"List of studio bookings"},"401":{"description":"Unauthorized"},"403":{"description":"Missing bookings:read scope"}}}},"/api/v1/mini-sessions":{"get":{"operationId":"listMiniSessions","summary":"List mini-session booking events","description":"Requires scope: bookings:read.","parameters":[{"name":"activeOnly","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"List of mini-session events with open slot counts"},"401":{"description":"Unauthorized"},"403":{"description":"Missing bookings:read scope"}}},"post":{"operationId":"createMiniSessionEvent","summary":"Create a mini-session event with auto-generated time slots","description":"Requires scope: bookings:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMiniSessionRequest"}}}},"responses":{"201":{"description":"Created mini-session event, generated slots, and public booking URL"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing bookings:write scope"}}}},"/api/v1/store/orders":{"get":{"operationId":"listStoreOrders","summary":"List print and digital store orders","description":"Requires scope: store:read.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["pending_payment","manual_pending","pending_review","submitted_to_lab","in_production","shipped","completed","paused","cancelled","refunded"]}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Store orders with status summary and lab connection status"},"401":{"description":"Unauthorized"},"403":{"description":"Missing store:read scope"}}}},"/api/v1/store/coupons":{"get":{"operationId":"listCoupons","summary":"List studio promo codes and coupons","description":"Requires scope: store:read.","responses":{"200":{"description":"List of studio coupons"},"401":{"description":"Unauthorized"},"403":{"description":"Missing store:read scope"}}},"post":{"operationId":"createCoupon","summary":"Create a promo or coupon code","description":"Requires scope: store:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCouponRequest"}}}},"responses":{"201":{"description":"Created coupon"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing store:write scope"},"409":{"description":"Coupon code already exists"}}}},"/api/v1/gift-cards":{"get":{"operationId":"listGiftCards","summary":"List issued and purchased studio gift cards","description":"Requires scope: billing:read.","responses":{"200":{"description":"List of studio gift cards and balances"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:read scope"}}},"post":{"operationId":"issueGiftCard","summary":"Issue a digital studio gift card","description":"Requires scope: billing:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueGiftCardRequest"}}}},"responses":{"201":{"description":"Issued gift card with unique code and transaction ledger"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:write scope"}}}},"/api/v1/waitlist":{"get":{"operationId":"listWaitlist","summary":"List mini-session waitlist entries","description":"Requires scope: bookings:read.","parameters":[{"name":"sessionTypeId","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["waiting","notified","booked","removed"]}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"List of waitlist entries"},"401":{"description":"Unauthorized"},"403":{"description":"Missing bookings:read scope"}}}},"/api/v1/waitlist/notify":{"post":{"operationId":"notifyWaitlist","summary":"Email waiting families on a mini-session waitlist","description":"Requires scope: bookings:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotifyWaitlistRequest"}}}},"responses":{"200":{"description":"Waitlist notification summary"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing bookings:write scope"}}}},"/api/v1/payment-links":{"get":{"operationId":"listPaymentLinks","summary":"List reusable studio payment links","description":"Requires scope: billing:read.","responses":{"200":{"description":"List of payment links with public URLs"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:read scope"}}},"post":{"operationId":"createPaymentLink","summary":"Create a reusable payment link","description":"Requires scope: billing:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentLinkRequest"}}}},"responses":{"201":{"description":"Created payment link with public /pay-link URL"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:write scope"}}}},"/api/v1/reports":{"get":{"operationId":"getFinancialReport","summary":"Get studio financial & tax report","description":"Requires scope: billing:read.","parameters":[{"name":"preset","in":"query","schema":{"type":"string","enum":["month","quarter","ytd","last_year","custom"],"default":"ytd"}},{"name":"start","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"end","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Gross revenue, service vs. store split, tips, tax, and payment method breakdown"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:read scope"}}}},"/api/v1/inbox":{"get":{"operationId":"listInboxThreads","summary":"List two-way studio inbox threads","description":"Requires scope: comms:read.","parameters":[{"name":"filter","in":"query","schema":{"type":"string","enum":["all","unread","inquiries","archived"],"default":"all"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"clientId","in":"query","schema":{"type":"string"}},{"name":"projectId","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"List of inbox threads and unread counts"},"401":{"description":"Unauthorized"},"403":{"description":"Missing comms:read scope"}}},"post":{"operationId":"sendInboxMessage","summary":"Reply to an inbox thread or start a new conversation","description":"Requires scope: comms:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInboxMessageRequest"}}}},"responses":{"201":{"description":"Sent message and updated thread detail"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing comms:write scope"}}}},"/api/v1/campaigns":{"get":{"operationId":"listEmailCampaigns","summary":"List studio email marketing campaigns","description":"Requires scope: comms:read.","responses":{"200":{"description":"List of email campaigns and subscriber stats"},"401":{"description":"Unauthorized"},"403":{"description":"Missing comms:read scope"}}},"post":{"operationId":"createEmailCampaign","summary":"Create a draft email marketing campaign","description":"Requires scope: comms:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmailCampaignRequest"}}}},"responses":{"201":{"description":"Created draft campaign"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing comms:write scope"}}}},"/api/v1/website/pages":{"get":{"operationId":"listCustomPages","summary":"List custom studio website pages","description":"Requires scope: website:write or galleries:read.","responses":{"200":{"description":"List of custom website pages with public URLs"},"401":{"description":"Unauthorized"},"403":{"description":"Missing website:write or galleries:read scope"}}},"post":{"operationId":"createCustomPage","summary":"Create a custom studio website page","description":"Requires scope: website:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomPageRequest"}}}},"responses":{"201":{"description":"Created custom website page with public URL"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing website:write scope"},"409":{"description":"Slug already exists"}}}},"/api/v1/contracts":{"get":{"operationId":"listContracts","summary":"List client contracts and studio contract templates","description":"Requires scope: crm:read.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["draft","sent","partially_signed","signed","void"]}},{"name":"clientId","in":"query","schema":{"type":"string"}},{"name":"projectId","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"List of studio contracts and templates"},"401":{"description":"Unauthorized"},"403":{"description":"Missing crm:read scope"}}},"post":{"operationId":"createContractFromTemplate","summary":"Create a Tiptap draft contract from a starter or custom template with project placeholder auto-fill","description":"Requires scope: crm:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContractFromTemplateRequest"}}}},"responses":{"201":{"description":"Created Tiptap contract draft, auto-fill summary, editor URL, and signing URL"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing crm:write scope"},"404":{"description":"Client, project, or template not found"}}}},"/api/v1/contracts/{id}/remind":{"post":{"operationId":"sendContractReminder","summary":"Send an immediate signing reminder for an unsigned contract","description":"Requires scope: crm:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Reminder sent with updated reminderCount"},"401":{"description":"Unauthorized"},"403":{"description":"Missing crm:write scope"},"404":{"description":"Contract not found"},"409":{"description":"Contract is not in an unsigned active state or is expired"}}}},"/api/v1/collection-presets":{"get":{"operationId":"listCollectionPresets","summary":"List reusable Client Gallery collection presets","description":"Requires scope: galleries:read.","responses":{"200":{"description":"Studio collection presets and built-in starter blueprints"},"401":{"description":"Unauthorized"},"403":{"description":"Missing galleries:read scope"}}}},"/api/v1/collection-presets/apply":{"post":{"operationId":"applyCollectionPreset","summary":"Apply a collection preset to an existing gallery collection","description":"Requires scope: galleries:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyCollectionPresetRequest"}}}},"responses":{"200":{"description":"Preset applied to collection"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing galleries:write scope"},"404":{"description":"Collection or preset not found"}}}},"/api/v1/lead-forms":{"get":{"operationId":"listLeadForms","summary":"List standalone and embeddable lead-capture contact forms","description":"Requires scope: crm:read.","parameters":[{"name":"activeOnly","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Lead-capture forms with public /inquire and /embed/form URLs"},"401":{"description":"Unauthorized"},"403":{"description":"Missing crm:read scope"}}}},"/api/v1/projects/{id}/notes":{"get":{"operationId":"listProjectNotes","summary":"List private studio notes on a project","description":"Requires scope: crm:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Private notes attached to the project"},"401":{"description":"Unauthorized"},"403":{"description":"Missing crm:read scope"},"404":{"description":"Project not found"}}},"post":{"operationId":"addProjectNote","summary":"Add a private studio note to a project","description":"Requires scope: crm:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddProjectNoteRequest"}}}},"responses":{"201":{"description":"Created private project note"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing crm:write scope"},"404":{"description":"Project not found"}}}},"/api/v1/proposals":{"get":{"operationId":"listProposals","summary":"List Smart Proposals for this studio","description":"Requires scope: billing:read.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["all","draft","sent","viewed","accepted","signed","booked","expired","void"]}},{"name":"clientId","in":"query","schema":{"type":"string"}},{"name":"projectId","in":"query","schema":{"type":"string"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"Smart Proposals list and status counts"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:read scope"}}},"post":{"operationId":"createProposal","summary":"Create a Smart Proposal (packages, agreement, and retainer schedule)","description":"Requires scope: billing:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProposalRequest"}}}},"responses":{"201":{"description":"Created Smart Proposal with shareable /proposal/[token] URL"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:write scope"}}}},"/api/v1/proposals/{id}":{"get":{"operationId":"getProposal","summary":"Get a Smart Proposal by ID","description":"Requires scope: billing:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Smart Proposal details"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:read scope"},"404":{"description":"Proposal not found"}}},"patch":{"operationId":"updateProposal","summary":"Update a draft or unlocked Smart Proposal","description":"Requires scope: billing:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProposalRequest"}}}},"responses":{"200":{"description":"Updated Smart Proposal"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:write scope"},"404":{"description":"Proposal not found"}}},"delete":{"operationId":"archiveProposal","summary":"Archive or void a Smart Proposal","description":"Requires scope: billing:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Proposal archived/voided"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:write scope"},"404":{"description":"Proposal not found"}}}},"/api/v1/proposals/{id}/send":{"post":{"operationId":"sendProposal","summary":"Email a Smart Proposal link to the client","description":"Requires scope: billing:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendProposalRequest"}}}},"responses":{"200":{"description":"Proposal sent to client"},"401":{"description":"Unauthorized"},"403":{"description":"Missing billing:write scope"},"404":{"description":"Proposal not found"}}}},"/api/v1/promos":{"get":{"operationId":"listPrintPromos","summary":"List automated print-sale promos and expiring print credits","description":"Requires scope: store:read.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["draft","scheduled","active","paused","ended"]}}],"responses":{"200":{"description":"Print promos with attributed orders and revenue"},"401":{"description":"Unauthorized"},"403":{"description":"Missing store:read scope"}}},"post":{"operationId":"createPrintPromo","summary":"Create and optionally launch a print-sale promo or print credit","description":"Requires scope: store:write.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePrintPromoRequest"}}}},"responses":{"201":{"description":"Created print promo synced with store coupon"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing store:write scope"}}}},"/api/v1/promos/{id}":{"get":{"operationId":"getPrintPromo","summary":"Get a print promo by ID","description":"Requires scope: store:read.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Print promo details"},"401":{"description":"Unauthorized"},"403":{"description":"Missing store:read scope"},"404":{"description":"Promo not found"}}},"patch":{"operationId":"updatePrintPromo","summary":"Update a print promo","description":"Requires scope: store:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePrintPromoRequest"}}}},"responses":{"200":{"description":"Updated print promo"},"400":{"description":"Validation error"},"401":{"description":"Unauthorized"},"403":{"description":"Missing store:write scope"},"404":{"description":"Promo not found"}}},"delete":{"operationId":"deletePrintPromo","summary":"Delete a print promo and deactivate its backing coupon","description":"Requires scope: store:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Promo deleted"},"401":{"description":"Unauthorized"},"403":{"description":"Missing store:write scope"},"404":{"description":"Promo not found"}}}},"/api/v1/promos/{id}/launch":{"post":{"operationId":"launchPrintPromo","summary":"Launch or resume a print promo immediately","description":"Requires scope: store:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Promo launched"},"401":{"description":"Unauthorized"},"403":{"description":"Missing store:write scope"},"404":{"description":"Promo not found"}}}},"/api/v1/promos/{id}/pause":{"post":{"operationId":"pausePrintPromo","summary":"Pause an active print promo","description":"Requires scope: store:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Promo paused"},"401":{"description":"Unauthorized"},"403":{"description":"Missing store:write scope"},"404":{"description":"Promo not found"}}}},"/api/v1/promos/{id}/end":{"post":{"operationId":"endPrintPromo","summary":"End a print promo immediately and disable its coupon","description":"Requires scope: store:write.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Promo ended"},"401":{"description":"Unauthorized"},"403":{"description":"Missing store:write scope"},"404":{"description":"Promo not found"}}}}}}