Skip to main content
POST
Create an embedded credential session
Creates a short-lived iframe URL for the Rubie Embedded Credential Capture widget. Create the session from your backend, return embed_url to the browser, and mount it in an iframe on parent_origin.

Notes

  • blueprint_keys is the exact set of Blueprints the user may select. Passing one key skips the picker.
  • parent_origin must be an allowlisted HTTPS origin with no path, query, or fragment.
  • Sessions expire after 15 minutes. Create one when the user opens the flow.
  • Use one idempotency key per deliberate opening. Reusing a key can replay an expired session.
  • Blueprint branding and its primary authentication strategy are configured in Rubie.
See Embedded Credential Capture for iframe mounting, browser events, and server-side confirmation.

Authorizations

Authorization
string
header
required

Your Rubie API key as a bearer token.

Headers

Idempotency-Key
string

Unique key for safely retrying mutating requests. Matching key + body replays the original response for 24 hours. Matching key + different body returns 409 conflict.

Body

application/json
blueprint_keys
string[]
required

Blueprint keys the end user may select. Passing one key skips the picker and opens that Blueprint's credential form directly.

Required array length: 1 - 50 elements
Example:
parent_origin
string<uri>
required

Exact HTTPS origin where the iframe will be mounted. It must be allowlisted for the account and contain no path, query, or fragment.

Maximum string length: 2048
Example:

"https://app.example.com"

name
string

Optional display name for the connection in the Rubie dashboard.

Maximum string length: 256

Response

Embedded credential session created

id
string
required

Opaque embedded credential session id.

Example:

"ecs_MQ"

status
enum<string>
required

Lifecycle status of an embedded credential session. completed and expired are terminal. Treat this as an open string set and keep polling on statuses you do not recognise.

Available options:
pending,
completed,
expired
blueprint_keys
string[]
required

Exact set of Blueprints displayed in the widget.

Required array length: 1 - 50 elements
parent_origin
string<uri>
required

Exact allowlisted HTTPS origin permitted to frame the widget.

Example:

"https://app.example.com"

expires_at
string<date-time>
required
created_at
string<date-time>
required
embed_url
string<uri> | null

Origin-bound iframe URL. Present while the session is pending and null after it completes or expires.

selected_blueprint_key
string | null

Blueprint selected by the end user. Present when status is completed and guaranteed to belong to blueprint_keys.

credential_id
string | null

Vaulted credential id. Present only when status is completed. Retain it against the initiating user and selected Blueprint.

Example:

"cred_NDc"

completed_at
string<date-time> | null