openapi: 3.2.0 info: title: Vaultre Messages API contact: name: VaultRE url: https://www.vaultre.com.au email: api@vaultre.com.au version: '1.0' description: 'Operations tagged messages across 2 of this provider''s published API definitions: vaultre-api-v1-2-openapi.yml, vaultre-api-v1-3-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.2 - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.3 tags: - name: messages description: Operations related to franchise and user messages paths: /messages/received: get: tags: - messages summary: Retrieve all received messages description: Retrieve all received messages operationId: getMessagesReceived responses: 200: description: Messages retrieved content: {} security: - Api-Key: [] Bearer: [] servers: - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.2 /messages/sent: get: tags: - messages summary: Retrieve all sent messages description: Retrieve all sent messages operationId: getMessagesSent responses: 200: description: Messages retrieved content: {} security: - Api-Key: [] Bearer: [] servers: - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.2 /threads: get: tags: - messages summary: Retrieve all message threads description: Retrieve all message threads operationId: getMessagesThreads responses: 200: description: Message threads retrieved content: {} security: - Api-Key: [] Bearer: [] servers: - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.2 /threads/franchise: post: tags: - messages summary: Add a franchise thread description: Add a franchise thread operationId: addThreadFranchise requestBody: description: Message thread details content: application/json: schema: $ref: '#/components/schemas/AddUpdateMessageThread' required: true responses: 201: description: Message thread added content: application/json: schema: $ref: '#/components/schemas/MessageThread' 400: description: Invalid data content: application/json: schema: $ref: '#/components/schemas/SuccessOrError' security: - Api-Key: [] Bearer: [] x-codegen-request-body-name: body servers: - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.2 /threads/user: post: tags: - messages summary: Add a user message thread description: Add a user message thread operationId: addThreadUser requestBody: description: Message thread details content: application/json: schema: $ref: '#/components/schemas/AddUpdateMessageThread' required: true responses: 201: description: Message thread added content: application/json: schema: $ref: '#/components/schemas/MessageThread' 400: description: Invalid data content: application/json: schema: $ref: '#/components/schemas/SuccessOrError' security: - Api-Key: [] Bearer: [] x-codegen-request-body-name: body servers: - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.2 /threads/{id}: put: tags: - messages summary: Update a message thread description: Update a message thread operationId: updateMessageThread parameters: - name: id in: path description: ID of the message thread required: true schema: type: integer format: int64 requestBody: description: Message thread details content: application/json: schema: $ref: '#/components/schemas/AddUpdateMessageThread' required: true responses: 200: description: Message thread updated content: application/json: schema: $ref: '#/components/schemas/MessageThread' 400: description: Invalid data content: application/json: schema: $ref: '#/components/schemas/SuccessOrError' security: - Api-Key: [] Bearer: [] - in: [] name: [] description: [] required: [] type: [] format: [] x-codegen-request-body-name: body servers: - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.2 /threads/{id}/messages: get: tags: - messages summary: Retrieve all messages in a thread description: Retrieve all messages in a thread operationId: getThreadMessages responses: 200: description: Thread messages retrieved content: {} security: - Api-Key: [] Bearer: [] post: tags: - messages summary: Add a message to a thread description: Add a message to a thread operationId: addThreadMessage parameters: - name: id in: path description: ID of the message thread required: true schema: type: integer format: int64 requestBody: description: Message details content: application/json: schema: type: object properties: message: type: string required: true responses: 201: description: Message added content: application/json: schema: $ref: '#/components/schemas/Message' 400: description: Invalid data content: application/json: schema: $ref: '#/components/schemas/SuccessOrError' security: - Api-Key: [] Bearer: [] x-codegen-request-body-name: body servers: - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.2 /threads/{id}/markRead: post: tags: - messages summary: Mark all messages in a thread as read by the current user description: Mark all messages in a thread as read by the current user operationId: putMessageThreadRead parameters: - name: id in: path description: ID of the message thread required: true schema: type: integer format: int64 responses: 200: description: Thread marked as read content: application/json: schema: $ref: '#/components/schemas/SuccessOrError' 400: description: Invalid data content: application/json: schema: $ref: '#/components/schemas/SuccessOrError' security: - Api-Key: [] Bearer: [] servers: - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.2 /search/threads/recipients: get: tags: - messages summary: Get all threads with the supplied recipients description: Get all threads with the supplied recipients. The user will be added automatically if not supplied. operationId: getSearchThreadsRecipients parameters: - name: recipients in: query description: Recipient ID style: form explode: false schema: type: array items: type: integer format: int64 - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/pagesize' - name: sort in: query description: Field by which to sort the results. schema: type: string enum: - modified - created - $ref: '#/components/parameters/sortOrder' responses: 200: description: Message threads retrieved content: {} 400: description: Invalid data content: application/json: schema: $ref: '#/components/schemas/SuccessOrError' security: - Api-Key: [] Bearer: [] servers: - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.2 /search/threads/staffTypes: get: tags: - messages summary: Get all threads with the supplied recipients description: Get all threads with the supplied recipients. operationId: getSearchThreadsStaffTypes parameters: - name: staffTypes in: query description: Staff Type ID style: form explode: false schema: type: array items: type: integer format: int64 - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/pagesize' - name: sort in: query description: Field by which to sort the results. schema: type: string enum: - modified - created - $ref: '#/components/parameters/sortOrder' responses: 200: description: Message threads retrieved content: {} 400: description: Invalid data content: application/json: schema: $ref: '#/components/schemas/SuccessOrError' security: - Api-Key: [] Bearer: [] servers: - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.2 /search/threads/term: get: tags: - messages summary: Search for message threads containing term description: Search for message threads containing term operationId: getSearchThreadsTerm parameters: - name: term in: query description: The term to search for. schema: type: string - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/pagesize' - name: sort in: query description: Field by which to sort the results. schema: type: string enum: - modified - created - $ref: '#/components/parameters/sortOrder' responses: 200: description: Message threads retrieved content: {} 400: description: Invalid data content: application/json: schema: $ref: '#/components/schemas/SuccessOrError' security: - Api-Key: [] Bearer: [] servers: - url: https://ap-southeast-2.api.vaultre.com.au/api/v1.2 components: schemas: MessageReceipt: type: object properties: id: type: number format: int64 name: type: string seen: type: boolean MessageThread: type: object properties: id: type: number format: int64 name: type: string created: type: string format: date-time modified: type: string format: date-time accountId: type: number format: int64 franchiseId: type: number format: int64 insertedBy: $ref: '#/components/schemas/Access' recipients: type: array items: $ref: '#/components/schemas/MessageRecipient' latestMessage: $ref: '#/components/schemas/Message' UserPhoto: type: object properties: original: type: string thumb_360: type: string MessageRecipient: type: object properties: id: type: number format: int64 name: type: string photo: type: string SuccessOrError: type: object properties: success: type: boolean msg: type: string code: type: string AddUpdateMessageThread: type: object properties: name: type: string recipients: type: array items: $ref: '#/components/schemas/MessageRecipient' Access: type: object properties: id: type: integer format: int64 name: type: string photo: $ref: '#/components/schemas/UserPhoto' Message: type: object properties: id: type: number format: int64 threadId: type: number format: int64 message: type: string receipts: type: array items: $ref: '#/components/schemas/MessageReceipt' insertedBy: $ref: '#/components/schemas/Access' inserted: type: string format: date-time isFranchise: type: boolean Access_2: type: object properties: id: type: integer format: int64 name: type: string photo: $ref: '#/components/schemas/UserPhoto' account: type: object properties: id: type: integer format: int64 name: type: string parameters: pagesize: name: pagesize in: query description: Number of records to be returned in each page. schema: type: integer format: int64 default: 50 page: name: page in: query description: Page number of results schema: type: integer format: int64 sortOrder: name: sortOrder in: query description: Order by which to sort the results. Used in conjunction with sort parameter. schema: type: string enum: - asc - desc securitySchemes: Api-Key: type: apiKey name: X-Api-Key in: header Bearer: type: apiKey description: Use format 'Bearer [token]' name: Authorization in: header x-refined-from: - vaultre-api-v1-2-openapi.yml - vaultre-api-v1-3-openapi.yml