{"_id":"@bara-agency/fub-sdk","_rev":"2-3daf57ef93842a08868bd448ae8c075a","name":"@bara-agency/fub-sdk","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@bara-agency/fub-sdk","version":"0.1.0","keywords":["follow-up-boss","followupboss","crm","sdk","api"],"author":"","license":"MIT","_id":"@bara-agency/fub-sdk@0.1.0","maintainers":[{"name":"nikomart","email":"niko.martell3@gmail.com"}],"homepage":"https://github.com/baraagency/followupboss#readme","bugs":{"url":"https://github.com/baraagency/followupboss/issues"},"dist":{"shasum":"98a64be688e6726e3e7a99a1050fd4f0d11d1686","tarball":"https://registry.npmjs.org/@bara-agency/fub-sdk/-/fub-sdk-0.1.0.tgz","fileCount":9,"integrity":"sha512-LimmpBFcitBUxjMQeDJYk3CXLIhNt2uO5GK5rH9i3P9GZ3fJFccI8JZmo+r3DILtJ9A1IklXR9wOYu0M2zVucQ==","signatures":[{"sig":"MEYCIQCxTHHgGq7Qv4Bzhvp7gB30fLqRTjJ6vzf+LaHOcIiuJAIhAJ3GswJ/ggwsHMvxGoT9E06ef196mnW74DfqnfXHlgKw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74354},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"c60f2a1fb57b070a4ab2a9883a2edf26b149232b","scripts":{"test":"vitest run","build":"tsup src/index.ts --format esm,cjs --dts --clean --sourcemap --target node18","verify":"npm run typecheck && npm test && npm run build && npm run test:types","typecheck":"tsc --noEmit","test:types":"tsd","prepublishOnly":"npm run verify"},"_npmUser":{"name":"nikomart","email":"niko.martell3@gmail.com"},"repository":{"url":"git+https://github.com/baraagency/followupboss.git","type":"git"},"_npmVersion":"11.12.1","description":"TypeScript SDK for the Follow Up Boss API.","directories":{},"sideEffects":false,"_nodeVersion":"26.0.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tsd":"^0.31.2","tsup":"^8.5.0","vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^25.6.2"},"_npmOperationalInternal":{"tmp":"tmp/fub-sdk_0.1.0_1783975583686_0.7622205174283885","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bara-agency/fub-sdk","version":"0.1.1","description":"TypeScript SDK for the Follow Up Boss API.","repository":{"type":"git","url":"git+https://github.com/baraagency/followupboss.git"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"sideEffects":false,"engines":{"node":">=18"},"scripts":{"build":"tsup src/index.ts --format esm,cjs --clean --sourcemap --target node18 && tsc --project tsconfig.build.json","prepublishOnly":"npm run verify","test":"vitest run","test:types":"tsd","typecheck":"tsc --noEmit","verify":"npm run typecheck && npm test && npm run build && npm run test:types"},"keywords":["follow-up-boss","followupboss","crm","sdk","api"],"author":"","license":"MIT","publishConfig":{"registry":"https://registry.npmjs.org","access":"public"},"devDependencies":{"@tsd/typescript":"^5.9.3","@types/node":"^25.6.2","tsd":"^0.31.2","tsup":"^8.5.0","typescript":"^5.9.3","vitest":"^3.2.4"},"gitHead":"66e91e40ae8d5cb17bf009aae76dc077a7a12bf7","_id":"@bara-agency/fub-sdk@0.1.1","bugs":{"url":"https://github.com/baraagency/followupboss/issues"},"homepage":"https://github.com/baraagency/followupboss#readme","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-u7EPb+BQU5Ixyufg8jNm7bLsSTbmoWIOJbCIjuRpoSl5pq2YQydFglZMR45ETVtc8p0iUUFcO5hqjaNE9ij7GA==","shasum":"7e8dc03040de85b5583e82506cbed954b445d8a9","tarball":"https://registry.npmjs.org/@bara-agency/fub-sdk/-/fub-sdk-0.1.1.tgz","fileCount":15,"unpackedSize":248878,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFh1JEeOuIiWVYTrK4cSnN2Ypq1VLN6k81076tiViZyaAiEArGB59Ga3rElAoQMuSv5OCia1ne/wDwIo7+MksLfFCRU="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:78fef678-6f74-43b8-8d1f-50818bb4a76f"}},"directories":{},"maintainers":[{"name":"nikomart","email":"niko.martell3@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/fub-sdk_0.1.1_1788917145299_0.5294754019911223"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-13T20:46:23.404Z","modified":"2026-09-09T01:25:45.607Z","0.1.0":"2026-07-13T20:46:23.828Z","0.1.1":"2026-09-09T01:25:45.443Z"},"bugs":{"url":"https://github.com/baraagency/followupboss/issues"},"license":"MIT","homepage":"https://github.com/baraagency/followupboss#readme","keywords":["follow-up-boss","followupboss","crm","sdk","api"],"repository":{"type":"git","url":"git+https://github.com/baraagency/followupboss.git"},"description":"TypeScript SDK for the Follow Up Boss API.","maintainers":[{"name":"nikomart","email":"niko.martell3@gmail.com"}],"readme":"# followupboss\n\nTypeScript SDK for the Follow Up Boss API.\n\n## Install\n\n```sh\nnpm install @bara-agency/fub-sdk\n```\n\n## Configure\n\nFollow Up Boss API-key authentication uses HTTP Basic auth with the API key as the username and a blank password. Registered integrations must also send the `X-System` and `X-System-Key` identification headers.\n\n```ts\nimport { FollowUpBossClient } from \"@bara-agency/fub-sdk\";\n\nconst fub = new FollowUpBossClient({\n  apiKey: process.env.FUB_API_KEY!,\n  system: process.env.FUB_SYSTEM!,\n  systemKey: process.env.FUB_SYSTEM_KEY!,\n});\n```\n\nThe default API base URL is `https://api.followupboss.com/v1`. You can override it for tests or proxies:\n\n```ts\nconst fub = new FollowUpBossClient({\n  apiKey: \"api-key\",\n  system: \"ExampleApp\",\n  systemKey: \"system-key\",\n  baseUrl: \"https://api.followupboss.com/v1\",\n});\n```\n\n## Send Leads and Events\n\nFollow Up Boss recommends sending new leads through `POST /events`, not by directly creating people through `POST /people`. Event creation lets Follow Up Boss deduplicate contacts, record inquiry history, notify agents, and apply configured lead flows.\n\n```ts\nawait fub.events.create({\n  source: \"Website\",\n  system: \"Custom IDX\",\n  type: \"Inquiry\",\n  message: \"I would like more information.\",\n  person: {\n    firstName: \"Ada\",\n    lastName: \"Lovelace\",\n    emails: [{ value: \"ada@example.com\", type: \"home\" }],\n  },\n});\n```\n\n## Search People\n\n```ts\nconst page = await fub.people.list({\n  limit: 25,\n  email: \"lead@example.com\",\n  fields: [\"firstName\", \"lastName\", \"emails\"],\n});\n\nfor (const person of page.people) {\n  console.log(person.id, person.firstName, person.lastName);\n}\n```\n\n## Paginate\n\nCollection resources expose both `list()` and `paginate()`. The iterator follows the Follow Up Boss `_metadata.next` cursor.\n\n```ts\nfor await (const person of fub.people.paginate({ limit: 100, tags: [\"Buyer\"] })) {\n  console.log(person.id);\n}\n```\n\n## Common Resources\n\n```ts\nawait fub.notes.create({\n  personId: 123,\n  subject: \"Follow up\",\n  body: \"Call tomorrow morning.\",\n});\n\nawait fub.tasks.update(456, {\n  personId: 123,\n  name: \"Call Ada\",\n  type: \"Call\",\n  isCompleted: false,\n});\n\nconst users = await fub.users.list({ email: \"agent@example.com\" });\nconst stages = await fub.stages.list({ sort: \"orderWeight\" });\n```\n\nFor endpoints without a convenience wrapper, use `request()`:\n\n```ts\nconst result = await fub.request(\"GET\", \"/customFields\");\n```\n\n## Errors and Rate Limits\n\nNon-2xx responses throw `FollowUpBossApiError`. The error includes the status, parsed body, response headers, and rate-limit metadata from Follow Up Boss headers when present.\n\n```ts\nimport { FollowUpBossApiError } from \"@bara-agency/fub-sdk\";\n\ntry {\n  await fub.people.list();\n} catch (error) {\n  if (error instanceof FollowUpBossApiError) {\n    console.error(error.status, error.body, error.rateLimit);\n  }\n}\n```\n\n`429 Too Many Requests` responses can be retried by enabling retry options. `Retry-After` is respected.\n\n```ts\nconst fub = new FollowUpBossClient({\n  apiKey: process.env.FUB_API_KEY!,\n  system: process.env.FUB_SYSTEM!,\n  systemKey: process.env.FUB_SYSTEM_KEY!,\n  retry: { maxRetries: 1 },\n});\n```\n\n## Development\n\n```sh\nnpm install\nnpm run verify\n```\n","readmeFilename":"README.md"}