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

# Create Response

> Create a user response using the management API. This will trigger the response pipeline, including webhooks, integrations, follow-up emails, and other configured actions.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/management/responses
openapi: 3.0.0
info:
  description: >-
    Formbricks offers two types of APIs: the **Public Client API** and the
    **Management API**. Each API serves a different purpose, has different
    authentication requirements, and provides access to different data and
    settings.


    Checkout the [API Key
    Setup](https://formbricks.com/docs/api/management/api-key-setup) - to access
    the Management APIs wit an API Key.


    > If you have forked the collection & running it, we recommend you to
    atleast update `apiKey` & `environmentId` the Collection variables as per
    your values! We also have a lot of post-run scripts written to help you
    navigate through auto-assigning variables when running scripts. 
      

    Need more help, visit our: [Website](https://formbricks.com) or join our
    [Discord](https://formbricks.com/discord)!
  title: API Documentation
  version: 1.0.0
servers:
  - url: https://{baseurl}
    variables:
      baseurl:
        default: app.formbricks.com
security: []
tags:
  - description: >-
      The Public Client API is designed for the JavaScript SDK and does not
      require authentication. It's primarily used for creating persons,
      sessions, and responses within the Formbricks platform. This API is ideal
      for client-side interactions, as it doesn't expose sensitive information.

      - Displays API - Mark Survey as Displayed or Responded for a Person

      - Responses API - Create & update responses for a survey

      - Environment API - Get the environment state to be used in Formbricks
      SDKs

      - Contacts API - Identify & update contacts (e.g. attributes)

      - User API - Identify & track users based on their attributes, device
      type, etc.
    name: Client API
  - description: >-
      Displays are metrics used to measure the number of times a survey was
      viewed both by unidentified or identified users.
    name: Client API - Display
  - description: >-
      Responses are captured whenever a user fills in your survey either
      partially or completely.
    name: Client API - Response
  - description: Get the environment state to be used in Formbricks SDKs
    name: Client API - Environment
  - description: >-
      Contacts are the identified users on Formbricks app that get initated when
      you pass a userId and have user activation enabled. This now allows you to
      track & show them targeted surveys based on their attributes, device type,
      etc.
    name: Client API - Contacts
  - description: >-
      Users are the identified users on Formbricks app that get initated when
      you pass a userId and have user activation enabled. This now allows you to
      track & show them targeted surveys based on their attributes, device type,
      etc. Currently, this api is only being used in the react-native sdk.
    name: Client API - User
  - description: >-
      The Management API provides access to all data and settings that are
      visible in the Formbricks App. This API requires a personal API Key for
      authentication, which can be generated in the Settings section of the
      Formbricks App. With the Management API, you can manage your Formbricks
      account programmatically, accessing and modifying data and settings as
      needed.


      > **For Auth:** we use the `x-api-key` header 
        

      API requests made to the Management API are authorized using a personal
      API key. This key grants the same rights and access as if you were logged
      in at app.formbricks.com. It's essential to keep your API key secure and
      not share it with others.


      To generate, store, or delete an API key, follow the instructions provided
      on the following page [API
      Key](https://formbricks.com/docs/api/management/api-key-setup).
    name: Management API
  - description: >-
      Action Classes allow you to set behaviour methods such as when a user
      clicks on a buy now button, or when a user leaves the page, etc. These
      allow you to trigger specific surveys to these users.


      Methods: Get All, Get, Create, Update, and Delete Action Classes
    name: Management API - Action Class
  - description: >-
      Attribute Classes help you categorize attributes so that you can target
      users based on specific values of their attributes. They are associated
      with a Person. Read more
      [here](https://formbricks.com/docs/in-app-surveys/attributes)
    name: Management API - Attribute Class
  - description: >-
      The Contacts API allows you to retrieve information about contacts in your
      environment. Contacts represent users who have interacted with your
      surveys or forms.
    name: Management API - Contacts
  - description: >-
      The Contact Attributes API allows you to retrieve information about
      attributes associated with contacts in your environment. These attributes
      can include custom properties and values assigned to your contacts.
    name: Management API - Contact Attributes
  - description: >-
      The Contact Attribute Keys API allows you to retrieve information about
      the defined attribute keys in your environment. These keys define the
      structure and properties that can be assigned to contacts, such as email,
      name, or custom attributes.
    name: Management API - Contact Attribute Keys
  - description: Retrieve Account Information
    name: Management API - Me
  - description: >-
      Enable User Identification in Formbricks to granularly target users to
      show surveys to without spraying across them. This API will help you
      utilise Formbricks User Identification to its maximum.


      Methods: Get All, Get, and Delete Persons
    name: Management API - People
  - description: >-
      Responses are what your users fill in as answers to a survey. Use this
      cautiosly and make sure you handle this data carefully.


      Methods allowed: Get All, Get by Survey, Get, Update, and Delete Responses
    name: Management API - Response
  - description: >-
      Surveys are the core of user data & feedback collection. We have various
      types of surveys to cater to you:


      - In-App Surveys
          
      - Website Surveys
          
      - Link Surveys
          

      Create surveys & then trigger them as per your actions & attribute
      filterings that you have set to make the most of them.


      Methods allowed: Get All, Get, Create, Update, and Delete Surveys
    name: Management API - Survey
  - description: >-
      Formbricks' Webhook API offers a powerful interface for interacting with
      webhooks. Webhooks allow you to receive real-time HTTP notifications of
      changes to specific objects in the Formbricks environment.


      The behavior of the webhooks is determined by their trigger settings. The
      trigger determines which updates the webhook sends. Current available
      triggers include:


      - "responseCreated"
          
      - "responseUpdated", and
          
      - "responseFinished".
          

      These APIs are designed to facilitate seamless integration of Formbricks
      with third-party systems. By making use of our webhook API, you can
      automate the process of sending data to these systems whenever significant
      events occur within your Formbricks environment.

        

      Methods allowed: Get All, Get ,Create, and Delete Webhooks
    name: Management API - Webhook
paths:
  /api/v1/management/responses:
    post:
      tags:
        - Management API - Response
      summary: Create Response
      description: >-
        Create a user response using the management API. This will trigger the
        response pipeline, including webhooks, integrations, follow-up emails,
        and other configured actions.
      parameters:
        - example: '{{apiKey}}'
          in: header
          name: x-api-key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            examples:
              default:
                value:
                  createdAt: '2024-09-05T08:44:16.051Z'
                  data:
                    hg508afs7lgx8nlni5dtit5u:
                      - Hello World
                  finished: false
                  language: en
                  surveyId: clwj7hi7r0000vfhpfze6vjdg
                  updatedAt: '2024-09-05T08:44:16.051Z'
            schema:
              properties:
                createdAt:
                  description: Creation timestamp (optional; usually set by server)
                  format: date-time
                  type: string
                data:
                  additionalProperties: true
                  description: >-
                    Answers keyed by questionId; value shape depends on question
                    type
                  type: object
                finished:
                  description: Whether the response is marked as finished
                  type: boolean
                language:
                  description: >-
                    Language of the response (survey should have this language
                    enabled)
                  enum:
                    - en
                    - de
                    - pt
                    - etc..
                  type: string
                surveyId:
                  description: The ID of the survey this response belongs to
                  type: string
                updatedAt:
                  description: Update timestamp (optional; usually set by server)
                  format: date-time
                  type: string
              required:
                - surveyId
              type: object
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  createdAt: '2024-04-23T12:15:01.680Z'
                  data:
                    hs8yd14l9h8u353tjmv6rzaw: clicked
                    hs8yd14l9h8u353tjmv6rzawqqq: clicked
                    tcgls0063n8ri7dtrbnepcmz: Who? Who? Who?
                  finished: true
                  id: clvccml2p0009xz1zrlk1wbqb
                  language: en
                  meta:
                    action: test action
                    source: Postman API
                    url: https://postman.com
                    userAgent: {}
                  person:
                    attributes:
                      Created From: API
                      created_from: API
                    createdAt: '2024-04-23T07:39:22.696Z'
                    environmentId: clurwouax000azffxt7n5unn3
                    id: clvc2s3ig000k494jltkqkm2u
                    updatedAt: '2024-04-23T07:39:22.696Z'
                    userId: THIS-IS-A-VVERY-LONG-USER-ID-FOR-TESTING
                  personAttributes:
                    Created From: API
                    created_from: API
                  singleUseId: null
                  surveyId: clus3omb00009oo10s53e2pa5
                  tags: []
                  ttc:
                    _total: 310
                    hs8yd14l9h8u353tjmv6rzawqqq: 120
                    tcgls0063n8ri7dtrbnepcmz: 190
                  updatedAt: '2024-04-23T12:16:39.774Z'
              schema:
                type: object
          description: OK
          headers:
            Connection:
              schema:
                example: keep-alive
                type: string
            Date:
              schema:
                example: Tue, 23 Apr 2024 12:16:39 GMT
                type: string
            Keep-Alive:
              schema:
                example: timeout=5
                type: string
            Transfer-Encoding:
              schema:
                example: chunked
                type: string
            cache-control:
              schema:
                example: private, no-store
                type: string
            content-type:
              schema:
                example: application/json
                type: string
            vary:
              schema:
                example: RSC, Next-Router-State-Tree, Next-Router-Prefetch
                type: string
        '401':
          content:
            application/json:
              example:
                code: unauthorized
                details: {}
                message: You are not authorized to access this resource
              schema:
                type: object
          description: Unauthorized
          headers:
            Connection:
              schema:
                example: keep-alive
                type: string
            Date:
              schema:
                example: Tue, 23 Apr 2024 12:10:34 GMT
                type: string
            Keep-Alive:
              schema:
                example: timeout=5
                type: string
            Transfer-Encoding:
              schema:
                example: chunked
                type: string
            content-type:
              schema:
                example: application/json
                type: string
            vary:
              schema:
                example: RSC, Next-Router-State-Tree, Next-Router-Prefetch
                type: string

````