MailSlurpTemplateControllerApi

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

CreateTemplate

TemplateDto CreateTemplate(ctx, createTemplateOptions)

Create a Template

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
createTemplateOptionsCreateTemplateOptionscreateTemplateOptions

Return type

TemplateDto

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

DeleteTemplate

DeleteTemplate(ctx, templateId)

Delete Template

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
templateIdstringTemplateId

Return type

(empty response body)

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetAllTemplates

PageTemplateProjection GetAllTemplates(ctx, optional)

Get all Templates in paginated format

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
optional*GetAllTemplatesOptsoptional parametersnil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetAllTemplatesOpts struct

NameTypeDescriptionNotes
pageoptional.Int32Optional page in list pagination[default to 0]
sizeoptional.Int32Optional page size in list pagination[default to 20]
sortoptional.StringOptional createdAt sort direction ASC or DESC[default to ASC]

Return type

PageTemplateProjection

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTemplate

TemplateDto GetTemplate(ctx, templateId)

Get Template

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
templateIdstringTemplateId

Return type

TemplateDto

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTemplates

[]TemplateProjection GetTemplates(ctx, )

Get all Templates

Required Parameters

This endpoint does not need any parameter.

Return type

**[]TemplateProjection**

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]