> ## 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.

# Creates a portal task

> Creates a new client portal task associated with the specified matter.



## OpenAPI

````yaml /openapi.json post /matters/{matterId}/portal/tasks
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/tasks:
    post:
      tags:
        - Portal
      summary: Creates a portal task
      description: Creates a new client portal task associated with the specified matter.
      operationId: CreatePortalTaskAsync
      parameters:
        - name: matterId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PortalTaskDto'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PortalTaskDto'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/PortalTaskDto'
        required: true
      responses:
        '202':
          description: When request is accepted. Returns the id of the task to be created.
        '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:
    PortalTaskDto:
      required:
        - externalUserId
        - title
        - url
      type: object
      properties:
        contactId:
          type: string
          description: Unique identifier of the contact.
          format: uuid
          nullable: true
          example: 93421c6f-40bd-465d-bb95-3b3b5e200e30
        email:
          type: string
          description: >-
            Email address of the contact. If provided, this takes precedence
            over ContactId.
          nullable: true
          example: contact@example.com
        externalUserId:
          minLength: 1
          type: string
          description: The optional external user identifier of the external system.
        title:
          minLength: 1
          type: string
          description: The title of the task to be displayed in the UI.
          example: 'Sign: Verification of Identity'
        url:
          minLength: 1
          type: string
          description: The URL that will be displayed within the task content.
          example: http://www.yourwebsite.com
        requireMFA:
          type: boolean
          description: Whether MFA is required before showing the task content.
        optional:
          type: boolean
          description: "Whether the task is \"Required\" or \"Optional\".\r\n\r\nOptional tasks appear in a separate section in the UI."
        actionText:
          type: string
          description: "Optional action text, a single word to describe the action the task relates to. \r\n\r\nDefaults to \"Complete\", but other examples could be \"Sign\" or \"Review\"."
          nullable: true
          example: Complete
        completedText:
          type: string
          description: >-
            Optional completed text, used on the task success screen if
            provided.
          nullable: true
          example: Signing Complete!
        completedUrl:
          type: string
          description: "Optional completed URL, which is a URL that is loaded in the task content body instead of the default success screen if provided.\r\n\r\nThis option overrides CompletedText if provided."
          nullable: true
          example: http://www.yourwebsite.com
      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

````