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

# Create form response (client portal)

> Create a new form response record. Public access - no authentication required.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /cp/form/{form}/response
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /cp/form/{form}/response:
    post:
      tags:
        - client-portal
      summary: Create form response (client portal)
      description: >-
        Create a new form response record. Public access - no authentication
        required.
      parameters:
        - description: Form ID
          name: form
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
        description: >-
          Form response data (team, responder required; client, user, task,
          launch optional). A form that is not public needs the task or launch
          its link carries, or a signed-in session of the team. A client needs
          the sig its shared request link carries, or a signed-in session with
          access to it.
        required: true
      responses:
        '200':
          description: Created form response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/pkg_routes_cp_form_response.NewFormResponseResponse
        '400':
          description: Bad request - invalid form ID, team ID, or request body
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          description: Form is not public and the link carries nothing that opens it
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '404':
          description: Form not found
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
components:
  schemas:
    pkg_routes_cp_form_response.NewFormResponseResponse:
      type: object
      properties:
        response:
          $ref: '#/components/schemas/types.FormResponse'
    types.FormResponse:
      type: object
      properties:
        _id:
          type: string
        client:
          description: If filled out by client
          type: string
        completed_at:
          type: integer
        contact:
          description: If filled out by contact
          type: string
        deleted_at:
          type: integer
        device_agent:
          type: string
        fields:
          type: string
        form:
          type: string
        ip:
          type: string
        opened_at:
          type: integer
        pdf:
          description: Keep track of responses
          type: string
        responder:
          description: If filled out by unauthenticated user
          allOf:
            - $ref: '#/components/schemas/types.FormResponder'
        responses:
          type: array
          items:
            $ref: '#/components/schemas/types.Response'
        sent_at:
          type: integer
        team:
          type: string
        user:
          type: string
    types.FormResponder:
      type: object
      properties:
        email:
          type: string
        name:
          type: string
    types.Response:
      type: object
      properties:
        key:
          type: string
        link:
          type: string
        on_type:
          type: string
        question:
          type: string
        timestamp:
          type: string
        title:
          type: string
        type:
          type: string
        value: {}

````

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