Skip to main content

API keys and your in-app contact form

Updated

API keys connect your own product and scripts to Bancroft. The most common use is a contact form inside your app: each message a customer sends becomes a ticket, right next to your email.

Only workspace admins can create and revoke keys, in Settings → API keys.

Choose the right key

Key typeUse it forSafe in your app's frontend?
ClientYour in-app contact form. Customers only ever see their own tickets.Yes
ServerScripts and back-end jobs that read and update any ticketNo, keep it on your server

Each key is also Live or Test. Test keys create tickets in your test queue, where they're never emailed and don't count toward your plan. Use one while you build, then switch to a live key.

Create a key

  1. Go to Settings → API keys and select Create key.
  2. Give it a name you'll recognize, like "Marketing site contact form". Leave it blank and Bancroft names it for you.
  3. Choose the type and mode, then create it.
  4. Copy the key and store it somewhere safe, like your secrets manager.

Bancroft shows the key only once. If you lose it, create a new one and revoke the old one.

Build your contact form

You design the form in your own app, so it looks like the rest of your product. Your form sends each message to Bancroft with your client key, and it arrives as a ticket in Unassigned. You can also offer a callback request, where the customer leaves a phone number and a good time to call.

The step-by-step guide with code is in the developer docs.

Revoke a key

Select Revoke next to a key. Requests using it fail from then on, and it can't be turned back on. Create a new key to replace it.

Didn't answer your question?

Tell the team what you're stuck on and they'll reply by email.

Contact support
API keys and your in-app contact form | Bancroft