Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
291 changes: 291 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ tags:
description: Guided tours of Makerble's own pages for new colleagues; Organisation Admins choose each team's stops, wording and how strict they are, and see who has finished
- name: Feature Launches
description: One record per Makerble feature holding its launch content, used by announcements and the feature launch emails; written by Makerble staff
- name: Weekly Email
description: The weekly email of feature announcements, prepared and approved by Makerble staff
- name: Feature Tours
description: Short tours introducing one feature to people who already use Makerble, offered from a page's Intro or an announcement; written by Makerble staff
- name: Staff Unavailability
Expand Down Expand Up @@ -2004,6 +2006,225 @@ paths:
$ref: '#/components/responses/ForbiddenError'
"422":
$ref: '#/components/responses/UnprocessableEntityList'
/weekly_feature_email:
get:
tags: [Weekly Email]
summary: Get a week's weekly email of feature announcements
description: |
The weekly email of feature announcements for one week (Monday to Sunday), as on Site Overview › Weekly email:
its items (feature launches) in order, subject, opening paragraph, whether it is paused, when it sends, and once
sent, when and to how many people. Without `week`, the coming week's: this week's until it has been sent, then
next week's. A week's email is made the first time it is asked for, filled with the feature launches of
Makerble's announcements that start that week.

Each person gets only the items whose announcement they are in the audience of. Contacts with a login, Survey
Portal users and people who turned it off in Notification settings get nothing, and a week with no items sends
nothing. System Access users (Makerble staff) only. Anyone else gets 403.
operationId: getWeeklyFeatureEmail
security: [{tokenAuth: []}]
parameters:
- $ref: '#/components/parameters/WeeklyEmailWeek'
responses:
"200":
description: The week's email and how the weekly email is sent
content:
application/json:
schema:
$ref: '#/components/schemas/WeeklyFeatureEmailWithSetting'
"401":
$ref: '#/components/responses/Unauthorized'
"403":
$ref: '#/components/responses/ForbiddenError'
"422":
$ref: '#/components/responses/UnprocessableEntityList'
patch:
tags: [Weekly Email]
summary: Change a week's weekly email
description: |
Changes a week's email, as Site Overview › Weekly email does. Only what you send changes.
`feature_launch_ids` is the whole list of items, in order: launches left out are removed (and stay removed
when the week fills again from new announcements) and new ones are added. `paused: true` stops it sending until
it is resumed. A week that has been sent, or is over, can't change (422). System Access users only.
operationId: updateWeeklyFeatureEmail
security: [{tokenAuth: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
week:
type: string
format: date
description: Any date in the week. Without it, the coming week's email.
feature_launch_ids:
type: array
maxItems: 10
items: { type: integer }
description: Every item, in order (see GET /feature_launches)
subject:
type: string
maxLength: 150
description: Leave empty to name the features
intro:
type: string
maxLength: 1000
description: An opening paragraph
paused:
type: boolean
example:
week: '2026-12-07'
feature_launch_ids: [12, 9]
intro: Here's what's new in Makerble this week.
responses:
"200":
description: The week's email, after the change
content:
application/json:
schema:
$ref: '#/components/schemas/WeeklyFeatureEmailWithSetting'
"401":
$ref: '#/components/responses/Unauthorized'
"403":
$ref: '#/components/responses/ForbiddenError'
"422":
$ref: '#/components/responses/UnprocessableEntityList'
/weekly_feature_email/preview:
post:
tags: [Weekly Email]
summary: Preview a week's weekly email as a chosen user gets it
description: |
The week's email as one user would get it, sending nothing: only the items whose announcement they are in the
audience of, with their name and their unsubscribe link. Without `user_email`, your own. If they would get
nothing, `gets_email` is false and `left_out` says why. System Access users only.
operationId: previewWeeklyFeatureEmail
security: [{tokenAuth: []}]
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
week:
type: string
format: date
description: Any date in the week. Without it, the coming week's email.
user_email:
type: string
description: Whose email to show. Without it, your own.
example:
week: '2026-12-07'
user_email: busi@example.com
responses:
"200":
description: The email as that user gets it, or why they get none
content:
application/json:
schema:
$ref: '#/components/schemas/WeeklyFeatureEmailPreview'
"401":
$ref: '#/components/responses/Unauthorized'
"403":
$ref: '#/components/responses/ForbiddenError'
"422":
$ref: '#/components/responses/UnprocessableEntityList'
/weekly_feature_email/approve:
post:
tags: [Weekly Email]
summary: Approve and send a week's weekly email
description: |
Approve and send, as on Site Overview › Weekly email: records that you approved the week's email, resumes it if
it was paused and sends it straight away. With Send once approved, the email goes only once someone does this.
A week with no items, or one already sent, returns 422. System Access users only.
operationId: approveWeeklyFeatureEmail
security: [{tokenAuth: []}]
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
week:
type: string
format: date
description: Any date in the week. Without it, the coming week's email.
example:
week: '2026-12-07'
responses:
"200":
description: The week's email, now sent
content:
application/json:
schema:
$ref: '#/components/schemas/WeeklyFeatureEmailWithSetting'
"401":
$ref: '#/components/responses/Unauthorized'
"403":
$ref: '#/components/responses/ForbiddenError'
"422":
$ref: '#/components/responses/UnprocessableEntityList'
/weekly_feature_email/setting:
patch:
tags: [Weekly Email]
summary: Change how the weekly email is sent
description: |
Send automatically (`send_mode: automatic`) sends each week's email on its day and hour, unless it is paused.
Send once approved (`send_mode: approval`) waits until someone approves it. `send_day` is 1 (Monday) to 7
(Sunday) and `send_hour` 0 to 23, in UK time. Only what you send changes. System Access users only.
operationId: updateWeeklyFeatureEmailSetting
security: [{tokenAuth: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
send_mode: { type: string, enum: [automatic, approval] }
send_day: { type: integer, minimum: 1, maximum: 7 }
send_hour: { type: integer, minimum: 0, maximum: 23 }
example:
send_mode: approval
responses:
"200":
description: How the weekly email is sent, after the change
content:
application/json:
schema:
$ref: '#/components/schemas/WeeklyFeatureEmailSetting'
"401":
$ref: '#/components/responses/Unauthorized'
"403":
$ref: '#/components/responses/ForbiddenError'
"422":
$ref: '#/components/responses/UnprocessableEntityList'
/weekly_feature_emails:
get:
tags: [Weekly Email]
summary: List weekly emails
description: |
Every week's email that has been made, newest week first, with when each was sent and to how many people.
System Access users only.
operationId: listWeeklyFeatureEmails
security: [{tokenAuth: []}]
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PerPage'
- $ref: '#/components/parameters/LastSyncDatetime'
responses:
"200":
description: Paginated weekly emails
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedWeeklyFeatureEmails'
"401":
$ref: '#/components/responses/Unauthorized'
"403":
$ref: '#/components/responses/ForbiddenError'
/feature_launches/{id}:
parameters:
- name: id
Expand Down Expand Up @@ -24325,6 +24546,14 @@ components:
schema:
type: integer
description: The Organisation (Charity) ID
WeeklyEmailWeek:
name: week
in: query
required: false
description: Any date in the week (weeks start on Monday). Without it, the coming week's email.
schema:
type: string
format: date
Page:
name: page
in: query
Expand Down Expand Up @@ -26045,6 +26274,68 @@ components:
- type: string
format: binary
- $ref: '#/components/schemas/AnnouncementImageUpload'
WeeklyFeatureEmail:
type: object
description: One week's weekly email of feature announcements (Site Overview › Weekly email)
properties:
week_starts_on: { type: string, format: date, description: The Monday the week starts on }
week_ends_on: { type: string, format: date }
status: { type: string, enum: [open, sent] }
editable: { type: boolean, description: False once it has been sent or its week is over }
paused: { type: boolean }
subject: { type: string, nullable: true, description: Empty to name the features }
intro: { type: string, nullable: true, description: The opening paragraph }
send_at: { type: string, format: date-time, nullable: true, description: When it sends automatically; null once sent }
waiting_for_approval: { type: boolean, description: True while it needs Approve and send before it can go }
approved_at: { type: string, format: date-time, nullable: true }
approved_by_id: { type: integer, nullable: true }
sent_at: { type: string, format: date-time, nullable: true }
recipients_count: { type: integer, description: How many people it was sent to }
items:
type: array
description: The feature launches it shows, in order
items:
type: object
properties:
feature_launch_id: { type: integer }
name: { type: string }
position: { type: integer }
source: { type: string, enum: [announcement, added], description: From the week's announcements, or added by someone }
updated_at: { type: string, format: date-time }
WeeklyFeatureEmailSetting:
type: object
description: How the weekly email is sent
properties:
send_mode: { type: string, enum: [automatic, approval] }
send_day: { type: integer, description: 1 (Monday) to 7 (Sunday) }
send_hour: { type: integer, description: 0 to 23 }
time_zone: { type: string, example: Europe/London }
WeeklyFeatureEmailWithSetting:
allOf:
- $ref: '#/components/schemas/WeeklyFeatureEmail'
- type: object
properties:
setting:
$ref: '#/components/schemas/WeeklyFeatureEmailSetting'
PaginatedWeeklyFeatureEmails:
allOf:
- $ref: '#/components/schemas/PaginationEnvelope'
- type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/WeeklyFeatureEmail'
WeeklyFeatureEmailPreview:
type: object
properties:
to: { type: string }
gets_email: { type: boolean }
left_out: { type: string, nullable: true, description: Why they get no email, when gets_email is false }
subject: { type: string, nullable: true }
feature_launch_ids: { type: array, items: { type: integer }, description: The items they get }
html: { type: string, nullable: true }
text: { type: string, nullable: true }
PaginatedFeatureLaunches:
allOf:
- $ref: '#/components/schemas/PaginationEnvelope'
Expand Down
Loading
Loading