Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
BringYour is a web-standards VPN marketplace with an emphasis on fast, secure internet everwhere.
The API for BringYour bootstraps the connect
protocol, and is the source of JWTs and other match-making transactions.
The JWT returned by /auth routes does not have a clientId. The connect
protocol requires a JWT with a clientId. Use the /network routes to obtain a JWT with a clientId.
In the BringYour network:
a network name is a globally unique subnet (xyz.bringyour.network)
a clientId is a globally unique 16-byte address
clientIds are equivalent to IPv6, but are expressed as UDID
clients also have an IPv6 and IPv4 mapped to their clientId
Outside of IP translation like taptun/utun, clients are typically addressed via their clientId.
Unless otherwise specified, time/date strings will be formatted in the Go default 2006-01-02 15:04:05.999999999 -0700 MST
.
Note the API lives at https://api.bringyour.com.
The API uses an authentication JWT. There are two roles of JWT: admin (user) and client. Admins have more privileges on the network. To get started with an admin JWT, . Then in the dialog, tap the button "Copy an Auth Code". This will copy a limited-time auth code to the clipboard. Use the following API request to convert the auth code into an admin JWT.
Get all providers in the caller network. Each provider includes stats from the last 24 hours.
GET /stats/providers HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"created_time": "text",
"providers": [
{
"client_id": "text",
"connected": true,
"connected_events_last_24h": [
{
"event_time": "text",
"connected": true
}
],
"uptime_last_24h": 1,
"transfer_data_last_24h": 1,
"payout_last_24h": 1,
"search_interest_last_24h": 1,
"contracts_last_24h": 1,
"clients_last_24h": 1,
"provide_mode": 1
}
]
}
Simple hello to the network that returns some useful information. This can be used for discovery.
GET /hello HTTP/1.1
Host: api.bringyour.com
Accept: */*
{
"client_address": "text"
}
Set account preferences.
POST /preferences/set-preferences HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24
{
"product_updates": true
}
{}
Get account preferences.
GET /preferences HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"product_updates": true
}
Get network statistics for the last 90 days. The statistics are updated approximately every 60s.
GET /stats/last-90 HTTP/1.1
Host: api.bringyour.com
Accept: */*
{
"lookback": 1,
"created_time": 1,
"all_transfer_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"all_transfer_summary": 1,
"all_transfer_summary_rate": 1,
"all_packets_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"all_packets_summary": 1,
"all_packets_summary_rate": 1,
"providers_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"providers_superspeed_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"providers_summary": 1,
"providers_summary_superspeed": 1,
"countries_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"countries_summary": 1,
"regions_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"regions_summary": 1,
"cities_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"cities_summary": 1,
"extender_transfer_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"extender_transfer_summary": 1,
"extender_transfer_summary_rate": 1,
"extenders_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"extenders_superspeed_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"extenders_summary": 1,
"extenders_summary_superspeed": 1,
"networks_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"networks_summary": 1,
"devices_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"devices_summary": 1
}
Get statistics for all providers in the caller network for the last 90 days. This is meant to answer the top level question of how the providers in a network are performing.
GET /stats/providers-overview-last-90 HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"lookback": 1,
"created_time": "text",
"uptime": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"transfer_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"payout": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"search_interest": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"contracts": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"clients": {
"ANY_ADDITIONAL_PROPERTY": 1
}
}
Password login for email and phone number.
email or phone number
POST /auth/login-with-password HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 38
{
"user_auth": "text",
"password": "text"
}
{
"verification_required": {
"user_auth": "text"
},
"network": {
"by_jwt": "text",
"name": "text"
},
"error": {
"message": "text"
}
}
Send password reset code to email or phone number.
email or phone number
POST /auth/password-reset HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"user_auth": "text"
}
{
"user_auth": "text"
}
Create a limited use code (auth code) to share authentication
with connected apps and tools.
The code is tied to the caller session,
and will be expired with any of the caller's sessions.
Currently a code cannot be created for a client JWT
(from /network/auth-client
).
This is a subset of an OAuth flow.
POST /auth/code-create HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 31
{
"duration_minutes": 1,
"uses": 1
}
{
"auth_code": "text",
"duration_minutes": 1,
"uses": 1,
"error": {
"auth_code_limit_exceeded": true,
"message": "text"
}
}
Get detailed stats on a single provider in the caller network. This is meant to give the user complete visibility over usage.
udid
POST /stats/provider-last-90 HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"client_id": "text"
}
{
"lookback": 1,
"created_time": "text",
"uptime": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"transfer_data": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"payout": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"search_interest": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"contracts": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"clients": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"client_details": [
{
"client_id": "text",
"transfer_data": {
"ANY_ADDITIONAL_PROPERTY": 1
}
}
]
}
Create a spec object for find-providers2
using a description
of the intended use of the network.
description of the intended use of the connection
POST /network/create-provider-spec HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 16
{
"query": "text"
}
{
"specs": [
{
"location_id": "text",
"location_group_id": "text",
"client_id": "text",
"best_available": true
}
]
}
Get the balance for the USDC user custody wallet. The user custody wallet allows BringYour to query the balance, but the user must take actions against the wallet.
GET /wallet/balance HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"wallet_info": {
"wallet_id": "text",
"token_id": "text",
"blockchain": "text",
"blockchain_symbol": "text",
"create_date": "text",
"balance_usdc_nano_cents": 1,
"address": "text"
}
}
Gain permission to use the connect
protocol as the requested clientId,
or assign a new clientId.
Each network can have at most 128 clientIds.
Above that number, new clientId requests will error until one or more
existing clientIds are removed.
udid. Optional. If this is given, it must currently exist in the network. Omit this to assign a new client id.
If this is a new device, sets the device name to the description of the device.
If this is a new device, sets the device spec.
udid. Optional. | The client that the new client is derived from. If this is called with a client jwt, the derived client id is inferred from the jwt.
POST /network/auth-client HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 89
{
"client_id": "text",
"description": "text",
"device_spec": "text",
"derived_client_id": "text"
}
{
"by_client_jwt": "text",
"error": {
"client_limit_exceeded": true,
"message": "text"
}
}
Creates a code to adopt a device. The adopt code is valid for a limited time.
Name of the device that will be shared to the adopter
POST /device/create-adopt-code HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 43
{
"device_name": "text",
"device_spec": "text"
}
{
"adopt_code": "text",
"adopt_secret": "text",
"duration_minutes": 1,
"error": {
"message": "text"
}
}
The status of the shared device. The status can be one of:
POST /device/share-status HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 21
{
"share_code": "text"
}
{
"pending": true,
"associated_network_name": "text",
"error": {
"message": "text"
}
}
Authenticate with an auth code. The returned session is tied to the session that created the auth code, and will be expired with any of the creator's sessions. This is a subset of an OAuth flow.
POST /auth/code-login HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"auth_code": "text"
}
{
"by_jwt": "text",
"error": {
"message": "text"
}
}
Get the current subscription status and transfer balance.
GET /subscription/balance HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"balance_byte_count": 1,
"current_subscription": {
"subscription_id": "text",
"store": "text",
"plan": "text"
},
"active_transfer_balances": [
{
"balance_id": "text",
"network_id": "text",
"start_time": "text",
"end_time": "text",
"start_balance_byte_count": 1,
"net_revenue_nano_cents": 1,
"balance_byte_count": 1
}
],
"pending_payout_usd_nano_cents": 1,
"wallet_info": {
"wallet_id": "text",
"token_id": "text",
"blockchain": "Polygon",
"blockchain_symbol": "MATIC",
"create_date": "text",
"balance_usdc_nano_cents": 1,
"address": "text"
},
"update_time": "text"
}
Verify ownership of email or phone number.
email or phone number
POST /auth/verify HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 41
{
"user_auth": "text",
"verify_code": "text"
}
{
"network": {},
"error": {}
}
Change password.
POST /auth/password-set HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 39
{
"reset_code": "text",
"password": "text"
}
{}
Create a new network. A user authority can be associated with at most one network.
email or phone number
user consent to accept terms of service
POST /auth/network-create HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 134
{
"user_name": "text",
"user_auth": "text",
"auth_jwt": "text",
"auth_jwt_type": "apple",
"password": "text",
"network_name": "text",
"terms": true
}
{
"network": {
"by_jwt": "text",
"network_id": "text",
"network_name": "text"
},
"verification_required": {
"user_auth": "text"
},
"error": {
"message": "text"
}
}
Randomly sample providers that for a location or group, which are active and in good health. This allows random iteration by using the exclude input to mark visited providers.
udid
udid
udid
POST /network/find-providers HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 91
{
"location_id": "text",
"location_group_id": "text",
"count": 1,
"exclude_location_ids": [
"text"
]
}
{
"client_ids": [
"text"
]
}
Add a device, which can either be owned by the network or shared with the network. The code provided can be either adoption code or a share code. Once a code is added, the device becomes an associated device until confirmation. If the device is a shared device, it will remain an associated device after confirmation.
share code or adopt code
POST /device/add HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"code": "text"
}
{
"code_type": "share",
"code": "text",
"device_name": "text",
"associated_network_name": "text",
"client_id": "text",
"duration_minutes": 1,
"error": {
"message": "text"
}
}
Search for locations, groups, and devices that match a query, regardless of whether an providers are active.
POST /network/find-locations HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 78
{
"query": "text",
"max_distance_fraction": 1,
"enable_max_distance_fraction": true
}
{
"specs": [
{
"location_id": "text",
"location_group_id": "text",
"client_id": "text",
"best_available": true
}
],
"groups": [
{
"location_group_id": "text",
"name": "text",
"provider_count": 1,
"promoted": true,
"match_distance": 1
}
],
"locations": [
{
"location_id": "text",
"location_type": "city",
"name": "text",
"city": "text",
"city_location_id": "text",
"region": "text",
"region_location_id": "text",
"country": "text",
"country_location_id": "text",
"country_code": "text",
"provider_count": 1,
"match_distance": 1
}
],
"devices": [
{
"client_id": "text",
"device_name": "text"
}
]
}
Get the latest status of all clients on this network.
Includes:
GET /network/clients HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"clients": [
{
"client_id": "text",
"device_id": "text",
"network_id": "text",
"description": "text",
"device_name": "text",
"device_spec": "text",
"create_time": "text",
"auth_time": "text",
"resident": {
"client_id": "text",
"instance_id": "text",
"resident_id": "text",
"resident_host": "text",
"resident_service": "text",
"resident_block": "text",
"resident_internal_ports": [
1
]
},
"provide_mode": 1,
"connections": [
{
"client_id": "text",
"connection_id": "text",
"connect_time": "text",
"disconnect_time": "text",
"connection_host": "text",
"connection_service": "text",
"connection_block": null
}
]
}
]
}
Send verification code to email or phone number.
email or phone number
POST /auth/verify-send HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"user_auth": "text"
}
{
"user_auth": "text"
}
A QR code that maps to a URL to add the shared device. Send it to someone to scan to add the device.
Share code
GET /device/share-code/{code}/qr.png HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
binary
Sets the name of a device owned by the network.
To set the name of devices shared with the network, use /device/set-association-name
.
udid
POST /device/set-name HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 41
{
"device_id": "text",
"device_name": "text"
}
{
"error": {
"message": "text"
}
}
Get a list of wallets associated with your network
GET /account/wallets HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"wallets": [
{
"wallet_id": "text",
"circle_wallet_id": "text",
"network_id": "text",
"wallet_type": "circle_uc",
"blockchain": "SOL",
"wallet_address": "text",
"active": true,
"default_token_type": "USDC",
"create_time": "text"
}
]
}
Unique network code to refer new users
GET /account/referral-code HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"referral_code": "text"
}
Check if the balance code is valid.
POST /subscription/check-balance-code HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"secret": "text"
}
{
"balance": {
"start_time": "text",
"end_time": "text",
"balance_byte_count": 1
},
"error": {
"message": "text"
}
}
Fetches the payout wallet associated with the network
GET /account/payout-wallet HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"wallet_id": "text"
}
Set an existing account wallet as the wallet to receive network payments.
udid
POST /account/payout-wallet HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"wallet_id": "text"
}
{}
Out-of-band control messages for the connect protocol. Blocking request-response control messages need to be handled out-of-band to resolve the possibility of dedlocks in the client sequence.
base64 encoded connect protobuf Pack
processed as control messages.
As an inline message, these would be sent to the control id.
POST /connect/control HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"pack": [
"text"
]
}
{
"pack": [
"text"
],
"error": {
"message": "text"
}
}
Confirm the share of a device. This must be called from the side that initiates the share.
POST /device/confirm-share HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 54
{
"share_code": "text",
"associated_network_name": "text"
}
{
"associated_network_name": "text",
"error": {
"message": "text"
}
}
Start a login for a user authority. The user authority may be:
email or phone number
POST /auth/login HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 62
{
"user_auth": "text",
"auth_jwt": "text",
"auth_jwt_type": "apple"
}
{
"user_name": "text",
"user_auth": "text",
"auth_allowed": [
"password"
],
"error": {
"suggested_user_auth": "password",
"message": "text"
},
"network": {
"by_jwt": "text"
}
}
Randomly sample providers for locations, groups, or devices, which are active and in good health. This allows random iteration by using the exclude input to mark visited providers.
udid
POST /network/find-providers2 HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 176
{
"specs": [
{
"location_id": "text",
"location_group_id": "text",
"client_id": "text",
"best_available": true
}
],
"count": 1,
"exclude_client_ids": [
"text"
],
"exclude_destinations": [
[
"text"
]
]
}
{
"providers": [
{}
]
}
A QR code that maps to a URL to adopt the device. Send it to someone to scan to adopt the device.
Adopt code
GET /device/adopt-code/{code}/qr.png HTTP/1.1
Host: api.bringyour.com
Accept: */*
binary
Feedback.
POST /feedback/send-feedback HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 313
{
"uses": {
"personal": true,
"business": true
},
"needs": {
"private": true,
"safe": true,
"global": true,
"collaborate": true,
"app_control": true,
"block_data_brokers": true,
"block_ads": true,
"focus": true,
"connect_servers": true,
"run_servers": true,
"prevent_cyber": true,
"audit": true,
"zero_trust": true,
"visualize": true,
"other": "text"
}
}
{}
Retrieves the paid and unpaid byte count provided to the network
GET /transfer/stats HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"paid_bytes_provided": 1,
"unpaid_bytes_provided": 1
}
Set up a transfer from the Circle USDC user self custody wallet to an address. This starts a process that must be completed by the user.
user consent to accept terms of transfer
POST /wallet/circle-transfer-out HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 61
{
"to_address": "text",
"amount_usdc_nano_cents": 1,
"terms": true
}
{
"user_token": {
"user_token": "text",
"encryption_key": "text"
},
"challenge_id": "text",
"error": {
"message": "text"
}
}
Set the name of the association.
To set the name of devices owned by the network, use /device/set-name
.
Name of the device
POST /device/set-association-name HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 36
{
"code": "text",
"device_name": "text"
}
{
"error": {
"message": "text"
}
}
Redeem the balance code and add the transfer balance to the caller network.
POST /subscription/redeem-balance-code HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 17
{
"secret": "text"
}
{
"transfer_balance": {
"transfer_balance_id": "text",
"start_time": "text",
"end_time": "text",
"balance_byte_count": 1
},
"error": {
"message": "text"
}
}
Remove a device association. The association can be any of:
POST /device/remove-association HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15
{
"code": "text"
}
{
"error": {
"message": "text"
}
}
Check if the network name is available. A new network name must satisfy:
POST /auth/network-check HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 23
{
"network_name": "text"
}
{
"available": true
}
Creates an anonymous payment identifier to be used with purchases. This keeps network information out of the payment processor system. For example in Google Play this is called the "obfuscated account id".
POST /subscription/create-payment-id HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 2
{}
{
"subscription_payment_id": "text",
"error": {
"message": "text"
}
}
Confirm the adoption of a device. This must be called from the side that initiates the adoption.
POST /device/confirm-adopt HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 76
{
"adopt_code": "text",
"adopt_secret": "text",
"associated_network_name": "text"
}
{
"by_client_jwt": "text",
"error": {
"message": "text"
}
}
Remove a client from the network.
udid
POST /network/remove-client HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"client_id": "text"
}
{
"error": {
"message": "text"
}
}
Validate a USDC wallet address on the user custody wallet chain. This can be used to check whether an address can receive a transfer out from the user custody wallet. Please use this before initiating any transfer out to avoid lost funds.
POST /wallet/validate-address HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 18
{
"address": "text"
}
{
"valid": true
}
Initialize the Circle USDC user self custody wallet. This starts a process that must be completed by the user.
POST /wallet/circle-init HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"user_token": {
"user_token": "text",
"encryption_key": "text"
},
"challenge_id": "text",
"error": {
"message": "text"
}
}
Search for locations and groups that match a query,
where there are at least one active provider in good health.
The match algorithm accounts for typos and misspelling,
and the tolerance can be tuned in the input.
Note that a location or group will need to be mapped to an actual provider
using /network/find-providers
.
POST /network/find-provider-locations HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 78
{
"query": "text",
"max_distance_fraction": 1,
"enable_max_distance_fraction": true
}
{
"specs": [
{
"location_id": "text",
"location_group_id": "text",
"client_id": "text",
"best_available": true
}
],
"groups": [
{
"location_group_id": "text",
"name": "text",
"provider_count": 1,
"promoted": true,
"match_distance": 1
}
],
"locations": [
{
"location_id": "text",
"location_type": "city",
"name": "text",
"city": "text",
"city_location_id": "text",
"region": "text",
"region_location_id": "text",
"country": "text",
"country_location_id": "text",
"country_code": "text",
"provider_count": 1,
"match_distance": 1
}
],
"devices": [
{
"client_id": "text",
"device_name": "text"
}
]
}
The status of the adopt-code device. The status can be one of:
POST /device/adopt-status HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 21
{
"adopt_code": "text"
}
{
"pending": true,
"associated_network_name": "text",
"error": {
"message": "text"
}
}
Creates a code to share a device.
udid
Name of the device that will be shared to the guest
POST /device/create-share-code HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 41
{
"client_id": "text",
"device_name": "text"
}
{
"share_code": "text",
"error": {
"message": "text"
}
}
Create a new wallet for your network. You can then use it as a payout wallet by posting to /account/payout-wallet.
The blockchain associated with the address
The "SOL" or "MATIC" wallet address
We only support "USDC"
POST /account/wallet HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 72
{
"blockchain": "SOL",
"wallet_address": "text",
"default_token_type": "USDC"
}
{
"wallet_id": "text"
}
Remove an adopt code. This must be called from the side that initiates the adoption.
POST /device/remove-adopt-code HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
Accept: */*
Content-Length: 43
{
"adopt_code": "text",
"adopt_secret": "text"
}
{
"error": {
"message": "text"
}
}
Remove a wallet from your list of account wallets
udid
POST /account/wallets/remove HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 20
{
"wallet_id": "text"
}
{
"success": true,
"error": {
"message": "text"
}
}
Set the provide mode for a device.
udid
The devices associated with the caller network. Associated devices are:
POST /device/set-provide HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"client_id": "text",
"provide_mode": 1
}
{
"provide_mode": 1,
"error": {
"message": "text"
}
}
GET /device/associations HTTP/1.1
Host: api.bringyour.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"pending_adoption_devices": [
{
"code": "text",
"device_name": "text",
"duration_minutes": 1
}
],
"incoming_shared_devices": [
{
"pending": true,
"code": "text",
"device_name": "text",
"client_id": "text",
"network_name": "text"
}
],
"outgoing_shared_devices": [
{
"pending": true,
"code": "text",
"device_name": "text",
"client_id": "text",
"network_name": "text"
}
]
}
A list of locations and groups where there are at least one active provider
in good health.
Note that a location or group will need to be mapped to an actual provider
using /network/find-providers
.
GET /network/provider-locations HTTP/1.1
Host: api.bringyour.com
Accept: */*
{
"specs": [
{
"location_id": "text",
"location_group_id": "text",
"client_id": "text",
"best_available": true
}
],
"groups": [
{
"location_group_id": "text",
"name": "text",
"provider_count": 1,
"promoted": true,
"match_distance": 1
}
],
"locations": [
{
"location_id": "text",
"location_type": "city",
"name": "text",
"city": "text",
"city_location_id": "text",
"region": "text",
"region_location_id": "text",
"country": "text",
"country_location_id": "text",
"country_code": "text",
"provider_count": 1,
"match_distance": 1
}
],
"devices": [
{
"client_id": "text",
"device_name": "text"
}
]
}