@cybrid/cybrid-api-id-angular 0.123.13 → 0.123.15
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/esm2020/api/bankApplications.service.mjs +2 -2
- package/esm2020/api/customerTokens.service.mjs +2 -2
- package/esm2020/api/organizationApplications.service.mjs +2 -2
- package/esm2020/api/users.service.mjs +2 -2
- package/esm2020/model/application.mjs +2 -2
- package/esm2020/model/applicationList.mjs +1 -1
- package/esm2020/model/applicationWithSecret.mjs +1 -1
- package/esm2020/model/applicationWithSecretAllOf.mjs +2 -2
- package/esm2020/model/customerToken.mjs +2 -2
- package/esm2020/model/errorResponse.mjs +2 -2
- package/esm2020/model/postBankApplication.mjs +2 -2
- package/esm2020/model/postCustomerToken.mjs +2 -2
- package/esm2020/model/postOrganizationApplication.mjs +2 -2
- package/esm2020/model/postUser.mjs +2 -2
- package/esm2020/model/user.mjs +2 -2
- package/esm2020/model/userList.mjs +1 -1
- package/fesm2015/cybrid-cybrid-api-id-angular.mjs +6 -6
- package/fesm2015/cybrid-cybrid-api-id-angular.mjs.map +1 -1
- package/fesm2020/cybrid-cybrid-api-id-angular.mjs +13 -13
- package/fesm2020/cybrid-cybrid-api-id-angular.mjs.map +1 -1
- package/model/application.d.ts +1 -1
- package/model/applicationList.d.ts +1 -1
- package/model/applicationWithSecretAllOf.d.ts +1 -1
- package/model/customerToken.d.ts +1 -1
- package/model/errorResponse.d.ts +1 -1
- package/model/postBankApplication.d.ts +1 -1
- package/model/postCustomerToken.d.ts +1 -1
- package/model/postOrganizationApplication.d.ts +1 -1
- package/model/postUser.d.ts +1 -1
- package/model/user.d.ts +1 -1
- package/model/userList.d.ts +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cybrid-cybrid-api-id-angular.mjs","sources":["../../encoder.ts","../../variables.ts","../../configuration.ts","../../api/bankApplications.service.ts","../../api/customerTokens.service.ts","../../api/organizationApplications.service.ts","../../api/users.service.ts","../../api/api.ts","../../model/application.ts","../../model/applicationWithSecretAllOf.ts","../../model/applicationWithSecret.ts","../../model/customerToken.ts","../../model/errorResponse.ts","../../model/postBankApplication.ts","../../model/postCustomerToken.ts","../../model/postOrganizationApplication.ts","../../model/postUser.ts","../../model/user.ts","../../api.module.ts","../../cybrid-cybrid-api-id-angular.ts"],"sourcesContent":["import { HttpParameterCodec } from '@angular/common/http';\n\n/**\n * Custom HttpParameterCodec\n * Workaround for https://github.com/angular/angular/issues/18261\n */\nexport class CustomHttpParameterCodec implements HttpParameterCodec {\n encodeKey(k: string): string {\n return encodeURIComponent(k);\n }\n encodeValue(v: string): string {\n return encodeURIComponent(v);\n }\n decodeKey(k: string): string {\n return decodeURIComponent(k);\n }\n decodeValue(v: string): string {\n return decodeURIComponent(v);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const BASE_PATH = new InjectionToken<string>('basePath');\nexport const COLLECTION_FORMATS = {\n 'csv': ',',\n 'tsv': ' ',\n 'ssv': ' ',\n 'pipes': '|'\n}\n","import { HttpParameterCodec } from '@angular/common/http';\n\nexport interface ConfigurationParameters {\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n apiKeys?: {[ key: string ]: string};\n username?: string;\n password?: string;\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n accessToken?: string | (() => string);\n basePath?: string;\n withCredentials?: boolean;\n encoder?: HttpParameterCodec;\n /**\n * The keys are the names in the securitySchemes section of the OpenAPI\n * document. They should map to the value used for authentication\n * minus any standard prefixes such as 'Basic' or 'Bearer'.\n */\n credentials?: {[ key: string ]: string | (() => string | undefined)};\n}\n\nexport class Configuration {\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n apiKeys?: {[ key: string ]: string};\n username?: string;\n password?: string;\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n accessToken?: string | (() => string);\n basePath?: string;\n withCredentials?: boolean;\n encoder?: HttpParameterCodec;\n /**\n * The keys are the names in the securitySchemes section of the OpenAPI\n * document. They should map to the value used for authentication\n * minus any standard prefixes such as 'Basic' or 'Bearer'.\n */\n credentials: {[ key: string ]: string | (() => string | undefined)};\n\n constructor(configurationParameters: ConfigurationParameters = {}) {\n this.apiKeys = configurationParameters.apiKeys;\n this.username = configurationParameters.username;\n this.password = configurationParameters.password;\n this.accessToken = configurationParameters.accessToken;\n this.basePath = configurationParameters.basePath;\n this.withCredentials = configurationParameters.withCredentials;\n this.encoder = configurationParameters.encoder;\n if (configurationParameters.credentials) {\n this.credentials = configurationParameters.credentials;\n }\n else {\n this.credentials = {};\n }\n\n // init default BearerAuth credential\n if (!this.credentials['BearerAuth']) {\n this.credentials['BearerAuth'] = () => {\n return typeof this.accessToken === 'function'\n ? this.accessToken()\n : this.accessToken;\n };\n }\n\n // init default oauth2 credential\n if (!this.credentials['oauth2']) {\n this.credentials['oauth2'] = () => {\n return typeof this.accessToken === 'function'\n ? this.accessToken()\n : this.accessToken;\n };\n }\n }\n\n /**\n * Select the correct content-type to use for a request.\n * Uses {@link Configuration#isJsonMime} to determine the correct content-type.\n * If no content type is found return the first found type if the contentTypes is not empty\n * @param contentTypes - the array of content types that are available for selection\n * @returns the selected content-type or <code>undefined</code> if no selection could be made.\n */\n public selectHeaderContentType (contentTypes: string[]): string | undefined {\n if (contentTypes.length === 0) {\n return undefined;\n }\n\n const type = contentTypes.find((x: string) => this.isJsonMime(x));\n if (type === undefined) {\n return contentTypes[0];\n }\n return type;\n }\n\n /**\n * Select the correct accept content-type to use for a request.\n * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.\n * If no content type is found return the first found type if the contentTypes is not empty\n * @param accepts - the array of content types that are available for selection.\n * @returns the selected content-type or <code>undefined</code> if no selection could be made.\n */\n public selectHeaderAccept(accepts: string[]): string | undefined {\n if (accepts.length === 0) {\n return undefined;\n }\n\n const type = accepts.find((x: string) => this.isJsonMime(x));\n if (type === undefined) {\n return accepts[0];\n }\n return type;\n }\n\n /**\n * Check if the given MIME is a JSON MIME.\n * JSON MIME examples:\n * application/json\n * application/json; charset=UTF8\n * APPLICATION/JSON\n * application/vnd.company+json\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\n * @return True if the given MIME is JSON, false otherwise.\n */\n public isJsonMime(mime: string): boolean {\n const jsonMime: RegExp = new RegExp('^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$', 'i');\n return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');\n }\n\n public lookupCredential(key: string): string | undefined {\n const value = this.credentials[key];\n return typeof value === 'function'\n ? value()\n : value;\n }\n}\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ApplicationListIdpModel } from '../model/applicationList';\n// @ts-ignore\nimport { ApplicationWithSecretIdpModel } from '../model/applicationWithSecret';\n// @ts-ignore\nimport { ErrorResponseIdpModel } from '../model/errorResponse';\n// @ts-ignore\nimport { PostBankApplicationIdpModel } from '../model/postBankApplication';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BankApplicationsService {\n\n protected basePath = 'https://id.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Create bank application\n * Creates a bank OAuth2 application. Required scope: **bank_applications:execute**\n * @param postBankApplicationIdpModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public createBankApplication(postBankApplicationIdpModel: PostBankApplicationIdpModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<ApplicationWithSecretIdpModel>;\n public createBankApplication(postBankApplicationIdpModel: PostBankApplicationIdpModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<ApplicationWithSecretIdpModel>>;\n public createBankApplication(postBankApplicationIdpModel: PostBankApplicationIdpModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<ApplicationWithSecretIdpModel>>;\n public createBankApplication(postBankApplicationIdpModel: PostBankApplicationIdpModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (postBankApplicationIdpModel === null || postBankApplicationIdpModel === undefined) {\n throw new Error('Required parameter postBankApplicationIdpModel was null or undefined when calling createBankApplication.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.post<ApplicationWithSecretIdpModel>(`${this.configuration.basePath}/api/bank_applications`,\n postBankApplicationIdpModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Delete bank application\n * Deletes an application.Required scope: **bank_applications:execute**\n * @param clientId Identifier for the application.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public deleteBankApplication(clientId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;\n public deleteBankApplication(clientId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;\n public deleteBankApplication(clientId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;\n public deleteBankApplication(clientId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (clientId === null || clientId === undefined) {\n throw new Error('Required parameter clientId was null or undefined when calling deleteBankApplication.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.delete<any>(`${this.configuration.basePath}/api/bank_applications/${encodeURIComponent(String(clientId))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * List bank applications\n * Retrieve a list of bank OAuth2 applications. Required scope: **banks:read**\n * @param page The page index to retrieve.\n * @param perPage The number of entities per page to return.\n * @param bankGuid Bank guid to list applications for.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public listBankApplications(page?: string, perPage?: string, bankGuid?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<ApplicationListIdpModel>;\n public listBankApplications(page?: string, perPage?: string, bankGuid?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<ApplicationListIdpModel>>;\n public listBankApplications(page?: string, perPage?: string, bankGuid?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<ApplicationListIdpModel>>;\n public listBankApplications(page?: string, perPage?: string, bankGuid?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n if (page !== undefined && page !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>page, 'page');\n }\n if (perPage !== undefined && perPage !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'per_page');\n }\n if (bankGuid !== undefined && bankGuid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>bankGuid, 'bank_guid');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<ApplicationListIdpModel>(`${this.configuration.basePath}/api/bank_applications`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { CustomerTokenIdpModel } from '../model/customerToken';\n// @ts-ignore\nimport { ErrorResponseIdpModel } from '../model/errorResponse';\n// @ts-ignore\nimport { PostCustomerTokenIdpModel } from '../model/postCustomerToken';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CustomerTokensService {\n\n protected basePath = 'https://id.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Create customer access token\n * Creates a customer JWT access token. Required scopes: **customers:write** and **customers:read**\n * @param postCustomerTokenIdpModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public createCustomerToken(postCustomerTokenIdpModel: PostCustomerTokenIdpModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<CustomerTokenIdpModel>;\n public createCustomerToken(postCustomerTokenIdpModel: PostCustomerTokenIdpModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<CustomerTokenIdpModel>>;\n public createCustomerToken(postCustomerTokenIdpModel: PostCustomerTokenIdpModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<CustomerTokenIdpModel>>;\n public createCustomerToken(postCustomerTokenIdpModel: PostCustomerTokenIdpModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (postCustomerTokenIdpModel === null || postCustomerTokenIdpModel === undefined) {\n throw new Error('Required parameter postCustomerTokenIdpModel was null or undefined when calling createCustomerToken.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.post<CustomerTokenIdpModel>(`${this.configuration.basePath}/api/customer_tokens`,\n postCustomerTokenIdpModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ApplicationListIdpModel } from '../model/applicationList';\n// @ts-ignore\nimport { ApplicationWithSecretIdpModel } from '../model/applicationWithSecret';\n// @ts-ignore\nimport { ErrorResponseIdpModel } from '../model/errorResponse';\n// @ts-ignore\nimport { PostOrganizationApplicationIdpModel } from '../model/postOrganizationApplication';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrganizationApplicationsService {\n\n protected basePath = 'https://id.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Create organization application\n * Create an organization OAuth2 application. Required scope: **organization_applications:execute**\n * @param postOrganizationApplicationIdpModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public createOrganizationApplication(postOrganizationApplicationIdpModel: PostOrganizationApplicationIdpModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<ApplicationWithSecretIdpModel>;\n public createOrganizationApplication(postOrganizationApplicationIdpModel: PostOrganizationApplicationIdpModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<ApplicationWithSecretIdpModel>>;\n public createOrganizationApplication(postOrganizationApplicationIdpModel: PostOrganizationApplicationIdpModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<ApplicationWithSecretIdpModel>>;\n public createOrganizationApplication(postOrganizationApplicationIdpModel: PostOrganizationApplicationIdpModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (postOrganizationApplicationIdpModel === null || postOrganizationApplicationIdpModel === undefined) {\n throw new Error('Required parameter postOrganizationApplicationIdpModel was null or undefined when calling createOrganizationApplication.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.post<ApplicationWithSecretIdpModel>(`${this.configuration.basePath}/api/organization_applications`,\n postOrganizationApplicationIdpModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Delete organization application\n * Deletes an application.Required scope: **organization_applications:execute**\n * @param clientId Identifier for the application.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public deleteOrganizationApplication(clientId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;\n public deleteOrganizationApplication(clientId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;\n public deleteOrganizationApplication(clientId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;\n public deleteOrganizationApplication(clientId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (clientId === null || clientId === undefined) {\n throw new Error('Required parameter clientId was null or undefined when calling deleteOrganizationApplication.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.delete<any>(`${this.configuration.basePath}/api/organization_applications/${encodeURIComponent(String(clientId))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * List organization applications\n * Retrieve a list of organization OAuth2 applications. Required scope: **organizations:read**\n * @param page The page index to retrieve.\n * @param perPage The number of entities per page to return.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public listOrganizationApplications(page?: string, perPage?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<ApplicationListIdpModel>;\n public listOrganizationApplications(page?: string, perPage?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<ApplicationListIdpModel>>;\n public listOrganizationApplications(page?: string, perPage?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<ApplicationListIdpModel>>;\n public listOrganizationApplications(page?: string, perPage?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n if (page !== undefined && page !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>page, 'page');\n }\n if (perPage !== undefined && perPage !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'per_page');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<ApplicationListIdpModel>(`${this.configuration.basePath}/api/organization_applications`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ErrorResponseIdpModel } from '../model/errorResponse';\n// @ts-ignore\nimport { PostUserIdpModel } from '../model/postUser';\n// @ts-ignore\nimport { UserIdpModel } from '../model/user';\n// @ts-ignore\nimport { UserListIdpModel } from '../model/userList';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UsersService {\n\n protected basePath = 'https://id.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Create user\n * Creates a user. \n * @param postUserIdpModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public createUser(postUserIdpModel: PostUserIdpModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<UserIdpModel>;\n public createUser(postUserIdpModel: PostUserIdpModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<UserIdpModel>>;\n public createUser(postUserIdpModel: PostUserIdpModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<UserIdpModel>>;\n public createUser(postUserIdpModel: PostUserIdpModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (postUserIdpModel === null || postUserIdpModel === undefined) {\n throw new Error('Required parameter postUserIdpModel was null or undefined when calling createUser.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.post<UserIdpModel>(`${this.configuration.basePath}/api/users`,\n postUserIdpModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Disable User\n * Disables a user. User is not deleted. Required scope: **users:execute**\n * @param userGuid Identifier for the user.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public disableUser(userGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;\n public disableUser(userGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;\n public disableUser(userGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;\n public disableUser(userGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (userGuid === null || userGuid === undefined) {\n throw new Error('Required parameter userGuid was null or undefined when calling disableUser.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.delete<any>(`${this.configuration.basePath}/api/users/${encodeURIComponent(String(userGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Get User\n * Retrieves a user. Required scope: **users:read**\n * @param userGuid Identifier for the user.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public getUser(userGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<UserIdpModel>;\n public getUser(userGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<UserIdpModel>>;\n public getUser(userGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<UserIdpModel>>;\n public getUser(userGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (userGuid === null || userGuid === undefined) {\n throw new Error('Required parameter userGuid was null or undefined when calling getUser.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<UserIdpModel>(`${this.configuration.basePath}/api/users/${encodeURIComponent(String(userGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * List users\n * Retrieve a list users. Required scope: **users:read**\n * @param page The page index to retrieve.\n * @param perPage The number of entities per page to return.\n * @param guid Comma separated guids to list users for.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public listUser(page?: string, perPage?: string, guid?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<UserListIdpModel>;\n public listUser(page?: string, perPage?: string, guid?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<UserListIdpModel>>;\n public listUser(page?: string, perPage?: string, guid?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<UserListIdpModel>>;\n public listUser(page?: string, perPage?: string, guid?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n if (page !== undefined && page !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>page, 'page');\n }\n if (perPage !== undefined && perPage !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'per_page');\n }\n if (guid !== undefined && guid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>guid, 'guid');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<UserListIdpModel>(`${this.configuration.basePath}/api/users`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","export * from './bankApplications.service';\nimport { BankApplicationsService } from './bankApplications.service';\nexport * from './customerTokens.service';\nimport { CustomerTokensService } from './customerTokens.service';\nexport * from './organizationApplications.service';\nimport { OrganizationApplicationsService } from './organizationApplications.service';\nexport * from './users.service';\nimport { UsersService } from './users.service';\nexport const APIS = [BankApplicationsService, CustomerTokensService, OrganizationApplicationsService, UsersService];\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface ApplicationIdpModel { \n /**\n * Name provided for the OAuth2 application.\n */\n name: string;\n /**\n * The OAuth2 application\\'s client ID.\n */\n client_id: string;\n /**\n * List of the scopes granted to the OAuth2 application.\n */\n scopes: Array<ApplicationIdpModel.ScopesEnum>;\n /**\n * ISO8601 datetime the record was created at.\n */\n created_at: string;\n /**\n * ISO8601 datetime the record was last updated at.\n */\n updated_at?: string;\n}\nexport namespace ApplicationIdpModel {\n export type ScopesEnum = 'accounts:execute' | 'accounts:read' | 'bank_applications:execute' | 'banks:execute' | 'banks:read' | 'banks:write' | 'counterparties:execute' | 'counterparties:read' | 'counterparties:write' | 'customers:execute' | 'customers:read' | 'customers:write' | 'deposit_addresses:execute' | 'deposit_addresses:read' | 'deposit_bank_accounts:execute' | 'deposit_bank_accounts:read' | 'external_bank_accounts:execute' | 'external_bank_accounts:read' | 'external_bank_accounts:write' | 'external_wallets:execute' | 'external_wallets:read' | 'identity_verifications:execute' | 'identity_verifications:read' | 'identity_verifications:write' | 'invoices:execute' | 'invoices:read' | 'invoices:write' | 'organization_applications:execute' | 'organizations:read' | 'organizations:write' | 'prices:read' | 'quotes:execute' | 'quotes:read' | 'subscription_events:execute' | 'subscription_events:read' | 'subscriptions:execute' | 'subscriptions:read' | 'subscriptions:write' | 'trades:execute' | 'trades:read' | 'transfers:execute' | 'transfers:read' | 'users:execute' | 'users:read' | 'workflows:execute' | 'workflows:read';\n export const ScopesEnum = {\n Accountsexecute: 'accounts:execute' as ScopesEnum,\n Accountsread: 'accounts:read' as ScopesEnum,\n BankApplicationsexecute: 'bank_applications:execute' as ScopesEnum,\n Banksexecute: 'banks:execute' as ScopesEnum,\n Banksread: 'banks:read' as ScopesEnum,\n Bankswrite: 'banks:write' as ScopesEnum,\n Counterpartiesexecute: 'counterparties:execute' as ScopesEnum,\n Counterpartiesread: 'counterparties:read' as ScopesEnum,\n Counterpartieswrite: 'counterparties:write' as ScopesEnum,\n Customersexecute: 'customers:execute' as ScopesEnum,\n Customersread: 'customers:read' as ScopesEnum,\n Customerswrite: 'customers:write' as ScopesEnum,\n DepositAddressesexecute: 'deposit_addresses:execute' as ScopesEnum,\n DepositAddressesread: 'deposit_addresses:read' as ScopesEnum,\n DepositBankAccountsexecute: 'deposit_bank_accounts:execute' as ScopesEnum,\n DepositBankAccountsread: 'deposit_bank_accounts:read' as ScopesEnum,\n ExternalBankAccountsexecute: 'external_bank_accounts:execute' as ScopesEnum,\n ExternalBankAccountsread: 'external_bank_accounts:read' as ScopesEnum,\n ExternalBankAccountswrite: 'external_bank_accounts:write' as ScopesEnum,\n ExternalWalletsexecute: 'external_wallets:execute' as ScopesEnum,\n ExternalWalletsread: 'external_wallets:read' as ScopesEnum,\n IdentityVerificationsexecute: 'identity_verifications:execute' as ScopesEnum,\n IdentityVerificationsread: 'identity_verifications:read' as ScopesEnum,\n IdentityVerificationswrite: 'identity_verifications:write' as ScopesEnum,\n Invoicesexecute: 'invoices:execute' as ScopesEnum,\n Invoicesread: 'invoices:read' as ScopesEnum,\n Invoiceswrite: 'invoices:write' as ScopesEnum,\n OrganizationApplicationsexecute: 'organization_applications:execute' as ScopesEnum,\n Organizationsread: 'organizations:read' as ScopesEnum,\n Organizationswrite: 'organizations:write' as ScopesEnum,\n Pricesread: 'prices:read' as ScopesEnum,\n Quotesexecute: 'quotes:execute' as ScopesEnum,\n Quotesread: 'quotes:read' as ScopesEnum,\n SubscriptionEventsexecute: 'subscription_events:execute' as ScopesEnum,\n SubscriptionEventsread: 'subscription_events:read' as ScopesEnum,\n Subscriptionsexecute: 'subscriptions:execute' as ScopesEnum,\n Subscriptionsread: 'subscriptions:read' as ScopesEnum,\n Subscriptionswrite: 'subscriptions:write' as ScopesEnum,\n Tradesexecute: 'trades:execute' as ScopesEnum,\n Tradesread: 'trades:read' as ScopesEnum,\n Transfersexecute: 'transfers:execute' as ScopesEnum,\n Transfersread: 'transfers:read' as ScopesEnum,\n Usersexecute: 'users:execute' as ScopesEnum,\n Usersread: 'users:read' as ScopesEnum,\n Workflowsexecute: 'workflows:execute' as ScopesEnum,\n Workflowsread: 'workflows:read' as ScopesEnum\n };\n}\n\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface ApplicationWithSecretAllOfIdpModel { \n /**\n * The OAuth2 application\\'s secret.\n */\n secret: string;\n}\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { ApplicationWithSecretAllOfIdpModel } from './applicationWithSecretAllOf';\nimport { ApplicationIdpModel } from './application';\n\n\nexport interface ApplicationWithSecretIdpModel { \n /**\n * Name provided for the OAuth2 application.\n */\n name: string;\n /**\n * The OAuth2 application\\'s client ID.\n */\n client_id: string;\n /**\n * List of the scopes granted to the OAuth2 application.\n */\n scopes: Array<ApplicationWithSecretIdpModel.ScopesEnum>;\n /**\n * ISO8601 datetime the record was created at.\n */\n created_at: string;\n /**\n * ISO8601 datetime the record was last updated at.\n */\n updated_at?: string;\n /**\n * The OAuth2 application\\'s secret.\n */\n secret: string;\n}\nexport namespace ApplicationWithSecretIdpModel {\n export type ScopesEnum = 'accounts:execute' | 'accounts:read' | 'bank_applications:execute' | 'banks:execute' | 'banks:read' | 'banks:write' | 'counterparties:execute' | 'counterparties:read' | 'counterparties:write' | 'customers:execute' | 'customers:read' | 'customers:write' | 'deposit_addresses:execute' | 'deposit_addresses:read' | 'deposit_bank_accounts:execute' | 'deposit_bank_accounts:read' | 'external_bank_accounts:execute' | 'external_bank_accounts:read' | 'external_bank_accounts:write' | 'external_wallets:execute' | 'external_wallets:read' | 'identity_verifications:execute' | 'identity_verifications:read' | 'identity_verifications:write' | 'invoices:execute' | 'invoices:read' | 'invoices:write' | 'organization_applications:execute' | 'organizations:read' | 'organizations:write' | 'prices:read' | 'quotes:execute' | 'quotes:read' | 'subscription_events:execute' | 'subscription_events:read' | 'subscriptions:execute' | 'subscriptions:read' | 'subscriptions:write' | 'trades:execute' | 'trades:read' | 'transfers:execute' | 'transfers:read' | 'users:execute' | 'users:read' | 'workflows:execute' | 'workflows:read';\n export const ScopesEnum = {\n Accountsexecute: 'accounts:execute' as ScopesEnum,\n Accountsread: 'accounts:read' as ScopesEnum,\n BankApplicationsexecute: 'bank_applications:execute' as ScopesEnum,\n Banksexecute: 'banks:execute' as ScopesEnum,\n Banksread: 'banks:read' as ScopesEnum,\n Bankswrite: 'banks:write' as ScopesEnum,\n Counterpartiesexecute: 'counterparties:execute' as ScopesEnum,\n Counterpartiesread: 'counterparties:read' as ScopesEnum,\n Counterpartieswrite: 'counterparties:write' as ScopesEnum,\n Customersexecute: 'customers:execute' as ScopesEnum,\n Customersread: 'customers:read' as ScopesEnum,\n Customerswrite: 'customers:write' as ScopesEnum,\n DepositAddressesexecute: 'deposit_addresses:execute' as ScopesEnum,\n DepositAddressesread: 'deposit_addresses:read' as ScopesEnum,\n DepositBankAccountsexecute: 'deposit_bank_accounts:execute' as ScopesEnum,\n DepositBankAccountsread: 'deposit_bank_accounts:read' as ScopesEnum,\n ExternalBankAccountsexecute: 'external_bank_accounts:execute' as ScopesEnum,\n ExternalBankAccountsread: 'external_bank_accounts:read' as ScopesEnum,\n ExternalBankAccountswrite: 'external_bank_accounts:write' as ScopesEnum,\n ExternalWalletsexecute: 'external_wallets:execute' as ScopesEnum,\n ExternalWalletsread: 'external_wallets:read' as ScopesEnum,\n IdentityVerificationsexecute: 'identity_verifications:execute' as ScopesEnum,\n IdentityVerificationsread: 'identity_verifications:read' as ScopesEnum,\n IdentityVerificationswrite: 'identity_verifications:write' as ScopesEnum,\n Invoicesexecute: 'invoices:execute' as ScopesEnum,\n Invoicesread: 'invoices:read' as ScopesEnum,\n Invoiceswrite: 'invoices:write' as ScopesEnum,\n OrganizationApplicationsexecute: 'organization_applications:execute' as ScopesEnum,\n Organizationsread: 'organizations:read' as ScopesEnum,\n Organizationswrite: 'organizations:write' as ScopesEnum,\n Pricesread: 'prices:read' as ScopesEnum,\n Quotesexecute: 'quotes:execute' as ScopesEnum,\n Quotesread: 'quotes:read' as ScopesEnum,\n SubscriptionEventsexecute: 'subscription_events:execute' as ScopesEnum,\n SubscriptionEventsread: 'subscription_events:read' as ScopesEnum,\n Subscriptionsexecute: 'subscriptions:execute' as ScopesEnum,\n Subscriptionsread: 'subscriptions:read' as ScopesEnum,\n Subscriptionswrite: 'subscriptions:write' as ScopesEnum,\n Tradesexecute: 'trades:execute' as ScopesEnum,\n Tradesread: 'trades:read' as ScopesEnum,\n Transfersexecute: 'transfers:execute' as ScopesEnum,\n Transfersread: 'transfers:read' as ScopesEnum,\n Usersexecute: 'users:execute' as ScopesEnum,\n Usersread: 'users:read' as ScopesEnum,\n Workflowsexecute: 'workflows:execute' as ScopesEnum,\n Workflowsread: 'workflows:read' as ScopesEnum\n };\n}\n\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface CustomerTokenIdpModel { \n /**\n * The JWT access token for the customer.\n */\n access_token?: string;\n}\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface ErrorResponseIdpModel { \n /**\n * Status code for Http Request\n */\n status: string;\n /**\n * Error message\n */\n error_message: string;\n /**\n * Message code for Error\n */\n message_code: string;\n}\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface PostBankApplicationIdpModel { \n /**\n * Name for the bank application.\n */\n name: string;\n /**\n * Bank guid the application is associated to.\n */\n bank_guid?: string;\n}\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface PostCustomerTokenIdpModel { \n /**\n * Customer guid the access token is being generated for.\n */\n customer_guid: string;\n /**\n * List of the scopes requested for the access token.\n */\n scopes: Set<PostCustomerTokenIdpModel.ScopesEnum>;\n}\nexport namespace PostCustomerTokenIdpModel {\n export type ScopesEnum = 'counterparties:read' | 'counterparties:write' | 'counterparties:execute' | 'customers:read' | 'customers:write' | 'accounts:read' | 'accounts:execute' | 'prices:read' | 'quotes:read' | 'quotes:execute' | 'trades:read' | 'trades:execute' | 'transfers:read' | 'transfers:execute' | 'external_bank_accounts:read' | 'external_bank_accounts:write' | 'external_bank_accounts:execute' | 'external_wallets:read' | 'external_wallets:execute' | 'workflows:read' | 'workflows:execute' | 'deposit_addresses:read' | 'deposit_addresses:execute' | 'deposit_bank_accounts:read' | 'deposit_bank_accounts:execute' | 'invoices:read' | 'invoices:write' | 'invoices:execute' | 'identity_verifications:read' | 'identity_verifications:write' | 'identity_verifications:execute';\n export const ScopesEnum = {\n Counterpartiesread: 'counterparties:read' as ScopesEnum,\n Counterpartieswrite: 'counterparties:write' as ScopesEnum,\n Counterpartiesexecute: 'counterparties:execute' as ScopesEnum,\n Customersread: 'customers:read' as ScopesEnum,\n Customerswrite: 'customers:write' as ScopesEnum,\n Accountsread: 'accounts:read' as ScopesEnum,\n Accountsexecute: 'accounts:execute' as ScopesEnum,\n Pricesread: 'prices:read' as ScopesEnum,\n Quotesread: 'quotes:read' as ScopesEnum,\n Quotesexecute: 'quotes:execute' as ScopesEnum,\n Tradesread: 'trades:read' as ScopesEnum,\n Tradesexecute: 'trades:execute' as ScopesEnum,\n Transfersread: 'transfers:read' as ScopesEnum,\n Transfersexecute: 'transfers:execute' as ScopesEnum,\n ExternalBankAccountsread: 'external_bank_accounts:read' as ScopesEnum,\n ExternalBankAccountswrite: 'external_bank_accounts:write' as ScopesEnum,\n ExternalBankAccountsexecute: 'external_bank_accounts:execute' as ScopesEnum,\n ExternalWalletsread: 'external_wallets:read' as ScopesEnum,\n ExternalWalletsexecute: 'external_wallets:execute' as ScopesEnum,\n Workflowsread: 'workflows:read' as ScopesEnum,\n Workflowsexecute: 'workflows:execute' as ScopesEnum,\n DepositAddressesread: 'deposit_addresses:read' as ScopesEnum,\n DepositAddressesexecute: 'deposit_addresses:execute' as ScopesEnum,\n DepositBankAccountsread: 'deposit_bank_accounts:read' as ScopesEnum,\n DepositBankAccountsexecute: 'deposit_bank_accounts:execute' as ScopesEnum,\n Invoicesread: 'invoices:read' as ScopesEnum,\n Invoiceswrite: 'invoices:write' as ScopesEnum,\n Invoicesexecute: 'invoices:execute' as ScopesEnum,\n IdentityVerificationsread: 'identity_verifications:read' as ScopesEnum,\n IdentityVerificationswrite: 'identity_verifications:write' as ScopesEnum,\n IdentityVerificationsexecute: 'identity_verifications:execute' as ScopesEnum\n };\n}\n\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface PostOrganizationApplicationIdpModel { \n /**\n * Name for the organization application.\n */\n name: string;\n}\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface PostUserIdpModel { \n /**\n * The email address associated with the user.\n */\n email: string;\n}\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.13\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface UserIdpModel { \n /**\n * Auto-generated unique identifier for the user.\n */\n guid?: string;\n /**\n * The user\\'s username.\n */\n username?: string;\n /**\n * The user\\'s email address.\n */\n email?: string;\n /**\n * ISO8601 datetime the record was created at.\n */\n created_at?: string;\n /**\n * ISO8601 datetime the record was last updated at.\n */\n updated_at?: string;\n}\n\n","import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';\nimport { Configuration } from './configuration';\nimport { HttpClient } from '@angular/common/http';\n\nimport { BankApplicationsService } from './api/bankApplications.service';\nimport { CustomerTokensService } from './api/customerTokens.service';\nimport { OrganizationApplicationsService } from './api/organizationApplications.service';\nimport { UsersService } from './api/users.service';\n\n@NgModule({\n imports: [],\n declarations: [],\n exports: [],\n providers: []\n})\nexport class ApiModule {\n public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> {\n return {\n ngModule: ApiModule,\n providers: [ { provide: Configuration, useFactory: configurationFactory } ]\n };\n }\n\n constructor( @Optional() @SkipSelf() parentModule: ApiModule,\n @Optional() http: HttpClient) {\n if (parentModule) {\n throw new Error('ApiModule is already loaded. Import in your base AppModule only.');\n }\n if (!http) {\n throw new Error('You need to import the HttpClientModule in your AppModule! \\n' +\n 'See also https://github.com/angular/angular/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;0BAAI,QAAQ;;0BACpB,QAAQ;;;ACxB1B;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"cybrid-cybrid-api-id-angular.mjs","sources":["../../encoder.ts","../../variables.ts","../../configuration.ts","../../api/bankApplications.service.ts","../../api/customerTokens.service.ts","../../api/organizationApplications.service.ts","../../api/users.service.ts","../../api/api.ts","../../model/application.ts","../../model/applicationWithSecretAllOf.ts","../../model/applicationWithSecret.ts","../../model/customerToken.ts","../../model/errorResponse.ts","../../model/postBankApplication.ts","../../model/postCustomerToken.ts","../../model/postOrganizationApplication.ts","../../model/postUser.ts","../../model/user.ts","../../api.module.ts","../../cybrid-cybrid-api-id-angular.ts"],"sourcesContent":["import { HttpParameterCodec } from '@angular/common/http';\n\n/**\n * Custom HttpParameterCodec\n * Workaround for https://github.com/angular/angular/issues/18261\n */\nexport class CustomHttpParameterCodec implements HttpParameterCodec {\n encodeKey(k: string): string {\n return encodeURIComponent(k);\n }\n encodeValue(v: string): string {\n return encodeURIComponent(v);\n }\n decodeKey(k: string): string {\n return decodeURIComponent(k);\n }\n decodeValue(v: string): string {\n return decodeURIComponent(v);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const BASE_PATH = new InjectionToken<string>('basePath');\nexport const COLLECTION_FORMATS = {\n 'csv': ',',\n 'tsv': ' ',\n 'ssv': ' ',\n 'pipes': '|'\n}\n","import { HttpParameterCodec } from '@angular/common/http';\n\nexport interface ConfigurationParameters {\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n apiKeys?: {[ key: string ]: string};\n username?: string;\n password?: string;\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n accessToken?: string | (() => string);\n basePath?: string;\n withCredentials?: boolean;\n encoder?: HttpParameterCodec;\n /**\n * The keys are the names in the securitySchemes section of the OpenAPI\n * document. They should map to the value used for authentication\n * minus any standard prefixes such as 'Basic' or 'Bearer'.\n */\n credentials?: {[ key: string ]: string | (() => string | undefined)};\n}\n\nexport class Configuration {\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n apiKeys?: {[ key: string ]: string};\n username?: string;\n password?: string;\n /**\n * @deprecated Since 5.0. Use credentials instead\n */\n accessToken?: string | (() => string);\n basePath?: string;\n withCredentials?: boolean;\n encoder?: HttpParameterCodec;\n /**\n * The keys are the names in the securitySchemes section of the OpenAPI\n * document. They should map to the value used for authentication\n * minus any standard prefixes such as 'Basic' or 'Bearer'.\n */\n credentials: {[ key: string ]: string | (() => string | undefined)};\n\n constructor(configurationParameters: ConfigurationParameters = {}) {\n this.apiKeys = configurationParameters.apiKeys;\n this.username = configurationParameters.username;\n this.password = configurationParameters.password;\n this.accessToken = configurationParameters.accessToken;\n this.basePath = configurationParameters.basePath;\n this.withCredentials = configurationParameters.withCredentials;\n this.encoder = configurationParameters.encoder;\n if (configurationParameters.credentials) {\n this.credentials = configurationParameters.credentials;\n }\n else {\n this.credentials = {};\n }\n\n // init default BearerAuth credential\n if (!this.credentials['BearerAuth']) {\n this.credentials['BearerAuth'] = () => {\n return typeof this.accessToken === 'function'\n ? this.accessToken()\n : this.accessToken;\n };\n }\n\n // init default oauth2 credential\n if (!this.credentials['oauth2']) {\n this.credentials['oauth2'] = () => {\n return typeof this.accessToken === 'function'\n ? this.accessToken()\n : this.accessToken;\n };\n }\n }\n\n /**\n * Select the correct content-type to use for a request.\n * Uses {@link Configuration#isJsonMime} to determine the correct content-type.\n * If no content type is found return the first found type if the contentTypes is not empty\n * @param contentTypes - the array of content types that are available for selection\n * @returns the selected content-type or <code>undefined</code> if no selection could be made.\n */\n public selectHeaderContentType (contentTypes: string[]): string | undefined {\n if (contentTypes.length === 0) {\n return undefined;\n }\n\n const type = contentTypes.find((x: string) => this.isJsonMime(x));\n if (type === undefined) {\n return contentTypes[0];\n }\n return type;\n }\n\n /**\n * Select the correct accept content-type to use for a request.\n * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.\n * If no content type is found return the first found type if the contentTypes is not empty\n * @param accepts - the array of content types that are available for selection.\n * @returns the selected content-type or <code>undefined</code> if no selection could be made.\n */\n public selectHeaderAccept(accepts: string[]): string | undefined {\n if (accepts.length === 0) {\n return undefined;\n }\n\n const type = accepts.find((x: string) => this.isJsonMime(x));\n if (type === undefined) {\n return accepts[0];\n }\n return type;\n }\n\n /**\n * Check if the given MIME is a JSON MIME.\n * JSON MIME examples:\n * application/json\n * application/json; charset=UTF8\n * APPLICATION/JSON\n * application/vnd.company+json\n * @param mime - MIME (Multipurpose Internet Mail Extensions)\n * @return True if the given MIME is JSON, false otherwise.\n */\n public isJsonMime(mime: string): boolean {\n const jsonMime: RegExp = new RegExp('^(application\\/json|[^;/ \\t]+\\/[^;/ \\t]+[+]json)[ \\t]*(;.*)?$', 'i');\n return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');\n }\n\n public lookupCredential(key: string): string | undefined {\n const value = this.credentials[key];\n return typeof value === 'function'\n ? value()\n : value;\n }\n}\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ApplicationListIdpModel } from '../model/applicationList';\n// @ts-ignore\nimport { ApplicationWithSecretIdpModel } from '../model/applicationWithSecret';\n// @ts-ignore\nimport { ErrorResponseIdpModel } from '../model/errorResponse';\n// @ts-ignore\nimport { PostBankApplicationIdpModel } from '../model/postBankApplication';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BankApplicationsService {\n\n protected basePath = 'https://id.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Create bank application\n * Creates a bank OAuth2 application. Required scope: **bank_applications:execute**\n * @param postBankApplicationIdpModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public createBankApplication(postBankApplicationIdpModel: PostBankApplicationIdpModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<ApplicationWithSecretIdpModel>;\n public createBankApplication(postBankApplicationIdpModel: PostBankApplicationIdpModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<ApplicationWithSecretIdpModel>>;\n public createBankApplication(postBankApplicationIdpModel: PostBankApplicationIdpModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<ApplicationWithSecretIdpModel>>;\n public createBankApplication(postBankApplicationIdpModel: PostBankApplicationIdpModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (postBankApplicationIdpModel === null || postBankApplicationIdpModel === undefined) {\n throw new Error('Required parameter postBankApplicationIdpModel was null or undefined when calling createBankApplication.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.post<ApplicationWithSecretIdpModel>(`${this.configuration.basePath}/api/bank_applications`,\n postBankApplicationIdpModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Delete bank application\n * Deletes an application.Required scope: **bank_applications:execute**\n * @param clientId Identifier for the application.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public deleteBankApplication(clientId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;\n public deleteBankApplication(clientId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;\n public deleteBankApplication(clientId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;\n public deleteBankApplication(clientId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (clientId === null || clientId === undefined) {\n throw new Error('Required parameter clientId was null or undefined when calling deleteBankApplication.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.delete<any>(`${this.configuration.basePath}/api/bank_applications/${encodeURIComponent(String(clientId))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * List bank applications\n * Retrieve a list of bank OAuth2 applications. Required scope: **banks:read**\n * @param page The page index to retrieve.\n * @param perPage The number of entities per page to return.\n * @param bankGuid Bank guid to list applications for.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public listBankApplications(page?: string, perPage?: string, bankGuid?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<ApplicationListIdpModel>;\n public listBankApplications(page?: string, perPage?: string, bankGuid?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<ApplicationListIdpModel>>;\n public listBankApplications(page?: string, perPage?: string, bankGuid?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<ApplicationListIdpModel>>;\n public listBankApplications(page?: string, perPage?: string, bankGuid?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n if (page !== undefined && page !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>page, 'page');\n }\n if (perPage !== undefined && perPage !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'per_page');\n }\n if (bankGuid !== undefined && bankGuid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>bankGuid, 'bank_guid');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<ApplicationListIdpModel>(`${this.configuration.basePath}/api/bank_applications`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { CustomerTokenIdpModel } from '../model/customerToken';\n// @ts-ignore\nimport { ErrorResponseIdpModel } from '../model/errorResponse';\n// @ts-ignore\nimport { PostCustomerTokenIdpModel } from '../model/postCustomerToken';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CustomerTokensService {\n\n protected basePath = 'https://id.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Create customer access token\n * Creates a customer JWT access token. Required scopes: **customers:write** and **customers:read**\n * @param postCustomerTokenIdpModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public createCustomerToken(postCustomerTokenIdpModel: PostCustomerTokenIdpModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<CustomerTokenIdpModel>;\n public createCustomerToken(postCustomerTokenIdpModel: PostCustomerTokenIdpModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<CustomerTokenIdpModel>>;\n public createCustomerToken(postCustomerTokenIdpModel: PostCustomerTokenIdpModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<CustomerTokenIdpModel>>;\n public createCustomerToken(postCustomerTokenIdpModel: PostCustomerTokenIdpModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (postCustomerTokenIdpModel === null || postCustomerTokenIdpModel === undefined) {\n throw new Error('Required parameter postCustomerTokenIdpModel was null or undefined when calling createCustomerToken.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.post<CustomerTokenIdpModel>(`${this.configuration.basePath}/api/customer_tokens`,\n postCustomerTokenIdpModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ApplicationListIdpModel } from '../model/applicationList';\n// @ts-ignore\nimport { ApplicationWithSecretIdpModel } from '../model/applicationWithSecret';\n// @ts-ignore\nimport { ErrorResponseIdpModel } from '../model/errorResponse';\n// @ts-ignore\nimport { PostOrganizationApplicationIdpModel } from '../model/postOrganizationApplication';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrganizationApplicationsService {\n\n protected basePath = 'https://id.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Create organization application\n * Create an organization OAuth2 application. Required scope: **organization_applications:execute**\n * @param postOrganizationApplicationIdpModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public createOrganizationApplication(postOrganizationApplicationIdpModel: PostOrganizationApplicationIdpModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<ApplicationWithSecretIdpModel>;\n public createOrganizationApplication(postOrganizationApplicationIdpModel: PostOrganizationApplicationIdpModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<ApplicationWithSecretIdpModel>>;\n public createOrganizationApplication(postOrganizationApplicationIdpModel: PostOrganizationApplicationIdpModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<ApplicationWithSecretIdpModel>>;\n public createOrganizationApplication(postOrganizationApplicationIdpModel: PostOrganizationApplicationIdpModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (postOrganizationApplicationIdpModel === null || postOrganizationApplicationIdpModel === undefined) {\n throw new Error('Required parameter postOrganizationApplicationIdpModel was null or undefined when calling createOrganizationApplication.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.post<ApplicationWithSecretIdpModel>(`${this.configuration.basePath}/api/organization_applications`,\n postOrganizationApplicationIdpModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Delete organization application\n * Deletes an application.Required scope: **organization_applications:execute**\n * @param clientId Identifier for the application.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public deleteOrganizationApplication(clientId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;\n public deleteOrganizationApplication(clientId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;\n public deleteOrganizationApplication(clientId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;\n public deleteOrganizationApplication(clientId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (clientId === null || clientId === undefined) {\n throw new Error('Required parameter clientId was null or undefined when calling deleteOrganizationApplication.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.delete<any>(`${this.configuration.basePath}/api/organization_applications/${encodeURIComponent(String(clientId))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * List organization applications\n * Retrieve a list of organization OAuth2 applications. Required scope: **organizations:read**\n * @param page The page index to retrieve.\n * @param perPage The number of entities per page to return.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public listOrganizationApplications(page?: string, perPage?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<ApplicationListIdpModel>;\n public listOrganizationApplications(page?: string, perPage?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<ApplicationListIdpModel>>;\n public listOrganizationApplications(page?: string, perPage?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<ApplicationListIdpModel>>;\n public listOrganizationApplications(page?: string, perPage?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n if (page !== undefined && page !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>page, 'page');\n }\n if (perPage !== undefined && perPage !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'per_page');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<ApplicationListIdpModel>(`${this.configuration.basePath}/api/organization_applications`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n/* tslint:disable:no-unused-variable member-ordering */\n\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { HttpClient, HttpHeaders, HttpParams,\n HttpResponse, HttpEvent, HttpParameterCodec, HttpContext \n } from '@angular/common/http';\nimport { CustomHttpParameterCodec } from '../encoder';\nimport { Observable } from 'rxjs';\n\n// @ts-ignore\nimport { ErrorResponseIdpModel } from '../model/errorResponse';\n// @ts-ignore\nimport { PostUserIdpModel } from '../model/postUser';\n// @ts-ignore\nimport { UserIdpModel } from '../model/user';\n// @ts-ignore\nimport { UserListIdpModel } from '../model/userList';\n\n// @ts-ignore\nimport { BASE_PATH, COLLECTION_FORMATS } from '../variables';\nimport { Configuration } from '../configuration';\n\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UsersService {\n\n protected basePath = 'https://id.sandbox.cybrid.app';\n public defaultHeaders = new HttpHeaders();\n public configuration = new Configuration();\n public encoder: HttpParameterCodec;\n\n constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {\n if (configuration) {\n this.configuration = configuration;\n }\n if (typeof this.configuration.basePath !== 'string') {\n if (typeof basePath !== 'string') {\n basePath = this.basePath;\n }\n this.configuration.basePath = basePath;\n }\n this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();\n }\n\n\n private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {\n if (typeof value === \"object\" && value instanceof Date === false) {\n httpParams = this.addToHttpParamsRecursive(httpParams, value);\n } else {\n httpParams = this.addToHttpParamsRecursive(httpParams, value, key);\n }\n return httpParams;\n }\n\n private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {\n if (value == null) {\n return httpParams;\n }\n\n if (typeof value === \"object\") {\n if (Array.isArray(value)) {\n (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));\n } else if (value instanceof Date) {\n if (key != null) {\n httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10));\n } else {\n throw Error(\"key may not be null if value is Date\");\n }\n } else {\n Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive(\n httpParams, value[k], key != null ? `${key}.${k}` : k));\n }\n } else if (key != null) {\n httpParams = httpParams.append(key, value);\n } else {\n throw Error(\"key may not be null if value is not object or array\");\n }\n return httpParams;\n }\n\n /**\n * Create user\n * Creates a user. \n * @param postUserIdpModel \n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public createUser(postUserIdpModel: PostUserIdpModel, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<UserIdpModel>;\n public createUser(postUserIdpModel: PostUserIdpModel, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<UserIdpModel>>;\n public createUser(postUserIdpModel: PostUserIdpModel, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<UserIdpModel>>;\n public createUser(postUserIdpModel: PostUserIdpModel, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (postUserIdpModel === null || postUserIdpModel === undefined) {\n throw new Error('Required parameter postUserIdpModel was null or undefined when calling createUser.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n // to determine the Content-Type header\n const consumes: string[] = [\n 'application/json'\n ];\n const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);\n if (httpContentTypeSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);\n }\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.post<UserIdpModel>(`${this.configuration.basePath}/api/users`,\n postUserIdpModel,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Disable User\n * Disables a user. User is not deleted. Required scope: **users:execute**\n * @param userGuid Identifier for the user.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public disableUser(userGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;\n public disableUser(userGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;\n public disableUser(userGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;\n public disableUser(userGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (userGuid === null || userGuid === undefined) {\n throw new Error('Required parameter userGuid was null or undefined when calling disableUser.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.delete<any>(`${this.configuration.basePath}/api/users/${encodeURIComponent(String(userGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * Get User\n * Retrieves a user. Required scope: **users:read**\n * @param userGuid Identifier for the user.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public getUser(userGuid: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<UserIdpModel>;\n public getUser(userGuid: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<UserIdpModel>>;\n public getUser(userGuid: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<UserIdpModel>>;\n public getUser(userGuid: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n if (userGuid === null || userGuid === undefined) {\n throw new Error('Required parameter userGuid was null or undefined when calling getUser.');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<UserIdpModel>(`${this.configuration.basePath}/api/users/${encodeURIComponent(String(userGuid))}`,\n {\n context: localVarHttpContext,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n /**\n * List users\n * Retrieve a list users. Required scope: **users:read**\n * @param page The page index to retrieve.\n * @param perPage The number of entities per page to return.\n * @param guid Comma separated guids to list users for.\n * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.\n * @param reportProgress flag to report request and response progress.\n */\n public listUser(page?: string, perPage?: string, guid?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<UserListIdpModel>;\n public listUser(page?: string, perPage?: string, guid?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<UserListIdpModel>>;\n public listUser(page?: string, perPage?: string, guid?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<UserListIdpModel>>;\n public listUser(page?: string, perPage?: string, guid?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {\n\n let localVarQueryParameters = new HttpParams({encoder: this.encoder});\n if (page !== undefined && page !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>page, 'page');\n }\n if (perPage !== undefined && perPage !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>perPage, 'per_page');\n }\n if (guid !== undefined && guid !== null) {\n localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,\n <any>guid, 'guid');\n }\n\n let localVarHeaders = this.defaultHeaders;\n\n let localVarCredential: string | undefined;\n // authentication (BearerAuth) required\n localVarCredential = this.configuration.lookupCredential('BearerAuth');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n // authentication (oauth2) required\n localVarCredential = this.configuration.lookupCredential('oauth2');\n if (localVarCredential) {\n localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);\n }\n\n let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;\n if (localVarHttpHeaderAcceptSelected === undefined) {\n // to determine the Accept header\n const httpHeaderAccepts: string[] = [\n 'application/json'\n ];\n localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);\n }\n if (localVarHttpHeaderAcceptSelected !== undefined) {\n localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);\n }\n\n let localVarHttpContext: HttpContext | undefined = options && options.context;\n if (localVarHttpContext === undefined) {\n localVarHttpContext = new HttpContext();\n }\n\n\n let responseType_: 'text' | 'json' | 'blob' = 'json';\n if (localVarHttpHeaderAcceptSelected) {\n if (localVarHttpHeaderAcceptSelected.startsWith('text')) {\n responseType_ = 'text';\n } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {\n responseType_ = 'json';\n } else {\n responseType_ = 'blob';\n }\n }\n\n return this.httpClient.get<UserListIdpModel>(`${this.configuration.basePath}/api/users`,\n {\n context: localVarHttpContext,\n params: localVarQueryParameters,\n responseType: <any>responseType_,\n withCredentials: this.configuration.withCredentials,\n headers: localVarHeaders,\n observe: observe,\n reportProgress: reportProgress\n }\n );\n }\n\n}\n","export * from './bankApplications.service';\nimport { BankApplicationsService } from './bankApplications.service';\nexport * from './customerTokens.service';\nimport { CustomerTokensService } from './customerTokens.service';\nexport * from './organizationApplications.service';\nimport { OrganizationApplicationsService } from './organizationApplications.service';\nexport * from './users.service';\nimport { UsersService } from './users.service';\nexport const APIS = [BankApplicationsService, CustomerTokensService, OrganizationApplicationsService, UsersService];\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface ApplicationIdpModel { \n /**\n * Name provided for the OAuth2 application.\n */\n name: string;\n /**\n * The OAuth2 application\\'s client ID.\n */\n client_id: string;\n /**\n * List of the scopes granted to the OAuth2 application.\n */\n scopes: Array<ApplicationIdpModel.ScopesEnum>;\n /**\n * ISO8601 datetime the record was created at.\n */\n created_at: string;\n /**\n * ISO8601 datetime the record was last updated at.\n */\n updated_at?: string;\n}\nexport namespace ApplicationIdpModel {\n export type ScopesEnum = 'accounts:execute' | 'accounts:read' | 'bank_applications:execute' | 'banks:execute' | 'banks:read' | 'banks:write' | 'counterparties:execute' | 'counterparties:read' | 'counterparties:write' | 'customers:execute' | 'customers:read' | 'customers:write' | 'deposit_addresses:execute' | 'deposit_addresses:read' | 'deposit_bank_accounts:execute' | 'deposit_bank_accounts:read' | 'external_bank_accounts:execute' | 'external_bank_accounts:read' | 'external_bank_accounts:write' | 'external_wallets:execute' | 'external_wallets:read' | 'identity_verifications:execute' | 'identity_verifications:read' | 'identity_verifications:write' | 'invoices:execute' | 'invoices:read' | 'invoices:write' | 'organization_applications:execute' | 'organizations:read' | 'organizations:write' | 'prices:read' | 'quotes:execute' | 'quotes:read' | 'subscription_events:execute' | 'subscription_events:read' | 'subscriptions:execute' | 'subscriptions:read' | 'subscriptions:write' | 'trades:execute' | 'trades:read' | 'transfers:execute' | 'transfers:read' | 'users:execute' | 'users:read' | 'workflows:execute' | 'workflows:read';\n export const ScopesEnum = {\n Accountsexecute: 'accounts:execute' as ScopesEnum,\n Accountsread: 'accounts:read' as ScopesEnum,\n BankApplicationsexecute: 'bank_applications:execute' as ScopesEnum,\n Banksexecute: 'banks:execute' as ScopesEnum,\n Banksread: 'banks:read' as ScopesEnum,\n Bankswrite: 'banks:write' as ScopesEnum,\n Counterpartiesexecute: 'counterparties:execute' as ScopesEnum,\n Counterpartiesread: 'counterparties:read' as ScopesEnum,\n Counterpartieswrite: 'counterparties:write' as ScopesEnum,\n Customersexecute: 'customers:execute' as ScopesEnum,\n Customersread: 'customers:read' as ScopesEnum,\n Customerswrite: 'customers:write' as ScopesEnum,\n DepositAddressesexecute: 'deposit_addresses:execute' as ScopesEnum,\n DepositAddressesread: 'deposit_addresses:read' as ScopesEnum,\n DepositBankAccountsexecute: 'deposit_bank_accounts:execute' as ScopesEnum,\n DepositBankAccountsread: 'deposit_bank_accounts:read' as ScopesEnum,\n ExternalBankAccountsexecute: 'external_bank_accounts:execute' as ScopesEnum,\n ExternalBankAccountsread: 'external_bank_accounts:read' as ScopesEnum,\n ExternalBankAccountswrite: 'external_bank_accounts:write' as ScopesEnum,\n ExternalWalletsexecute: 'external_wallets:execute' as ScopesEnum,\n ExternalWalletsread: 'external_wallets:read' as ScopesEnum,\n IdentityVerificationsexecute: 'identity_verifications:execute' as ScopesEnum,\n IdentityVerificationsread: 'identity_verifications:read' as ScopesEnum,\n IdentityVerificationswrite: 'identity_verifications:write' as ScopesEnum,\n Invoicesexecute: 'invoices:execute' as ScopesEnum,\n Invoicesread: 'invoices:read' as ScopesEnum,\n Invoiceswrite: 'invoices:write' as ScopesEnum,\n OrganizationApplicationsexecute: 'organization_applications:execute' as ScopesEnum,\n Organizationsread: 'organizations:read' as ScopesEnum,\n Organizationswrite: 'organizations:write' as ScopesEnum,\n Pricesread: 'prices:read' as ScopesEnum,\n Quotesexecute: 'quotes:execute' as ScopesEnum,\n Quotesread: 'quotes:read' as ScopesEnum,\n SubscriptionEventsexecute: 'subscription_events:execute' as ScopesEnum,\n SubscriptionEventsread: 'subscription_events:read' as ScopesEnum,\n Subscriptionsexecute: 'subscriptions:execute' as ScopesEnum,\n Subscriptionsread: 'subscriptions:read' as ScopesEnum,\n Subscriptionswrite: 'subscriptions:write' as ScopesEnum,\n Tradesexecute: 'trades:execute' as ScopesEnum,\n Tradesread: 'trades:read' as ScopesEnum,\n Transfersexecute: 'transfers:execute' as ScopesEnum,\n Transfersread: 'transfers:read' as ScopesEnum,\n Usersexecute: 'users:execute' as ScopesEnum,\n Usersread: 'users:read' as ScopesEnum,\n Workflowsexecute: 'workflows:execute' as ScopesEnum,\n Workflowsread: 'workflows:read' as ScopesEnum\n };\n}\n\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface ApplicationWithSecretAllOfIdpModel { \n /**\n * The OAuth2 application\\'s secret.\n */\n secret: string;\n}\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport { ApplicationWithSecretAllOfIdpModel } from './applicationWithSecretAllOf';\nimport { ApplicationIdpModel } from './application';\n\n\nexport interface ApplicationWithSecretIdpModel { \n /**\n * Name provided for the OAuth2 application.\n */\n name: string;\n /**\n * The OAuth2 application\\'s client ID.\n */\n client_id: string;\n /**\n * List of the scopes granted to the OAuth2 application.\n */\n scopes: Array<ApplicationWithSecretIdpModel.ScopesEnum>;\n /**\n * ISO8601 datetime the record was created at.\n */\n created_at: string;\n /**\n * ISO8601 datetime the record was last updated at.\n */\n updated_at?: string;\n /**\n * The OAuth2 application\\'s secret.\n */\n secret: string;\n}\nexport namespace ApplicationWithSecretIdpModel {\n export type ScopesEnum = 'accounts:execute' | 'accounts:read' | 'bank_applications:execute' | 'banks:execute' | 'banks:read' | 'banks:write' | 'counterparties:execute' | 'counterparties:read' | 'counterparties:write' | 'customers:execute' | 'customers:read' | 'customers:write' | 'deposit_addresses:execute' | 'deposit_addresses:read' | 'deposit_bank_accounts:execute' | 'deposit_bank_accounts:read' | 'external_bank_accounts:execute' | 'external_bank_accounts:read' | 'external_bank_accounts:write' | 'external_wallets:execute' | 'external_wallets:read' | 'identity_verifications:execute' | 'identity_verifications:read' | 'identity_verifications:write' | 'invoices:execute' | 'invoices:read' | 'invoices:write' | 'organization_applications:execute' | 'organizations:read' | 'organizations:write' | 'prices:read' | 'quotes:execute' | 'quotes:read' | 'subscription_events:execute' | 'subscription_events:read' | 'subscriptions:execute' | 'subscriptions:read' | 'subscriptions:write' | 'trades:execute' | 'trades:read' | 'transfers:execute' | 'transfers:read' | 'users:execute' | 'users:read' | 'workflows:execute' | 'workflows:read';\n export const ScopesEnum = {\n Accountsexecute: 'accounts:execute' as ScopesEnum,\n Accountsread: 'accounts:read' as ScopesEnum,\n BankApplicationsexecute: 'bank_applications:execute' as ScopesEnum,\n Banksexecute: 'banks:execute' as ScopesEnum,\n Banksread: 'banks:read' as ScopesEnum,\n Bankswrite: 'banks:write' as ScopesEnum,\n Counterpartiesexecute: 'counterparties:execute' as ScopesEnum,\n Counterpartiesread: 'counterparties:read' as ScopesEnum,\n Counterpartieswrite: 'counterparties:write' as ScopesEnum,\n Customersexecute: 'customers:execute' as ScopesEnum,\n Customersread: 'customers:read' as ScopesEnum,\n Customerswrite: 'customers:write' as ScopesEnum,\n DepositAddressesexecute: 'deposit_addresses:execute' as ScopesEnum,\n DepositAddressesread: 'deposit_addresses:read' as ScopesEnum,\n DepositBankAccountsexecute: 'deposit_bank_accounts:execute' as ScopesEnum,\n DepositBankAccountsread: 'deposit_bank_accounts:read' as ScopesEnum,\n ExternalBankAccountsexecute: 'external_bank_accounts:execute' as ScopesEnum,\n ExternalBankAccountsread: 'external_bank_accounts:read' as ScopesEnum,\n ExternalBankAccountswrite: 'external_bank_accounts:write' as ScopesEnum,\n ExternalWalletsexecute: 'external_wallets:execute' as ScopesEnum,\n ExternalWalletsread: 'external_wallets:read' as ScopesEnum,\n IdentityVerificationsexecute: 'identity_verifications:execute' as ScopesEnum,\n IdentityVerificationsread: 'identity_verifications:read' as ScopesEnum,\n IdentityVerificationswrite: 'identity_verifications:write' as ScopesEnum,\n Invoicesexecute: 'invoices:execute' as ScopesEnum,\n Invoicesread: 'invoices:read' as ScopesEnum,\n Invoiceswrite: 'invoices:write' as ScopesEnum,\n OrganizationApplicationsexecute: 'organization_applications:execute' as ScopesEnum,\n Organizationsread: 'organizations:read' as ScopesEnum,\n Organizationswrite: 'organizations:write' as ScopesEnum,\n Pricesread: 'prices:read' as ScopesEnum,\n Quotesexecute: 'quotes:execute' as ScopesEnum,\n Quotesread: 'quotes:read' as ScopesEnum,\n SubscriptionEventsexecute: 'subscription_events:execute' as ScopesEnum,\n SubscriptionEventsread: 'subscription_events:read' as ScopesEnum,\n Subscriptionsexecute: 'subscriptions:execute' as ScopesEnum,\n Subscriptionsread: 'subscriptions:read' as ScopesEnum,\n Subscriptionswrite: 'subscriptions:write' as ScopesEnum,\n Tradesexecute: 'trades:execute' as ScopesEnum,\n Tradesread: 'trades:read' as ScopesEnum,\n Transfersexecute: 'transfers:execute' as ScopesEnum,\n Transfersread: 'transfers:read' as ScopesEnum,\n Usersexecute: 'users:execute' as ScopesEnum,\n Usersread: 'users:read' as ScopesEnum,\n Workflowsexecute: 'workflows:execute' as ScopesEnum,\n Workflowsread: 'workflows:read' as ScopesEnum\n };\n}\n\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface CustomerTokenIdpModel { \n /**\n * The JWT access token for the customer.\n */\n access_token?: string;\n}\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface ErrorResponseIdpModel { \n /**\n * Status code for Http Request\n */\n status: string;\n /**\n * Error message\n */\n error_message: string;\n /**\n * Message code for Error\n */\n message_code: string;\n}\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface PostBankApplicationIdpModel { \n /**\n * Name for the bank application.\n */\n name: string;\n /**\n * Bank guid the application is associated to.\n */\n bank_guid?: string;\n}\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface PostCustomerTokenIdpModel { \n /**\n * Customer guid the access token is being generated for.\n */\n customer_guid: string;\n /**\n * List of the scopes requested for the access token.\n */\n scopes: Set<PostCustomerTokenIdpModel.ScopesEnum>;\n}\nexport namespace PostCustomerTokenIdpModel {\n export type ScopesEnum = 'counterparties:read' | 'counterparties:write' | 'counterparties:execute' | 'customers:read' | 'customers:write' | 'accounts:read' | 'accounts:execute' | 'prices:read' | 'quotes:read' | 'quotes:execute' | 'trades:read' | 'trades:execute' | 'transfers:read' | 'transfers:execute' | 'external_bank_accounts:read' | 'external_bank_accounts:write' | 'external_bank_accounts:execute' | 'external_wallets:read' | 'external_wallets:execute' | 'workflows:read' | 'workflows:execute' | 'deposit_addresses:read' | 'deposit_addresses:execute' | 'deposit_bank_accounts:read' | 'deposit_bank_accounts:execute' | 'invoices:read' | 'invoices:write' | 'invoices:execute' | 'identity_verifications:read' | 'identity_verifications:write' | 'identity_verifications:execute';\n export const ScopesEnum = {\n Counterpartiesread: 'counterparties:read' as ScopesEnum,\n Counterpartieswrite: 'counterparties:write' as ScopesEnum,\n Counterpartiesexecute: 'counterparties:execute' as ScopesEnum,\n Customersread: 'customers:read' as ScopesEnum,\n Customerswrite: 'customers:write' as ScopesEnum,\n Accountsread: 'accounts:read' as ScopesEnum,\n Accountsexecute: 'accounts:execute' as ScopesEnum,\n Pricesread: 'prices:read' as ScopesEnum,\n Quotesread: 'quotes:read' as ScopesEnum,\n Quotesexecute: 'quotes:execute' as ScopesEnum,\n Tradesread: 'trades:read' as ScopesEnum,\n Tradesexecute: 'trades:execute' as ScopesEnum,\n Transfersread: 'transfers:read' as ScopesEnum,\n Transfersexecute: 'transfers:execute' as ScopesEnum,\n ExternalBankAccountsread: 'external_bank_accounts:read' as ScopesEnum,\n ExternalBankAccountswrite: 'external_bank_accounts:write' as ScopesEnum,\n ExternalBankAccountsexecute: 'external_bank_accounts:execute' as ScopesEnum,\n ExternalWalletsread: 'external_wallets:read' as ScopesEnum,\n ExternalWalletsexecute: 'external_wallets:execute' as ScopesEnum,\n Workflowsread: 'workflows:read' as ScopesEnum,\n Workflowsexecute: 'workflows:execute' as ScopesEnum,\n DepositAddressesread: 'deposit_addresses:read' as ScopesEnum,\n DepositAddressesexecute: 'deposit_addresses:execute' as ScopesEnum,\n DepositBankAccountsread: 'deposit_bank_accounts:read' as ScopesEnum,\n DepositBankAccountsexecute: 'deposit_bank_accounts:execute' as ScopesEnum,\n Invoicesread: 'invoices:read' as ScopesEnum,\n Invoiceswrite: 'invoices:write' as ScopesEnum,\n Invoicesexecute: 'invoices:execute' as ScopesEnum,\n IdentityVerificationsread: 'identity_verifications:read' as ScopesEnum,\n IdentityVerificationswrite: 'identity_verifications:write' as ScopesEnum,\n IdentityVerificationsexecute: 'identity_verifications:execute' as ScopesEnum\n };\n}\n\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface PostOrganizationApplicationIdpModel { \n /**\n * Name for the organization application.\n */\n name: string;\n}\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface PostUserIdpModel { \n /**\n * The email address associated with the user.\n */\n email: string;\n}\n\n","/**\n * Cybrid Identity API\n * # Cybrid API documentation Welcome to Cybrid, an all-in-one crypto platform that enables you to easily **build** and **launch** white-label crypto products or services. In these documents, you\\'ll find details on how our REST API operates and generally how our platform functions. If you\\'re looking for our UI SDK Widgets for Web or Mobile (iOS/Android), generated API clients, or demo applications, head over to our [Github repo](https://github.com/Cybrid-app). 💡 We recommend bookmarking the [Cybrid LinkTree](https://linktr.ee/cybridtechnologies) which contains many helpful links to platform resources. ## Getting Started This is Cybrid\\'s public interactive API documentation, which allows you to fully test our APIs. If you\\'d like to use a different tool to exercise our APIs, you can download the [Open API 3.0 yaml](https://bank.production.cybrid.app/api/schema/v1/swagger.yaml) for import. If you\\'re new to our APIs and the Cybrid Platform, follow the below guides to get set up and familiar with the platform: 1. [Introduction](https://docs.cybrid.xyz/docs/introduction) 2. [Platform Introduction](https://docs.cybrid.xyz/docs/how-is-cybrid-architected) 3. [Testing with Hosted Web Demo App](https://docs.cybrid.xyz/docs/testing-with-hosted-web-demo-app) In [Getting Started in the Cybrid Sandbox](https://docs.cybrid.xyz/docs/how-do-i-get-started-with-the-sandbox), we walk you through how to use the [Cybrid Sandbox](https://id.sandbox.cybrid.app/) to create a test bank and generate API keys. In [Getting Ready for Trading](https://kb.cybrid.xyz/getting-ready-for-trading), we walk through creating customers, customer identities, accounts, as well as executing quotes and trades. ## Working with the Cybrid Platform There are three primary ways you can interact with the Cybrid platform: 1. Directly via our RESTful API (this documentation) 2. Using our API clients available in a variety of languages ([Angular](https://github.com/Cybrid-app/cybrid-api-bank-angular), [Java](https://github.com/Cybrid-app/cybrid-api-bank-java), [Kotlin](https://github.com/Cybrid-app/cybrid-api-bank-kotlin), [Python](https://github.com/Cybrid-app/cybrid-api-bank-python), [Ruby](https://github.com/Cybrid-app/cybrid-api-bank-ruby), [Swift](https://github.com/Cybrid-app/cybrid-api-bank-swift) or [Typescript](https://github.com/Cybrid-app/cybrid-api-bank-typescript)) 3. Integrating a platform specific SDK ([Web](https://github.com/Cybrid-app/cybrid-sdk-web), [Android](https://github.com/Cybrid-app/cybrid-sdk-android), [iOS](https://github.com/Cybrid-app/cybrid-sdk-ios)) Our complete set of APIs allows you to manage resources across three distinct areas: your `Organization`, your `Banks` and your `Identities`. For most of your testing and interaction you\\'ll be using the `Bank` API, which is where the majority of APIs reside. *The complete set of APIs can be found on the following pages:* | API | Description | |------------------------------------------------------------------|-------------------------------------------------------------| | [Organization API](https://organization.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organizations | | [Bank API](https://bank.production.cybrid.app/api/schema/swagger-ui) | APIs to manage banks (and all downstream customer activity) | | [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui) | APIs to manage organization and bank identities | For questions please contact [Support](mailto:support@cybrid.xyz) at any time for assistance, or contact the [Product Team](mailto:product@cybrid.xyz) for product suggestions. ## Authenticating with the API The Cybrid Platform uses OAuth 2.0 Bearer Tokens to authenticate requests to the platform. Credentials to create `Organization` and `Bank` tokens can be generated via the [Cybrid Sandbox](https://id.production.cybrid.app). Access tokens can be generated for a `Customer` as well via the [Cybrid IdP](https://id.production.cybrid.app) as well. An `Organization` access token applies broadly to the whole Organization and all of its `Banks`, whereas, a `Bank` access token is specific to an individual Bank. `Customer` tokens, similarly, are scoped to a specific customer in a bank. Both `Organization` and `Bank` tokens can be created using the OAuth Client Credential Grant flow. Each Organization and Bank has its own unique `Client ID` and `Secret` that allows for machine-to-machine authentication. A `Bank` can then generate `Customer` access tokens via API using our [Identities API](https://id.production.cybrid.app/api/schema/swagger-ui). <font color=\\\"orange\\\">**⚠️ Never share your Client ID or Secret publicly or in your source code repository.**</font> Your `Client ID` and `Secret` can be exchanged for a time-limited `Bearer Token` by interacting with the Cybrid Identity Provider or through interacting with the **Authorize** button in this document. The following curl command can be used to quickly generate a `Bearer Token` for use in testing the API or demo applications. ``` # Example request when using Bank credentials curl -X POST https://id.production.cybrid.app/oauth/token -d \\'{ \\\"grant_type\\\": \\\"client_credentials\\\", \\\"client_id\\\": \\\"<Your Client ID>\\\", \\\"client_secret\\\": \\\"<Your Secret>\\\", \\\"scope\\\": \\\"banks:read banks:write bank_applications:execute accounts:read accounts:execute counterparties:read counterparties:write counterparties:execute customers:read customers:write customers:execute prices:read quotes:execute quotes:read trades:execute trades:read transfers:execute transfers:read external_bank_accounts:read external_bank_accounts:write external_bank_accounts:execute external_wallets:read external_wallets:execute workflows:read workflows:execute deposit_addresses:read deposit_addresses:execute deposit_bank_accounts:read deposit_bank_accounts:execute invoices:read invoices:write invoices:execute identity_verifications:read identity_verifications:write identity_verifications:execute\\\" }\\' -H \\\"Content-Type: application/json\\\" # When using Organization credentials set `scope` to \\'organizations:read organizations:write organization_applications:execute banks:read banks:write banks:execute bank_applications:execute users:read users:execute counterparties:read customers:read accounts:read prices:read quotes:execute quotes:read trades:execute trades:read transfers:read transfers:execute external_bank_accounts:read external_wallets:read workflows:read deposit_addresses:read deposit_bank_accounts:read invoices:read subscriptions:read subscriptions:write subscriptions:execute subscription_events:read subscription_events:execute identity_verifications:read\\' ``` <font color=\\\"orange\\\">**⚠️ Note: The above curl will create a bearer token with full scope access. Delete scopes if you\\'d like to restrict access.**</font> ## Authentication Scopes The Cybrid platform supports the use of scopes to control the level of access a token is limited to. Scopes do not grant access to resources; instead, they provide limits, in support of the least privilege principal. The following scopes are available on the platform and can be requested when generating either an Organization, Bank or Customer token. Generally speaking, the _Read_ scope is required to read and list resources, the _Write_ scope is required to update a resource and the _Execute_ scope is required to create a resource. | Resource | Read scope (Token Type) | Write scope (Token Type) | Execute scope (Token Type) | |-----------------------|------------------------------------------------------------|-----------------------------------------------|--------------------------------------------------| | Account | accounts:read (Organization, Bank, Customer) | | accounts:execute (Bank, Customer) | | Bank | banks:read (Organization, Bank) | banks:write (Organization, Bank) | banks:execute (Organization) | | Customer | customers:read (Organization, Bank, Customer) | customers:write (Bank, Customer) | customers:execute (Bank) | | Counterparty | counterparties:read (Organization, Bank, Customer) | counterparties:write (Bank, Customer) | counterparties:execute (Bank) | | Deposit Address | deposit_addresses:read (Organization, Bank, Customer) | deposit_addresses:write (Bank, Customer) | deposit_addresses:execute (Bank, Customer) | | External Bank Account | external_bank_accounts:read (Organization, Bank, Customer) | external_bank_accounts:write (Bank, Customer) | external_bank_accounts:execute (Bank, Customer) | | External Wallet | external_wallet:read (Organization, Bank, Customer) | | external_wallet:execute (Bank, Customer) | | Organization | organizations:read (Organization) | organizations:write (Organization) | | | User | users:read (Organization) | | users:execute (Organization) | | Price | prices:read (Bank, Customer) | | | | Quote | quotes:read (Organization, Bank, Customer) | | quotes:execute (Organization, Bank, Customer) | | Trade | trades:read (Organization, Bank, Customer) | | trades:execute (Organization, Bank, Customer) | | Transfer | transfers:read (Organization, Bank, Customer) | | transfers:execute (Organization, Bank, Customer) | | Workflow | workflows:read (Organization, Bank, Customer) | | workflows:execute (Bank, Customer) | | Invoice | invoices:read (Organization, Bank, Customer) | invoices:write (Bank, Customer) | invoices:execute (Bank, Customer) | ## Available Endpoints The available APIs for the [Identity](https://id.production.cybrid.app/api/schema/swagger-ui), [Organization](https://organization.production.cybrid.app/api/schema/swagger-ui) and [Bank](https://bank.production.cybrid.app/api/schema/swagger-ui) API services are listed below: | API Service | Model | API Endpoint Path | Description | |--------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------| | Identity | Bank | /api/bank_applications | Create and list banks | | Identity | CustomerToken | /api/customer_tokens | Create customer JWT access tokens | | Identity | Organization | /api/organization_applications | Create and list organizations | | Identity | Organization | /api/users | Create and list organization users | | Organization | Organization | /api/organizations | APIs to retrieve and update organization name | | Bank | Account | /api/accounts | Create and list accounts, which hold a specific asset for a customers | | Bank | Asset | /api/assets | Get a list of assets supported by the platform (ex: BTC, ETH) | | Bank | Bank | /api/banks | Create, update and list banks, the parent to customers, accounts, etc | | Bank | Customer | /api/customers | Create and list customers | | Bank | Counterparty | /api/counterparties | Create and list counterparties | | Bank | DepositAddress | /api/deposit_addresses | Create, get and list deposit addresses | | Bank | ExternalBankAccount | /api/external_bank_accounts | Create, get and list external bank accounts, which connect customer bank accounts to the platform | | Bank | ExternalWallet | /api/external_wallets | Create, get, list and delete external wallets, which connect customer wallets to the platform | | Bank | IdentityVerification | /api/identity_verifications | Create and list identity verifications, which are performed on customers for KYC | | Bank | Invoice | /api/invoices | Create, get, cancel and list invoices | | Bank | PaymentInstruction | /api/payment_instructions | Create, get and list payment instructions for invoices | | Bank | Price | /api/prices | Get the current prices for assets on the platform | | Bank | Quote | /api/quotes | Create and list quotes, which are required to execute trades | | Bank | Symbol | /api/symbols | Get a list of symbols supported for trade (ex: BTC-USD) | | Bank | Trade | /api/trades | Create and list trades, which buy or sell cryptocurrency | | Bank | Transfer | /api/transfers | Create, get and list transfers (e.g., funding, book) | | Bank | Workflow | /api/workflows | Create, get and list workflows | ## Understanding Object Models & Endpoints **Organizations** An `Organization` is meant to represent the organization partnering with Cybrid to use our platform. An `Organization` typically does not directly interact with `customers`. Instead, an Organization has one or more `banks`, which encompass the financial service offerings of the platform. **Banks** A `Bank` is owned by an `Organization` and can be thought of as an environment or container for `customers` and product offerings. Banks are created in either `Sandbox` or `Production` mode, where `Sandbox` is the environment that you would test, prototype and build in prior to moving to `Production`. An `Organization` can have multiple `banks`, in either `Sandbox` or `Production` environments. A `Sandbox Bank` will be backed by stubbed data and process flows. For instance, funding source transfer processes as well as trades will be simulated rather than performed, however asset prices are representative of real-world values. You have an unlimited amount of simulated fiat currency for testing purposes. **Customers** `Customers` represent your banking users on the platform. At present, we offer support for `Individuals` as Customers. `Customers` must be verified (i.e., KYC\\'d) in our system before they can play any part on the platform, which means they must have an associated and a passing `Identity Verification`. See the Identity Verifications section for more details on how a customer can be verified. `Customers` must also have an `Account` to be able to transact, in the desired asset class. See the Accounts APIs for more details on setting up accounts for the customer. \n *\n * The version of the OpenAPI document: v0.123.15\n * Contact: support@cybrid.app\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\n\nexport interface UserIdpModel { \n /**\n * Auto-generated unique identifier for the user.\n */\n guid?: string;\n /**\n * The user\\'s username.\n */\n username?: string;\n /**\n * The user\\'s email address.\n */\n email?: string;\n /**\n * ISO8601 datetime the record was created at.\n */\n created_at?: string;\n /**\n * ISO8601 datetime the record was last updated at.\n */\n updated_at?: string;\n}\n\n","import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';\nimport { Configuration } from './configuration';\nimport { HttpClient } from '@angular/common/http';\n\nimport { BankApplicationsService } from './api/bankApplications.service';\nimport { CustomerTokensService } from './api/customerTokens.service';\nimport { OrganizationApplicationsService } from './api/organizationApplications.service';\nimport { UsersService } from './api/users.service';\n\n@NgModule({\n imports: [],\n declarations: [],\n exports: [],\n providers: []\n})\nexport class ApiModule {\n public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> {\n return {\n ngModule: ApiModule,\n providers: [ { provide: Configuration, useFactory: configurationFactory } ]\n };\n }\n\n constructor( @Optional() @SkipSelf() parentModule: ApiModule,\n @Optional() http: HttpClient) {\n if (parentModule) {\n throw new Error('ApiModule is already loaded. Import in your base AppModule only.');\n }\n if (!http) {\n throw new Error('You need to import the HttpClientModule in your AppModule! \\n' +\n 'See also https://github.com/angular/angular/issues/20575');\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i2.Configuration"],"mappings":";;;;;AAEA;;;AAGG;MACU,wBAAwB,CAAA;AACjC,IAAA,SAAS,CAAC,CAAS,EAAA;AACf,QAAA,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;KAChC;AACD,IAAA,WAAW,CAAC,CAAS,EAAA;AACjB,QAAA,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;KAChC;AACD,IAAA,SAAS,CAAC,CAAS,EAAA;AACf,QAAA,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;KAChC;AACD,IAAA,WAAW,CAAC,CAAS,EAAA;AACjB,QAAA,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;KAChC;AACJ;;MCjBY,SAAS,GAAG,IAAI,cAAc,CAAS,UAAU,EAAE;AACnD,MAAA,kBAAkB,GAAG;AAC9B,IAAA,KAAK,EAAE,GAAG;AACV,IAAA,KAAK,EAAE,KAAK;AACZ,IAAA,KAAK,EAAE,GAAG;AACV,IAAA,OAAO,EAAE,GAAG;;;MCiBH,aAAa,CAAA;AAqBtB,IAAA,WAAA,CAAY,0BAAmD,EAAE,EAAA;AAC7D,QAAA,IAAI,CAAC,OAAO,GAAG,uBAAuB,CAAC,OAAO,CAAC;AAC/C,QAAA,IAAI,CAAC,QAAQ,GAAG,uBAAuB,CAAC,QAAQ,CAAC;AACjD,QAAA,IAAI,CAAC,QAAQ,GAAG,uBAAuB,CAAC,QAAQ,CAAC;AACjD,QAAA,IAAI,CAAC,WAAW,GAAG,u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