Dynamic Custom Networks API
The Custom Networks API from Dynamic — 2 operation(s) for custom networks.
The Custom Networks API from Dynamic — 2 operation(s) for custom networks.
openapi: 3.0.1
info:
title: Dashboard Allowlists Custom Networks API
description: Dashboard API documentation
version: 1.0.0
servers:
- url: https://app.dynamicauth.com/api/v0
- url: https://app.dynamic.xyz/api/v0
- url: http://localhost:3333/api/v0
tags:
- name: Custom Networks
paths:
/organizations/{organizationId}/customNetworks:
get:
summary: Get all custom networks for an organization
operationId: getCustomNetworks
tags:
- Custom Networks
parameters:
- $ref: '#/components/parameters/organizationId'
responses:
'200':
description: List of custom networks
content:
application/json:
schema:
type: object
properties:
customNetworks:
type: array
items:
$ref: '#/components/schemas/CustomNetworkResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/InternalServerError'
security:
- bearerAuth: []
post:
summary: Create a custom network for an organization
operationId: createCustomNetwork
tags:
- Custom Networks
parameters:
- $ref: '#/components/parameters/organizationId'
requestBody:
description: Data to create a custom network
content:
application/json:
schema:
$ref: '#/components/schemas/CustomNetworkRequest'
required: true
responses:
'201':
description: Custom network created
content:
application/json:
schema:
$ref: '#/components/schemas/CustomNetworkResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'500':
$ref: '#/components/responses/InternalServerError'
security:
- bearerAuth: []
/organizations/{organizationId}/customNetworks/{networkId}:
get:
summary: Get a specific custom network
operationId: getCustomNetwork
tags:
- Custom Networks
parameters:
- $ref: '#/components/parameters/organizationId'
- $ref: '#/components/parameters/networkId'
responses:
'200':
description: Custom network details
content:
application/json:
schema:
$ref: '#/components/schemas/CustomNetworkResponse'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
description: Network not found
'500':
$ref: '#/components/responses/InternalServerError'
security:
- bearerAuth: []
put:
summary: Update a custom network
operationId: updateCustomNetwork
tags:
- Custom Networks
parameters:
- $ref: '#/components/parameters/organizationId'
- $ref: '#/components/parameters/networkId'
requestBody:
description: Data to update the custom network
content:
application/json:
schema:
$ref: '#/components/schemas/CustomNetworkRequest'
required: true
responses:
'200':
description: Custom network updated
content:
application/json:
schema:
$ref: '#/components/schemas/CustomNetworkResponse'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
description: Network not found
'500':
$ref: '#/components/responses/InternalServerError'
security:
- bearerAuth: []
delete:
summary: Delete a custom network
operationId: deleteCustomNetwork
tags:
- Custom Networks
parameters:
- $ref: '#/components/parameters/organizationId'
- $ref: '#/components/parameters/networkId'
responses:
'204':
description: Custom network deleted successfully
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
description: Network not found
'500':
$ref: '#/components/responses/InternalServerError'
security:
- bearerAuth: []
components:
parameters:
organizationId:
in: path
name: organizationId
required: true
description: ID of organization
schema:
$ref: '#/components/schemas/uuid'
networkId:
name: networkId
in: path
required: true
description: The unique identifier of the custom network
schema:
$ref: '#/components/schemas/uuid'
schemas:
Forbidden:
type: object
properties:
error:
type: string
example: Access Forbidden
InternalServerError:
type: object
properties:
error:
type: string
example: Internal Server Error
Unauthorized:
type: object
properties:
error:
type: string
example: No jwt provided!
CustomNetworkRequest:
type: object
required:
- networkType
- chainName
- chainId
- rpcUrl
- blockExplorerUrl
- iconUrl
- nativeCurrencyName
- nativeCurrencySymbol
- nativeCurrencyIconUrl
- nativeCurrencyDecimals
properties:
networkType:
$ref: '#/components/schemas/ChainEnum'
chainName:
type: string
pattern: ^(?=\S)[\p{L}\p{N} _.,-]+(?<=\S)$
maxLength: 100
description: Name of the custom network
example: Base Mainnet
chainId:
type: string
pattern: ^[0-9]+$
maxLength: 100
description: Chain ID of the network
example: '8453'
rpcUrl:
$ref: '#/components/schemas/NonEmptyUrlWith255MaxLength'
blockExplorerUrl:
$ref: '#/components/schemas/NonEmptyUrlWith255MaxLength'
iconUrl:
$ref: '#/components/schemas/NonEmptyUrlWith255MaxLength'
nativeCurrencyName:
type: string
pattern: ^(?=\S)[\p{L}\p{N} _.,-]+(?<=\S)$
maxLength: 100
description: Full name of the native currency
example: Ethereum
nativeCurrencySymbol:
type: string
pattern: ^[A-Z0-9]{1,10}$
maxLength: 100
description: Symbol of the native currency
example: ETH
nativeCurrencyIconUrl:
$ref: '#/components/schemas/NonEmptyUrlWith255MaxLength'
nativeCurrencyDecimals:
type: number
minimum: 0
maximum: 18
description: Number of decimals for the native currency
example: 18
uuid:
type: string
pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
minLength: 36
maxLength: 36
example: 95b11417-f18f-457f-8804-68e361f9164f
ChainEnum:
type: string
enum:
- ETH
- EVM
- FLOW
- SOL
- ALGO
- STARK
- COSMOS
- BTC
- ECLIPSE
- SUI
- SPARK
- TRON
- APTOS
- TON
- STELLAR
BadRequest:
type: object
properties:
error:
type: string
CustomNetworkResponse:
type: object
properties:
customNetwork:
type: object
required:
- id
- networkType
- chainName
- chainId
- rpcUrl
- blockExplorerUrl
- iconUrl
- nativeCurrencyName
- nativeCurrencySymbol
- nativeCurrencyIconUrl
- nativeCurrencyDecimals
properties:
id:
$ref: '#/components/schemas/uuid'
networkType:
$ref: '#/components/schemas/ChainEnum'
chainName:
type: string
pattern: ^(?=\S)[\p{L}\p{N} _.,-]+(?<=\S)$
maxLength: 100
chainId:
type: string
pattern: ^[0-9]+$
maxLength: 100
rpcUrl:
$ref: '#/components/schemas/NonEmptyUrlWith255MaxLength'
blockExplorerUrl:
$ref: '#/components/schemas/NonEmptyUrlWith255MaxLength'
iconUrl:
$ref: '#/components/schemas/NonEmptyUrlWith255MaxLength'
nativeCurrencyName:
type: string
pattern: ^(?=\S)[\p{L}\p{N} _.,-]+(?<=\S)$
maxLength: 100
nativeCurrencySymbol:
type: string
pattern: ^[A-Z0-9]{1,10}$
maxLength: 100
nativeCurrencyIconUrl:
$ref: '#/components/schemas/NonEmptyUrlWith255MaxLength'
nativeCurrencyDecimals:
type: number
minimum: 0
maximum: 18
NonEmptyUrlWith255MaxLength:
type: string
pattern: ^(https?:\/\/)?[a-z0-9]+([-.]+[a-z0-9]+)*\.[a-z]{2,10}([0-9]{1,5})?(\/.*)?$
maxLength: 255
example: https://website-sample.com
responses:
Forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/Forbidden'
Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/Unauthorized'
InternalServerError:
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerError'
BadRequest:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequest'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT