TemplateControllerApi

All URIs are relative to https://api.mailslurp.com

MethodHTTP requestDescription
createTemplatePOST /templatesCreate a Template
deleteTemplateDELETE /templates/{templateId}Delete Template
getAllTemplatesGET /templates/paginatedGet all Templates in paginated format
getTemplateGET /templates/{templateId}Get Template
getTemplatesGET /templatesGet all Templates
updateTemplatePUT /templates/{templateId}Update a Template

createTemplate

TemplateDto createTemplate(createTemplateOptions)

Create a Template

Parameters

NameTypeDescriptionNotes
createTemplateOptionsCreateTemplateOptionscreateTemplateOptions

Return type

TemplateDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteTemplate

deleteTemplate(templateId)

Delete Template

Parameters

NameTypeDescriptionNotes
templateIdUUIDtemplateId[default to null]

Return type

null (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getAllTemplates

PageTemplateProjection getAllTemplates(before, page, since, size, sort)

Get all Templates in paginated format

Parameters

NameTypeDescriptionNotes
beforeDateFilter by created at before the given timestamp[optional] [default to null]
pageIntegerOptional page in list pagination[optional] [default to 0]
sinceDateFilter by created at after the given timestamp[optional] [default to null]
sizeIntegerOptional page size in list pagination[optional] [default to 20]
sortStringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]

Return type

PageTemplateProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTemplate

TemplateDto getTemplate(templateId)

Get Template

Parameters

NameTypeDescriptionNotes
templateIdUUIDtemplateId[default to null]

Return type

TemplateDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTemplates

List getTemplates()

Get all Templates

Parameters

This endpoint does not need any parameter.

Return type

List

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

updateTemplate

TemplateDto updateTemplate(templateId, createTemplateOptions)

Update a Template

Parameters

NameTypeDescriptionNotes
templateIdUUIDtemplateId[default to null]
createTemplateOptionsCreateTemplateOptionscreateTemplateOptions

Return type

TemplateDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json