Institution Messages
Admin API
>
API Reference
>
v0
>
Messages
>
Institution Messages
openapi: 3.0.0
info:
version: '0.0'
title: Institution Messages
description: |
CRUD operations for institution messages.
tags:
- name: Institution Messages
- name: Messages
servers:
- url: 'https://banno.com'
paths:
"/a/mobile/api/v0/institutions/{institutionId}/messages":
get:
tags:
- Messages
description: |
Retrieves a list of messages for an institution.
Requires the "Manage institution messages" permission
parameters:
- $ref: "#/components/parameters/institutionId"
responses:
"200":
description: Returns an array of institution messages. Array will be empty if no
institution messages are found.
content:
application/json:
schema:
$ref: "#/components/schemas/messageArray"
post:
tags:
- Messages
description: |
Creates a message for the institution.
Requires the "Manage institution messages" permission
parameters:
- $ref: "#/components/parameters/institutionId"
requestBody:
$ref: "#/components/requestBodies/postMessage"
responses:
"200":
description: OK. Returns a the messageId of the created message.
content:
application/json:
schema:
$ref: "#/components/schemas/messageId"
"/a/mobile/api/v0//institutions/{institutionId}/messages/{messageId}":
get:
tags:
- Messages
description: |
Retrieves a single message.
Requires the "Manage institution messages" permission
parameters:
- $ref: "#/components/parameters/institutionId"
- $ref: "#/components/parameters/messageId"
responses:
"200":
description: OK
content:
application/json:
schema:
$ref: "#/components/schemas/message"
"404":
description: Not found
put:
tags:
- Messages
description: |
Updates a message. If the message being updated's scheduledAt is in the
past, this message will not be updated.
Requires the "Manage institution messages" permission
parameters:
- $ref: "#/components/parameters/institutionId"
- $ref: "#/components/parameters/messageId"
requestBody:
$ref: "#/components/requestBodies/postMessage"
responses:
"204":
description: Successful Request
delete:
tags:
- Messages
description: |
Deletes the message.
Requires the "Manage institution messages" permission
parameters:
- $ref: "#/components/parameters/institutionId"
- $ref: "#/components/parameters/messageId"
responses:
"200":
description: OK
components:
securitySchemes:
clientCredentials:
type: oauth2
description: OAuth2 using the client credentials flow
flows:
clientCredentials:
tokenUrl: https://banno.com/a/oidc-provider/api/v0/token
scopes: {}
parameters:
institutionId:
in: path
name: institutionId
description: ID of an institution
required: true
schema:
type: string
format: uuid
messageId:
in: path
name: messageId
description: ID of an message
required: true
schema:
type: string
format: uuid
requestBodies:
postMessage:
content:
application/json:
schema:
$ref: "#/components/schemas/postMessage"
schemas:
messageArray:
type: object
required:
- messages
properties:
messages:
type: array
items:
$ref: "#/components/schemas/message"
messageId:
type: string
description: UUID string
format: uuid
message:
type: object
required:
- id
- institutionId
- title
- description
- messageHtml
- createdAt
- updatedAt
- scheduledAt
- sendAlert
properties:
id:
$ref: "#/components/schemas/messageId"
institutionId:
type: string
description: id of institution
format: uuid
title:
type: string
description: Message title
description:
type: string
description: Description
pushNotificationMessage:
type: string
description: Optional message that pops up in push notifications
(defaults to "You have a new institution message.")
messageHtml:
type: string
description: Message HTML
format: html
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
scheduledAt:
type: string
description: datetime when the message is scheduled to be sent.
format: date-time
expiresAt:
type: string
format: date-time
sendAlert:
type: boolean
description: Refers to whether a push notification will be generated for all
users at the institution for this message.
example: true
segmentId:
type: string
description: optional id of user segment
format: uuid
postMessage:
type: object
required:
- title
- description
- messageHtml
- sendAlert
properties:
title:
type: string
description: Message title
description:
type: string
description: Description
pushNotificationMessage:
type: string
description: Optional message that pops up in push notifications
(defaults to "You have a new institution message.")
messageHtml:
type: string
description: Message HTML
format: html
scheduledAt:
type: string
description: optional datetime. If not provided, then the message will be
provided to the users as soon as possible. If the request is
updating a message and the previous scheduledTime has already
occurred, the scheduledTime will not be updated in the message.
format: date-time
expiresAt:
type: string
description: optional datetime
format: date-time
sendAlert:
type: boolean
description: Refers to whether a push notification will be generated for all
users at the institution for this message.
example: true
segmentId:
type: string
description: optional id of user segment
format: uuid
Have a Question?
Have a how-to question? Seeing a weird error? Get help on
StackOverflow.
Register for the Digital Toolkit Meetup
where we answer technical Q&A from the audience.
Last updated Mon Aug 30 2021