Skip to content
Navigation

Open a community direct message

POST
https://api.nicer.travel/community/dm

Answers the direct-message conversation between the caller and the people in userIds, creating it when it does not exist yet: the same people always get the same conversation, so calling again never makes a second one. Every participant must be an active member of the agency the request acts for. Any member of the agency may call it. Errors: 400 ERROR_BODY_VALIDATION for a conversation with nobody but the caller; 400 ERROR_UNAUTHORIZED for a participant who is not an active member of the agency; 400 ERROR_COMPANY_REQUIRED and 403 ERROR_DO_NOT_HAVE_PERMISSION as on every community route.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Request body JSON required

  • userIds
    array of
    string
    required
    minLength: 1

Returns

200

OK

JSON
  • dmId
    string
    required

    The conversation's id, the same whenever the same people talk.

  • companyName
    string
    required

    The agency the conversation belongs to.

  • participants
    array of
    string
    required

    The userIds of everyone in the conversation, the caller among them.

  • createdAt
    string
    required

    When the conversation was created, as ISO 8601 text.

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close