---
title: "Create a message"
method: POST
path: "/api/messages"
tags: ["message-controller"]
---

# Create a message

`POST /api/messages`

Add a message to the repository.

## Request body

- MessageReq
  - `accessPolicy` AccessPolicy
    - `accessPattern` 'NUMBER_LIMITED' | 'READ_CONFIRM' | 'TIME_LIMITED' | 'UNRESTRICTED'
    - `count` integer
    - `numberLimit` integer
  - `availableToDestination` boolean
  - `code` string
  - `createdDtm` TimestampReq
    - `date` integer
    - `hours` integer
    - `minutes` integer
    - `month` integer
    - `nanos` integer
    - `seconds` integer
    - `time` integer
    - `year` integer
  - `destId` string
  - `destName` string
  - `destType` 'CREDENTIAL_PROVIDER' | 'PERSON' | 'SERVICE_PROVIDER' | 'SYSTEM'
  - `emailDetails` object
  - `emailTo` string
  - `expiringDtm` TimestampReq
    - `date` integer
    - `hours` integer
    - `minutes` integer
    - `month` integer
    - `nanos` integer
    - `seconds` integer
    - `time` integer
    - `year` integer
  - `footer` string
  - `id` string
  - `info` MessageInfo
    - `cpAssociationRequest` CPAssociationRequest
      - `visibility` 'PRIVATE' | 'PUBLIC' | 'RESTRICTED'
    - `credentials` string[]
    - `invitation` Invitation
      - `associationRequest` AssociationRequest
        - `aliases` object
        - `termsAndConditionsUrl` string
      - `serviceUrls` string[]
    - `personCredentialIssuanceNotification` PersonCredentialIssuanceNotification
      - `credentialTypeExtendedName` string
      - `credentialTypeHref` string
      - `personEmail` string
      - `personHref` string
      - `result` 'FAILED_ISSUANCE' | 'SUCCESSFUL_ISSUANCE'
    - `personInfoNotification` PersonInfoNotification
      - `params` object
      - `requestedChannels` string[]
      - `sendErrors` ChannelSendError[]
        - `channel` 'EMAIL' | 'PUSH_NOTIFICATION' | 'SMS'
        - `code` integer
      - `type` string
  - `lastUpdatedDtm` TimestampReq
    - `date` integer
    - `hours` integer
    - `minutes` integer
    - `month` integer
    - `nanos` integer
    - `seconds` integer
    - `time` integer
    - `year` integer
  - `notBeforeDtm` TimestampReq
    - `date` integer
    - `hours` integer
    - `minutes` integer
    - `month` integer
    - `nanos` integer
    - `seconds` integer
    - `time` integer
    - `year` integer
  - `note` string
  - `permittedOperations` string[]
  - `previousMessageId` string
  - `readCount` integer
  - `secureContent` string
  - `sourceId` string
  - `sourceInfo` SourceInfo
  - `sourceName` string
  - `sourceType` 'CREDENTIAL_PROVIDER' | 'PERSON' | 'SERVICE_PROVIDER' | 'SYSTEM'
  - `status` 'ACTIVE' | 'ASSOC_REQ_ACCEPTED' | 'ASSOC_REQ_DECLINED' | 'DELETED' | 'EXPIRED' | 'INVITE_ACCEPTED' | 'INVITE_DECLINED' | 'NOT_SENT' | 'PENDING'
  - `subject` string
  - `type` 'ASSOCIATION_REQUEST' | 'CREDENTIAL' | 'INVITATION' | 'NOTICE' | 'PERSON_NOTIFICATION'

## Response `201`

Created

- MessageRes
  - `accessPolicy` AccessPolicy
    - `accessPattern` 'NUMBER_LIMITED' | 'READ_CONFIRM' | 'TIME_LIMITED' | 'UNRESTRICTED'
    - `count` integer
    - `numberLimit` integer
  - `availableToDestination` boolean
  - `code` string
  - `createdDtm` TimestampRes
    - `date` integer
    - `day` integer
    - `hours` integer
    - `minutes` integer
    - `month` integer
    - `nanos` integer
    - `seconds` integer
    - `time` integer
    - `timezoneOffset` integer
    - `year` integer
  - `destId` string
  - `destName` string
  - `destType` 'CREDENTIAL_PROVIDER' | 'PERSON' | 'SERVICE_PROVIDER' | 'SYSTEM'
  - `emailDetails` object
  - `emailTo` string
  - `expiringDtm` TimestampRes
    - `date` integer
    - `day` integer
    - `hours` integer
    - `minutes` integer
    - `month` integer
    - `nanos` integer
    - `seconds` integer
    - `time` integer
    - `timezoneOffset` integer
    - `year` integer
  - `footer` string
  - `href` string
  - `id` string
  - `info` MessageInfo
    - `cpAssociationRequest` CPAssociationRequest
      - `visibility` 'PRIVATE' | 'PUBLIC' | 'RESTRICTED'
    - `credentials` string[]
    - `invitation` Invitation
      - `associationRequest` AssociationRequest
        - `aliases` object
        - `termsAndConditionsUrl` string
      - `serviceUrls` string[]
    - `personCredentialIssuanceNotification` PersonCredentialIssuanceNotification
      - `credentialTypeExtendedName` string
      - `credentialTypeHref` string
      - `personEmail` string
      - `personHref` string
      - `result` 'FAILED_ISSUANCE' | 'SUCCESSFUL_ISSUANCE'
    - `personInfoNotification` PersonInfoNotification
      - `params` object
      - `requestedChannels` string[]
      - `sendErrors` ChannelSendError[]
        - `channel` 'EMAIL' | 'PUSH_NOTIFICATION' | 'SMS'
        - `code` integer
      - `type` string
  - `lastUpdatedDtm` TimestampRes
    - `date` integer
    - `day` integer
    - `hours` integer
    - `minutes` integer
    - `month` integer
    - `nanos` integer
    - `seconds` integer
    - `time` integer
    - `timezoneOffset` integer
    - `year` integer
  - `notBeforeDtm` TimestampRes
    - `date` integer
    - `day` integer
    - `hours` integer
    - `minutes` integer
    - `month` integer
    - `nanos` integer
    - `seconds` integer
    - `time` integer
    - `timezoneOffset` integer
    - `year` integer
  - `note` string
  - `permittedOperations` string[]
  - `previousMessageId` string
  - `readCount` integer
  - `secureContent` string
  - `sourceId` string
  - `sourceInfo` SourceInfo
  - `sourceName` string
  - `sourceType` 'CREDENTIAL_PROVIDER' | 'PERSON' | 'SERVICE_PROVIDER' | 'SYSTEM'
  - `status` 'ACTIVE' | 'ASSOC_REQ_ACCEPTED' | 'ASSOC_REQ_DECLINED' | 'DELETED' | 'EXPIRED' | 'INVITE_ACCEPTED' | 'INVITE_DECLINED' | 'NOT_SENT' | 'PENDING'
  - `subject` string
  - `type` 'ASSOCIATION_REQUEST' | 'CREDENTIAL' | 'INVITATION' | 'NOTICE' | 'PERSON_NOTIFICATION'

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Unexpected error in processing the request.

---

[API](https://skmtc.dev/myverifly/apis/api-documentation.md) · [All operations](https://skmtc.dev/myverifly/apis/api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/myverifly/api-documentation/revisions/03f300608c33/schema)
