diff --git a/members.go b/members.go index 1c12133..796ba58 100644 --- a/members.go +++ b/members.go @@ -67,6 +67,20 @@ func (s *MembersService) MemberList(ctx context.Context, req *MemberListRequest) return out, resp, nil } +// Notify members. +// +// Send an email to account members on behalf of the caller, with content the caller supplies. Only callable with a credential minted for an AI SRE session; any other credential is rejected with `AccessDenied`. Delivery is asynchronous — `accepted` means the email was queued, not that it was delivered. Call it with `dry_run` set to `true` before sending: `html` in the response is the email exactly as recipients will get it, so you can confirm the sanitizer kept everything the message depends on. +// +// API: POST /member/notify (memberNotify). +func (s *MembersService) MemberNotify(ctx context.Context, req *MemberNotifyRequest) (*MemberNotifyResponse, *Response, error) { + out := new(MemberNotifyResponse) + resp, err := s.client.do(ctx, "/member/notify", req, out) + if err != nil { + return nil, resp, err + } + return out, resp, nil +} + // Reset member info. // // Identify a member and reset the specified profile fields. diff --git a/models_gen.go b/models_gen.go index b6bc5fd..275c59a 100644 --- a/models_gen.go +++ b/models_gen.go @@ -5780,6 +5780,36 @@ type MemberListResponse struct { Total int64 `json:"total" toon:"total"` } +// MemberNotifyRequest is generated from the Flashduty OpenAPI schema. +type MemberNotifyRequest struct { + // Check without sending. When `true`, every check runs and the response returns the exact email in `html`, but nothing is queued and neither the hourly limit nor the per-turn duplicate check is consumed. Defaults to `false`. + DryRun bool `json:"dry_run,omitempty" toon:"dry_run,omitempty"` + // Email body as an HTML fragment (no ``/`
`/`` wrapper needed); recipients receive it as the whole email body. Required, up to 102,400 bytes of raw UTF-8 input (larger messages are clipped by common email clients), and must be non-empty after sanitization. Sanitized server-side: `