openapi: 3.1.0 info: title: Formbricks API description: Manage Formbricks resources programmatically. version: 2.0.0 servers: - url: https://app.formbricks.com/api/v2/management description: Formbricks Cloud tags: - name: Management API > Responses description: Operations for managing responses. - name: Management API > Contacts description: Operations for managing contacts. - name: Management API > Contact Attributes description: Operations for managing contact attributes. - name: Management API > Contact Attributes Keys description: Operations for managing contact attributes keys. - name: Management API > Surveys description: Operations for managing surveys. - name: Management API > Webhooks description: Operations for managing webhooks. - name: Management API > Roles description: Operations for managing roles. security: - apiKeyAuth: [] paths: /responses/{responseId}: put: description: Update an existing response for example when you want to mark a response as finished or you want to change an existing response's value. parameters: - in: path name: responseId required: true schema: type: string requestBody: content: application/json: schema: example: data: tcgls0063n8ri7dtrbnepcmz: Who? Who? Who? finished: true type: object responses: "200": content: application/json: example: data: {} schema: type: object description: OK "404": content: application/json: example: code: not_found details: resource_type: Response message: Response not found schema: type: object description: Not Found summary: Update Response tags: - Client API > Response servers: - url: https://app.formbricks.com/api/v2/client description: Formbricks Client /{environmentId}/responses: post: description: Create a response for a survey and its fields with the user's responses. The userId & meta here is optional requestBody: content: application/json: schema: example: surveyId: survey123 responses: {} type: object responses: "201": content: application/json: example: responseId: response123 schema: type: object description: Created summary: Create Response tags: - Client API > Response servers: - url: https://app.formbricks.com/api/v2/client description: Formbricks Client /{environmentId}/contacts/{userId}/attributes: put: description: Update a contact's attributes in Formbricks to keep them in sync with your app or when you want to set a custom attribute in Formbricks. parameters: - in: path name: environmentId required: true schema: type: string - in: path name: userId required: true schema: type: string requestBody: content: application/json: schema: example: attributes: {} type: object responses: "200": content: application/json: examples: example-0: {} example-1: {} schema: type: object description: OK "500": content: application/json: example: code: internal_server_error details: {} message: "Unable to complete request: Expected" schema: type: object description: Internal Server Error summary: Update Contact (Attributes) tags: - Client API > Contacts servers: - url: https://app.formbricks.com/api/v2/client description: Formbricks Client /{environmentId}/identify/contacts/{userId}: get: description: Retrieves a contact's state including their segments, displays, responses and other tracking information. If the contact doesn't exist, it will be created. parameters: - in: path name: environmentId required: true schema: type: string - in: path name: userId required: true schema: type: string responses: "200": content: application/json: example: userId: user123 state: active schema: type: object description: OK summary: Get Contact State tags: - Client API > Contacts servers: - url: https://app.formbricks.com/api/v2/client description: Formbricks Client /{environmentId}/displays: post: description: Create a new display for a valid survey ID. If a userId is passed, the display is linked to the user. requestBody: content: application/json: schema: example: surveyId: survey123 userId: user123 type: object responses: "201": content: application/json: example: displayId: display123 schema: type: object description: Created summary: Create Display tags: - Client API > Display servers: - url: https://app.formbricks.com/api/v2/client description: Formbricks Client /{environmentId}/displays/{displayId}: put: description: Update a Display for a user. A use case can be when a user submits a response & you want to link it to an existing display. parameters: - in: path name: displayId required: true schema: type: string requestBody: content: application/json: schema: example: responseId: response123 type: object responses: "200": content: application/json: example: displayId: display123 schema: type: object description: OK summary: Update Display tags: - Client API > Display servers: - url: https://app.formbricks.com/api/v2/client description: Formbricks Client /{environmentId}/environment: get: description: Retrieves the environment state to be used in Formbricks SDKs responses: "200": content: application/json: example: environmentId: env123 state: active schema: type: object description: OK summary: Get Environment State tags: - Client API > Environment servers: - url: https://app.formbricks.com/api/v2/client description: Formbricks Client /{environmentId}/user: post: description: Endpoint for creating or identifying a user within the specified environment. If the user already exists, this will identify them and potentially update user attributes. If they don't exist, it will create a new user. requestBody: content: application/json: schema: example: userId: user123 attributes: {} type: object responses: "200": content: application/json: example: userId: user123 state: identified schema: type: object description: OK summary: Create or Identify User tags: - Client API > User servers: - url: https://app.formbricks.com/api/v2/client description: Formbricks Client /{environmentId}/storage: post: summary: Upload Private File description: API endpoint for uploading private files. Uploaded files are kept private so that only users with access to the specified environment can retrieve them. The endpoint validates the survey ID, file name, and file type from the request body, and returns a signed URL for S3 uploads along with a local upload URL. tags: - Client API > File Upload parameters: - in: path name: environmentId required: true schema: type: string description: The ID of the environment. requestBody: required: true content: application/json: schema: type: object properties: surveyId: type: string description: The ID of the survey associated with the file. fileName: type: string description: The name of the file to be uploaded. fileType: type: string description: The MIME type of the file. required: - surveyId - fileName - fileType example: surveyId: cm7pr0x2y004o192zmit8cjvb fileName: example.jpg fileType: image/jpeg responses: "200": description: OK - Returns the signed URL, signing data, updated file name, and file URL. content: application/json: schema: type: object properties: data: type: object properties: signedUrl: type: string description: Signed URL for uploading the file to local storage. signingData: type: object properties: signature: type: string description: Signature for verifying the upload. timestamp: type: number description: Timestamp used in the signature. uuid: type: string description: Unique identifier for the signed upload. updatedFileName: type: string description: The updated file name after processing. fileUrl: type: string description: URL where the uploaded file can be accessed. example: data: signedUrl: http://localhost:3000/api/v1/client/cm1ubebtj000614kqe4hs3c67/storage/local signingData: signature: 3e51c6f441e646a0c9a47fdcdd25eee9bfac26d5506461d811b9c55cbdd90914 timestamp: 1741693207760 uuid: f48bcb1aad904f574069a253388024af updatedFileName: halle--fid--b153ba3e-6602-4bb3-bed9-211b5b1ae463.jpg fileUrl: http://localhost:3000/storage/cm1ubebtj000614kqe4hs3c67/private/halle--fid--b153ba3e-6602-4bb3-bed9-211b5b1ae463.jpg "400": description: Bad Request - One or more required fields are missing. content: application/json: schema: type: object properties: error: type: string description: Detailed error message. example: error: fileName is required "404": description: Not Found - The specified survey or organization does not exist. content: application/json: schema: type: object properties: error: type: string description: Detailed error message. example: error: Survey survey123 not found servers: - url: https://app.formbricks.com/api/v2/client description: Formbricks API Server /{environmentId}/storage/local: post: summary: Upload Private File to Local Storage description: API endpoint for uploading private files to local storage. The request must include a valid signature, UUID, and timestamp to verify the upload. The file is provided as a Base64 encoded string in the request body. The "Content-Type" header must be set to a valid MIME type, and the file data must be a valid file object (buffer). tags: - Client API > File Upload parameters: - in: path name: environmentId required: true schema: type: string description: The ID of the environment. requestBody: required: true content: application/json: schema: type: object properties: surveyId: type: string description: The ID of the survey associated with the file. fileName: type: string description: The URI encoded file name. fileType: type: string description: The MIME type of the file. signature: type: string description: Signed signature for verifying the file upload. uuid: type: string description: Unique identifier used in the signature validation. timestamp: type: string description: Timestamp used in the signature validation. fileBase64String: type: string description: Base64 encoded string of the file. It should include data type information, e.g. "data:;base64,". required: - surveyId - fileName - fileType - signature - uuid - timestamp - fileBase64String example: surveyId: survey123 fileName: example.jpg fileType: image/jpeg signature: signedSignatureValue uuid: uniqueUuidValue timestamp: "1627891234567" fileBase64String: data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/... responses: "200": description: OK - File uploaded successfully. content: application/json: schema: type: object properties: message: type: string description: Success message. example: message: File uploaded successfully "400": description: Bad Request - One or more required fields are missing or the file is too large. content: application/json: schema: type: object properties: error: type: string description: Detailed error message. example: error: fileName is required "401": description: Unauthorized - Signature validation failed or required signature fields are missing. content: application/json: schema: type: object properties: error: type: string description: Detailed error message. example: error: Unauthorized "404": description: Not Found - The specified survey or organization does not exist. content: application/json: schema: type: object properties: error: type: string description: Detailed error message. example: error: Survey survey123 not found "500": description: Internal Server Error - File upload failed. content: application/json: schema: type: object properties: error: type: string description: Detailed error message. example: error: File upload failed servers: - url: https://app.formbricks.com/api/v2 description: Formbricks API Server /responses: get: operationId: getResponses summary: Get responses description: Gets responses from the database. tags: - Management API > Responses parameters: - in: query name: limit schema: type: number minimum: 1 maximum: 100 default: 10 - in: query name: skip schema: type: number minimum: 0 default: 0 - in: query name: sortBy schema: type: string enum: &a6 - createdAt - updatedAt default: createdAt - in: query name: order schema: type: string enum: &a7 - asc - desc default: desc - in: query name: startDate schema: type: string required: true - in: query name: endDate schema: type: string required: true - in: query name: surveyId schema: type: string required: true - in: query name: contactId schema: type: string required: true responses: "200": description: Responses retrieved successfully. content: application/json: schema: type: array items: type: object properties: data: type: array items: type: object properties: id: type: string description: The ID of the response createdAt: type: string description: The date and time the response was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the response was last updated example: 2021-01-01T00:00:00.000Z finished: type: boolean description: Whether the response is finished example: true surveyId: type: string description: The ID of the survey contactId: type: - string - "null" description: The ID of the contact endingId: type: - string - "null" description: The ID of the ending data: type: object additionalProperties: anyOf: - type: string - type: number - type: array items: type: string - type: object additionalProperties: type: string description: The data of the response example: &a1 question1: answer1 question2: 2 question3: - answer3 - answer4 question4: subquestion1: answer5 variables: type: object additionalProperties: anyOf: - type: string - type: number description: The variables of the response example: &a2 variable1: answer1 variable2: 2 ttc: type: object additionalProperties: type: number description: The TTC of the response example: &a3 question1: 10 question2: 20 meta: type: object properties: source: type: string description: The source of the response example: https://example.com url: type: string description: The URL of the response example: https://example.com userAgent: type: object properties: browser: type: string os: type: string device: type: string country: type: string action: type: string description: The meta data of the response example: &a4 source: https://example.com url: https://example.com userAgent: browser: Chrome os: Windows device: Desktop country: US action: click contactAttributes: type: - object - "null" additionalProperties: type: string description: The attributes of the contact example: &a5 attribute1: value1 attribute2: value2 singleUseId: type: - string - "null" description: The single use ID of the response language: type: - string - "null" description: The language of the response example: en displayId: type: - string - "null" description: The display ID of the response meta: type: object properties: total: type: number limit: type: number offset: type: number post: operationId: createResponse summary: Create a response description: Creates a response in the database. tags: - Management API > Responses requestBody: required: true description: The response to create content: application/json: schema: type: object properties: createdAt: type: string description: The date and time the response was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the response was last updated example: 2021-01-01T00:00:00.000Z surveyId: type: string description: The ID of the survey displayId: type: - string - "null" description: The display ID of the response singleUseId: type: - string - "null" description: The single use ID of the response finished: type: boolean description: Whether the response is finished example: true endingId: type: - string - "null" description: The ID of the ending language: type: - string - "null" description: The language of the response example: en data: type: object additionalProperties: anyOf: - type: string - type: number - type: array items: type: string - type: object additionalProperties: type: string description: The data of the response example: *a1 variables: type: object additionalProperties: anyOf: - type: string - type: number description: The variables of the response example: *a2 ttc: type: object additionalProperties: type: number description: The TTC of the response example: *a3 meta: type: object properties: source: type: string description: The source of the response example: https://example.com url: type: string description: The URL of the response example: https://example.com userAgent: type: object properties: browser: type: string os: type: string device: type: string country: type: string action: type: string description: The meta data of the response example: *a4 required: - surveyId - finished - data responses: "201": description: Response created successfully. content: application/json: schema: type: object properties: id: type: string description: The ID of the response createdAt: type: string description: The date and time the response was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the response was last updated example: 2021-01-01T00:00:00.000Z finished: type: boolean description: Whether the response is finished example: true surveyId: type: string description: The ID of the survey contactId: type: - string - "null" description: The ID of the contact endingId: type: - string - "null" description: The ID of the ending data: type: object additionalProperties: anyOf: - type: string - type: number - type: array items: type: string - type: object additionalProperties: type: string description: The data of the response example: *a1 variables: type: object additionalProperties: anyOf: - type: string - type: number description: The variables of the response example: *a2 ttc: type: object additionalProperties: type: number description: The TTC of the response example: *a3 meta: type: object properties: source: type: string description: The source of the response example: https://example.com url: type: string description: The URL of the response example: https://example.com userAgent: type: object properties: browser: type: string os: type: string device: type: string country: type: string action: type: string description: The meta data of the response example: *a4 contactAttributes: type: - object - "null" additionalProperties: type: string description: The attributes of the contact example: *a5 singleUseId: type: - string - "null" description: The single use ID of the response language: type: - string - "null" description: The language of the response example: en displayId: type: - string - "null" description: The display ID of the response /responses/{id}: get: operationId: getResponse summary: Get a response description: Gets a response from the database. tags: - Management API > Responses parameters: - in: path name: id description: The ID of the response schema: $ref: "#/components/schemas/responseId" required: true responses: "200": description: Response retrieved successfully. content: application/json: schema: type: object properties: id: type: string description: The ID of the response createdAt: type: string description: The date and time the response was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the response was last updated example: 2021-01-01T00:00:00.000Z finished: type: boolean description: Whether the response is finished example: true surveyId: type: string description: The ID of the survey contactId: type: - string - "null" description: The ID of the contact endingId: type: - string - "null" description: The ID of the ending data: type: object additionalProperties: anyOf: - type: string - type: number - type: array items: type: string - type: object additionalProperties: type: string description: The data of the response example: *a1 variables: type: object additionalProperties: anyOf: - type: string - type: number description: The variables of the response example: *a2 ttc: type: object additionalProperties: type: number description: The TTC of the response example: *a3 meta: type: object properties: source: type: string description: The source of the response example: https://example.com url: type: string description: The URL of the response example: https://example.com userAgent: type: object properties: browser: type: string os: type: string device: type: string country: type: string action: type: string description: The meta data of the response example: *a4 contactAttributes: type: - object - "null" additionalProperties: type: string description: The attributes of the contact example: *a5 singleUseId: type: - string - "null" description: The single use ID of the response language: type: - string - "null" description: The language of the response example: en displayId: type: - string - "null" description: The display ID of the response put: operationId: updateResponse summary: Update a response description: Updates a response in the database. tags: - Management API > Responses parameters: - in: path name: id description: The ID of the response schema: $ref: "#/components/schemas/responseId" required: true requestBody: required: true description: The response to update content: application/json: schema: type: object properties: createdAt: type: string updatedAt: type: string environmentId: type: string surveyId: type: string userId: type: - string - "null" displayId: type: - string - "null" singleUseId: type: - string - "null" finished: type: boolean endingId: type: - string - "null" language: type: string data: type: object additionalProperties: anyOf: - type: string - type: number - type: array items: type: string - type: object additionalProperties: type: string variables: type: object additionalProperties: anyOf: - type: string - type: number ttc: type: object additionalProperties: type: number meta: type: object properties: source: type: string url: type: string userAgent: type: object properties: browser: type: string device: type: string os: type: string country: type: string action: type: string required: - environmentId - surveyId - finished - data responses: "200": description: Response updated successfully. content: application/json: schema: type: object properties: id: type: string description: The ID of the response createdAt: type: string description: The date and time the response was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the response was last updated example: 2021-01-01T00:00:00.000Z finished: type: boolean description: Whether the response is finished example: true surveyId: type: string description: The ID of the survey contactId: type: - string - "null" description: The ID of the contact endingId: type: - string - "null" description: The ID of the ending data: type: object additionalProperties: anyOf: - type: string - type: number - type: array items: type: string - type: object additionalProperties: type: string description: The data of the response example: *a1 variables: type: object additionalProperties: anyOf: - type: string - type: number description: The variables of the response example: *a2 ttc: type: object additionalProperties: type: number description: The TTC of the response example: *a3 meta: type: object properties: source: type: string description: The source of the response example: https://example.com url: type: string description: The URL of the response example: https://example.com userAgent: type: object properties: browser: type: string os: type: string device: type: string country: type: string action: type: string description: The meta data of the response example: *a4 contactAttributes: type: - object - "null" additionalProperties: type: string description: The attributes of the contact example: *a5 singleUseId: type: - string - "null" description: The single use ID of the response language: type: - string - "null" description: The language of the response example: en displayId: type: - string - "null" description: The display ID of the response delete: operationId: deleteResponse summary: Delete a response description: Deletes a response from the database. tags: - Management API > Responses parameters: - in: path name: id description: The ID of the response schema: $ref: "#/components/schemas/responseId" required: true responses: "200": description: Response deleted successfully. content: application/json: schema: type: object properties: id: type: string description: The ID of the response createdAt: type: string description: The date and time the response was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the response was last updated example: 2021-01-01T00:00:00.000Z finished: type: boolean description: Whether the response is finished example: true surveyId: type: string description: The ID of the survey contactId: type: - string - "null" description: The ID of the contact endingId: type: - string - "null" description: The ID of the ending data: type: object additionalProperties: anyOf: - type: string - type: number - type: array items: type: string - type: object additionalProperties: type: string description: The data of the response example: *a1 variables: type: object additionalProperties: anyOf: - type: string - type: number description: The variables of the response example: *a2 ttc: type: object additionalProperties: type: number description: The TTC of the response example: *a3 meta: type: object properties: source: type: string description: The source of the response example: https://example.com url: type: string description: The URL of the response example: https://example.com userAgent: type: object properties: browser: type: string os: type: string device: type: string country: type: string action: type: string description: The meta data of the response example: *a4 contactAttributes: type: - object - "null" additionalProperties: type: string description: The attributes of the contact example: *a5 singleUseId: type: - string - "null" description: The single use ID of the response language: type: - string - "null" description: The language of the response example: en displayId: type: - string - "null" description: The display ID of the response /contacts: get: operationId: getContacts summary: Get contacts description: Gets contacts from the database. tags: - Management API > Contacts parameters: - in: query name: limit schema: type: number minimum: 1 maximum: 100 default: 10 - in: query name: skip schema: type: number minimum: 0 default: 0 - in: query name: sortBy schema: type: string enum: - createdAt - updatedAt default: createdAt - in: query name: order schema: type: string enum: - asc - desc default: desc - in: query name: startDate schema: type: string - in: query name: endDate schema: type: string responses: "200": description: Contacts retrieved successfully. content: application/json: schema: type: array items: $ref: "#/components/schemas/contact" post: operationId: createContact summary: Create a contact description: Creates a contact in the database. tags: - Management API > Contacts requestBody: required: true description: The contact to create content: application/json: schema: $ref: "#/components/schemas/contactCreate" responses: "201": description: Contact created successfully. content: application/json: schema: $ref: "#/components/schemas/contact" /contacts/{id}: get: operationId: getContact summary: Get a contact description: Gets a contact from the database. tags: - Management API > Contacts parameters: - in: path name: contactId schema: type: string required: true responses: "200": description: Contact retrieved successfully. content: application/json: schema: $ref: "#/components/schemas/contact" put: operationId: updateContact summary: Update a contact description: Updates a contact in the database. tags: - Management API > Contacts parameters: - in: path name: contactId schema: type: string required: true requestBody: required: true description: The response to update content: application/json: schema: $ref: "#/components/schemas/contactCreate" responses: "200": description: Response updated successfully. content: application/json: schema: $ref: "#/components/schemas/contact" delete: operationId: deleteContact summary: Delete a contact description: Deletes a contact from the database. tags: - Management API > Contacts parameters: - in: path name: contactId schema: type: string required: true responses: "200": description: Contact deleted successfully. content: application/json: schema: $ref: "#/components/schemas/contact" /contact-attributes: get: operationId: getContactAttributes summary: Get contact attributes description: Gets contact attributes from the database. tags: - Management API > Contact Attributes parameters: - in: query name: limit schema: type: number minimum: 1 maximum: 100 default: 10 - in: query name: skip schema: type: number minimum: 0 default: 0 - in: query name: sortBy schema: type: string enum: - createdAt - updatedAt default: createdAt - in: query name: order schema: type: string enum: - asc - desc default: desc - in: query name: startDate schema: type: string - in: query name: endDate schema: type: string responses: "200": description: Contact attributes retrieved successfully. content: application/json: schema: type: array items: type: object properties: id: type: string createdAt: type: string updatedAt: type: string attributeKeyId: type: string contactId: type: string value: type: string required: - id - createdAt - updatedAt - attributeKeyId - contactId - value post: operationId: createContactAttribute summary: Create a contact attribute description: Creates a contact attribute in the database. tags: - Management API > Contact Attributes requestBody: required: true description: The contact attribute to create content: application/json: schema: $ref: "#/components/schemas/contactAttributeInput" responses: "201": description: Contact attribute created successfully. /contact-attributes/{id}: get: operationId: getContactAttribute summary: Get a contact attribute description: Gets a contact attribute from the database. tags: - Management API > Contact Attributes parameters: - in: path name: contactAttributeId schema: type: string required: true responses: "200": description: Contact retrieved successfully. content: application/json: schema: $ref: "#/components/schemas/contactAttribute" put: operationId: updateContactAttribute summary: Update a contact attribute description: Updates a contact attribute in the database. tags: - Management API > Contact Attributes parameters: - in: path name: contactAttributeId schema: type: string required: true requestBody: required: true description: The response to update content: application/json: schema: $ref: "#/components/schemas/contactAttributeInput" responses: "200": description: Response updated successfully. content: application/json: schema: $ref: "#/components/schemas/contactAttribute" delete: operationId: deleteContactAttribute summary: Delete a contact attribute description: Deletes a contact attribute from the database. tags: - Management API > Contact Attributes parameters: - in: path name: contactAttributeId schema: type: string required: true responses: "200": description: Contact deleted successfully. content: application/json: schema: $ref: "#/components/schemas/contactAttribute" /contact-attribute-keys: get: operationId: getContactAttributeKeys summary: Get contact attribute keys description: Gets contact attribute keys from the database. tags: - Management API > Contact Attribute Keys parameters: - in: query name: limit schema: type: number minimum: 1 maximum: 100 default: 10 - in: query name: skip schema: type: number minimum: 0 default: 0 - in: query name: sortBy schema: type: string enum: - createdAt - updatedAt default: createdAt - in: query name: order schema: type: string enum: - asc - desc default: desc - in: query name: startDate schema: type: string - in: query name: endDate schema: type: string responses: "200": description: Contact attribute keys retrieved successfully. content: application/json: schema: type: array items: type: object properties: id: type: string createdAt: type: string updatedAt: type: string isUnique: type: boolean default: false key: type: string name: type: - string - "null" description: type: - string - "null" type: type: string enum: - default - custom environmentId: type: string required: - id - createdAt - updatedAt - isUnique - key - name - description - type - environmentId post: operationId: createContactAttributeKey summary: Create a contact attribute key description: Creates a contact attribute key in the database. tags: - Management API > Contact Attribute Keys requestBody: required: true description: The contact attribute key to create content: application/json: schema: $ref: "#/components/schemas/contactAttributeKeyInput" responses: "201": description: Contact attribute key created successfully. /contact-attribute-keys/{id}: get: operationId: getContactAttributeKey summary: Get a contact attribute key description: Gets a contact attribute key from the database. tags: - Management API > Contact Attribute Keys parameters: - in: path name: contactAttributeKeyId schema: type: string required: true responses: "200": description: Contact attribute key retrieved successfully. content: application/json: schema: $ref: "#/components/schemas/contactAttributeKey" put: operationId: updateContactAttributeKey summary: Update a contact attribute key description: Updates a contact attribute key in the database. tags: - Management API > Contact Attribute Keys parameters: - in: path name: contactAttributeKeyId schema: type: string required: true requestBody: required: true description: The contact attribute key to update content: application/json: schema: $ref: "#/components/schemas/contactAttributeKeyInput" responses: "200": description: Contact attribute key updated successfully. content: application/json: schema: $ref: "#/components/schemas/contactAttributeKey" delete: operationId: deleteContactAttributeKey summary: Delete a contact attribute key description: Deletes a contact attribute key from the database. tags: - Management API > Contact Attribute Keys parameters: - in: path name: contactAttributeId schema: type: string required: true responses: "200": description: Contact attribute key deleted successfully. content: application/json: schema: $ref: "#/components/schemas/contactAttributeKey" /surveys: get: operationId: getSurveys summary: Get surveys description: Gets surveys from the database. tags: - Management API > Surveys parameters: - in: query name: limit schema: type: number minimum: 1 maximum: 100 default: 10 - in: query name: skip schema: type: number minimum: 0 default: 0 - in: query name: sortBy schema: type: string enum: - createdAt - updatedAt default: createdAt - in: query name: order schema: type: string enum: - asc - desc default: desc - in: query name: startDate schema: type: string - in: query name: endDate schema: type: string - in: query name: surveyType schema: type: string enum: - link - app - in: query name: surveyStatus schema: type: string enum: - draft - scheduled - inProgress - paused - completed responses: "200": description: Surveys retrieved successfully. content: application/json: schema: type: array items: $ref: "#/components/schemas/survey" post: operationId: createSurvey summary: Create a survey description: Creates a survey in the database. tags: - Management API > Surveys requestBody: required: true description: The survey to create content: application/json: schema: $ref: "#/components/schemas/surveyInput" responses: "201": description: Survey created successfully. content: application/json: schema: $ref: "#/components/schemas/survey" /surveys/{id}: get: operationId: getSurvey summary: Get a survey description: Gets a survey from the database. tags: - Management API > Surveys parameters: - in: path name: id description: The ID of the survey schema: $ref: "#/components/schemas/surveyId" required: true responses: "200": description: Response retrieved successfully. content: application/json: schema: $ref: "#/components/schemas/survey" put: operationId: updateSurvey summary: Update a survey description: Updates a survey in the database. tags: - Management API > Surveys parameters: - in: path name: id description: The ID of the survey schema: $ref: "#/components/schemas/surveyId" required: true requestBody: required: true description: The survey to update content: application/json: schema: $ref: "#/components/schemas/surveyInput" responses: "200": description: Response updated successfully. content: application/json: schema: $ref: "#/components/schemas/survey" delete: operationId: deleteSurvey summary: Delete a survey description: Deletes a survey from the database. tags: - Management API > Surveys parameters: - in: path name: id description: The ID of the survey schema: $ref: "#/components/schemas/surveyId" required: true responses: "200": description: Response deleted successfully. content: application/json: schema: $ref: "#/components/schemas/survey" /webhooks: get: operationId: getWebhooks summary: Get webhooks description: Gets webhooks from the database. tags: - Management API > Webhooks parameters: - in: query name: limit schema: type: number minimum: 1 maximum: 100 default: 10 - in: query name: skip schema: type: number minimum: 0 default: 0 - in: query name: sortBy schema: type: string enum: *a6 default: createdAt - in: query name: order schema: type: string enum: *a7 default: desc - in: query name: startDate schema: type: string required: true - in: query name: endDate schema: type: string required: true - in: query name: surveyIds schema: type: array items: type: string required: true responses: "200": description: Webhooks retrieved successfully. content: application/json: schema: type: array items: type: object properties: data: type: array items: type: object properties: id: type: string description: The ID of the webhook name: type: - string - "null" description: The name of the webhook createdAt: type: string description: The date and time the webhook was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the webhook was last updated example: 2021-01-01T00:00:00.000Z url: type: string format: uri description: The URL of the webhook source: type: string enum: &a8 - user - zapier - make - n8n description: The source of the webhook environmentId: type: string description: The ID of the environment triggers: type: array items: type: string enum: &a9 - responseFinished - responseCreated - responseUpdated description: The triggers of the webhook surveyIds: type: array items: type: string description: "The IDs of the surveys " meta: type: object properties: total: type: number limit: type: number offset: type: number post: operationId: createWebhook summary: Create a webhook description: Creates a webhook in the database. tags: - Management API > Webhooks requestBody: required: true description: The webhook to create content: application/json: schema: type: object properties: name: type: - string - "null" description: The name of the webhook url: type: string format: uri description: The URL of the webhook source: type: string enum: *a8 description: The source of the webhook environmentId: type: string description: The ID of the environment triggers: type: array items: type: string enum: *a9 description: The triggers of the webhook surveyIds: type: array items: type: string description: "The IDs of the surveys " required: - name - url - source - environmentId - triggers - surveyIds responses: "201": description: Webhook created successfully. content: application/json: schema: type: object properties: id: type: string description: The ID of the webhook name: type: - string - "null" description: The name of the webhook createdAt: type: string description: The date and time the webhook was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the webhook was last updated example: 2021-01-01T00:00:00.000Z url: type: string format: uri description: The URL of the webhook source: type: string enum: *a8 description: The source of the webhook environmentId: type: string description: The ID of the environment triggers: type: array items: type: string enum: *a9 description: The triggers of the webhook surveyIds: type: array items: type: string description: "The IDs of the surveys " /webhooks/{webhookId}: get: operationId: getWebhook summary: Get a webhook description: Gets a webhook from the database. tags: - Management API > Webhooks parameters: - in: path name: id description: The ID of the webhook schema: $ref: "#/components/schemas/webhookId" required: true responses: "200": description: Webhook retrieved successfully. content: application/json: schema: type: object properties: id: type: string description: The ID of the webhook name: type: - string - "null" description: The name of the webhook createdAt: type: string description: The date and time the webhook was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the webhook was last updated example: 2021-01-01T00:00:00.000Z url: type: string format: uri description: The URL of the webhook source: type: string enum: *a8 description: The source of the webhook environmentId: type: string description: The ID of the environment triggers: type: array items: type: string enum: *a9 description: The triggers of the webhook surveyIds: type: array items: type: string description: "The IDs of the surveys " put: operationId: updateWebhook summary: Update a webhook description: Updates a webhook in the database. tags: - Management API > Webhooks parameters: - in: path name: id description: The ID of the webhook schema: $ref: "#/components/schemas/webhookId" required: true requestBody: required: true description: The webhook to update content: application/json: schema: type: object properties: name: type: - string - "null" description: The name of the webhook url: type: string format: uri description: The URL of the webhook source: type: string enum: *a8 description: The source of the webhook environmentId: type: string description: The ID of the environment triggers: type: array items: type: string enum: *a9 description: The triggers of the webhook surveyIds: type: array items: type: string description: "The IDs of the surveys " required: - name - url - source - environmentId - triggers - surveyIds responses: "200": description: Webhook updated successfully. content: application/json: schema: type: object properties: id: type: string description: The ID of the webhook name: type: - string - "null" description: The name of the webhook createdAt: type: string description: The date and time the webhook was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the webhook was last updated example: 2021-01-01T00:00:00.000Z url: type: string format: uri description: The URL of the webhook source: type: string enum: *a8 description: The source of the webhook environmentId: type: string description: The ID of the environment triggers: type: array items: type: string enum: *a9 description: The triggers of the webhook surveyIds: type: array items: type: string description: "The IDs of the surveys " delete: operationId: deleteWebhook summary: Delete a webhook description: Deletes a webhook from the database. tags: - Management API > Webhooks parameters: - in: path name: id description: The ID of the webhook schema: $ref: "#/components/schemas/webhookId" required: true responses: "200": description: Webhook deleted successfully. content: application/json: schema: type: object properties: id: type: string description: The ID of the webhook name: type: - string - "null" description: The name of the webhook createdAt: type: string description: The date and time the webhook was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the webhook was last updated example: 2021-01-01T00:00:00.000Z url: type: string format: uri description: The URL of the webhook source: type: string enum: *a8 description: The source of the webhook environmentId: type: string description: The ID of the environment triggers: type: array items: type: string enum: *a9 description: The triggers of the webhook surveyIds: type: array items: type: string description: "The IDs of the surveys " /roles: get: operationId: getRoles summary: Get roles description: Gets roles from the database. tags: - Management API > Roles responses: "200": description: Roles retrieved successfully. content: application/json: schema: type: array items: type: string components: securitySchemes: apiKeyAuth: type: apiKey in: header name: x-api-key description: Use your Formbricks x-api-key to authenticate. schemas: response: type: object properties: id: type: string description: The ID of the response createdAt: type: string description: The date and time the response was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the response was last updated example: 2021-01-01T00:00:00.000Z finished: type: boolean description: Whether the response is finished example: true surveyId: type: string description: The ID of the survey contactId: type: - string - "null" description: The ID of the contact endingId: type: - string - "null" description: The ID of the ending data: type: object additionalProperties: anyOf: - type: string - type: number - type: array items: type: string - type: object additionalProperties: type: string description: The data of the response example: *a1 variables: type: object additionalProperties: anyOf: - type: string - type: number description: The variables of the response example: *a2 ttc: type: object additionalProperties: type: number description: The TTC of the response example: *a3 meta: type: object properties: source: type: string description: The source of the response example: https://example.com url: type: string description: The URL of the response example: https://example.com userAgent: type: object properties: browser: type: string os: type: string device: type: string country: type: string action: type: string description: The meta data of the response example: *a4 contactAttributes: type: - object - "null" additionalProperties: type: string description: The attributes of the contact example: *a5 singleUseId: type: - string - "null" description: The single use ID of the response language: type: - string - "null" description: The language of the response example: en displayId: type: - string - "null" description: The display ID of the response required: - id - createdAt - updatedAt - finished - surveyId - contactId - endingId - data - variables - ttc - meta - contactAttributes - singleUseId - language - displayId contact: type: object properties: id: type: string description: Unique identifier for the contact userId: type: - string - "null" description: Optional external user identifier createdAt: type: string description: When the contact was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: When the contact was last updated example: 2021-01-01T00:00:00.000Z environmentId: type: string description: The environment this contact belongs to required: - id - userId - createdAt - updatedAt - environmentId contactAttribute: type: object properties: id: type: string description: The ID of the contact attribute createdAt: type: string description: The date and time the contact attribute was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the contact attribute was last updated example: 2021-01-01T00:00:00.000Z attributeKeyId: type: string description: The ID of the attribute key contactId: type: string description: The ID of the contact value: type: string description: The value of the attribute example: example@email.com required: - id - createdAt - updatedAt - attributeKeyId - contactId - value contactAttributeKey: type: object properties: id: type: string description: The ID of the contact attribute key createdAt: type: string description: The date and time the contact attribute key was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the contact attribute key was last updated example: 2021-01-01T00:00:00.000Z isUnique: type: boolean description: Whether the attribute must have unique values across contacts example: false key: type: string description: The attribute identifier used in the system example: email name: type: - string - "null" description: Display name for the attribute example: Email Address description: type: - string - "null" description: Description of the attribute example: The user's email address type: type: string enum: - default - custom description: Whether this is a default or custom attribute example: custom environmentId: type: string description: The ID of the environment this attribute belongs to required: - id - createdAt - updatedAt - isUnique - key - name - description - type - environmentId survey: type: object properties: id: type: string description: The ID of the survey createdAt: type: string description: The date and time the survey was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the survey was last updated example: 2021-01-01T00:00:00.000Z name: type: string description: The name of the survey redirectUrl: type: - string - "null" format: uri description: The URL to redirect to after the survey is completed type: type: string enum: - link - web - website - app description: The type of the survey status: type: string enum: - draft - scheduled - inProgress - paused - completed description: The status of the survey thankYouMessage: type: - string - "null" description: The thank you message of the survey showLanguageSwitch: type: - boolean - "null" description: Whether to show the language switch showThankYouMessage: type: - boolean - "null" description: Whether to show the thank you message welcomeCard: type: object properties: enabled: type: boolean timeToFinish: type: boolean showResponseCount: type: boolean headline: type: object additionalProperties: type: string html: type: object additionalProperties: type: string fileUrl: type: string buttonLabel: type: object additionalProperties: type: string videoUrl: type: string required: - enabled - timeToFinish - showResponseCount description: The welcome card configuration displayProgressBar: type: - boolean - "null" description: Whether to display the progress bar resultShareKey: type: - string - "null" description: The result share key of the survey pin: type: - string - "null" description: The pin of the survey createdBy: type: - string - "null" description: The user who created the survey environmentId: type: string description: The environment ID of the survey endings: type: array items: anyOf: - type: object properties: id: type: string type: type: string const: endScreen headline: type: object additionalProperties: type: string subheader: type: object additionalProperties: type: string buttonLabel: type: object additionalProperties: type: string buttonLink: type: string format: uri imageUrl: type: string videoUrl: type: string required: - id - type - type: object properties: id: type: string type: type: string const: redirectToUrl url: type: string label: type: string required: - id - type default: &a11 [] description: The endings of the survey thankYouCard: type: - object - "null" properties: enabled: type: boolean message: type: string required: - enabled - message description: The thank you card of the survey (deprecated) hiddenFields: type: object properties: enabled: type: boolean fieldIds: type: array items: type: string required: - enabled description: Hidden fields configuration variables: type: array items: oneOf: - type: object properties: id: type: string name: type: string type: type: string const: number value: type: number default: 0 required: - id - name - type - value - type: object properties: id: type: string name: type: string type: type: string const: text value: type: string default: "" required: - id - name - type - value description: Survey variables displayOption: type: string enum: &a12 - displayOnce - displayMultiple - displaySome - respondMultiple description: Display options for the survey recontactDays: type: - number - "null" description: Days before recontacting displayLimit: type: - number - "null" description: Display limit for the survey autoClose: type: - number - "null" description: Auto close time in seconds autoComplete: type: - number - "null" description: Auto complete time in seconds delay: type: number description: Delay before showing survey runOnDate: type: - string - "null" description: Date to run the survey closeOnDate: type: - string - "null" description: Date to close the survey surveyClosedMessage: type: - object - "null" properties: enabled: type: boolean heading: type: string subheading: type: string required: - enabled - heading - subheading description: Message shown when survey is closed segmentId: type: - string - "null" description: ID of the segment projectOverwrites: type: - object - "null" properties: brandColor: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ highlightBorderColor: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ placement: type: - string - "null" enum: &a14 - bottomLeft - bottomRight - topLeft - topRight - center clickOutsideClose: type: - boolean - "null" darkOverlay: type: - boolean - "null" description: Project specific overwrites styling: type: - object - "null" properties: brandColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light questionColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light inputColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light inputBorderColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light cardBackgroundColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light cardBorderColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light cardShadowColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light highlightBorderColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light isDarkModeEnabled: type: - boolean - "null" roundness: type: - number - "null" cardArrangement: type: - object - "null" properties: linkSurveys: type: string enum: &a10 - casual - straight - simple appSurveys: type: string enum: *a10 required: - linkSurveys - appSurveys background: type: - object - "null" properties: bg: type: - string - "null" bgType: type: - string - "null" enum: &a13 - animation - color - image - upload brightness: type: - number - "null" hideProgressBar: type: - boolean - "null" isLogoHidden: type: - boolean - "null" description: Survey styling configuration singleUse: type: object properties: enabled: type: boolean isEncrypted: type: boolean required: - enabled - isEncrypted description: Single use configuration isVerifyEmailEnabled: type: boolean description: Whether email verification is enabled isSingleResponsePerEmailEnabled: type: boolean description: Whether single response per email is enabled inlineTriggers: type: - array - "null" items: {} description: Inline triggers configuration isBackButtonHidden: type: boolean description: Whether the back button is hidden verifyEmail: type: object properties: enabled: type: boolean message: type: string required: - enabled - message description: Email verification configuration (deprecated) displayPercentage: type: - number - "null" description: The display percentage of the survey questions: type: array items: {} description: The questions of the survey. required: - id - createdAt - updatedAt - name - redirectUrl - type - status - thankYouMessage - showLanguageSwitch - showThankYouMessage - welcomeCard - displayProgressBar - resultShareKey - pin - createdBy - environmentId - endings - thankYouCard - hiddenFields - variables - displayOption - recontactDays - displayLimit - autoClose - autoComplete - delay - runOnDate - closeOnDate - surveyClosedMessage - segmentId - projectOverwrites - styling - singleUse - isVerifyEmailEnabled - isSingleResponsePerEmailEnabled - inlineTriggers - isBackButtonHidden - verifyEmail - displayPercentage - questions webhook: type: object properties: id: type: string description: The ID of the webhook name: type: - string - "null" description: The name of the webhook createdAt: type: string description: The date and time the webhook was created example: 2021-01-01T00:00:00.000Z updatedAt: type: string description: The date and time the webhook was last updated example: 2021-01-01T00:00:00.000Z url: type: string format: uri description: The URL of the webhook source: type: string enum: *a8 description: The source of the webhook environmentId: type: string description: The ID of the environment triggers: type: array items: type: string enum: *a9 description: The triggers of the webhook surveyIds: type: array items: type: string description: "The IDs of the surveys " required: - id - name - createdAt - updatedAt - url - source - environmentId - triggers - surveyIds role: type: array items: type: string responseId: type: string description: The ID of the response contactCreate: type: object properties: userId: type: - string - "null" description: Optional external user identifier environmentId: type: string description: The environment this contact belongs to required: - environmentId description: A contact to create contactAttributeInput: type: object properties: attributeKeyId: type: string description: The ID of the attribute key contactId: type: string description: The ID of the contact value: type: string description: The value of the attribute example: example@email.com required: - attributeKeyId - contactId - value description: Input data for creating or updating a contact attribute contactAttributeKeyInput: type: object properties: key: type: string description: The attribute identifier used in the system example: email name: type: - string - "null" description: Display name for the attribute example: Email Address description: type: - string - "null" description: Description of the attribute example: The user's email address type: type: string enum: - default - custom description: Whether this is a default or custom attribute example: custom environmentId: type: string description: The ID of the environment this attribute belongs to required: - key - name - description - type - environmentId description: Input data for creating or updating a contact attribute surveyInput: type: object properties: name: type: string description: The name of the survey redirectUrl: type: - string - "null" format: uri description: The URL to redirect to after the survey is completed type: type: string enum: - link - web - website - app description: The type of the survey environmentId: type: string description: The environment ID of the survey questions: type: array items: {} description: The questions of the survey. endings: type: array items: anyOf: - type: object properties: id: type: string type: type: string const: endScreen headline: type: object additionalProperties: type: string subheader: type: object additionalProperties: type: string buttonLabel: type: object additionalProperties: type: string buttonLink: type: string format: uri imageUrl: type: string videoUrl: type: string required: - id - type - type: object properties: id: type: string type: type: string const: redirectToUrl url: type: string label: type: string required: - id - type default: *a11 description: The endings of the survey thankYouCard: type: - object - "null" properties: enabled: type: boolean message: type: string required: - enabled - message description: The thank you card of the survey (deprecated) hiddenFields: type: object properties: enabled: type: boolean fieldIds: type: array items: type: string required: - enabled description: Hidden fields configuration variables: type: array items: oneOf: - type: object properties: id: type: string name: type: string type: type: string const: number value: type: number default: 0 required: - id - name - type - type: object properties: id: type: string name: type: string type: type: string const: text value: type: string default: "" required: - id - name - type description: Survey variables displayOption: type: string enum: *a12 description: Display options for the survey recontactDays: type: - number - "null" description: Days before recontacting displayLimit: type: - number - "null" description: Display limit for the survey autoClose: type: - number - "null" description: Auto close time in seconds autoComplete: type: - number - "null" description: Auto complete time in seconds delay: type: number description: Delay before showing survey runOnDate: type: - string - "null" description: Date to run the survey closeOnDate: type: - string - "null" description: Date to close the survey singleUse: type: object properties: enabled: type: boolean isEncrypted: type: boolean required: - enabled - isEncrypted description: Single use configuration isVerifyEmailEnabled: type: boolean description: Whether email verification is enabled isSingleResponsePerEmailEnabled: type: boolean description: Whether single response per email is enabled inlineTriggers: type: - array - "null" items: {} description: Inline triggers configuration verifyEmail: type: object properties: enabled: type: boolean message: type: string required: - enabled - message description: Email verification configuration (deprecated) displayPercentage: type: - number - "null" description: The display percentage of the survey welcomeCard: type: object properties: enabled: type: boolean timeToFinish: type: boolean showResponseCount: type: boolean headline: type: object additionalProperties: type: string html: type: object additionalProperties: type: string fileUrl: type: string buttonLabel: type: object additionalProperties: type: string videoUrl: type: string required: - enabled - timeToFinish - showResponseCount description: The welcome card configuration surveyClosedMessage: type: - object - "null" properties: enabled: type: boolean heading: type: string subheading: type: string required: - enabled - heading - subheading description: Message shown when survey is closed styling: type: - object - "null" properties: brandColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light questionColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light inputColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light inputBorderColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light cardBackgroundColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light cardBorderColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light cardShadowColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light highlightBorderColor: type: - object - "null" properties: light: type: string pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ dark: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ required: - light isDarkModeEnabled: type: - boolean - "null" roundness: type: - number - "null" cardArrangement: type: - object - "null" properties: linkSurveys: type: string enum: *a10 appSurveys: type: string enum: *a10 required: - linkSurveys - appSurveys background: type: - object - "null" properties: bg: type: - string - "null" bgType: type: - string - "null" enum: *a13 brightness: type: - number - "null" hideProgressBar: type: - boolean - "null" isLogoHidden: type: - boolean - "null" description: Survey styling configuration projectOverwrites: type: - object - "null" properties: brandColor: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ highlightBorderColor: type: - string - "null" pattern: ^#(?:[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$ placement: type: - string - "null" enum: *a14 clickOutsideClose: type: - boolean - "null" darkOverlay: type: - boolean - "null" description: Project specific overwrites showLanguageSwitch: type: - boolean - "null" description: Whether to show the language switch required: - name - type - environmentId - questions - hiddenFields - displayOption - delay - singleUse - isVerifyEmailEnabled - isSingleResponsePerEmailEnabled - welcomeCard description: A survey input object for creating or updating surveys surveyId: type: string description: The ID of the survey webhookId: type: string description: The ID of the webhook