> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.neetoform.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update form availability

> Open or close the form, or set a deadline, a submission limit and a closed message. Only the fields you send are changed.

> [!NOTE]
>
> Replace `{your-subdomain}` with your workspace’s subdomain. \
> Learn how to find your subdomain in [Workspace subdomain](https://apidocs.neetoform.com/api/workspace-subdomain.md).


## OpenAPI

````yaml bundled/form-settings.yaml PATCH /forms/{form_id}/availability
openapi: 3.0.3
info:
  title: NeetoForm Form Settings APIs
  version: 2.0.0
servers:
  - description: NeetoForm APIs
    url: https://{your-subdomain}.neetoform.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/api/workspace-subdomain).
security: []
paths:
  /forms/{form_id}/availability:
    patch:
      tags:
        - Availability
      summary: Update form availability
      description: >-
        Open or close the form, or set a deadline, a submission limit and a
        closed message. Only the fields you send are changed.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/form_id_param'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - availability
              properties:
                availability:
                  type: object
                  properties:
                    manage_access_method:
                      type: string
                      enum:
                        - enable
                        - disable
                        - based_on_submission_count
                        - based_on_time
                        - based_on_limit_and_time
                      description: >-
                        `enable` opens the form. `disable` closes it. The other
                        values close it by submission count, by time, or by
                        both.
                      example: based_on_limit_and_time
                    submission_deadline:
                      type: string
                      format: date-time
                      description: >-
                        Date and time after which the form stops accepting
                        submissions.
                      example: '2030-01-01T00:00:00.000Z'
                    submission_limit:
                      type: integer
                      minimum: 1
                      maximum: 1000000
                      description: Number of submissions after which the form closes.
                      example: 50
                    custom_closed_message:
                      type: string
                      description: Message shown when the form is closed.
                      example: This form is closed.
      responses:
        '200':
          description: OK - Availability updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/availability_response'
        '400':
          $ref: '#/components/responses/response_missing_body'
        '404':
          $ref: '#/components/responses/response_form_not_found'
        '422':
          description: Unprocessable Entity - A value is not valid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
              example:
                error: Submission limit must be less than or equal to 1000000
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/api/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
    form_id_param:
      in: path
      name: form_id
      description: >-
        Unique ID of the form. Refer to [Getting the Form
        ID](/api/getting-form-id) for detailed instructions.
      required: true
      schema:
        type: string
  schemas:
    availability_response:
      type: object
      properties:
        availability:
          $ref: '#/components/schemas/availability'
    error_response:
      type: object
      properties:
        error:
          type: string
    availability:
      type: object
      properties:
        manage_access_method:
          type: string
          enum:
            - enable
            - disable
            - based_on_submission_count
            - based_on_time
            - based_on_limit_and_time
          example: based_on_limit_and_time
        submission_deadline:
          type: string
          format: date-time
          nullable: true
          example: '2030-01-01T00:00:00.000Z'
        submission_limit:
          type: integer
          nullable: true
          example: 50
        custom_closed_message:
          type: string
          nullable: true
          example: This form is closed.
        is_enabled:
          type: boolean
          description: Whether the form is open for submissions now.
          example: true
  responses:
    response_missing_body:
      description: Bad Request - The request body is missing its root key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error_response'
    response_form_not_found:
      description: Not Found - The form does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error_response'
          example:
            error: Form does not exist.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.