Connect an AI app builder
Built your own tool with Base44, Lovable or Bolt? It can read your clients and jobs and draft estimates in Groundflag. A draft reaches nobody until you open it and send it.
Make a token.
In Groundflag, the owner or an admin opens Settings, API Settings, and clicks Create Token. Pick only what your tool needs: clients.read and projects.read to look things up, quotes.write to draft estimates. Copy the token, because it shows only once.
Keep it in the builder's secrets.
Add it as a secret named GROUNDFLAG_API_TOKEN. In Base44, that is the app's Secrets. Never paste a token into the chat or into page code.
Tell the builder what to do.
Paste this into its chat: Using a backend function and the GROUNDFLAG_API_TOKEN secret, connect to the API described at https://api.groundflag.com/docs/openapi.json with a Bearer token. Base URL https://api.groundflag.com/api/v1/public. Start by calling GET /me and showing the company name.
Check the connection.
When GET /me shows your company, the token works. Then ask for what you want, for example a form that sends POST /quotes with a job and its lines.
Review the draft in Groundflag.
Each draft comes back with app_url, the page where you check the lines, add tax and terms, and send it to the client.
What the API does
It reads clients, jobs, estimates, invoices, payments, tasks and clock punches. It creates and updates clients, jobs and tasks, takes leads, and drafts estimates. Webhooks tell your tool when something happens.
It does not send estimates or invoices, record payments or charge anyone. Those stay in the app, with a person.
If you use Base44
Base44 calls outside services from backend functions, which need its Builder plan or higher. Its Custom integrations page can also import https://api.groundflag.com/docs/openapi.json, so every app in your workspace can use the same connection. Pick up to 30 endpoints there.
Questions
My tool says CORS error or Failed to fetch.
It is calling Groundflag from the browser page. Ask the builder to move the call to a backend function. The API answers server calls only, which also keeps your token out of the page.
I get a 403 with insufficient_scope.
The token does not have the permission named in required_scope. Create a new token with it, put it in the secret, and revoke the old one. Tokens made before drafts existed do not have quotes.write.
I get a 401.
The token is wrong, revoked or missing. The header must read Authorization: Bearer, then a space, then the token.
Does the API cost extra?
Company API keys are part of the Business plan on the pricing page, and you can try them during your free trial.
Keep reading
Questions? Write to hello@groundflag.com