{ "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.\n\nCheckout the [API Key Setup](https://formbricks.com/docs/api/management/api-key-setup) - to access the Management APIs wit an API Key.\n\n> 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. \n \n\nNeed more help, visit our: [Website](https://formbricks.com) or join our [Discord](https://formbricks.com/discord)!", "title": "API Documentation", "version": "1.0.0" }, "openapi": "3.0.0", "paths": { "/api/v1/client/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": { "hs8yd14l9h8u353tjmv6rzawqqq": "clicked", "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?" }, "finished": true }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "example": { "data": {} }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 08:09:19 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "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" } } } }, "404": { "content": { "application/json": { "example": { "code": "not_found", "details": { "resource_id": "nonexistentid", "resource_type": "Response" }, "message": "Response not found" }, "schema": { "type": "object" } } }, "description": "Not Found", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 08:13:50 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "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" } } } } }, "summary": "Update Response", "tags": ["Client API > Response"] } }, "/api/v1/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": { "Created From": "API" } }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "examples": { "example-0": { "summary": "Success (New Attributes)", "value": { "data": { "changed": true, "message": "The person was successfully updated." } } }, "example-1": { "summary": "Success (Same Attributes)", "value": { "data": { "changed": false, "message": "No updates were necessary; the person is already up to date." } } } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:42:32 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "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" } } } }, "500": { "content": { "application/json": { "example": { "code": "internal_server_error", "details": {}, "message": "Unable to complete request: Expected property name or '}' in JSON at position 29" }, "schema": { "type": "object" } } }, "description": "Internal Server Error", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:43:29 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "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" } } } } }, "summary": "Update Contact (Attributes)", "tags": ["Client API > Contacts"] } }, "/api/v1/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.", "parameters": [ { "in": "path", "name": "environmentId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "surveyId": "{{surveyId}}", "userId": "{{userId}} (optional)" }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "example": { "data": { "id": "clvc1z8200006494jgnds7ort" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:16:55 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "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" } } } }, "500": { "content": { "application/json": { "example": { "code": "internal_server_error", "details": {}, "message": "\nInvalid `prisma.display.create()` invocation:\n\n\nAn operation failed because it depends on one or more records that were required but not found. No 'Survey' record(s) (needed to inline the relation on 'Display' record(s)) was found for a nested connect on one-to-many relation 'DisplayToSurvey'." }, "schema": { "type": "object" } } }, "description": "Internal Server Error", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Headers": { "schema": { "example": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version", "type": "string" } }, "Access-Control-Allow-Methods": { "schema": { "example": "GET,OPTIONS,PATCH,DELETE,POST,PUT", "type": "string" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:12:51 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" } } } } }, "summary": "Create Display", "tags": ["Client API > Display"] } }, "/api/v1/client/{environmentId}/displays/{displayId}": { "put": { "description": "Update an 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": "environmentId", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "displayId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "responseId": "{{responseId}} (optional)", "userId": "{{userId}} (optional)" }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "example": { "data": {} }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:26:39 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "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" } } } }, "500": { "content": { "application/json": { "example": { "code": "internal_server_error", "details": {}, "message": "Person with ID 2 not found" }, "schema": { "type": "object" } } }, "description": "Internal Server Error", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:26:06 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "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" } } } } }, "summary": "Update Display", "tags": ["Client API > Display"] } }, "/api/v1/client/{environmentId}/environment": { "get": { "description": "Retrieves the environment state to be used in Formbricks SDKs", "parameters": [ { "description": "The ID of the environment", "in": "path", "name": "environmentId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "actionClasses": { "example": [ { "id": "cm6orqtdd000b19wjec82bpp2", "key": null, "name": "New Session", "noCodeConfig": null, "type": "automatic" }, { "id": "cm6oryki3000i19wj860utcnn", "key": "code", "name": "code action", "noCodeConfig": null, "type": "code" } ], "items": { "properties": { "id": { "example": "cm6orqtdd000b19wjec82bpp2", "type": "string" }, "key": { "example": null, "nullable": true, "type": "string" }, "name": { "example": "New Session", "type": "string" }, "noCodeConfig": { "example": null, "nullable": true, "type": "object" }, "type": { "example": "automatic", "type": "string" } }, "type": "object" }, "type": "array" }, "project": { "properties": { "clickOutsideClose": { "example": true, "type": "boolean" }, "darkOverlay": { "example": false, "type": "boolean" }, "id": { "example": "cm6orqtcl000319wj9wb7dltl", "type": "string" }, "inAppSurveyBranding": { "example": true, "type": "boolean" }, "placement": { "example": "bottomRight", "type": "string" }, "recontactDays": { "example": 7, "type": "integer" }, "styling": { "properties": { "allowStyleOverwrite": { "example": true, "type": "boolean" }, "brandColor": { "properties": { "light": { "example": "#64748b", "type": "string" } }, "type": "object" } }, "type": "object" } }, "type": "object" }, "surveys": { "description": "List of surveys in the environment", "items": { "properties": { "autoClose": { "example": null, "type": "boolean" }, "delay": { "example": 0, "type": "integer" }, "displayLimit": { "example": 5, "type": "integer" }, "displayOption": { "example": "respondMultiple", "type": "string" }, "displayPercentage": { "example": null, "type": "integer" }, "endings": { "items": { "properties": { "buttonLabel": { "example": "Create your own Survey", "type": "string" }, "buttonLink": { "example": "https://formbricks.com", "type": "string" }, "headline": { "example": "Thank you!", "type": "string" }, "id": { "example": "o729tod5klhix62njmk262dk", "type": "string" }, "subheader": { "example": "We appreciate your feedback.", "type": "string" }, "type": { "example": "endScreen", "type": "string" } }, "type": "object" }, "type": "array" }, "hiddenFields": { "properties": { "enabled": { "example": true, "type": "boolean" }, "fieldIds": { "items": { "type": "string" }, "type": "array" } }, "type": "object" }, "id": { "example": "cm6orr901000g19wjwwa690eo", "type": "string" }, "languages": { "items": { "type": "string" }, "type": "array" }, "name": { "example": "Start from scratch", "type": "string" }, "questions": { "items": { "properties": { "buttonLabel": { "example": "Next", "type": "string" }, "charLimit": { "example": false, "type": "boolean" }, "headline": { "example": "What would you like to know?", "type": "string" }, "id": { "example": "dd5c8w2a4ttkbnjb9nwhtb17", "type": "string" }, "inputType": { "example": "text", "type": "string" }, "placeholder": { "example": "Type your answer here...", "type": "string" }, "required": { "example": true, "type": "boolean" }, "type": { "example": "openText", "type": "string" } }, "type": "object" }, "type": "array" }, "recontactDays": { "example": 0, "type": "integer" }, "segment": { "properties": { "createdAt": { "example": "2025-02-03T08:08:33.377Z", "type": "string" }, "description": { "example": null, "type": "string" }, "filters": { "items": { "type": "string" }, "type": "array" }, "id": { "example": "cm6orr90h000h19wj1lnwoxwg", "type": "string" }, "isPrivate": { "example": true, "type": "boolean" }, "title": { "example": "cm6orr901000g19wjwwa690eo", "type": "string" }, "updatedAt": { "example": "2025-02-03T08:08:33.377Z", "type": "string" } }, "type": "object" }, "showLanguageSwitch": { "example": null, "type": "boolean" }, "status": { "example": "inProgress", "type": "string" }, "styling": { "example": null, "type": "object" }, "triggers": { "items": { "properties": { "actionClass": { "example": "code action", "type": "string" } }, "type": "object" }, "type": "array" }, "type": { "example": "app", "type": "string" }, "variables": { "items": { "type": "string" }, "type": "array" }, "welcomeCard": { "properties": { "buttonLabel": { "example": "Next", "type": "string" }, "enabled": { "example": false, "type": "boolean" }, "headline": { "example": "Welcome!", "type": "string" }, "html": { "example": "Thanks for providing your feedback - let's go!", "type": "string" }, "showResponseCount": { "example": false, "type": "boolean" }, "timeToFinish": { "example": false, "type": "boolean" } }, "type": "object" } }, "type": "object" }, "type": "array" } }, "type": "object" } }, "type": "object" } } }, "description": "HTTP Status 200" }, "404": { "content": { "application/json": { "schema": { "properties": { "code": { "example": "not_found", "type": "string" }, "details": { "properties": { "resource_id": { "example": "tpywklouw2p7tebdu4zv01an", "type": "string" }, "resource_type": { "example": "environment", "type": "string" } }, "type": "object" }, "message": { "example": "Environment not found", "type": "string" } }, "type": "object" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "properties": { "code": { "example": "internal_server_error", "type": "string" }, "details": { "type": "object" }, "message": { "example": "Unable to complete request: Expected property name or '}' in JSON at position 29", "type": "string" } }, "type": "object" } } }, "description": "Internal Server Error" } }, "summary": "Get Environment State", "tags": ["Client API > Environment"] } }, "/api/v1/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": [ { "description": "The ID of the environment", "in": "path", "name": "environmentId", "required": true, "schema": { "type": "string" } }, { "description": "The user ID to identify the contact", "in": "path", "name": "userId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "example": { "displays": [ { "createdAt": "2024-04-23T08:59:37.550Z", "surveyId": "pjogp5a1wyxon6umplmf49b8" } ], "lastDisplayAt": "2024-04-23T08:59:37.550Z", "responses": ["pjogp5a1wyxon6umplmf49b8"], "segments": ["fi8f9oekza95wwszrptidivq", "zgwrv8eg7vfavdhzv1s0po1w"], "userId": "user-123" }, "properties": { "data": { "properties": { "displays": { "description": "List of survey displays for this contact", "items": { "properties": { "createdAt": { "format": "date-time", "type": "string" }, "surveyId": { "type": "string" } }, "type": "object" }, "type": "array" }, "lastDisplayAt": { "description": "Timestamp of the last survey display", "format": "date-time", "nullable": true, "type": "string" }, "responses": { "description": "List of survey IDs the contact has responded to", "items": { "type": "string" }, "type": "array" }, "segments": { "description": "List of segment IDs the contact belongs to", "items": { "type": "string" }, "type": "array" }, "userId": { "description": "The user ID of the contact", "type": "string" } }, "type": "object" } }, "type": "object" } } }, "description": "OK" }, "403": { "content": { "application/json": { "schema": { "properties": { "code": { "example": "forbidden", "type": "string" }, "message": { "example": "User identification is only available for enterprise users.", "type": "string" } }, "type": "object" } } }, "description": "Forbidden" }, "404": { "content": { "application/json": { "schema": { "properties": { "code": { "example": "not_found", "type": "string" }, "details": { "properties": { "resource_id": { "example": "tpywklouw2p7tebdu4zv01an", "type": "string" }, "resource_type": { "example": "environment", "type": "string" } }, "type": "object" }, "message": { "example": "Environment not found", "type": "string" } }, "type": "object" } } }, "description": "Not Found" }, "500": { "content": { "application/json": { "schema": { "properties": { "code": { "example": "internal_server_error", "type": "string" }, "details": { "type": "object" }, "message": { "example": "Unable to complete request: Expected property name or '}' in JSON at position 29", "type": "string" } }, "type": "object" } } }, "description": "Internal Server Error" } }, "summary": "Get Contact State", "tags": ["Client API > Contacts"] } }, "/api/v1/client/{environmentId}/responses": { "post": { "description": "Create a response for a survey and it's fields with the user's responses. The userId & meta here is optional", "parameters": [ { "in": "path", "name": "environmentId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "data": { "hs8yd14l9h8u353tjmv6rzaw": "clicked", "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?" }, "finished": false, "meta": { "action": "test action", "source": "Postman API", "url": "https://postman.com" }, "surveyId": "{{surveyId}}", "userId": "{{userId}} (optional)" }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "example": { "data": { "id": "clvc3aool000p494jzjuukfzu" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:53:50 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "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" } } } }, "400": { "content": { "application/json": { "example": { "code": "bad_request", "details": { "surveyId": "Invalid cuid2" }, "message": "Fields are missing or incorrectly formatted" }, "schema": { "type": "object" } } }, "description": "Bad Request", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:55:50 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "type": "string" } }, "content-type": { "schema": { "example": "application/json", "type": "string" } }, "vary": { "schema": { "example": "RSC, Next-Router-State-Tree, Next-Router-Prefetch", "type": "string" } } } }, "404": { "content": { "application/json": { "example": { "code": "not_found", "details": { "resource_id": "hs8yd14l9h8u353tjmv6rzaw", "resource_type": "Survey" }, "message": "Survey not found" }, "schema": { "type": "object" } } }, "description": "Not Found", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:56:29 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "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" } } } } }, "summary": "Create Response", "tags": ["Client API > Response"] } }, "/api/v1/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.\n", "parameters": [ { "in": "path", "name": "environmentId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "example": { "attributes": { "plan": "free" }, "userId": "hello-user" }, "schema": { "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "schema": { "properties": { "data": { "properties": { "state": { "properties": { "data": { "properties": { "displays": { "items": { "properties": { "createdAt": { "example": "2025-02-03T11:23:13.050Z", "type": "string" }, "surveyId": { "example": "cm6orqtdd000a19wjhnbces5s", "type": "string" } }, "type": "object" }, "type": "array" }, "lastDisplayAt": { "example": "2025-02-03T11:23:13.050Z", "type": "string" }, "responses": { "items": { "example": "cm6orqtdd000a19wjhnbces5s", "type": "string" }, "type": "array" }, "segments": { "items": { "example": "cm6onrezn000hw2ahcokiz41v", "type": "string" }, "type": "array" }, "userId": { "example": "hello-user", "type": "string" } }, "type": "object" }, "expiresAt": { "example": "2025-02-03T11:23:13.050Z", "type": "string" } }, "type": "object" } }, "type": "object" } }, "type": "object" } } }, "description": "OK", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:36:43 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "type": "string" } }, "content-type": { "schema": { "example": "application/json", "type": "string" } }, "vary": { "schema": { "example": "RSC, Next-Router-State-Tree, Next-Router-Prefetch", "type": "string" } } } }, "400": { "content": { "application/json": { "example": { "code": "bad_request", "message": "userId is required" }, "schema": { "type": "object" } } }, "description": "Bad Request", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:36:43 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "type": "string" } }, "content-type": { "schema": { "example": "application/json", "type": "string" } }, "vary": { "schema": { "example": "RSC, Next-Router-State-Tree, Next-Router-Prefetch", "type": "string" } } } }, "404": { "content": { "application/json": { "example": { "code": "not_found", "details": { "resource_id": "f16ttdvtkx85k5m4s561ruqj", "resource_type": "Environment" }, "message": "Environment not found" }, "schema": { "type": "object" } } }, "description": "Not Found", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:56:29 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "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" } } } }, "500": { "content": { "application/json": { "example": { "code": "internal_server_error", "details": {}, "message": "An unexpected error occurred" }, "schema": { "type": "object" } } }, "description": "Internal Server Error", "headers": { "Access-Control-Allow-Credentials": { "schema": { "example": "true", "type": "boolean" } }, "Access-Control-Allow-Origin": { "schema": { "example": "*", "type": "string" } }, "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 07:56:29 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "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" } } } } }, "summary": "Create or Identify User", "tags": ["Client API > User"] } }, "/api/v1/management/action-classes": { "get": { "description": "Fetches all the action classes available in the environment", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-Api-Key", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "createdAt": "2024-04-09T04:53:29.577Z", "description": "Gets fired when a new session is created", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clurwouax000bzffxv3fqy6mt", "name": "New Session", "noCodeConfig": null, "type": "automatic", "updatedAt": "2024-04-09T04:53:29.577Z" }, { "createdAt": "2024-04-09T04:53:29.577Z", "description": "A user on Desktop leaves the website with the cursor.", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clurwouax000czffx4wj0qldi", "name": "Exit Intent (Desktop)", "noCodeConfig": null, "type": "automatic", "updatedAt": "2024-04-09T04:53:29.577Z" }, { "createdAt": "2024-04-09T04:53:29.577Z", "description": "A user scrolled 50% of the current page", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clurwouax000dzffx3dfxc91d", "name": "50% Scroll", "noCodeConfig": null, "type": "automatic", "updatedAt": "2024-04-09T04:53:29.577Z" }, { "createdAt": "2024-04-22T08:59:01.144Z", "description": "hhehe", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvaq6nx40000mhqfuu74rv92", "name": "new_action_v2", "noCodeConfig": null, "type": "code", "updatedAt": "2024-04-22T09:03:55.509Z" }, { "createdAt": "2024-04-22T09:04:30.756Z", "description": null, "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvaqdq8z000bmhqfu0km5rv4", "name": "new_action_v20", "noCodeConfig": null, "type": "code", "updatedAt": "2024-04-22T09:04:30.756Z" }, { "createdAt": "2024-04-23T07:11:17.032Z", "description": null, "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvc1ryuf0001494jc8oesfwl", "name": "new_action_v1", "noCodeConfig": null, "type": "code", "updatedAt": "2024-04-23T07:11:17.032Z" } ] }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 08:47:03 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": "not_authenticated", "details": { "x-Api-Key": "Header not provided or API Key invalid" }, "message": "Not authenticated" }, "schema": { "type": "object" } } }, "description": "Unauthorized", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 08:48:01 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" } } } } }, "summary": "Get All Action Classes", "tags": ["Management API > Action Class"] }, "post": { "description": "Create Action Class from the UI or from the API! You can read more about them [here](https://formbricks.com/docs/in-app-surveys/actions).", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "description": "From API Docs (optional)", "environmentId": "{{environmentId}}", "name": "My Action from Postman", "noCodeConfig": { "innerHtml": { "value": "sign-up" }, "type": "innerHtml" }, "type": "code" }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "example": { "data": { "createdAt": "2024-04-23T08:58:47.507Z", "description": null, "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvc5m82c000z494jkvnw1gh0", "name": "My Action from Postman", "noCodeConfig": null, "type": "code", "updatedAt": "2024-04-23T08:58:47.507Z" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 08:58:47 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" } } } }, "400": { "content": { "application/json": { "example": { "code": "bad_request", "details": {}, "message": "Database error when creating an action for environment clurwouax000azffxt7n5unn3" }, "schema": { "type": "object" } } }, "description": "Bad Request", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 08:57:55 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" } } } } }, "summary": "Create Action Class", "tags": ["Management API > Action Class"] } }, "/api/v1/management/action-classes/{actionClassId}": { "delete": { "description": "Deletes an existing action class", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "actionClassId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "createdAt": "2024-04-23T08:58:47.507Z", "description": null, "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvc5m82c000z494jkvnw1gh0", "name": "My Action from Postman", "noCodeConfig": null, "type": "code", "updatedAt": "2024-04-23T08:58:47.507Z" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 08:59:13 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" } } } }, "400": { "content": { "application/json": { "example": { "code": "bad_request", "details": {}, "message": "Automatic action classes cannot be deleted" }, "schema": { "type": "object" } } }, "description": "Bad Request", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 09:13:05 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" } } } }, "404": { "content": { "application/json": { "example": { "code": "not_found", "details": { "resource_id": "clvc5m82c000z494jkvnw1gh0", "resource_type": "Action Class" }, "message": "Action Class not found" }, "schema": { "type": "object" } } }, "description": "Not Found", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 08:59:38 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" } } } } }, "summary": "Delete Action Class", "tags": ["Management API > Action Class"] }, "get": { "description": "Fetch an Action Class by it's ID", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-Api-Key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "actionClassId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "createdAt": "2024-04-09T04:53:29.577Z", "description": "Gets fired when a new session is created", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clurwouax000bzffxv3fqy6mt", "name": "New Session", "noCodeConfig": null, "type": "automatic", "updatedAt": "2024-04-09T04:53:29.577Z" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 09:03:25 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" } } } }, "404": { "content": { "application/json": { "example": { "code": "not_found", "details": { "resource_id": "clvc5m82c000z494jkvnw1gh0", "resource_type": "Action Class" }, "message": "Action Class not found" }, "schema": { "type": "object" } } }, "description": "Not Found", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 09:01:09 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" } } } } }, "summary": "Get Action Class by ID", "tags": ["Management API > Action Class"] } }, "/api/v1/management/attribute-classes": { "get": { "description": "Fetches all the available attribute classes", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "archived": false, "createdAt": "2024-04-09T04:53:29.577Z", "description": "The email of the person", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clurwouax000ezffxs7unemg2", "name": "email", "type": "automatic", "updatedAt": "2024-04-09T04:53:29.577Z" }, { "archived": false, "createdAt": "2024-04-09T04:53:29.577Z", "description": "The language used by the person", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clurwouax000fzffxv9rycait", "name": "language", "type": "automatic", "updatedAt": "2024-04-09T04:53:29.577Z" }, { "archived": false, "createdAt": "2024-04-22T08:59:27.319Z", "description": null, "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvaq78470004mhqfm0x3kasv", "name": "Init Attribute 2", "type": "code", "updatedAt": "2024-04-22T08:59:27.319Z" }, { "archived": false, "createdAt": "2024-04-22T08:59:27.348Z", "description": null, "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvaq78500005mhqfd8z2dnxq", "name": "Init Attribute 1", "type": "code", "updatedAt": "2024-04-22T08:59:27.348Z" }, { "archived": false, "createdAt": "2024-04-23T07:41:05.917Z", "description": null, "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvc2ub5p000l494j1xwrgvqe", "name": "created_from", "type": "code", "updatedAt": "2024-04-23T07:41:05.917Z" }, { "archived": false, "createdAt": "2024-04-23T07:42:32.659Z", "description": null, "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvc2w637000n494j4z3oyye3", "name": "Created From", "type": "code", "updatedAt": "2024-04-23T07:42:32.659Z" } ] }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 09:14:46 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" } } } } }, "summary": "Get All Attribute Classes", "tags": ["Management API > Attribute Class"] }, "post": { "description": "Create a new Attribute Class by passing in its type as well as the name! Now just use them in your app and pass this value with a user & it'll be associated with it.", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "environmentId": "{{environmentId}}", "name": "My new Attribute", "type": "code" }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "example": { "data": { "archived": false, "createdAt": "2024-04-23T11:21:38.155Z", "description": null, "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvcapx7v0000xz1zskcgf5k0", "name": "My new Attribute", "type": "code", "updatedAt": "2024-04-23T11:21:38.155Z" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:21:38 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" } } } }, "400": { "content": { "application/json": { "example": { "code": "bad_request", "details": {}, "message": "\nInvalid `prisma.attributeClass.create()` invocation:\n\n\nUnique constraint failed on the fields: (`name`,`environmentId`)" }, "schema": { "type": "object" } } }, "description": "Bad Request", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:22:39 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" } } } } }, "summary": "Create Attribute Class", "tags": ["Management API > Attribute Class"] } }, "/api/v1/management/attribute-classes/{attributeClassId}": { "delete": { "description": "Delete an attribute class by its ID. Please note that you currently cannot delete the \"automatic\" type of attributes. Please ignore them if you do not wish to utilise them.", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "attributeClassId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "archived": false, "createdAt": "2024-04-22T08:59:27.319Z", "description": null, "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvaq78470004mhqfm0x3kasv", "name": "Init Attribute 2", "type": "code", "updatedAt": "2024-04-22T08:59:27.319Z" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 09:58:24 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" } } } }, "400": { "content": { "application/json": { "example": { "code": "bad_request", "details": {}, "message": "Automatic Attribute Classes cannot be deleted" }, "schema": { "type": "object" } } }, "description": "Bad Request", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 09:57:48 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" } } } }, "404": { "content": { "application/json": { "example": { "code": "not_found", "details": { "resource_id": "clurwouax000ezffxs7unemg2s", "resource_type": "Attribute Class" }, "message": "Attribute Class not found" }, "schema": { "type": "object" } } }, "description": "Not Found", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 09:57:29 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" } } } } }, "summary": "Delete Attribute Class", "tags": ["Management API > Attribute Class"] }, "get": { "description": "Fetches an Attribute Class by its ID", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "attributeClassId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "archived": false, "createdAt": "2024-04-09T04:53:29.577Z", "description": "The email of the person", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clurwouax000ezffxs7unemg2", "name": "email", "type": "automatic", "updatedAt": "2024-04-09T04:53:29.577Z" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 09:15:25 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" } } } }, "404": { "content": { "application/json": { "example": { "code": "not_found", "details": { "resource_id": "clurwouax000ezffxs7unemg2s", "resource_type": "Attribute Class" }, "message": "Attribute Class not found" }, "schema": { "type": "object" } } }, "description": "Not Found", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 09:15:59 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" } } } }, "500": { "content": { "application/json": { "example": { "code": "internal_server_error", "details": {}, "message": "Some error occurred" }, "schema": { "type": "object" } } }, "description": "Internal Server Error", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 09:15:37 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" } } } } }, "summary": "Get Attribute Class by ID", "tags": ["Management API > Attribute Class"] } }, "/api/v1/management/contact-attribute-keys": { "get": { "description": "Retrieve a list of all contact attribute keys defined in the current environment", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "createdAt": "2024-11-07T12:25:48.589Z", "description": "The email of the person", "environmentId": "cm37a748d0008hbwhqvvuba23", "id": "cm37a748d000ahbwhd5bbwc09", "isUnique": true, "key": "email", "name": "email", "type": "default", "updatedAt": "2024-12-03T13:30:28.620Z" } ] }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:37:25 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" } } } } }, "summary": "Get All Contact Attribute Keys", "tags": ["Management API > Contact Attribute Keys"] } }, "/api/v1/management/contact-attribute-keys/{contactAttributeKeyId}": { "get": { "description": "Retrieve a specific contact attribute key by its ID. This returns detailed information about how a particular attribute is defined in your environment.", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "description": "The ID of the contact attribute key to retrieve", "in": "path", "name": "contactAttributeKeyId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "createdAt": "2024-11-07T12:25:48.589Z", "description": "The email of the person", "environmentId": "cm37a748d0008hbwhqvvuba23", "id": "cm37a748d000ahbwhd5bbwc09", "isUnique": true, "key": "email", "name": "email", "type": "default", "updatedAt": "2024-12-03T13:30:28.620Z" } }, "schema": { "properties": { "data": { "properties": { "createdAt": { "description": "Timestamp when the attribute key was created", "format": "date-time", "type": "string" }, "description": { "description": "Detailed description of what this attribute represents", "type": "string" }, "environmentId": { "description": "ID of the environment this attribute key belongs to", "type": "string" }, "id": { "description": "Unique identifier for the attribute key", "type": "string" }, "isUnique": { "description": "Whether this attribute must have unique values across contacts", "type": "boolean" }, "key": { "description": "The machine-readable identifier for the attribute", "type": "string" }, "name": { "description": "Human-readable name for the attribute", "type": "string" }, "type": { "description": "The type of attribute (e.g., \"default\")", "type": "string" }, "updatedAt": { "description": "Timestamp when the attribute key was last updated", "format": "date-time", "type": "string" } }, "type": "object" } }, "type": "object" } } }, "description": "OK", "headers": { "content-type": { "schema": { "example": "application/json", "type": "string" } }, "vary": { "schema": { "example": "RSC, Next-Router-State-Tree, Next-Router-Prefetch", "type": "string" } } } }, "404": { "content": { "application/json": { "example": { "code": "not_found", "details": { "resource_id": "cm37a748d000ahbwhd5bbwc09", "resource_type": "ContactAttributeKey" }, "message": "Contact attribute key not found" }, "schema": { "properties": { "code": { "example": "not_found", "type": "string" }, "details": { "properties": { "resource_id": { "type": "string" }, "resource_type": { "example": "ContactAttributeKey", "type": "string" } }, "type": "object" }, "message": { "example": "Contact attribute key not found", "type": "string" } }, "type": "object" } } }, "description": "Not Found" } }, "summary": "Get Contact Attribute Key by ID", "tags": ["Management API > Contact Attribute Keys"] } }, "/api/v1/management/contact-attributes": { "get": { "description": "Retrieve a list of all contact attributes in the current environment", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "attributeKeyId": "cm4jnsxxh00ukh3aq08gpdafw", "contactId": "cm4jnsxcd00ufh3aqz1b6zox6", "createdAt": "2024-12-11T08:59:38.309Z", "id": "cm4jnsxxh00umh3aq76q08ah1", "updatedAt": "2024-12-11T08:59:38.309Z", "value": "eight" } ] }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:37:25 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" } } } } }, "summary": "Get All Contact Attributes", "tags": ["Management API > Contact Attributes"] } }, "/api/v1/management/contacts": { "get": { "description": "Retrieve a list of all contacts for the current environment", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "createdAt": "2024-12-11T08:59:37.550Z", "environmentId": "cm37a748d0001hbwhqvvuba23", "id": "cm4jnsxcd012fh3aqz1b6zox6", "updatedAt": "2024-12-11T08:59:37.550Z", "userId": null }, { "createdAt": "2024-12-12T12:09:46.859Z", "environmentId": "cm37a748d0001hbwhqvvuba23", "id": "cm4la1bhn12g5cr5qh8p6v874", "updatedAt": "2024-12-12T12:09:46.859Z", "userId": null } ] }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:37:25 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" } } } } }, "summary": "Get All Contacts", "tags": ["Management API > Contacts"] } }, "/api/v1/management/contacts/{contactId}": { "get": { "description": "Retrieve a specific contact by its ID", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "description": "The ID of the contact to retrieve", "in": "path", "name": "contactId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "createdAt": "2024-12-11T08:59:37.550Z", "environmentId": "cm37a748d0008hbwhqvvuba23", "id": "cm4jnsxcd00ufh3aqz1b6zox6", "updatedAt": "2024-12-11T08:59:37.550Z", "userId": null } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:37:25 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" } } } }, "404": { "content": { "application/json": { "example": { "code": "not_found", "details": { "resource_id": "cm4jnsxcd00ufh3aqz1b6zox6", "resource_type": "Contact" }, "message": "Contact not found" }, "schema": { "type": "object" } } }, "description": "Not Found" } }, "summary": "Get Contact by ID", "tags": ["Management API > Contacts"] } }, "/api/v1/management/me": { "get": { "description": "Fetches the product associated with the passed API key", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "createdAt": "2024-04-09T04:53:29.577Z", "id": "clurwouax000azffxt7n5unn3", "product": { "id": "clurwouaj0003zffx0hu6bonm", "name": "My Product" }, "type": "production", "updatedAt": "2024-04-09T14:14:49.256Z", "widgetSetupCompleted": true }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:31:38 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" } } } } }, "summary": "Me", "tags": ["Management API > Me"] } }, "/api/v1/management/people": { "get": { "description": "Get all the identified people from Formbricks", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "attributes": { "Init Attribute 1": "eight", "language": "gu" }, "createdAt": "2024-04-22T08:59:26.959Z", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvaq77u70002mhqfih5bnk0i", "updatedAt": "2024-04-22T08:59:26.959Z", "userId": "THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING" }, { "attributes": {}, "createdAt": "2024-04-23T07:12:44.928Z", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvc1tuo00003494jnz64wd0t", "updatedAt": "2024-04-23T07:12:44.928Z", "userId": "1" }, { "attributes": { "Init Attribute 1": "eight", "language": "gu" }, "createdAt": "2024-04-23T07:30:42.730Z", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvc2gyay0009494jbanqhr79", "updatedAt": "2024-04-23T07:30:42.730Z", "userId": "SECOND-USER-ID" }, { "attributes": {}, "createdAt": "2024-04-23T07:35:47.091Z", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvc2nh5g000h494jkr6qcxhz", "updatedAt": "2024-04-23T07:35:47.091Z", "userId": "Shubham" }, { "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" } ] }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:35:32 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" } } } } }, "summary": "Get All Persons", "tags": ["Management API > People"] } }, "/api/v1/management/people/{personId}": { "delete": { "description": "Delete an identified person from Formbricks.", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "personId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "success": "Person deleted successfully" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:37:27 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" } } } }, "404": { "content": { "application/json": { "example": { "code": "not_found", "details": { "resource_id": "clvaq77u70002mhqfih5bnk0i", "resource_type": "Person" }, "message": "Person not found" }, "schema": { "type": "object" } } }, "description": "Not Found", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:37:37 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" } } } } }, "summary": "Delete Person", "tags": ["Management API > People"] }, "get": { "description": "Get a person by their internal ID on Formbricks. This internal ID can be found from the Get All Person endpoint.", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "personId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "attributes": { "Init Attribute 1": "eight", "language": "gu" }, "createdAt": "2024-04-22T08:59:26.959Z", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvaq77u70002mhqfih5bnk0i", "updatedAt": "2024-04-22T08:59:26.959Z", "userId": "THIS-IS-A-VERY-LONG-USER-ID-FOR-TESTING" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:36:41 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" } } } } }, "summary": "Get Person by ID", "tags": ["Management API > People"] } }, "/api/v1/management/responses": { "get": { "description": "Pass the surveyId as a Query Parameter & only fetch responses for a specific survey that you have access to.", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "example": "{{surveyId}}", "in": "query", "name": "surveyId", "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "createdAt": "2024-04-23T08:03:32.901Z", "data": { "1": "clicked", "hs8yd14l9h8u353tjmv6rzaw": "clicked", "hs8yd14l9h8u353tjmv6rzawqqq": "clicked", "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?", "tcgls012312312063n8ri7dtrbnepcmz": "Who? Who? Who?" }, "finished": true, "id": "clvc3n6hy000u494jn2ypw30r", "language": null, "meta": { "action": "test action", "source": "Postman API", "url": "https://postman.com", "userAgent": {} }, "notes": [], "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": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": {}, "updatedAt": "2024-04-23T08:14:12.343Z" }, { "createdAt": "2024-04-23T08:00:01.151Z", "data": { "hs8yd14l9h8u353tjmv6rzaw": "clicked", "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?" }, "finished": false, "id": "clvc3in3z000t494j4wtax1oi", "language": null, "meta": { "userAgent": {} }, "notes": [], "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": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": {}, "updatedAt": "2024-04-23T08:00:01.151Z" }, { "createdAt": "2024-04-23T07:59:49.759Z", "data": { "hs8yd14l9h8u353tjmv6rzaw": "clicked", "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?" }, "finished": true, "id": "clvc3iebk000s494j37tq10o3", "language": null, "meta": { "userAgent": {} }, "notes": [], "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": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": {}, "updatedAt": "2024-04-23T07:59:49.759Z" }, { "createdAt": "2024-04-23T07:57:27.583Z", "data": { "hs8yd14l9h8u353tjmv6rzaw": "ho ho ho", "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?" }, "finished": true, "id": "clvc3fcm7000r494jgvs99mqa", "language": null, "meta": { "userAgent": {} }, "notes": [], "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": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": {}, "updatedAt": "2024-04-23T07:57:27.583Z" }, { "createdAt": "2024-04-23T07:56:59.441Z", "data": { "hs7yd14l9h8u353tjmv6rzaw": "clicked", "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?" }, "finished": true, "id": "clvc3eqwj000q494jali1xhzq", "language": null, "meta": { "userAgent": {} }, "notes": [], "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": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": {}, "updatedAt": "2024-04-23T07:56:59.441Z" }, { "createdAt": "2024-04-23T07:53:49.935Z", "data": { "hs8yd14l9h8u353tjmv6rzaw": "clicked", "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?" }, "finished": true, "id": "clvc3aool000p494jzjuukfzu", "language": null, "meta": { "userAgent": {} }, "notes": [], "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": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": {}, "updatedAt": "2024-04-23T07:53:49.935Z" }, { "createdAt": "2024-04-12T13:49:47.746Z", "data": { "hs8yd14l9h8u353tjmv6rzaw": "clicked", "inputType": "text", "tcgls0063n8ri7dtrbnepcmz": "fsef" }, "finished": true, "id": "cluwq6352000klvz6t82e1oyt", "language": null, "meta": { "action": "New Session", "url": "http://localhost:3002/app?formbricksDebug=true", "userAgent": { "browser": "Chrome", "os": "Linux" } }, "notes": [], "person": null, "personAttributes": null, "singleUseId": null, "surveyId": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": { "_total": 6908, "hs8yd14l9h8u353tjmv6rzaw": 4094.60000000149, "tcgls0063n8ri7dtrbnepcmz": 2813.39999999851 }, "updatedAt": "2024-04-12T13:53:24.650Z" }, { "createdAt": "2024-04-12T13:09:54.616Z", "data": { "hs8yd14l9h8u353tjmv6rzaw": "clicked" }, "finished": false, "id": "cluwoqsl4000ilvz6xmbaf5fl", "language": null, "meta": { "action": "New Session", "url": "http://localhost:3002/app?formbricksDebug=true", "userAgent": { "browser": "Chrome", "os": "Linux" } }, "notes": [], "person": null, "personAttributes": null, "singleUseId": null, "surveyId": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": {}, "updatedAt": "2024-04-12T13:09:54.616Z" }, { "createdAt": "2024-04-12T13:09:19.823Z", "data": { "hs8yd14l9h8u353tjmv6rzaw": "clicked", "inputType": "text", "tcgls0063n8ri7dtrbnepcmz": "aaa" }, "finished": true, "id": "cluwoq1qn000glvz6ntrzf3kc", "language": null, "meta": { "action": "New Session", "url": "http://localhost:3002/app?formbricksDebug=true", "userAgent": { "browser": "Chrome", "os": "Linux" } }, "notes": [], "person": null, "personAttributes": null, "singleUseId": null, "surveyId": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": { "_total": 4311.599999997765, "hs8yd14l9h8u353tjmv6rzaw": 2231.199999999255, "tcgls0063n8ri7dtrbnepcmz": 2080.39999999851 }, "updatedAt": "2024-04-12T13:09:23.793Z" }, { "createdAt": "2024-04-12T13:08:58.008Z", "data": { "hs8yd14l9h8u353tjmv6rzaw": "clicked" }, "finished": false, "id": "cluwopkwr000dlvz6mxvueqm8", "language": null, "meta": { "action": "New Session", "url": "http://localhost:3002/app?formbricksDebug=true", "userAgent": { "browser": "Chrome", "os": "Linux" } }, "notes": [], "person": null, "personAttributes": null, "singleUseId": null, "surveyId": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": {}, "updatedAt": "2024-04-12T13:08:58.008Z" }, { "createdAt": "2024-04-12T13:07:01.174Z", "data": { "hs8yd14l9h8u353tjmv6rzaw": "clicked" }, "finished": true, "id": "cluwon2ra000clvz6pwo3b5g3", "language": null, "meta": { "action": "New Session", "url": "http://localhost:3002/app?formbricksDebug=true", "userAgent": { "browser": "Chrome", "os": "Linux" } }, "notes": [], "person": null, "personAttributes": null, "singleUseId": null, "surveyId": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": {}, "updatedAt": "2024-04-12T13:07:01.174Z" } ] }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:40:24 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" } } } } }, "summary": "Get Survey Responses", "tags": ["Management API > Response"] }, "post": { "description": "Create a user response using the management API", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "createdAt": "2024-09-05T08:44:16.051Z", "data": { "hg508afs7lgx8nlni5dtit5u": ["Hello World"] }, "finished": false, "language": "default", "surveyId": "clwj7hi7r0000vfhpfze6vjdg", "updatedAt": "2024-09-05T08:44:16.051Z" }, "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": {} }, "notes": [], "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" } } } } }, "summary": "Create Response", "tags": ["Management API > Response"] } }, "/api/v1/management/responses/{responseId}": { "delete": { "description": "Delete a response with its ID", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "responseId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "createdAt": "2024-04-23T08:03:32.901Z", "data": { "1": "clicked", "hs8yd14l9h8u353tjmv6rzaw": "clicked", "hs8yd14l9h8u353tjmv6rzawqqq": "clicked", "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?", "tcgls012312312063n8ri7dtrbnepcmz": "Who? Who? Who?" }, "finished": true, "id": "clvc3n6hy000u494jn2ypw30r", "language": null, "meta": { "action": "test action", "source": "Postman API", "url": "https://postman.com", "userAgent": {} }, "notes": [], "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": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": {}, "updatedAt": "2024-04-23T08:14:12.343Z" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:46:40 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 11:46:49 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" } } } } }, "summary": "Delete Response", "tags": ["Management API > Response"] }, "get": { "description": "Fetch the entire response object based on its ID", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "responseId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "createdAt": "2024-04-23T08:03:32.901Z", "data": { "1": "clicked", "hs8yd14l9h8u353tjmv6rzaw": "clicked", "hs8yd14l9h8u353tjmv6rzawqqq": "clicked", "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?", "tcgls012312312063n8ri7dtrbnepcmz": "Who? Who? Who?" }, "finished": true, "id": "clvc3n6hy000u494jn2ypw30r", "language": null, "meta": { "action": "test action", "source": "Postman API", "url": "https://postman.com", "userAgent": {} }, "notes": [], "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": "clusgqpml0000135cxet3y8vh", "tags": [], "ttc": {}, "updatedAt": "2024-04-23T08:14:12.343Z" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:46:08 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 11:45:38 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" } } } } }, "summary": "Get Response by ID", "tags": ["Management API > Response"] }, "put": { "description": "Update an existing user response with new data", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "responseId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "data": { "hs8yd14l9h8u353tjmv6rzawqqq": "clicked", "language": "en", "tcgls0063n8ri7dtrbnepcmz": "Who? Who? Who?", "ttc": { "hs8yd14l9h8u353tjmv6rzawqqq": 120, "tcgls0063n8ri7dtrbnepcmz": 190 } }, "finished": true }, "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": {} }, "notes": [], "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" } } } } }, "summary": "Update Response", "tags": ["Management API > Response"] } }, "/api/v1/management/surveys": { "get": { "description": "Fetches all existing surveys", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "autoClose": null, "autoComplete": null, "closeOnDate": null, "createdAt": "2024-08-05T11:08:27.042Z", "createdBy": "clfv1zvij0000ru0gunwpy43a", "delay": 0, "displayLimit": null, "displayOption": "displayOnce", "displayPercentage": null, "endings": [ { "buttonLabel": { "default": "Create your own Survey" }, "buttonLink": "https://formbricks.com/signup", "headline": { "default": "Thank you!" }, "id": "p73t62dgwq0cvmtt6ug0hmfc", "subheader": { "default": "We appreciate your feedback." }, "type": "endScreen" } ], "environmentId": "clygwxsbh01v5aga1sdien2th", "hiddenFields": { "enabled": false, "fieldIds": [] }, "id": "clzgw1k4i0001mny1unf8eggn", "isVerifyEmailEnabled": false, "languages": [], "name": "Example Survey", "pin": null, "productOverwrites": null, "questions": [ { "headline": { "default": "What would you like to know?" }, "id": "ovpy6va1hab7fl12n913zua0", "inputType": "text", "placeholder": { "default": "Type your answer here..." }, "required": true, "subheader": { "default": "This is an example survey." }, "type": "openText" }, { "choices": [ { "id": "xpoxuu3sifk1ee8he67ctf5i", "label": { "default": "Sun ☀️" } }, { "id": "hnsovcdmxtcbly6tig1az3qc", "label": { "default": "Ocean 🌊" } }, { "id": "kcnelzdxknvwo8fq20d3nrr5", "label": { "default": "Palms 🌴" } } ], "headline": { "default": "What's important on vacay?" }, "id": "awkn2llljy7a4oulp5t15yec", "required": true, "shuffleOption": "none", "type": "multipleChoiceMulti" } ], "recontactDays": null, "redirectUrl": null, "resultShareKey": null, "runOnDate": null, "segment": null, "showLanguageSwitch": null, "singleUse": { "enabled": false, "isEncrypted": true }, "status": "inProgress", "styling": null, "surveyClosedMessage": null, "triggers": [], "type": "link", "updatedAt": "2024-08-05T11:09:21.826Z", "welcomeCard": { "enabled": true, "fileUrl": "", "headline": { "default": "Welcome!" }, "html": { "default": "
Thanks for providing your feedback - let's go!
" }, "showResponseCount": false, "timeToFinish": false } } ] }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:48:18 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" } } } } }, "summary": "Get All Surveys", "tags": ["Management API > Survey"] }, "post": { "description": "Create a survey with granular settings, questions, their types, welcomeCard, thankYouCard, languages, etc right from this API. We'd however recommend you to do this via our Formbricks App with the UI for a better visual experience.", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "autoClose": null, "autoComplete": null, "closeOnDate": null, "createdBy": null, "delay": 0, "displayLimit": null, "displayOption": "displayOnce", "displayPercentage": null, "endings": [ { "buttonLabel": { "default": "Create your own Survey" }, "buttonLink": "https://formbricks.com/signup", "headline": { "default": "Thank you!" }, "id": "p73t62dgwq0cvmtt6ug0hmfc", "subheader": { "default": "We appreciate your feedback." }, "type": "endScreen" } ], "environmentId": "{{environmentId}}", "hiddenFields": { "enabled": false, "fieldIds": [] }, "isVerifyEmailEnabled": false, "languages": [], "name": "Example Survey", "pin": null, "productOverwrites": null, "questions": [ { "headline": { "default": "What would you like to know?" }, "id": "ovpy6va1hab7fl12n913zua0", "inputType": "text", "placeholder": { "default": "Type your answer here..." }, "required": true, "subheader": { "default": "This is an example survey." }, "type": "openText" }, { "choices": [ { "id": "xpoxuu3sifk1ee8he67ctf5i", "label": { "default": "Sun ☀️" } }, { "id": "hnsovcdmxtcbly6tig1az3qc", "label": { "default": "Ocean 🌊" } }, { "id": "kcnelzdxknvwo8fq20d3nrr5", "label": { "default": "Palms 🌴" } } ], "headline": { "default": "What's important on vacay?" }, "id": "awkn2llljy7a4oulp5t15yec", "required": true, "shuffleOption": "none", "type": "multipleChoiceMulti" } ], "recontactDays": null, "redirectUrl": null, "resultShareKey": null, "runOnDate": null, "segmentId": null, "showLanguageSwitch": null, "singleUse": { "enabled": false, "isEncrypted": true }, "status": "inProgress", "styling": null, "surveyClosedMessage": null, "triggers": [], "type": "link", "welcomeCard": { "enabled": true, "fileUrl": "", "headline": { "default": "Welcome!" }, "html": { "default": "Thanks for providing your feedback - let's go!
" }, "showResponseCount": false, "timeToFinish": false } }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "example": { "data": { "autoClose": null, "autoComplete": null, "closeOnDate": null, "createdAt": "2024-08-05T11:08:27.042Z", "createdBy": "clfv1zvij0000ru0gunwpy43a", "delay": 0, "displayLimit": null, "displayOption": "displayOnce", "displayPercentage": null, "endings": [ { "buttonLabel": { "default": "Create your own Survey" }, "buttonLink": "https://formbricks.com/signup", "headline": { "default": "Thank you!" }, "id": "p73t62dgwq0cvmtt6ug0hmfc", "subheader": { "default": "We appreciate your feedback." }, "type": "endScreen" } ], "environmentId": "clygwxsbh01v5aga1sdien2th", "hiddenFields": { "enabled": false, "fieldIds": [] }, "id": "clzgw1k4i0001mny1unf8eggn", "isVerifyEmailEnabled": false, "languages": [], "name": "Example Survey", "pin": null, "productOverwrites": null, "questions": [ { "headline": { "default": "What would you like to know?" }, "id": "ovpy6va1hab7fl12n913zua0", "inputType": "text", "placeholder": { "default": "Type your answer here..." }, "required": true, "subheader": { "default": "This is an example survey." }, "type": "openText" }, { "choices": [ { "id": "xpoxuu3sifk1ee8he67ctf5i", "label": { "default": "Sun ☀️" } }, { "id": "hnsovcdmxtcbly6tig1az3qc", "label": { "default": "Ocean 🌊" } }, { "id": "kcnelzdxknvwo8fq20d3nrr5", "label": { "default": "Palms 🌴" } } ], "headline": { "default": "What's important on vacay?" }, "id": "awkn2llljy7a4oulp5t15yec", "required": true, "shuffleOption": "none", "type": "multipleChoiceMulti" } ], "recontactDays": null, "redirectUrl": null, "resultShareKey": null, "runOnDate": null, "segment": null, "showLanguageSwitch": null, "singleUse": { "enabled": false, "isEncrypted": true }, "status": "inProgress", "styling": null, "surveyClosedMessage": null, "triggers": [], "type": "link", "updatedAt": "2024-08-05T11:09:21.826Z", "welcomeCard": { "enabled": true, "fileUrl": "", "headline": { "default": "Welcome!" }, "html": { "default": "Thanks for providing your feedback - let's go!
" }, "showResponseCount": false, "timeToFinish": false } } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:29:29 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" } } } }, "400": { "content": { "application/json": { "example": { "code": "bad_request", "details": { "hiddenFields.enabled": "Required" }, "message": "Fields are missing or incorrectly formatted" }, "schema": { "type": "object" } } }, "description": "Bad Request", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:29:50 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "access-control-allow-headers": { "schema": { "example": "Content-Type, Authorization", "type": "string" } }, "access-control-allow-methods": { "schema": { "example": "GET, POST, PUT, DELETE, OPTIONS", "type": "string" } }, "access-control-allow-origin": { "schema": { "example": "*", "type": "string" } }, "content-type": { "schema": { "example": "application/json", "type": "string" } }, "vary": { "schema": { "example": "RSC, Next-Router-State-Tree, Next-Router-Prefetch", "type": "string" } } } } }, "summary": "Create Survey", "tags": ["Management API > Survey"] } }, "/api/v1/management/surveys/{surveyId}": { "delete": { "description": "Delete a Survey by its ID. Please use this only when extrememly necessary.", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "surveyId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "autoClose": null, "autoComplete": null, "closeOnDate": null, "createdAt": "2024-08-05T11:08:27.042Z", "createdBy": "clfv1zvij0000ru0gunwpy43a", "delay": 0, "displayLimit": null, "displayOption": "displayOnce", "displayPercentage": null, "endings": [ { "buttonLabel": { "default": "Create your own Survey" }, "buttonLink": "https://formbricks.com/signup", "headline": { "default": "Thank you!" }, "id": "p73t62dgwq0cvmtt6ug0hmfc", "subheader": { "default": "We appreciate your feedback." }, "type": "endScreen" } ], "environmentId": "clygwxsbh01v5aga1sdien2th", "hiddenFields": { "enabled": false, "fieldIds": [] }, "id": "clzgw1k4i0001mny1unf8eggn", "isVerifyEmailEnabled": false, "languages": [], "name": "Example Survey", "pin": null, "productOverwrites": null, "questions": [ { "headline": { "default": "What would you like to know?" }, "id": "ovpy6va1hab7fl12n913zua0", "inputType": "text", "placeholder": { "default": "Type your answer here..." }, "required": true, "subheader": { "default": "This is an example survey." }, "type": "openText" }, { "choices": [ { "id": "xpoxuu3sifk1ee8he67ctf5i", "label": { "default": "Sun ☀️" } }, { "id": "hnsovcdmxtcbly6tig1az3qc", "label": { "default": "Ocean 🌊" } }, { "id": "kcnelzdxknvwo8fq20d3nrr5", "label": { "default": "Palms 🌴" } } ], "headline": { "default": "What's important on vacay?" }, "id": "awkn2llljy7a4oulp5t15yec", "required": true, "shuffleOption": "none", "type": "multipleChoiceMulti" } ], "recontactDays": null, "redirectUrl": null, "resultShareKey": null, "runOnDate": null, "segment": null, "showLanguageSwitch": null, "singleUse": { "enabled": false, "isEncrypted": true }, "status": "inProgress", "styling": null, "surveyClosedMessage": null, "triggers": [], "type": "link", "updatedAt": "2024-08-05T11:09:21.826Z", "welcomeCard": { "enabled": true, "fileUrl": "", "headline": { "default": "Welcome!" }, "html": { "default": "Thanks for providing your feedback - let's go!
" }, "showResponseCount": false, "timeToFinish": false } } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:49:26 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" } } } }, "404": { "content": { "application/json": { "example": { "code": "not_found", "details": { "resource_id": "clusgqpml0000135cxet3y8vh", "resource_type": "Survey" }, "message": "Survey not found" }, "schema": { "type": "object" } } }, "description": "Not Found", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:49:33 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" } } } } }, "summary": "Delete Survey", "tags": ["Management API > Survey"] }, "get": { "description": "Fetch a survey object based on its ID", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "surveyId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "autoClose": null, "autoComplete": null, "closeOnDate": null, "createdAt": "2024-08-05T11:08:27.042Z", "createdBy": "clfv1zvij0000ru0gunwpy43a", "delay": 0, "displayLimit": null, "displayOption": "displayOnce", "displayPercentage": null, "endings": [ { "buttonLabel": { "default": "Create your own Survey" }, "buttonLink": "https://formbricks.com/signup", "headline": { "default": "Thank you!" }, "id": "p73t62dgwq0cvmtt6ug0hmfc", "subheader": { "default": "We appreciate your feedback." }, "type": "endScreen" } ], "environmentId": "clygwxsbh01v5aga1sdien2th", "hiddenFields": { "enabled": false, "fieldIds": [] }, "id": "clzgw1k4i0001mny1unf8eggn", "isVerifyEmailEnabled": false, "languages": [], "name": "Example Survey", "pin": null, "productOverwrites": null, "questions": [ { "headline": { "default": "What would you like to know?" }, "id": "ovpy6va1hab7fl12n913zua0", "inputType": "text", "placeholder": { "default": "Type your answer here..." }, "required": true, "subheader": { "default": "This is an example survey." }, "type": "openText" }, { "choices": [ { "id": "xpoxuu3sifk1ee8he67ctf5i", "label": { "default": "Sun ☀️" } }, { "id": "hnsovcdmxtcbly6tig1az3qc", "label": { "default": "Ocean 🌊" } }, { "id": "kcnelzdxknvwo8fq20d3nrr5", "label": { "default": "Palms 🌴" } } ], "headline": { "default": "What's important on vacay?" }, "id": "awkn2llljy7a4oulp5t15yec", "required": true, "shuffleOption": "none", "type": "multipleChoiceMulti" } ], "recontactDays": null, "redirectUrl": null, "resultShareKey": null, "runOnDate": null, "segment": null, "showLanguageSwitch": null, "singleUse": { "enabled": false, "isEncrypted": true }, "status": "inProgress", "styling": null, "surveyClosedMessage": null, "triggers": [], "type": "link", "updatedAt": "2024-08-05T11:09:21.826Z", "welcomeCard": { "enabled": true, "fileUrl": "", "headline": { "default": "Welcome!" }, "html": { "default": "Thanks for providing your feedback - let's go!
" }, "showResponseCount": false, "timeToFinish": false } } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 11:49:06 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" } } } } }, "summary": "Get Survey by ID", "tags": ["Management API > Survey"] }, "put": { "description": "Update an existing survey with new properties. This is also what we'd recommend you to do from the UI for a better visual feedback.", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "surveyId", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "name": "Example Survey" }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "example": { "data": { "autoClose": null, "autoComplete": null, "closeOnDate": null, "createdAt": "2024-08-05T11:08:27.042Z", "createdBy": "clfv1zvij0000ru0gunwpy43a", "delay": 0, "displayLimit": null, "displayOption": "displayOnce", "displayPercentage": null, "endings": [ { "buttonLabel": { "default": "Create your own Survey" }, "buttonLink": "https://formbricks.com/signup", "headline": { "default": "Thank you!" }, "id": "p73t62dgwq0cvmtt6ug0hmfc", "subheader": { "default": "We appreciate your feedback." }, "type": "endScreen" } ], "environmentId": "clygwxsbh01v5aga1sdien2th", "hiddenFields": { "enabled": false, "fieldIds": [] }, "id": "clzgw1k4i0001mny1unf8eggn", "isVerifyEmailEnabled": false, "languages": [], "name": "Example Survey", "pin": null, "productOverwrites": null, "questions": [ { "headline": { "default": "What would you like to know?" }, "id": "ovpy6va1hab7fl12n913zua0", "inputType": "text", "placeholder": { "default": "Type your answer here..." }, "required": true, "subheader": { "default": "This is an example survey." }, "type": "openText" }, { "choices": [ { "id": "xpoxuu3sifk1ee8he67ctf5i", "label": { "default": "Sun ☀️" } }, { "id": "hnsovcdmxtcbly6tig1az3qc", "label": { "default": "Ocean 🌊" } }, { "id": "kcnelzdxknvwo8fq20d3nrr5", "label": { "default": "Palms 🌴" } } ], "headline": { "default": "What's important on vacay?" }, "id": "awkn2llljy7a4oulp5t15yec", "required": true, "shuffleOption": "none", "type": "multipleChoiceMulti" } ], "recontactDays": null, "redirectUrl": null, "resultShareKey": null, "runOnDate": null, "segment": null, "showLanguageSwitch": null, "singleUse": { "enabled": false, "isEncrypted": true }, "status": "inProgress", "styling": null, "surveyClosedMessage": null, "triggers": [], "type": "link", "updatedAt": "2024-08-05T11:09:21.826Z", "welcomeCard": { "enabled": true, "fileUrl": "", "headline": { "default": "Welcome!" }, "html": { "default": "Thanks for providing your feedback - let's go!
" }, "showResponseCount": false, "timeToFinish": false } } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:34:09 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" } } } }, "400": { "content": { "application/json": { "example": { "code": "bad_request", "details": {}, "message": "Survey with ID cls79mi7j0000hq9o4dd60xsk not found" }, "schema": { "type": "object" } } }, "description": "Bad Request", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:30:32 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" } } } } }, "summary": "Update Survey", "tags": ["Management API > Survey"] } }, "/api/v1/management/surveys/{surveyId}/singleUseIds": { "get": { "description": "Generates multiple single use survey links for a survey based on its id.", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "surveyId", "required": true, "schema": { "type": "string" } }, { "description": "Number of links to generate.", "example": 10, "in": "query", "name": "limit", "required": false, "schema": { "default": 10, "exclusiveMaximum": false, "exclusiveMinimum": false, "maximum": 5000, "minimum": 1, "type": "integer" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ "https://app.formbricks.com/s/clzqym2l300015ycm88weliq0?suId=ohkj3qx6d0wdo9r3nfpm3bgj", "https://app.formbricks.com/s/clzqym2l300015ycm88weliq0?suId=ci6la2lzj63pvsp6x3eqbhff", "https://app.formbricks.com/s/clzqym2l300015ycm88weliq0?suId=ge8xc013ad5elmt144h2gpl4", "https://app.formbricks.com/s/clzqym2l300015ycm88weliq0?suId=zqh6x0judrawhasr4pmywbkb", "https://app.formbricks.com/s/clzqym2l300015ycm88weliq0?suId=mpqm14y2ub8utokxci6phr1y", "https://app.formbricks.com/s/clzqym2l300015ycm88weliq0?suId=g5ej7f8w9tc87xkvefeajoxa", "https://app.formbricks.com/s/clzqym2l300015ycm88weliq0?suId=av7swj3jlld97ejbw7lymbau", "https://app.formbricks.com/s/clzqym2l300015ycm88weliq0?suId=sub2yfok3sdsje2dddzf0l5d", "https://app.formbricks.com/s/clzqym2l300015ycm88weliq0?suId=hbiee77q8qunti3lxmtoq7w9", "https://app.formbricks.com/s/clzqym2l300015ycm88weliq0?suId=eo5kb2suapyks59j84egijso" ] }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Mon, 19 Aug 2024 12:55:21 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "X-Content-Type-Options": { "schema": { "example": "nosniff", "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" } } } }, "400": { "content": { "application/json": { "example": { "code": "bad_request", "details": {}, "message": "Single use links are not enabled for this survey" }, "schema": { "type": "object" } } }, "description": "Bad Request", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Mon, 19 Aug 2024 12:58:34 GMT", "type": "string" } }, "Keep-Alive": { "schema": { "example": "timeout=5", "type": "string" } }, "Transfer-Encoding": { "schema": { "example": "chunked", "type": "string" } }, "X-Content-Type-Options": { "schema": { "example": "nosniff", "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" } } } } }, "summary": "Get SingleUse Links", "tags": ["Management API > Survey"] } }, "/api/v1/webhooks": { "get": { "description": "Retrieve a list of all webhooks for the current environment", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": [ { "createdAt": "2024-04-23T12:35:45.326Z", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvcdd8oe000nxz1zhz6q9z3l", "name": null, "source": "user", "surveyIds": [], "triggers": ["responseCreated", "responseUpdated", "responseFinished"], "updatedAt": "2024-04-23T12:35:45.326Z", "url": "https://eoy8o887lmsqmhz.m.pipedream.net" }, { "createdAt": "2024-04-23T12:36:07.100Z", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvcddph9000oxz1zsnjhvllw", "name": null, "source": "user", "surveyIds": [], "triggers": ["responseCreated", "responseUpdated", "responseFinished"], "updatedAt": "2024-04-23T12:36:07.100Z", "url": "https://eoy8o887lmsqmhz.m.pipedream.net" }, { "createdAt": "2024-04-23T12:36:56.507Z", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvcderln000pxz1z95jqj0qw", "name": null, "source": "user", "surveyIds": [], "triggers": ["responseCreated", "responseUpdated", "responseFinished"], "updatedAt": "2024-04-23T12:36:56.507Z", "url": "https://eoy8o887lmsqmhz.m.pipedream.net" } ] }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:37:25 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" } } } } }, "summary": "Get All Webhooks", "tags": ["Management API > Webhook"] }, "post": { "description": "Create a new webhook right from the API and see it active right away!", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "example": { "triggers": ["responseCreated", "responseUpdated", "responseFinished"], "url": "https://eoy8o887lmsqmhz.m.pipedream.net" }, "type": "object" } } } }, "responses": { "200": { "content": { "application/json": { "example": { "data": { "createdAt": "2024-04-23T12:35:45.326Z", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvcdd8oe000nxz1zhz6q9z3l", "name": null, "source": "user", "surveyIds": [], "triggers": ["responseCreated", "responseUpdated", "responseFinished"], "updatedAt": "2024-04-23T12:35:45.326Z", "url": "https://eoy8o887lmsqmhz.m.pipedream.net" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:35:45 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" } } } } }, "summary": "Create Webhook", "tags": ["Management API > Webhook"] } }, "/api/v1/webhooks/{webhookId}": { "delete": { "description": "Delete an existing webhook by provifding it's ID. It will immediately apply and not trigger again.", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "webhookId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "createdAt": "2024-04-23T12:35:45.326Z", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvcdd8oe000nxz1zhz6q9z3l", "name": null, "source": "user", "surveyIds": [], "triggers": ["responseCreated", "responseUpdated", "responseFinished"], "updatedAt": "2024-04-23T12:35:45.326Z", "url": "https://eoy8o887lmsqmhz.m.pipedream.net" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:38:57 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" } } } }, "404": { "content": { "application/json": { "example": { "code": "not_found", "details": { "resource_id": "clvcdd8oe000nxz1zhz6q9z3l", "resource_type": "Webhook" }, "message": "Webhook not found" }, "schema": { "type": "object" } } }, "description": "Not Found", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:39:22 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" } } } } }, "summary": "Delete Webhook", "tags": ["Management API > Webhook"] }, "get": { "description": "Get a specific webhook object based on its ID", "parameters": [ { "example": "{{apiKey}}", "in": "header", "name": "x-api-key", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "webhookId", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "data": { "createdAt": "2024-04-23T12:35:45.326Z", "environmentId": "clurwouax000azffxt7n5unn3", "id": "clvcdd8oe000nxz1zhz6q9z3l", "name": null, "source": "user", "surveyIds": [], "triggers": ["responseCreated", "responseUpdated", "responseFinished"], "updatedAt": "2024-04-23T12:35:45.326Z", "url": "https://eoy8o887lmsqmhz.m.pipedream.net" } }, "schema": { "type": "object" } } }, "description": "OK", "headers": { "Connection": { "schema": { "example": "keep-alive", "type": "string" } }, "Date": { "schema": { "example": "Tue, 23 Apr 2024 12:38:29 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" } } } } }, "summary": "Get Webhook", "tags": ["Management API > Webhook"] } }, "/health": { "get": { "description": "Formbricks' Health Check endpoint to make sure the App & the Database are connected with each other & up!", "responses": { "200": { "content": { "text/plain": { "example": "\n\n \n \n \n \n \n \n \n \n \n \n \nAll systems are up and running
\n