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

# Add a thank-you page

> Add a thank-you page to a form. Use `kind` `custom_message` to show a message, or `redirect_to_url` to send the person to another URL. If you leave out `title`, one is generated.

> [!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 POST /forms/{form_id}/thank_you_pages
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:
    post:
      tags:
        - Thank-You Pages
      summary: Add a thank-you page
      description: >-
        Add a thank-you page to a form. Use `kind` `custom_message` to show a
        message, or `redirect_to_url` to send the person to another URL. If you
        leave out `title`, one is generated.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/form_id_param'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - thank_you_page
              properties:
                thank_you_page:
                  type: object
                  properties:
                    title:
                      $ref: '#/components/schemas/title'
                    description:
                      $ref: '#/components/schemas/description'
                    kind:
                      $ref: '#/components/schemas/kind'
                    message:
                      $ref: '#/components/schemas/message'
                    redirect_url:
                      $ref: '#/components/schemas/redirect_url'
                    show_redirect_message:
                      $ref: '#/components/schemas/show_redirect_message'
                    redirect_message:
                      $ref: '#/components/schemas/redirect_message'
                    pass_event_details_to_redirect_url:
                      $ref: '#/components/schemas/pass_event_details_to_redirect_url'
                    social_sharing_enabled:
                      $ref: '#/components/schemas/social_sharing_enabled'
                    show_resubmit_link:
                      $ref: '#/components/schemas/show_resubmit_link'
                    resubmit_link_text:
                      $ref: '#/components/schemas/resubmit_link_text'
                    primary:
                      $ref: '#/components/schemas/primary'
      responses:
        '201':
          description: Created - Thank-you page added
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/thank_you_page_response'
        '400':
          $ref: '#/components/responses/response_missing_body'
        '404':
          $ref: '#/components/responses/response_form_not_found'
        '422':
          description: >-
            Unprocessable Entity - The page is not valid, for example a redirect
            page without a URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_response'
              example:
                error: Redirect url can't be blank
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:
    title:
      type: string
      description: Title of the page. A title is generated when you leave it out on create.
      example: Pricing
    description:
      type: string
      description: Short description of the page.
    kind:
      type: string
      enum:
        - custom_message
        - redirect_to_url
      description: >-
        `custom_message` shows a message. `redirect_to_url` sends the person to
        another URL.
      example: redirect_to_url
    message:
      type: string
      description: >-
        Message shown after submission, as HTML. Required for `custom_message`
        pages.
      example: <p>Thanks for your response.</p>
    redirect_url:
      type: string
      format: uri
      description: >-
        The http or https URL to send the person to. Required for
        `redirect_to_url` pages.
      example: https://example.com/pricing
    show_redirect_message:
      type: boolean
      description: Show a message before the redirect.
    redirect_message:
      type: string
      description: >-
        Message shown before the redirect, as HTML. Required when
        `show_redirect_message` is true on a `redirect_to_url` page.
      example: <h2>Thank you.</h2>
    pass_event_details_to_redirect_url:
      type: boolean
      description: Add the submission details to the redirect URL.
    social_sharing_enabled:
      type: boolean
      description: Show social sharing buttons.
    show_resubmit_link:
      type: boolean
      description: Show a link that lets the person submit the form again.
    resubmit_link_text:
      type: string
      description: Text of the resubmit link. Required when `show_resubmit_link` is true.
      example: Click here to submit another response
    primary:
      type: boolean
      description: >-
        Make this the primary page. The page that was primary before is set to
        not primary.
    thank_you_page_response:
      type: object
      properties:
        thank_you_page:
          $ref: '#/components/schemas/thank_you_page'
    error_response:
      type: object
      properties:
        error:
          type: string
    thank_you_page:
      type: object
      properties:
        id:
          type: string
          example: 0b3c5a52-7a0e-4f2b-9d57-3d6a1a2f9c11
        title:
          type: string
          example: Pricing
        description:
          type: string
          example: ''
        kind:
          type: string
          enum:
            - custom_message
            - redirect_to_url
          example: redirect_to_url
        primary:
          type: boolean
          example: false
        message:
          type: string
          example: ''
        redirect_url:
          type: string
          nullable: true
          example: https://example.com/pricing
        show_redirect_message:
          type: boolean
          example: false
        redirect_message:
          type: string
          nullable: true
          example: <h2>Thank you.</h2>
        pass_event_details_to_redirect_url:
          type: boolean
          example: false
        social_sharing_enabled:
          type: boolean
          example: false
        show_resubmit_link:
          type: boolean
          example: false
        resubmit_link_text:
          type: string
          nullable: true
          example: Click here to submit another response
        created_at:
          $ref: '#/components/schemas/date_time_field'
    date_time_field:
      type: string
      format: date-time
  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.