Skedulo Notification Templates API
The Notification Templates API from Skedulo — 3 operation(s) for notification templates.
The Notification Templates API from Skedulo — 3 operation(s) for notification templates.
openapi: 3.0.0
info:
title: Authentication Admin Notification Templates API
description: Skedulo Authentication API
version: 1.0.0
servers:
- url: https://api.skedulo.com/auth
- url: https://api.uk.skedulo.com/auth
- url: https://api.ca.skedulo.com/auth
- url: https://api.au.skedulo.com/auth
tags:
- name: Notification Templates
paths:
/v2/templates/defaults:
get:
security:
- Authorization: []
summary: Notification template default values
description: Fetch the default values for notification templates.
tags:
- Notification Templates
responses:
'200':
description: Result
content:
application/json:
schema:
type: object
required:
- result
properties:
result:
type: array
items:
$ref: '#/components/schemas/NotificationTemplateV2Defaults'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v2/templates:
get:
security:
- Authorization: []
summary: Get all notification templates
tags:
- Notification Templates
responses:
'200':
description: Result
content:
application/json:
schema:
type: object
required:
- result
- error
properties:
result:
type: array
items:
$ref: '#/components/schemas/NotificationTemplateV2'
error:
type: array
items:
$ref: '#/components/schemas/NotificationTemplateV2Error'
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v2/template/{type}/{protocol}:
parameters:
- $ref: '#/components/parameters/NotificationTemplateType'
- $ref: '#/components/parameters/NotificationTemplateProtocol'
post:
security:
- Authorization: []
summary: Create or update a notification template for a protocol
tags:
- Notification Templates
operationId: templateV2Upsert
responses:
'200':
description: Successfully created or updated.
'403':
description: If the user does not have the required permissions.
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
requestBody:
content:
application/json:
schema:
type: object
properties:
template:
type: string
description: A notification template to use for this protocol. Accepts Mustache style variables that point at schema fields and a small number of Handlebar handlers.
example: New {{ Name }}. {{ Start }}. {{first Address "Unknown Address" }}. For {{first Account.Name Contact.FullName "Unknown Customer" }}, {{ Duration }}.
required: true
delete:
security:
- Authorization: []
summary: Delete notification template
description: Delete the notification template associated with a message protocol. Any future messages sent through this protocol will use the default template.
tags:
- Notification Templates
responses:
'200':
description: Successfully deleted
'403':
description: If the user does not have the required permissions.
default:
description: Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
NotificationTemplateV2Part:
type: object
discriminator:
propertyName: type
required:
- type
properties:
type:
type: string
enum:
- text
- variable
- function
NotificationTemplateV2Template:
type: object
required:
- text
- parts
properties:
text:
type: string
parts:
type: array
items:
$ref: '#/components/schemas/NotificationTemplateV2Part'
NotificationTemplateV2Defaults:
type: object
required:
- job_dispatch
- job_reminder
- job_cancelled
- job_offer
properties:
job_dispatch:
$ref: '#/components/schemas/NotificationTemplateV2Template'
job_reminder:
$ref: '#/components/schemas/NotificationTemplateV2Template'
job_cancelled:
$ref: '#/components/schemas/NotificationTemplateV2Template'
job_offer:
$ref: '#/components/schemas/NotificationTemplateV2Template'
additionalProperties: false
NotificationTemplateV2:
type: object
required:
- type
- protocol
- schema
- template
properties:
type:
type: string
enum:
- job_dispatch
- job_reminder
- job_cancelled
- job_offer
protocol:
type: string
enum:
- sms
- push
schema:
type: string
template:
$ref: '#/components/schemas/NotificationTemplateV2Template'
NotificationTemplateV2Error:
type: object
required:
- type
- protocol
- template
- error
properties:
type:
type: string
enum:
- job_dispatch
- job_reminder
- job_cancelled
- job_offer
protocol:
type: string
enum:
- sms
- push
template:
type: string
error:
description: A description of the error
type: string
Error:
type: object
required:
- errorType
- message
properties:
errorType:
type: string
message:
type: string
parameters:
NotificationTemplateProtocol:
name: protocol
in: path
required: true
schema:
type: string
enum:
- sms
- push
NotificationTemplateType:
name: type
in: path
required: true
schema:
type: string
enum:
- job_dispatch
- job_reminder
- job_cancelled
- job_offer
securitySchemes:
Authorization:
type: http
scheme: bearer
bearerFormat: JWT