openapi: 3.1.0 info: title: HeyMilo Public ATS Email Templates API description: External developer-facing API for HeyMilo. Create interviewers with agentic workflows, ingest candidates, retrieve interview results, and manage workspace resources. version: 2.0.0 servers: - url: https://api.heymilo.ai description: Production security: - ApiKeyAuth: [] tags: - name: Email Templates description: View email templates configured for candidate outreach. paths: /api/v2/email-templates: get: tags: - Email Templates summary: List email templates description: Returns all email templates configured for the workspace. operationId: listEmailTemplates parameters: - name: limit in: query required: false schema: type: integer maximum: 100 minimum: 1 default: 20 title: Limit - name: starting_after in: query required: false schema: anyOf: - type: string - type: 'null' title: Starting After - name: search in: query required: false schema: anyOf: - type: string - type: 'null' description: Case-insensitive substring filter applied to the template name. title: Search description: Case-insensitive substring filter applied to the template name. - name: X-API-KEY in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Workspace-Id in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Workspace-Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ListResponse_EmailTemplateResponse_' '401': description: Invalid or missing API key. content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' '429': description: Rate limit exceeded. content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api/v2/email-templates/{template_id}: get: tags: - Email Templates summary: Get an email template description: Returns a single email template by ID. operationId: getEmailTemplate parameters: - name: template_id in: path required: true schema: type: string title: Template Id - name: X-API-KEY in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Api-Key - name: Authorization in: header required: false schema: anyOf: - type: string - type: 'null' title: Authorization - name: X-Workspace-Id in: header required: false schema: anyOf: - type: string - type: 'null' title: X-Workspace-Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/SingleResponse_EmailTemplateResponse_' '401': description: Invalid or missing API key. content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' '429': description: Rate limit exceeded. content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' '404': description: Email template not found. content: application/json: schema: $ref: '#/components/schemas/APIErrorResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: ListResponse_EmailTemplateResponse_: properties: data: items: $ref: '#/components/schemas/EmailTemplateResponse' type: array title: Data pagination: $ref: '#/components/schemas/PaginationMeta' type: object required: - data - pagination title: ListResponse[EmailTemplateResponse] EmailTemplateResponse: properties: object: type: string const: email_template title: Object description: Object type identifier. default: email_template id: type: string title: Id description: Unique email template identifier. examples: - B31EB9E73BEE template_key: type: string title: Template Key description: 'Template key indicating the email type: ''WEB_INTERVIEW_INVITATION'', ''WEB_INTERVIEW_NUDGE'', ''RESUME_INVITATION'', ''RESUME_NUDGE'', ''FORM_INVITATION'', ''FORM_NUDGE'', ''WEB_INTERVIEW_FINAL_NUDGE'', ''SCHEDULING_LINK_EMAIL'', ''REPORT_READY_EMAIL''.' examples: - WEB_INTERVIEW_INVITATION name: type: string title: Name description: Human-readable template name. examples: - Custom Interview Invitation subject: type: string title: Subject description: Email subject line. Supports {{variable}} placeholders. examples: - Interview Confirmation for {{job_title}} at {{company_name}} content: type: string title: Content description: Email HTML body. Supports {{variable}} placeholders. examples: -

Hello {{candidate_name}}, ...

blackout_period: anyOf: - $ref: '#/components/schemas/BlackoutPeriod' - type: 'null' description: Blackout period during which this email will not be sent. created_at: type: number title: Created At description: Unix timestamp when the template was created. examples: - 1739612400.0 updated_at: type: number title: Updated At description: Unix timestamp when the template was last updated. examples: - 1739617200.0 type: object required: - id - template_key - name - subject - content - created_at - updated_at title: EmailTemplateResponse description: 'A single email template used for candidate communications. Templates define the subject line and HTML body for emails sent at various stages of the interview workflow (invitations, nudges, etc.).' APIErrorDetail: properties: code: type: string title: Code description: Machine-readable error code examples: - invalid_param message: type: string title: Message description: Human-readable explanation examples: - title must be between 3 and 200 characters param: anyOf: - type: string - type: 'null' title: Param description: Parameter that caused the error examples: - title type: object required: - code - message title: APIErrorDetail APIError: properties: type: type: string title: Type description: Error category examples: - invalid_request_error code: type: string title: Code description: Machine-readable error code examples: - validation_error message: type: string title: Message description: Human-readable summary examples: - The request body failed validation param: anyOf: - type: string - type: 'null' title: Param description: Top-level parameter that caused the error doc_url: anyOf: - type: string - type: 'null' title: Doc Url description: Link to relevant documentation errors: items: $ref: '#/components/schemas/APIErrorDetail' type: array title: Errors description: Detailed per-field validation errors type: object required: - type - code - message title: APIError ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError BlackoutPeriod: properties: enabled: type: boolean title: Enabled description: Whether the blackout period is active. examples: - true timezone: type: string title: Timezone description: IANA timezone identifier. examples: - America/New_York start_hour: type: integer title: Start Hour description: Start hour of the blackout window (0-23). examples: - 22 end_hour: type: integer title: End Hour description: End hour of the blackout window (0-24, where 24 = midnight). examples: - 7 type: object required: - enabled - timezone - start_hour - end_hour title: BlackoutPeriod description: Time window during which emails will not be sent. SingleResponse_EmailTemplateResponse_: properties: data: $ref: '#/components/schemas/EmailTemplateResponse' meta: anyOf: - additionalProperties: true type: object - type: 'null' title: Meta description: Optional metadata. Shape varies by endpoint. type: object required: - data title: SingleResponse[EmailTemplateResponse] APIErrorResponse: properties: error: $ref: '#/components/schemas/APIError' type: object required: - error title: APIErrorResponse PaginationMeta: properties: has_more: type: boolean title: Has More description: Whether more results exist beyond this page total_count: anyOf: - type: integer - type: 'null' title: Total Count description: Total number of results (if available) url: anyOf: - type: string - type: 'null' title: Url description: URL of this resource type: object required: - has_more title: PaginationMeta securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-API-KEY description: API key for authentication. Pass your key in the X-API-KEY header.