> ## 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.

# Delete a thank-you page

> Delete a thank-you page. The primary page cannot be deleted. Make another page primary first.

> [!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/thank-you-pages.yaml DELETE /forms/{form_id}/thank_you_pages/{id}
openapi: 3.0.3
info:
  title: NeetoForm Thank-You Pages 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}/thank_you_pages/{id}:
    delete:
      tags:
        - Thank-You Pages
      summary: Delete a thank-you page
      description: >-
        Delete a thank-you page. The primary page cannot be deleted. Make
        another page primary first.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/form_id_param'
        - $ref: '#/components/parameters/thank_you_page_id_param'
      responses:
        '200':
          description: OK - Thank-you page deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/deleted_response'
        '404':
          $ref: '#/components/responses/response_record_not_found'
        '422':
          description: Unprocessable Entity - The page is the primary page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
              example:
                error: Primary thank you page can't be deleted.
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
    thank_you_page_id_param:
      in: path
      name: id
      description: >-
        Unique ID of the thank-you page. You can get it from the [List thank-you
        pages](/api/thank-you-pages/list) API.
      required: true
      schema:
        type: string
        example: 0b3c5a52-7a0e-4f2b-9d57-3d6a1a2f9c11
  schemas:
    deleted_response:
      type: object
      properties:
        id:
          type: string
        deleted:
          type: boolean
          example: true
    error_response:
      type: object
      properties:
        error:
          type: string
  responses:
    response_record_not_found:
      description: Not Found - The form or the record does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error_response'
          example:
            error: Couldn't find the record you were looking for.

````

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