Inflection.io Email Templates API

The Email Templates API from Inflection.io — 1 operation(s) for email templates.

OpenAPI Specification

inflectionio-email-templates-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Inflection Developer Contact Activity Email Templates API
  version: '1.0'
  description: A REST API for reading and writing the people in your Inflection workspace — their profiles, product and marketing activity, static lists, and email templates.
servers:
- url: https://api.inflection.io
  description: Production
security:
- bearerAuth: []
tags:
- name: Email Templates
paths:
  /v1/email-templates:
    post:
      operationId: createEmailTemplate
      summary: Create an email template
      tags:
      - Email Templates
      description: "Templates are **create-only** over the API — there's no read, update, or delete route. After creating, edit in the UI via the returned `editorUrl`.\n\n- The from-email domain must be org-approved, otherwise `400\n  UnapprovedEmailDomainException`.\n- HTML tokens are validated — an unknown token returns `400\n  UnknownVariablesException`.\n- A duplicate name returns `409 TEMPLATE_ALREADY_EXISTS`."
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - html
              - subject
              - fromEmail
              properties:
                name:
                  type: string
                html:
                  type: string
                subject:
                  type: string
                fromEmail:
                  type: string
                replyTo:
                  type: string
      responses:
        '200':
          description: Template created, with an editorUrl to continue in the UI.
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Envelope'
                - type: object
                  properties:
                    data:
                      type: object
                      properties:
                        editorUrl:
                          type: string
        '400':
          description: Unapproved domain or unknown token.
        '409':
          description: Duplicate template name.
components:
  schemas:
    Envelope:
      type: object
      properties:
        data:
          description: Payload — object or array, shape depends on the endpoint.
        pagination:
          type: object
          description: Present only on paged list endpoints.
          properties:
            pageNumber:
              type: integer
              example: 1
            pageSize:
              type: integer
              example: 20
            totalElements:
              type: integer
              example: 151
            totalPages:
              type: integer
              example: 8
        errors:
          type: array
          items:
            type: object
            properties:
              errorCode:
                type: string
              message:
                type: string
              detail:
                type: string
        meta:
          type: object
          properties:
            status:
              type: string
              enum:
              - SUCCESS
              - FAILURE
            timestamp:
              type: string
              format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Personal Access Token. READ scope for GET, WRITE scope for POST/PATCH/DELETE.