API reference
Connect
/connect — accounts linked to a client, the connections that grant their use, and delegations of one operation.
Scope connect.
https://api.pathglobal.finance/connectPath Connect links accounts to a client and grants their use through connections. A linked account
is an instrument: its identifier is not kept in clear; a token and a mask are. A caller
reaches its own instruments, and the connections it granted or was granted.
A connection is type: "pathglobal.connection" and a delegation type: "pathglobal.delegation",
both signed by Path Global. They are objects of Path Global; a PATH CONNECT
connection of the protocol is path.connection or path.mandate.
An account at another member, { path }, is named by a PATH address or an alias. A PATH address is
resolved with RESOLVER; an alias is first found with FINDER (identifier_type: "alias"), which names
the member that holds it, then resolved at that member with the alias in the body of a signed lookup
(PIP-0028). With a holder name, the payee check of the holder gives match.
Links
| Route | Answer |
|---|---|
GET /providers | { "providers": [ … ] }: the platforms and exchanges that can be linked by delegated access, with what a linked account allows |
POST /sessions | Starts a link the person approves elsewhere: { "method": "oauth", "provider", … } at a platform or an exchange, { "method": "walletconnect", "chains" } in a wallet. 201 |
GET /sessions/:id | One session: pending, completed, declined or expired |
POST /sessions/:id/complete | { code, state } from the provider, or { topic, accounts } from the wallet. { session, instrument? } |
POST /instruments | Links an account: on a network { network, identifier, holder? }, at another member { path }, or a holding at Path Global { holding }. 201 with the instrument |
GET /instruments | { "instruments": [ … ] }, by ?subject= when given |
GET /instruments/:id | One instrument |
DELETE /instruments/:id | Unlinks it; every connection on it is revoked |
POST /instruments/:id/allowance | { network?, amount, expires_at, signature }: the allowance a wallet signed (Permit2 on an EVM chain, a token delegate on Solana) |
An instrument carries type, network, token, mask, holder ({ name?, match }, match being
match, close_match or unavailable) and capabilities.
Connections
| Route | Answer |
|---|---|
POST /connections | Grants a grantee the use of an instrument, for named capabilities, within a policy, with the consent recorded. 201 with the connection |
GET /connections | { "connections": [ … ] }, by ?instrument= when given |
GET /connections/:ref | One connection, for its grantor or its grantee |
POST /connections/:ref/consume | { capability, amount?, reference? }: uses the connection once. { connection, usage } |
GET /connections/:ref/usage | { "usage": [ … ] }: every use of the connection |
POST /connections/:ref/revoke | Ends the connection |
POST /connections/:ref/charge | A scheduled connection: draws the charge that is due and pays it to its destination. { connection, route? } |
Capabilities: payout_to, collect_from, view_balance, view_transactions, payment_request. A
capability that is absent is denied; every limit is enforced. A schedule makes a connection a
recurring mandate, with counters per period and, with charge, a charge drawn at each due date. A
charge whose route is under way is pending until the route ends.
Delegations
| Route | Answer |
|---|---|
POST /connections/:ref/delegations | Delegates one operation of a connection to a third party, bound to the capability, the amount and the destination. 201 with the delegation |
GET /connections/:ref/delegations | { "delegations": [ … ] } |
GET /delegations/:ref | One delegation |
POST /delegations/:ref/consume | { amount, destination, reference? }: the delegate performs the bound operation, the exact amount, to the committed destination |
POST /delegations/:ref/revoke | Ends the delegation |
A route can draw on a connection: its source is { connection, delegation? }
(Router).
Errors
| Code | Status | When |
|---|---|---|
pathglobal.connect.capability_denied | 403 | The connection does not grant the capability |
pathglobal.connect.limit_exceeded | 422 | The amount passes a limit of the connection or the delegation |
pathglobal.connect.inactive | 409 | The connection or the delegation is revoked or expired |
pathglobal.connect.not_due | 409 | charge: no charge is due, or one is under way |
pathglobal.connect.account_not_found | 422 | The account to link could not be verified |
pathglobal.connect.holder_mismatch | 422 | The holder does not match the account |
pathglobal.networks.identifier_invalid | 422 | The identifier is not one of the network |