Mailmodo Repeatable Block API

Trigger a campaign whose AMP email repeats a content block once per item in the payload

OpenAPI Specification

mailmodo-repeatable-block-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Repeatable Block
  version: '1.0'
  description: "Use repeatable block to personalise content for your users.  \n\nYou can personalise content in your newsletters, product recommendation emails, receipts, invoices, etc. \n\nHow to setup repeatable block in the editor?\n\n1. Personalise block elements with relevant attributes.\n2. Switch on the repeatable block option. \n3. Copy block id to use in the configuration. \n4. Preview and test the email.  \n\nYou would require mmAPI key, campaign id, block id to configure this API. Follow the help doc to get these details from your Mailmodo account. ( https://help.mailmodo.com/en/articles/162-how-to-get-the-mmapi-key-campaign-id-and-block-id )"
  x-source: https://www.mailmodo.com/developers/ccbd7751adeb5-repeatable-block
servers:
- url: https://api.mailmodo.com/api/v1
paths:
  /triggerCampaign/{campaign-id}:
    post:
      summary: Send email with repeatable block
      operationId: post-triggerCampaign-campaign-id
      responses:
        '200':
          description: User Created
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                    minLength: 1
                  ref:
                    type: string
                    minLength: 1
                required:
                - success
                - message
                - ref
                x-examples:
                  example-1:
                    success: true
                    message: Email scheduled successfully
                    ref: be2bab1a-e0a6-419c-8fe0-1d3557c2af63
              examples:
                example-1:
                  value:
                    success: true
                    message: Email scheduled successfully
                    ref: be2bab1a-e0a6-419c-8fe0-1d3557c2af63
        '400':
          description: Missing Required Information
      requestBody:
        content:
          application/json:
            schema:
              description: ''
              type: object
              x-examples:
                example-1:
                  email: john@example.com
                  subject: string
                  data:
                    first_name: string
                  addToList: string
                  blocks:
                  - blockId: blockazj5936
                    data:
                    - event: Sample value for event
                      start_time: Sample value for start_time
                      end_time: Sample value for end_time
                      apointement_url: Sample value for apointement_url
              properties:
                email:
                  type: string
                  minLength: 1
                subject:
                  type: string
                  minLength: 1
                addToList:
                  type: string
                  minLength: 1
                blocks:
                  type: array
                  uniqueItems: true
                  minItems: 1
                  items:
                    type: object
                    properties:
                      blockId:
                        type: string
                        minLength: 1
                      data:
                        type: array
                        uniqueItems: true
                        minItems: 1
                        items:
                        - type: object
                          description: Sample request. The actual keys will depend on the personlizations used in the block
                          properties:
                            event:
                              type: string
                              minLength: 1
                            start_time:
                              type: string
                              minLength: 1
                            end_time:
                              type: string
                              minLength: 1
                            apointement_url:
                              type: string
                              minLength: 1
                          required:
                          - event
                          - start_time
                          - end_time
                          - apointement_url
                        - type: object
                          description: Sample request. The actual keys will depend on the personlizations used in the block
                          properties:
                            event:
                              type: string
                              minLength: 1
                            start_time:
                              type: string
                              minLength: 1
                            end_time:
                              type: string
                              minLength: 1
                            apointement_url:
                              type: string
                              minLength: 1
                          required:
                          - event
                          - start_time
                          - end_time
                          - apointement_url
              required:
              - email
              - addToList
            examples: {}
        description: Repeatable block accept an array. This is a sample body, set it up according to the personalisation in the block.
      description: 'This API allows you to send data for repeatable block in the campaign.  '
      parameters:
      - schema:
          type: string
        in: header
        description: application/json
        name: Content-Type
        required: true
      - schema:
          type: string
        in: header
        name: mmApiKey
        description: Please input your API key available at https://manage.mailmodo.com/app/settings/apikey
        required: true
      tags:
      - Repeatable Block
    parameters:
    - schema:
        type: string
      name: campaign-id
      in: path
      required: true
components:
  schemas: {}
  securitySchemes:
    mmApiKey:
      name: mmApiKey
      type: apiKey
      in: header
security:
- mmApiKey: []
tags:
- name: Repeatable Block
  description: 'Use repeatable block to personalise content for your users.  '