Skip to content

MailSlurp\TemplateControllerApi

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

Method HTTP request Description
CreateTemplate Post /templates Create a Template
DeleteTemplate Delete /templates/{templateId} Delete email template
GetAllTemplates Get /templates/paginated List templates
GetTemplate Get /templates/{templateId} Get template
GetTemplates Get /templates List templates
UpdateTemplate Put /templates/{templateId} Update template

CreateTemplate

TemplateDto CreateTemplate(ctx, createTemplateOptions)

Create a Template

Create an email template with variables for use with templated transactional emails.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
createTemplateOptions CreateTemplateOptions

Return type

TemplateDto

Authorization

API_KEY

HTTP request headers

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

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

DeleteTemplate

DeleteTemplate(ctx, templateId)

Delete email template

Delete template

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
templateId string Template ID

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)

List templates

Get all templates in paginated format

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *GetAllTemplatesOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetAllTemplatesOpts struct

Name Type Description Notes
page optional.Int32 Optional page in list pagination [default to 0]
size optional.Int32 Optional page size in list pagination [default to 20]
sort optional.String Optional createdAt sort direction ASC or DESC [default to ASC]
since optional.Time Filter by created at after the given timestamp
before optional.Time Filter by created at before the given timestamp

Return type

PageTemplateProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

GetTemplate

TemplateDto GetTemplate(ctx, templateId)

Get template

Get email template

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
templateId string Template ID

Return type

TemplateDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

GetTemplates

[]TemplateProjection GetTemplates(ctx, )

List templates

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: /

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

UpdateTemplate

TemplateDto UpdateTemplate(ctx, templateId, createTemplateOptions)

Update template

Update email template

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
templateId string Template ID
createTemplateOptions CreateTemplateOptions

Return type

TemplateDto

Authorization

API_KEY

HTTP request headers

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

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