mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	api-docs: Revise create channel endpoint documentation.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							910ca975ab
						
					
				
				
					commit
					8ee59e9277
				
			@@ -23636,12 +23636,15 @@ paths:
 | 
				
			|||||||
      operationId: create-channel
 | 
					      operationId: create-channel
 | 
				
			||||||
      summary: Create a channel
 | 
					      summary: Create a channel
 | 
				
			||||||
      description: |
 | 
					      description: |
 | 
				
			||||||
        Create a new [channel](/help/create-channels) and optionally
 | 
					        Create a new [channel](/help/create-channels), and optionally subscribe
 | 
				
			||||||
        subscribe users to the newly created channel. The initial [channel settings](/api/update-stream)
 | 
					        users to the newly created channel.
 | 
				
			||||||
        will be determined by the optional parameters, like `invite_only`, detailed below.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        **Changes**: New in Zulip 11.0 (feature level 417). Previously, this was only possible via
 | 
					        The initial [channel settings](/api/update-stream) will be determined
 | 
				
			||||||
        the [`POST /api/subscribe`](/api/subscribe) endpoint, which handled both creation and subscription.
 | 
					        by the optional parameters, like `invite_only`, detailed below.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        **Changes**: New in Zulip 11.0 (feature level 417). Previously, this was
 | 
				
			||||||
 | 
					        only possible via the [`POST /api/subscribe`](/api/subscribe) endpoint,
 | 
				
			||||||
 | 
					        which handles both channel subscription and creation.
 | 
				
			||||||
      x-curl-examples-parameters:
 | 
					      x-curl-examples-parameters:
 | 
				
			||||||
        oneOf:
 | 
					        oneOf:
 | 
				
			||||||
          - type: include
 | 
					          - type: include
 | 
				
			||||||
@@ -23650,12 +23653,11 @@ paths:
 | 
				
			|||||||
                - name
 | 
					                - name
 | 
				
			||||||
                - subscribers
 | 
					                - subscribers
 | 
				
			||||||
      requestBody:
 | 
					      requestBody:
 | 
				
			||||||
 | 
					        required: true
 | 
				
			||||||
        content:
 | 
					        content:
 | 
				
			||||||
          application/x-www-form-urlencoded:
 | 
					          application/x-www-form-urlencoded:
 | 
				
			||||||
            schema:
 | 
					            schema:
 | 
				
			||||||
              type: object
 | 
					              type: object
 | 
				
			||||||
              description: |
 | 
					 | 
				
			||||||
                An object containing the top-level fields used to create a channel.
 | 
					 | 
				
			||||||
              properties:
 | 
					              properties:
 | 
				
			||||||
                name:
 | 
					                name:
 | 
				
			||||||
                  type: string
 | 
					                  type: string
 | 
				
			||||||
@@ -23692,11 +23694,11 @@ paths:
 | 
				
			|||||||
                  example: true
 | 
					                  example: true
 | 
				
			||||||
                invite_only:
 | 
					                invite_only:
 | 
				
			||||||
                  description: |
 | 
					                  description: |
 | 
				
			||||||
                    This parameter and the ones
 | 
					                    This parameter and the ones that follow are used to request an initial
 | 
				
			||||||
                    that follow are used to request an initial configuration of the new channel.
 | 
					                    configuration of the new channel.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    This parameter determines whether the newly created channel will be
 | 
					                    This parameter determines whether the newly created channel will be
 | 
				
			||||||
                    a private channel.
 | 
					                    a [private channel](/help/channel-permissions#private-channels).
 | 
				
			||||||
                  type: boolean
 | 
					                  type: boolean
 | 
				
			||||||
                  default: false
 | 
					                  default: false
 | 
				
			||||||
                  example: true
 | 
					                  example: true
 | 
				
			||||||
@@ -23796,15 +23798,12 @@ paths:
 | 
				
			|||||||
                contentType: application/json
 | 
					                contentType: application/json
 | 
				
			||||||
              topics_policy:
 | 
					              topics_policy:
 | 
				
			||||||
                contentType: application/json
 | 
					                contentType: application/json
 | 
				
			||||||
        required: true
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      responses:
 | 
					      responses:
 | 
				
			||||||
        "200":
 | 
					        "200":
 | 
				
			||||||
          description: Success.
 | 
					          description: Success.
 | 
				
			||||||
          content:
 | 
					          content:
 | 
				
			||||||
            application/json:
 | 
					            application/json:
 | 
				
			||||||
              schema:
 | 
					              schema:
 | 
				
			||||||
                description: "Success response for creating a channel."
 | 
					 | 
				
			||||||
                allOf:
 | 
					                allOf:
 | 
				
			||||||
                  - $ref: "#/components/schemas/JsonSuccessBase"
 | 
					                  - $ref: "#/components/schemas/JsonSuccessBase"
 | 
				
			||||||
                  - type: object
 | 
					                  - type: object
 | 
				
			||||||
@@ -23822,27 +23821,17 @@ paths:
 | 
				
			|||||||
          content:
 | 
					          content:
 | 
				
			||||||
            application/json:
 | 
					            application/json:
 | 
				
			||||||
              schema:
 | 
					              schema:
 | 
				
			||||||
                description: "Bad request as channel already exists."
 | 
					 | 
				
			||||||
                allOf:
 | 
					                allOf:
 | 
				
			||||||
                  - $ref: "#/components/schemas/CodedError"
 | 
					                  - $ref: "#/components/schemas/CodedError"
 | 
				
			||||||
                  - type: object
 | 
					                  - example:
 | 
				
			||||||
                    properties:
 | 
					                      {
 | 
				
			||||||
                      result:
 | 
					                        result: "error",
 | 
				
			||||||
                        type: string
 | 
					                        msg: "Channel 'discussions' already exists",
 | 
				
			||||||
                        example: "error"
 | 
					                        code: "CHANNEL_ALREADY_EXISTS",
 | 
				
			||||||
                      msg:
 | 
					                      }
 | 
				
			||||||
                        type: string
 | 
					                    description: |
 | 
				
			||||||
                        example: "Channel 'discussions' already exists"
 | 
					                      An example JSON error response for when a channel with the submitted
 | 
				
			||||||
                      code:
 | 
					                      name already exists.
 | 
				
			||||||
                        type: string
 | 
					 | 
				
			||||||
                        example: "CHANNEL_ALREADY_EXISTS"
 | 
					 | 
				
			||||||
                example:
 | 
					 | 
				
			||||||
                  {
 | 
					 | 
				
			||||||
                    result: "error",
 | 
					 | 
				
			||||||
                    msg: "Channel 'discussions' already exists",
 | 
					 | 
				
			||||||
                    code: "CHANNEL_ALREADY_EXISTS",
 | 
					 | 
				
			||||||
                  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  /user_groups/create:
 | 
					  /user_groups/create:
 | 
				
			||||||
    post:
 | 
					    post:
 | 
				
			||||||
      operationId: create-user-group
 | 
					      operationId: create-user-group
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user