Skip to main content

Partner Integration

Partners integrate with Loyva by using API keys to authenticate server-to-server requests. Partner endpoints are scoped and isolated — you can only access resources within your organization.

Integration architecture​

┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Partner Backend │ │ Loyva API │ │ Loyva Vault │
│ │ │ │ │ │
│ X-API-Key: lk_.. │────────>│ /partner/* │────────>│ Storage │
│ │<────────│ Scoped by org │<────────│ Compliance │
│ │ │ │ │ │
└──────────────────┘ └──────────────────┘ └──────────────────┘
│ │
│ Webhook events │ Embed tokens (in progress)
│<────────────────────────────│
│ │
│ ┌──────────────────┐│
│ │ User's Browser ││
│────────>│ Loyva signing │<─────────────────────
│ iframe (WIP) │ iframe
└──────────────────┘

What you get​

The full e-sign + e-vault lifecycle is exposed via REST. Embed widgets are an additional UI layer — see the note at the bottom.

E-sign + envelope lifecycle​

FeatureEndpointScope required
Create e-sign envelopePOST /partner/envelopesenvelopes:write
Create paper envelopePOST /partner/envelopes (envelope_kind: paper)envelopes:write
Upload pre-signed PDFPOST /partner/envelopes/:id/uploadenvelopes:write
List envelopes (with contract terms), filter by customer or statusGET /partner/envelopesenvelopes:read
Get envelope details, contract terms + signed field valuesGET /partner/envelopes/:idenvelopes:read
Check statusGET /partner/envelopes/:id/statusenvelopes:read
List customersGET /partner/customers/listcustomers:read
Look up a customer by client id or emailGET /partner/customerscustomers:read
Get signing linksGET /partner/envelopes/:id/signing-linksenvelopes:read
Send remindersPOST /partner/envelopes/:id/remindenvelopes:write
Void / cancelPOST /partner/envelopes/:id/voidenvelopes:write

E-vault — vault-in, retrieval, vault-out​

FeatureEndpointScope required
Vault completed e-sign (recovery)POST /partner/envelopes/:id/vault-in-signedvault:write
Vault uploaded paper PDFPOST /partner/envelopes/:id/vault-in-uploadvault:write
Download authoritative copyGET /partner/envelopes/:id/vault/signed-urlvault:read
Download non-authoritative copyGET /partner/envelopes/:id/vault/copy/signed-urlvault:read
Check UCC §9-105 complianceGET /partner/envelopes/:id/compliancecompliance:read
Get compliance certificateGET /partner/envelopes/:id/vault/certificatecompliance:read
Vault-out (release)POST /partner/envelopes/:id/vault-outvault:release

Configuration​

FeatureEndpointScope required
Manage webhook endpoints/webhooks/endpointsAdmin JWT (see Managing endpoints)
Update legacy webhook URL / secretPATCH /partner/webhookenvelopes:write
Mint embed tokenPOST /embed/tokenesign:write or vault:read
Receive webhooksOutbound to your endpointsPer-endpoint event subscription

End-to-end flows​

There are three end-to-end flows partners can drive entirely from the API:

  1. E-sign + auto-vault — Create with template_id, customer signs in DocuSeal, envelope.completed fires with the filled-in field data, the envelope auto-vaults, and vault.stored fires.
  2. Paper / pre-signed PDF — Create with envelope_kind: "paper", upload PDF, call vault-in-upload.
  3. Vault-out at end of lifecycle — After any vaulted envelope, call vault-out to release the authoritative copy to a recipient (e.g., a secured party at loan funding).

See Partner Endpoints for full request/response examples.

Reading contract data​

Contract terms (monthly rate, term, start date, renewal date, and the computed contract value) are returned as a fixed contract object on GET /partner/envelopes and GET /partner/envelopes/:id. You can call these at any time, so you don't need to store them from the envelope.completed webhook. Use the detail endpoint to read back the raw values filled into the signed document (fields).

curl "https://api.stg.loyva.net/api/v2/partner/envelopes/env_x7k9m2p4q1w3" \
-H "X-API-Key: lk_..."
{
"data": {
"envelope_id": "env_x7k9m2p4q1w3",
"status": "vaulted",
"contract": {
"monthly_rate_cents": 4999,
"billing_cycle": "monthly",
"term_months": 36,
"start_date": "2026-06-01",
"renewal_date": "2029-06-01",
"contract_value_cents": 179964
}
}
}

contract is null until the terms are recorded for that envelope. Terms come from template fields captured at signing, from AI extraction that a user reviewed and confirmed, or from manual entry in Loyva. See Contract terms for every field.

Getting started​

  1. Get an API key from your Loyva point of contact (see API Keys)
  2. Test with the API — create an envelope, send it for signing, vault it, retrieve the compliance certificate
  3. Configure webhooks — register an endpoint and subscribe to the events you need, starting with envelope.completed
  4. Go live — swap dev keys for production keys
Embedded widgets

Embedded signing and vault widgets are on the roadmap. The POST /embed/token endpoint is live (see Embed tokens), but the companion JavaScript SDK and iframe host are not yet published. The full e-sign and e-vault lifecycle (including vault-in and vault-out) can be driven entirely via REST today — embedded widgets are an optional UI layer for partners who want to render Loyva-branded signing inside their own app. Coordinate with your Loyva point of contact if you need embedded signing.