Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@formbricks/api

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@formbricks/api

Formbricks-api is an api wrapper for the Formbricks client API

  • 1.4.0
  • npm
  • Socket score

Version published
Weekly downloads
2.2K
decreased by-24.93%
Maintainers
1
Weekly downloads
 
Created
Source

@formbricks/api - API Wrapper for Formbricks

Installation

npm install @formbricks/api

Usage

Create API Client
import { EnvironmentId, FormbricksAPI } from "@formbricks/api";

const api = new FormbricksAPI({
  apiHost: "http://localhost:3000",
  environmentId: "clgwh8maj0005n2f66pwzev3r" as EnvironmentId,
});

Note All of the following methods return a Result from the @formbricks/errors package.

Create a new response
const response = await api.createResponse({
  surveyId: "......" as SurveyId,
  personId: "......" as PersonId,
  data: {
    questionId: "response",
  },
});
Update an existing response
const response = await api.updateResponse({
  responseId: "......" as ResponseId, // If you pass response.value.id from createResponse, you dont need 'as ResponseId'
  data: {
    questionId: "response",
  },
});

Keywords

FAQs

Package last updated on 21 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc