> ## Documentation Index
> Fetch the complete documentation index at: https://docs.smokeball.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sends a portal message

> Sends a message to the specified contact on the client portal. 

When using the Client Credentials grant type, include the UserId header to impersonate
the lawyer in the firm who is sending the message.



## OpenAPI

````yaml /openapi.json post /matters/{matterId}/portal/messages
openapi: 3.0.1
info:
  title: API
  version: '1.0'
servers:
  - url: https://api.smokeball.com
  - url: https://api.smokeball.com.au
  - url: https://api.smokeball.co.uk
  - url: https://stagingapi.smokeball.com
  - url: https://stagingapi.smokeball.com.au
  - url: https://stagingapi.smokeball.co.uk
security:
  - api-key: []
    token: []
paths:
  /matters/{matterId}/portal/messages:
    post:
      tags:
        - Portal
      summary: Sends a portal message
      description: "Sends a message to the specified contact on the client portal. \r\n\r\nWhen using the Client Credentials grant type, include the UserId header to impersonate\r\nthe lawyer in the firm who is sending the message."
      operationId: SendPortalMessageAsync
      parameters:
        - name: matterId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PortalMessageDto'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PortalMessageDto'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PortalMessageDto'
      responses:
        '202':
          description: When request is accepted.
        '400':
          description: When an unsupported request is made.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: When the authenticated account does not have access to the matter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: When matter with specified id does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    PortalMessageDto:
      required:
        - message
      type: object
      properties:
        contactId:
          type: string
          description: Unique identifier of the contact.
          format: uuid
          example: 93421c6f-40bd-465d-bb95-3b3b5e200e30
        message:
          minLength: 1
          type: string
        requireMFA:
          type: boolean
          description: Whether MFA is required before showing the message content.
          example: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    api-key:
      type: apiKey
      name: x-api-key
      in: header
    token:
      type: apiKey
      name: Authorization
      in: header
      x-amazon-apigateway-authtype: cognito_user_pools

````