Skip to content
Navigation

Create a community channel

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

Creates a channel in the agency's community and answers it with its memberCount. The creator is always a member; initialMemberIds adds people by userId, and autoJoin on a public channel adds everyone active in the agency. private makes it invite-only; writePolicy creator-only lets only the creator and the writers added later with PUT /community/channels/{channelId} post. Publishes app.CommunityChannel.created. Only the agency's admins may call it. Errors: 400 ERROR_UNAUTHORIZED for a caller who is not an admin, or for an initialMemberIds entry 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

  • name
    string
    required
    maxLength: 80 · minLength: 1
  • autoJoin
    optional
    boolean
  • description
    optional
    string
    maxLength: 500
  • initialMemberIds
    optional
    array of
    string
  • private
    optional
    boolean
  • writePolicy
    optional
    all-members
    or
    creator-only

Returns

200

OK

JSON
  • channelId
    string
    required

    The channel's id.

  • companyName
    string
    required

    The agency the channel belongs to.

  • name
    string
    required

    The channel's name.

  • description
    required

    What the channel is for; null when it says nothing.

    Any of the following:

    • string
    • null
  • private
    boolean
    required

    Whether the channel is invite-only. A public channel is open to everyone in the agency.

  • writePolicy
    all-members
    or
    creator-only
    required

    Who may post: all-members, or creator-only for its creator and the writers granted posting.

  • createdBy
    string
    required

    The userId of the person who created the channel.

  • createdAt
    string
    required

    When the channel was created, as ISO 8601 text.

  • memberCount
    optional
    integer

    How many people are in the channel. Only getting and creating a channel answer it.

    maximum: 9007199254740991 · minimum: -9007199254740991

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