Skip to main content
Raw TypeScript source · Workflow walkthrough · All examples

Run locally

Requires Node.js 22.18 or later. Run from the cloned repository; this file imports the shared client and contracts in src/. The default uses fictional local fixtures with no credentials, network calls, invitations, or spending.
For live calls, supply USERINTUITION_API_KEY securely in the environment and explicitly select --live. Follow the walkthrough for action-specific arguments and approvals. The B2/C1 adapters are illustrative pending release verification. Passing fixture checks does not establish live contract compatibility.

Inputs

Fixture mode needs no inputs. Live actions use —action, a study ID after creation, and the action-specific name, message, or request file described in the walkthrough.

Expected output

Fictional plan/fieldwork walkthrough labeled with fixture mode. Live mode prints the selected operation response.

Side effects

Fixture mode has no side effects. Live create/customize/launch/report-generation actions write data; launch starts paid recruitment and requires a separate approval flag.

Failures

Missing study/action inputs, malformed request JSON, a missing launch approval, and HTTP failures stop the operation. An interrupted write may have succeeded; inspect saved state before retrying.

Complete source file

The following is generated from examples/conduct-a-study/index.ts, not maintained as a separate snippet. SHA-256: f8cd9f0bfeb836b06c65f54595edd330775f835fbe825a50afb07a27e927f990.