Skip to main content
Every Rubie integration is two loops with different lifetimes:
  • Connect — once per user, per system. Your user hands over their credentials through a form Rubie hosts, and you get back an id to store against them.
  • Run — as often as you need. You trigger a Blueprint with that id and poll until it finishes, then fetch its outputs.

What you’ll need

The API key is a secret, so keep it in your server-side environment or secret manager:
Strategy ids and Blueprint keys are non-secret configuration. For a single integration, constants are the simplest option. If your application later supports several source systems or workflows, move them into configuration or separate lookup tables. They are not fixed pairs: one strategy can be reused by several Blueprints, and a Blueprint can require more than one strategy.
API keys are account-scoped and every endpoint here is server-to-server, so keys must never reach a browser. See Authentication.

Part 1 — Connect an account

Do this once, when a user first connects a system. The credentials go straight from your user to Rubie’s vault — they never touch your servers.
1

Create a credential session

strategy_id tells Rubie which system the user is connecting, so it renders the right fields on the form. return_url sends them back to your app when they’re done. Ask Rubie to allowlist its exact origin on the account that owns the API key making this request, then open the returned hosted_url in the same tab or a new one.
name is just a label for your team in the Rubie dashboard. Something that identifies the connection is a good choice.
2

Confirm the session, then store the credential id

After collection, Rubie redirects to your return_url with the session id:https://app.example.com/integrations/rubie/connected?session_id=sess_...Read session_id from the query string and confirm the session from your backend before saving credential_id:
When status is completed, credential_id is populated. Save it in your application’s integration settings. Rubie already stores the underlying credential under the account associated with your API key; your application stores only this opaque id so it can select the connection on future runs.If your application supports multiple connections, associate each credential_id with the corresponding workspace or integration. Branch on completed and expired; if the status is anything else, poll briefly until it settles. That id is now good for as many runs as you like.

Part 2 — Run a Blueprint

Now that you have a cred_..., trigger a run whenever you need work done in that system — on a schedule, on a webhook, or from a button in your UI.
1

Trigger the run

Pass the stored credential id. You’ll get 202 back: the run is queued, not finished.
2

Poll until it finishes

Poll every 2–5 seconds until status is completed, failed, or cancelled. Don’t block a user-facing request on it.
On failed, error.code is execution_failed — offer a retry. A network retry of the original trigger request should reuse its Idempotency-Key, but a user-initiated retry after a terminal failure is a new logical operation and must use a new key. Otherwise Rubie replays the original run response instead of creating another run.This endpoint returns lifecycle facts only, never run inputs, outputs, or file URLs, so it’s safe to poll from systems handling regulated data.
3

Fetch the results

After the status is completed, fetch the Blueprint outputs. Use direct delivery when you want records in the response body:
Direct responses contain each output’s records. For larger results, request deliveryMethod=presigned_url (the default) and download the temporary URLs in results. Rubie automatically switches a direct request to presigned URL delivery when the estimated payload is 5 MB or larger, so always branch on the returned dataDeliveryMethod.

Disconnecting

When a user disconnects a system, revoke the credential. This is a hard delete: the vaulted secrets are destroyed and the cred_... stops resolving, so drop your stored mapping at the same time.

Next