# 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 Template
GetAllTemplates Get /templates/paginated Get all Templates in paginated format
GetTemplate Get /templates/{TemplateId} Get Template
GetTemplates Get /templates Get all Templates

# CreateTemplate

TemplateDto CreateTemplate(ctx, createTemplateOptions)

Create a Template

# Required Parameters

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

# 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 README]

# DeleteTemplate

DeleteTemplate(ctx, templateId)

Delete Template

# Required Parameters

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

# 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 README]

# GetAllTemplates

PageTemplateProjection GetAllTemplates(ctx, optional)

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 index in inbox list pagination [default to 0]
size optional.Int32 Optional page size in inbox list pagination [default to 20]
sort optional.String Optional 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 README]

# GetTemplate

TemplateDto GetTemplate(ctx, templateId)

Get Template

# Required Parameters

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

# 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 README]

# 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 README]