naftiko: 1.0.0-alpha2 info: label: Marketo Engage Rest API — Emails description: 'Marketo Engage Rest API — Emails. 26 operations. Lead operation: Marketo Get Email by Name. Self-contained Naftiko capability covering one Marketo business surface.' tags: - Marketo - Emails created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: MARKETO_API_KEY: MARKETO_API_KEY capability: consumes: - type: http namespace: engage-rest-emails baseUri: https://localhost:8080 description: Marketo Engage Rest API — Emails business capability. Self-contained, no shared references. resources: - name: rest-asset-v1-email-byName.json path: /rest/asset/v1/email/byName.json operations: - name: getemailbynameusingget method: GET description: Marketo Get Email by Name outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: name in: query type: string description: Name of the email required: true - name: status in: query type: string description: Status filter for draft or approved versions - name: folder in: query type: string description: JSON representation of parent folder, with members 'id', and 'type' which may be 'Folder' or 'Program' - name: rest-asset-v1-email-ccFields.json path: /rest/asset/v1/email/ccFields.json operations: - name: getemailccfieldsusingget method: GET description: Marketo Get Email CC Fields outputRawFormat: json outputParameters: - name: result type: object value: $. - name: rest-asset-v1-email-id}.json path: /rest/asset/v1/email/{id}.json operations: - name: getemailbyidusingget method: GET description: Marketo Get Email By Id outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: status in: query type: string description: Status filter for draft or approved versions - name: updateemailusingpost method: POST description: Marketo Update Email Metadata outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: body in: body type: object description: Request body (JSON). required: true - name: rest-asset-v1-email-id-approveDraft.json path: /rest/asset/v1/email/{id}/approveDraft.json operations: - name: approvedraftusingpost method: POST description: Marketo Approve Email Draft outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: rest-asset-v1-email-id-clone.json path: /rest/asset/v1/email/{id}/clone.json operations: - name: cloneemailusingpost method: POST description: Marketo Clone Email outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: body in: body type: object description: Request body (JSON). required: true - name: rest-asset-v1-email-id-content.json path: /rest/asset/v1/email/{id}/content.json operations: - name: getemailcontentbyidusingget method: GET description: Marketo Get Email Content outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: status in: query type: string description: Status filter for draft or approved versions - name: updateemailcontentusingpost method: POST description: Marketo Update Email Content outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: body in: body type: object description: Request body (JSON). required: true - name: rest-asset-v1-email-id-content-rearrange.json path: /rest/asset/v1/email/{id}/content/rearrange.json operations: - name: rearrangemodulesusingpost method: POST description: Marketo Rearrange Email Modules outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: body in: body type: object description: Request body (JSON). required: false - name: rest-asset-v1-email-id-content-htmlId}.json path: /rest/asset/v1/email/{id}/content/{htmlId}.json operations: - name: updateemailcomponentcontentusingpost method: POST description: Marketo Update Email Content Section outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: htmlId in: path type: string description: htmlId required: true - name: body in: body type: object description: Request body (JSON). required: true - name: rest-asset-v1-email-id-content-moduleId-add.json path: /rest/asset/v1/email/{id}/content/{moduleId}/add.json operations: - name: addmoduleusingpost method: POST description: Marketo Add Email Module outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: moduleId in: path type: string description: moduleId required: true - name: name in: query type: string description: Name of the module required: true - name: index in: query type: integer description: Index of the module. Determines the order of the module in the email. required: true - name: rest-asset-v1-email-id-content-moduleId-delete.json path: /rest/asset/v1/email/{id}/content/{moduleId}/delete.json operations: - name: deletemoduleusingpost method: POST description: Marketo Delete Module outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: moduleId in: path type: string description: moduleId required: true - name: rest-asset-v1-email-id-content-moduleId-duplicate.json path: /rest/asset/v1/email/{id}/content/{moduleId}/duplicate.json operations: - name: duplicatemoduleusingpost method: POST description: Marketo Duplicate Email Module outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: moduleId in: path type: string description: moduleId required: true - name: name in: query type: string description: Name of the new module required: true - name: rest-asset-v1-email-id-content-moduleId-rename.json path: /rest/asset/v1/email/{id}/content/{moduleId}/rename.json operations: - name: renameusingpost method: POST description: Marketo Rename Email Module outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: moduleId in: path type: string description: moduleId required: true - name: name in: query type: string description: New module name required: true - name: rest-asset-v1-email-id-delete.json path: /rest/asset/v1/email/{id}/delete.json operations: - name: deleteemailusingpost method: POST description: Marketo Delete Email outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: rest-asset-v1-email-id-discardDraft.json path: /rest/asset/v1/email/{id}/discardDraft.json operations: - name: discarddraftusingpost method: POST description: Marketo Discard Email Draft outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: rest-asset-v1-email-id-dynamicContent-contentId}.json path: /rest/asset/v1/email/{id}/dynamicContent/{contentId}.json operations: - name: getemaildynamiccontentusingget method: GET description: Marketo Get Email Dynamic Content outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: Id of email required: true - name: contentId in: path type: string description: Id of email dynamic content section required: true - name: status in: query type: string description: Status filter for draft or approved versions - name: updateemaildynamiccontentusingpost method: POST description: Marketo Update Email Dynamic Content Section outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: Id of email required: true - name: contentId in: path type: string description: Id of email dynamic content section required: true - name: body in: body type: object description: Request body (JSON). required: true - name: rest-asset-v1-email-id-fullContent.json path: /rest/asset/v1/email/{id}/fullContent.json operations: - name: getemailfullcontentusingget method: GET description: Marketo Get Email Full Content outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: Id of the email required: true - name: status in: query type: string description: Status filter for draft or approved versions. Defaults to approved if asset is approved, draft if not. - name: leadId in: query type: integer description: The lead id to impersonate. Email is rendered as though it was received by this lead. - name: type in: query type: string description: Email content type to return. Default is HTML. - name: createemailfullcontentusingpost method: POST description: Marketo Update Email Full Content outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: Id of the email required: true - name: body in: body type: object description: Request body (JSON). required: true - name: rest-asset-v1-email-id-sendSample.json path: /rest/asset/v1/email/{id}/sendSample.json operations: - name: sendsampleemailusingpost method: POST description: Marketo Send Sample Email outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: Id of the email required: true - name: body in: body type: object description: Request body (JSON). required: true - name: rest-asset-v1-email-id-unapprove.json path: /rest/asset/v1/email/{id}/unapprove.json operations: - name: unapprovedraftusingpost method: POST description: Marketo Unapprove Email outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: rest-asset-v1-email-id-variable-name}.json path: /rest/asset/v1/email/{id}/variable/{name}.json operations: - name: updatevariableusingpost method: POST description: Marketo Update Email Variable outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: name in: path type: string description: name required: true - name: body in: body type: object description: Request body (JSON). required: false - name: rest-asset-v1-email-id-variables.json path: /rest/asset/v1/email/{id}/variables.json operations: - name: getemailvariablesusingget method: GET description: Marketo Get Email Variables outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer description: id required: true - name: rest-asset-v1-emails.json path: /rest/asset/v1/emails.json operations: - name: getemailusingget method: GET description: Marketo Get Emails outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: status in: query type: string description: Status filter for draft or approved versions - name: folder in: query type: string description: JSON representation of parent folder, with members 'id', and 'type' which may be 'Folder' or 'Program' - name: offset in: query type: integer description: Integer offset for paging - name: maxReturn in: query type: integer description: Maximum number of emails to return. Max 200, default 20 - name: earliestUpdatedAt in: query type: string description: Exclude emails prior to this date. Must be valid ISO-8601 string. See Datetim - name: latestUpdatedAt in: query type: string description: Exclude emails after this date. Must be valid ISO-8601 string. See Datetime