openapi: 3.0.0
info:
title: Privado ID - Issuer
description: |
The Issuer Node Core API is ideal for users who need multiple identities and for integrator profiles, who want to
create solutions based on Privado ID functionalities and might be interested in having access to low level
information such as Merkle Trees.
The Issuer Node API provide the following functionalities:
* Create and retrieve Identities
* Create a Verifiable Credential (VC)
* Retrieve a Verifiable Credential or a list of Verifiable Credentials
* Generate JSON to create a QR Code and use that to accept credentials in a wallet
* Revoke a Verifiable Credential
* Check revocation status of a Verifiable Credential
* Retrieve the Revocation Status of a Verifiable Credential
* Call Agent Endpoint using the Wallet App
* Handle connections.
version: "1"
tags:
- name: Identity
description: Collection of endpoints related to Identity
- name: Credentials
description: Collection of endpoints related to Credentials
- name: Agent
description: Collection of endpoints related to Mobile
- name: config
description: Collection of endpoints related to Config
- name: Key Management
description: Collection of endpoints related to Key Management
paths:
/status:
get:
summary: Healthcheck
operationId: Health
tags:
- Config
responses:
'200':
description: All services are running
content:
application/json:
schema:
$ref: '#/components/schemas/Health'
'500':
$ref: '#/components/responses/500'
/v2/supported-networks:
get:
summary: Get Supported Networks
operationId: GetSupportedNetworks
description: get supported blockchains and networks
security:
- basicAuth: [ ]
tags:
- Config
responses:
'200':
description: Supported Networks
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/SupportedNetworks'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
#authentication
/v2/authentication/sessions/{id}:
get:
summary: Get Authentication Connection
operationId: getAuthenticationConnection
description: get authentication connection
parameters:
- $ref: '#/components/parameters/id'
tags:
- Auth
- Connection
security:
- basicAuth: [ ]
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/GetAuthenticationConnectionResponse'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
/v2/{identifier}/authentication:
post:
summary: Get Authentication Message
operationId: Authentication
description: This endpoint returns an authentication message
tags:
- Auth
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- name: type
in: query
required: false
description: >
Type:
* `link` - (default value) Return a link redirection to the raw content. Easier to scan.
* `raw` - Return the raw QR code.
schema:
type: string
enum: [ raw, link ]
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/AuthenticationResponse'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/authentication/callback:
post:
summary: Authentication Callback
operationId: authCallback
description: This endpoint is called when the QR code is scanned and the user is authenticated. A connection is created.
tags:
- Auth
parameters:
- $ref: '#/components/parameters/sessionID'
requestBody:
required: true
content:
text/plain:
schema:
type: string
example: jwz-token
responses:
'200':
description: ok
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
#identity:
/v2/identities:
post:
summary: Create Identity
operationId: CreateIdentity
description: |
Endpoint to create an identity to issue credentials.
Issuer node supports two types of keys (field `type`):
* BJJ Keys
* ETH Keys
`credentialStatusType` field is optional and and defines how the auth core claim will be evaluated during
the process to verify that it has not been revoked.
tags:
- Identity
security:
- basicAuth: [ ]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateIdentityRequest'
responses:
'201':
description: Identity created
content:
application/json:
schema:
$ref: '#/components/schemas/CreateIdentityResponse'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'409':
$ref: '#/components/responses/409'
'500':
$ref: '#/components/responses/500'
get:
summary: Get Identities
operationId: GetIdentities
description: Endpoint to get all the identities
tags:
- Identity
security:
- basicAuth: [ ]
responses:
'200':
description: all good
content:
application/json:
schema:
type: array
x-omitempty: false
items:
$ref: '#/components/schemas/GetIdentitiesResponse'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}:
patch:
summary: Update Identity
operationId: UpdateIdentity
description: |
Endpoint to update the identity.
The displayName field is used to identify the identity in the UI.
tags:
- Identity
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- displayName
properties:
displayName:
type: string
example: "KYCAgeCredential Issuer identity"
responses:
'200':
description: Identity updated
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'500':
$ref: '#/components/responses/500-CreateIdentity'
get:
summary: Get Identity Detail
operationId: GetIdentityDetails
description: Endpoint to get an identity details
tags:
- Identity
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
responses:
'200':
description: Identity top up successfully
content:
application/json:
schema:
$ref: '#/components/schemas/GetIdentityDetailsResponse'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/state/retry:
post:
summary: Retry Publish Identity State
operationId: RetryPublishState
description: Endpoint to retry publish identity state. If the publish state failed, this endpoint can be used to retry the publish.
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
tags:
- Identity
responses:
'202':
description: Publish state successfully
content:
application/json:
schema:
$ref: '#/components/schemas/PublishIdentityStateResponse'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/state/publish:
post:
summary: Publish Identity State
operationId: PublishIdentityState
description: Endpoint to publish identity state.
tags:
- Identity
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
responses:
'200':
description: No transactions to process to the given identity
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'202':
description: Transaction ID of the published state
content:
application/json:
schema:
$ref: '#/components/schemas/PublishIdentityStateResponse'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/state/transactions:
get:
summary: Get Identity State Transactions
operationId: GetStateTransactions
description: |
Endpoint to get identity state transactions.
To get all transactions, use the filter `all`. To get the latest transaction, use the filter `latest`.
The transactions are paginated for `filter=all`. If the filter is not provided, the default is `all`.
security:
- basicAuth: [ ]
tags:
- Identity
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- in: query
name: filter
schema:
type: string
enum: [ all, latest ]
default: all
- in: query
name: page
schema:
type: integer
format: uint
minimum: 1
example: 5
description: Page to fetch. First is 1. If not provided, default is 1.
- in: query
name: max_results
schema:
type: integer
format: uint
example: 10
default: 50
description: Number of items to fetch on each page. Default is 10.
- in: query
name: sort
style: form
explode: false
schema:
type: array
items:
type: string
enum: [ "publishDate", "-publishDate", "status", "-status" ]
default: "-publishDate"
description: >
The minus sign (-) before createdAt means descending order.
responses:
'200':
description: State transactions
content:
application/json:
schema:
$ref: '#/components/schemas/StateTransactionsPaginated'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/state/status:
get:
summary: Get Identity State Status
operationId: GetStateStatus
description: |
Endpoint to get identity state status, if the identity status is published or not.
If the status is `pendingActions` is true it means that the identity has pending actions to be published.
security:
- basicAuth: [ ]
tags:
- Identity
parameters:
- $ref: '#/components/parameters/pathIdentifier'
responses:
'200':
description: State status
content:
application/json:
schema:
$ref: '#/components/schemas/StateStatusResponse'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/create-auth-credential:
post:
summary: Create Auth Credential
operationId: CreateAuthCredential
description: |
Endpoint to create a new Auth Credential
* keyID - only babyjubjub keys supported
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier2'
tags:
- Identity
- Key Management
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAuthCredentialRequest'
responses:
'201':
description: Key added successfully
content:
application/json:
schema:
type: object
required:
- id
- credentialStatusType
properties:
id:
type: string
description: The ID of the created Auth Credential
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
example: 8edd8112-c415-11ed-b036-debe37e1cbd6
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
#connections:
/v2/identities/{identifier}/connections/{id}:
get:
summary: Get Connection
operationId: getConnection
description: Returns a connection of the provided identity by connection id.
tags:
- Connection
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/GetConnectionResponse'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
delete:
summary: Delete Connection
operationId: deleteConnection
description: Removes a specific connection of the provided identity.
tags:
- Connection
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
- name: revokeCredentials
in: query
required: false
description: |
Set revokeCredentials to true if you want to revoke the credentials of the connection
schema:
type: boolean
- name: deleteCredentials
in: query
required: false
description: |
Set deleteCredentials to true if you want to delete the credentials of the connection
schema:
type: boolean
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/connections/{id}/credentials:
delete:
summary: Delete Connection Credentials
operationId: deleteConnectionCredentials
description: Delete a connection and its credentials for a specific identity.
tags:
- Connection
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/connections:
get:
summary: Get Connections
operationId: getConnections
description: Get all the connections of the provided identity.
tags:
- Connection
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- in: query
name: query
schema:
type: string
description: Query string to do full text search in connections.
- in: query
name: credentials
schema:
type: boolean
description: credentials=true to include the connection credentials.
- in: query
name: page
schema:
type: integer
format: uint
minimum: 1
example: 1
description: Page to fetch. First is one. If omitted, all results will be returned.
- in: query
name: max_results
schema:
type: integer
format: uint
example: 50
default: 50
description: Number of items to fetch on each page. Minimum is 10. Default is 50. No maximum by the moment.
- in: query
name: sort
style: form
explode: false
schema:
type: array
items:
type: string
enum: [ "createdAt", "-createdAt", "userID", "-userID" ]
default: "-createdAt"
description: >
The minus sign (-) before createdAt means descending order.
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectionsPaginated'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
post:
summary: Create Connection
operationId: createConnection
description: Creates a connection between two identities.
tags:
- Connection
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateConnectionRequest'
responses:
'201':
description: Connection Created
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/connections/{id}/credentials/revoke:
post:
summary: Revoke Connection Credentials
operationId: revokeConnectionCredentials
description: Revoke all the credentials of a connection for a specific identity.
tags:
- Connection
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
responses:
'202':
description: Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
#credentials:
/v2/identities/{identifier}/credentials:
post:
summary: Create Credential
operationId: CreateCredential
description: Creates a credential for the provided identity.
tags:
- Credentials
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCredentialRequest'
responses:
'201':
description: Credential Created
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCredentialResponse'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'422':
$ref: '#/components/responses/422'
'500':
$ref: '#/components/responses/500'
get:
summary: Get Credentials
operationId: GetCredentials
description: |
Returns a list of credentials for the provided identity. Results are paginated.
Filter between all | revoked | expired credentials and also perform a full text search with the query parameter.
tags:
- Credentials
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- in: query
name: page
schema:
type: integer
format: uint
minimum: 1
example: 1
description: Page to fetch. First is one. If omitted, all results will be returned.
- in: query
name: credentialSubject
schema:
type: string
example: did:polygonid:polygon:amoy:2qFpPHotk6oyaX1fcrpQFT4BMnmg8YszUwxYtaoGoe
- in: query
name: schemaType
schema:
type: string
example: UniquenessCredential
description: Filter credentials by schema type (partial match)
- in: query
name: schemaUrl
schema:
type: string
example: ipfs://QmYpsAHYPrNNaNc2o9SAMrPknSAYYAbse4hYxQgMP64Tvj
description: Filter credentials by schema URL (begins with match)
- in: query
name: status
schema:
type: string
enum: [ all, revoked, expired ]
description: >
Credential status:
* `all` - All Credentials. (default value)
* `revoked` - Only revoked credentials
* `expired` - Only expired credentials
- in: query
name: query
schema:
type: string
description: Query string to do full text search
- in: query
name: max_results
schema:
type: integer
format: uint
example: 50
default: 50
description: Number of items to fetch on each page. Minimum is 10. Default is 50. No maximum by the moment.
- in: query
name: sort
style: form
explode: false
schema:
type: array
items:
type: string
enum: [ "schemaType", "-schemaType", "createdAt", "-createdAt", "expiresAt", "-expiresAt", "revoked", "-revoked" ]
default: "-createdAt"
description: >
The minus sign (-) before createdAt means descending order.
responses:
'200':
description: List of credentials
content:
application/json:
schema:
$ref: '#/components/schemas/CredentialsPaginated'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/credentials/{id}:
get:
summary: Get Credential
operationId: GetCredential
description: Get a specific credential for the provided identity.
tags:
- Credentials
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/pathClaim'
responses:
'200':
description: Credential found
content:
application/json:
schema:
$ref: '#/components/schemas/Credential'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
delete:
summary: Delete Credential
operationId: DeleteCredential
description: Remove a specific credential for the provided identity.
tags:
- Credentials
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/pathClaim'
responses:
'200':
description: Credential deleted
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/credentials/revoke/{nonce}:
post:
summary: Revoke Credential
operationId: RevokeCredential
description: Revokes a specific credential for the provided identity.
tags:
- Credentials
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/pathNonce'
responses:
'202':
description: Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/RevokeClaimResponse'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
/v1/{identifier}/claims/revocation/status/{nonce}:
get:
summary: Get Revocation Status V1
operationId: GetRevocationStatus
deprecated: true
description: Endpoint to get the revocation status
tags:
- Credentials
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/pathNonce'
responses:
'200':
description: Proof
content:
application/json:
schema:
$ref: '#/components/schemas/RevocationStatusResponse'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/credentials/revocation/status/{nonce}:
get:
summary: Get Revocation Status
operationId: GetRevocationStatusV2
description: Endpoint to get the revocation status
tags:
- Credentials
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/pathNonce'
responses:
'200':
description: Proof
content:
application/json:
schema:
$ref: '#/components/schemas/RevocationStatusResponse'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/credentials/{id}/offer:
get:
summary: Get Credentials Offer
operationId: GetCredentialOffer
description: Returns a universal/deep link to an offer or raw offer message that can be used for accepting a claim. |
Response can be in 3 formats `universalLink`, `deepLink` or `raw`. Default is `universalLink`. Raw is the raw QR code and link is a QR code with a link to the raw content.
Regardless of the type, the field will always be called universalLink.
tags:
- Credentials
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/pathClaim'
- name: type
in: query
required: false
schema:
type: string
enum: [ universalLink, deepLink, raw ]
description: >
Type:
* `universalLink` - (default value) Returns a universal link. The preferred and more standard way to access the offer message
* `deepLink` - Returns a deeplink with a link redirection to the original message.
* `raw` - Returns the raw offer message.
responses:
'200':
description: ok
content:
application/json:
schema:
$ref: '#/components/schemas/CredentialOfferResponse'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'409':
$ref: '#/components/responses/409'
'500':
$ref: '#/components/responses/500'
#agent
/v2/agent:
post:
summary: Agent
operationId: Agent
description: Identity Agent Endpoint
tags:
- Agent
requestBody:
required: true
content:
text/plain:
schema:
type: string
example: jwz-token
responses:
'200':
description: TBD
content:
application/json:
schema:
$ref: '#/components/schemas/AgentResponse'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v1/agent:
post:
summary: Agent V1
operationId: AgentV1
description: Identity Agent Endpoint for v1.
deprecated: true
tags:
- Agent
requestBody:
required: true
content:
text/plain:
schema:
type: string
example: jwz-token
responses:
'200':
description: TBD
content:
application/json:
schema:
$ref: '#/components/schemas/AgentResponse'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/qr-store:
get:
summary: Get QrCode from store
operationId: GetQrFromStore
description: Returns a previously generated QR code via url shortener method
tags:
- QR Store
parameters:
- in: query
name: id
schema:
type: string
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
example: 8edd8112-c415-11ed-b036-debe37e1cbd6
- in: query
name: issuer
schema:
type: string
responses:
'200':
description: A json to generate a QR code
content:
application/json:
schema:
type: object
'400':
$ref: '#/components/responses/400'
'410':
$ref: '#/components/responses/410'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
#schemas:
/v2/identities/{identifier}/schemas:
post:
summary: Import JSON schema
operationId: ImportSchema
description: Import a JSON schema to be used in the credentials.
security:
- basicAuth: [ ]
tags:
- Schemas
parameters:
- $ref: '#/components/parameters/pathIdentifier'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ImportSchemaRequest'
responses:
'201':
description: Schema imported
content:
application/json:
schema:
$ref: '#/components/schemas/UUIDResponse'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
get:
summary: Get Schemas
operationId: GetSchemas
security:
- basicAuth: [ ]
tags:
- Schemas
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- in: query
name: query
schema:
type: string
description: Query string to do full text search in schema types and attributes.
responses:
'200':
description: Schema collection
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Schema'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/schemas/{id}:
get:
summary: Get Schema
operationId: GetSchema
description: Get a specific schema for the provided identity.
security:
- basicAuth: [ ]
tags:
- Schemas
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
responses:
'200':
description: Schema information
content:
application/json:
schema:
$ref: '#/components/schemas/Schema'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
patch:
summary: Update Schema
operationId: UpdateSchema
description: Update a specific schema for the provided identity.
security:
- basicAuth: [ ]
tags:
- Schemas
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
displayMethodID:
type: string
x-go-type: uuid.UUID
x-omitempty: false
responses:
'200':
description: Schema information
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
# Links
/v2/identities/{identifier}/credentials/links:
get:
summary: Get Links
operationId: GetLinks
description: |
Returns a list of links for the provided identity.
Filter between all | active | inactive | exceeded links and also perform a full text search with the query parameter.
security:
- basicAuth: [ ]
tags:
- Links
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- in: query
name: query
schema:
type: string
description: Query string to do full text search in schema types and attributes.
- in: query
name: status
schema:
type: string
enum: [ all, active, inactive, exceeded ]
description: >
Schema type:
* `all` - All links. (default value)
* `active` - Only active links. (Not expired, no issuance exceeded and not deactivated
* `inactive` - Only deactivated links
* `exceeded` - Expired or maximum issuance exceeded
responses:
'200':
description: Link collection
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Link'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
post:
summary: Create Link
operationId: CreateLink
description: Create a link for the provided identity. With this link, the identity can issue credentials.
security:
- basicAuth: [ ]
tags:
- Links
parameters:
- $ref: '#/components/parameters/pathIdentifier'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateLinkRequest'
responses:
'201':
description: Link created
content:
application/json:
schema:
$ref: '#/components/schemas/UUIDResponse'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/credentials/links/{id}:
get:
summary: Get Link
operationId: GetLink
description: |
Get a specific link for the provided identity.
`deepLink` and `universalLink` fields are returned if the credential has an associated protocol message.
To create an offer for the link, use the endpoint `/v2/identities/{identifier}/credentials/links/{id}/offer`.
security:
- basicAuth: [ ]
tags:
- Links
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
responses:
'200':
description: Credential link response
content:
application/json:
schema:
$ref: '#/components/schemas/Link'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
patch:
summary: Activate | Deactivate Link
operationId: ActivateLink
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
tags:
- Links
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- active
properties:
active:
type: boolean
example: true
responses:
'200':
description: Link updated
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
delete:
summary: Delete Link
operationId: DeleteLink
description: Remove a specific link for the provided identity.
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
tags:
- Links
responses:
'200':
description: Link deleted
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/credentials/links/{id}/offer:
post:
summary: Create a credential offer for a link
operationId: CreateLinkOffer
description: Create a credential offer for the provided link
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
tags:
- Links
responses:
'200':
description: Link offer generated
content:
application/json:
schema:
$ref: '#/components/schemas/CredentialLinkQrCodeResponse'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/credentials/links/callback:
post:
summary: Create Link QR Code Callback
operationId: CreateLinkQrCodeCallback
description: Process the callback from the QR code link
tags:
- Links
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/linkID'
requestBody:
required: true
content:
text/plain:
schema:
type: string
example: jwz-token
responses:
'200':
description: |
Return the offer for fetching the credential if the link was created for a Signature Credential or just 200 http status if the link was created for MTP Credential.
content:
application/json:
schema:
$ref: '#/components/schemas/Offer'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
# Display Methods
/v2/identities/{identifier}/display-method:
post:
summary: Create Display Method
operationId: CreateDisplayMethod
description: Create a display method for the provided identity.
security:
- basicAuth: [ ]
tags:
- Display Methods
parameters:
- $ref: '#/components/parameters/pathIdentifier'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateDisplayMethodRequest'
responses:
'201':
description: Display Method Created
content:
application/json:
schema:
$ref: '#/components/schemas/UUIDResponse'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
get:
summary: Get All Display Methods
operationId: GetAllDisplayMethods
description: |
Get all the display methods for the provided identity.
security:
- basicAuth: [ ]
tags:
- Display Methods
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- in: query
name: page
schema:
type: integer
format: uint
minimum: 1
example: 1
- in: query
name: max_results
schema:
type: integer
format: uint
example: 50
default: 50
description: Number of items to fetch on each page. Minimum is 10. Default is 50. No maximum by the moment.
- in: query
name: sort
style: form
explode: false
schema:
type: array
items:
type: string
enum: [ "created_at", "-created_at", "name", "-name", "type", "-type" ]
default: "-created_at"
description: >
The minus sign (-) before field means descending order.
responses:
'200':
description: Display Method list response
content:
application/json:
schema:
$ref: '#/components/schemas/DisplayMethodPaginated'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/display-method/{id}:
get:
summary: Get Display Method
operationId: GetDisplayMethod
description: |
Get a specific display method for the provided identity.
security:
- basicAuth: [ ]
tags:
- Display Methods
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
responses:
'200':
description: Display Method response
content:
application/json:
schema:
$ref: '#/components/schemas/DisplayMethodEntity'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
patch:
summary: Update Display Method
operationId: UpdateDisplayMethod
description: |
Update a specific display method for the provided identity.
security:
- basicAuth: [ ]
tags:
- Display Methods
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
example: "New Display Method Name"
url:
type: string
example: "https://new-display-method.com"
type:
type: string
example: "Iden3BasicDisplayMethodV1"
responses:
'200':
description: Display Method updated
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
delete:
summary: Delete Display Method
operationId: DeleteDisplayMethod
description: |
Delete a specific display method for the provided identity.
security:
- basicAuth: [ ]
tags:
- Display Methods
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
responses:
'200':
description: Display Method updated
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/keys:
post:
summary: Create a Key
operationId: CreateKey
description: Endpoint to create a new key.
tags:
- Key Management
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier2'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateKeyRequest'
responses:
'201':
description: Crated Key
content:
application/json:
schema:
$ref: '#/components/schemas/CreateKeyResponse'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
get:
summary: Get Keys
operationId: GetKeys
description: |
Returns a list of Keys for the provided identity.
security:
- basicAuth: [ ]
tags:
- Key Management
parameters:
- $ref: '#/components/parameters/pathIdentifier2'
- in: query
name: max_results
schema:
type: integer
format: uint
example: 50
default: 50
description: Number of items to fetch on each page. Minimum is 10. Default is 50. No maximum by the moment.
- in: query
name: page
schema:
type: integer
format: uint
minimum: 1
example: 1
description: Page to fetch. First is one. If omitted, page 1 will be returned.
- in: query
name: type
schema:
type: string
x-omitempty: false
example: "babyjubJub"
enum: [ babyjubJub, secp256k1, ed25519 ]
description: If not provided, all keys will be returned.
responses:
'200':
description: Keys collection
content:
application/json:
schema:
$ref: '#/components/schemas/KeysPaginated'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/keys/{id}:
get:
summary: Get a Key
operationId: GetKey
description: Get a specific key for the provided identity.
tags:
- Key Management
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier2'
- $ref: '#/components/parameters/pathKeyID'
responses:
'200':
description: Key found
content:
application/json:
schema:
$ref: '#/components/schemas/Key'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
patch:
summary: Update a Key
operationId: UpdateKey
description: Update a specific key.
tags:
- Key Management
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier2'
- $ref: '#/components/parameters/pathKeyID'
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- name
properties:
name:
type: string
example: "New Key Name"
responses:
'200':
description: Key found
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
delete:
summary: Delete Key
operationId: DeleteKey
description: Remove a specific key for the provided identity.
tags:
- Identity
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier2'
- $ref: '#/components/parameters/pathKeyID'
responses:
'200':
description: Key deleted
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/payment-request:
get:
summary: Get Payment Requests
operationId: GetPaymentRequests
description: Get payment requests for the provided identity.
tags:
- Payment
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- name: userDID
in: query
description: Filter by user DID
required: false
schema:
type: string
- name: schemaID
in: query
description: Filter by schema ID (schemas UUID)
required: false
schema:
type: string
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
- name: nonce
in: query
description: Filter by nonce
required: false
schema:
type: string
responses:
'200':
description: Payment Requests
content:
application/json:
schema:
$ref: '#/components/schemas/GetPaymentRequestsResponse'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
post:
summary: Create Payment Request
operationId: CreatePaymentRequest
description: Create a payment request for the provided identity.
tags:
- Payment
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreatePaymentRequest'
responses:
'201':
description: Payment Request Created
content:
application/json:
schema:
$ref: '#/components/schemas/CreatePaymentRequestResponse'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/payment-request/{id}:
get:
summary: Get Payment Request
operationId: GetPaymentRequest
description: Get a specific payment request for the provided identity.
tags:
- Payment
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
responses:
'200':
description: Retrieve a payment request
content:
application/json:
schema:
$ref: '#/components/schemas/CreatePaymentRequestResponse'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
delete:
summary: Delete Payment Request
operationId: DeletePaymentRequest
description: Remove a specific payment request for the provided identity.
tags:
- Payment
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
responses:
'200':
description: Payment request deleted
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
/v2/payment/settings:
get:
summary: Payments Configuration
operationId: GetPaymentSettings
description: Returns the server payments configuration
tags:
- Payment
security:
- basicAuth: [ ]
responses:
'200':
description: Payment settings
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentsConfiguration'
/v2/identities/{identifier}/payment/options:
get:
summary: Get Payment Options
operationId: GetPaymentOptions
description: Get the payment options for the provided identity.
tags:
- Payment
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
responses:
'200':
description: Payment options
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentOptionsPaginated'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
post:
summary: Create Payment Option
operationId: CreatePaymentOption
description: Create a payment option for the provided identity.
tags:
- Payment
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentOptionRequest'
responses:
'201':
description: Payment Option Created
content:
application/json:
schema:
$ref: '#/components/schemas/UUIDResponse'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'409':
$ref: '#/components/responses/409'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/payment/options/{id}:
get:
summary: Get Payment Option
operationId: GetPaymentOption
description: Get a specific payment option for the provided identity.
tags:
- Payment
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
responses:
'200':
description: Payment option
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentOption'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
delete:
summary: Delete Payment Option
operationId: DeletePaymentOption
description: Remove a specific payment option for the provided identity.
tags:
- Payment
security:
- basicAuth: [ ]
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
responses:
'200':
description: Payment option deleted
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'500':
$ref: '#/components/responses/500'
patch:
summary: Update Payment Option
operationId: UpdatePaymentOption
description: Update payment option for the provided identity.
security:
- basicAuth: [ ]
tags:
- Payment
parameters:
- $ref: '#/components/parameters/pathIdentifier'
- $ref: '#/components/parameters/id'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdatePaymentOptionRequest'
responses:
'200':
description: Schema information
content:
application/json:
schema:
$ref: '#/components/schemas/GenericMessage'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'500':
$ref: '#/components/responses/500'
/v2/identities/{identifier}/payment/verify/{nonce}:
post:
summary: Verify Payment
operationId: VerifyPayment
description: Verify a payment by nonce.
tags:
- Payment
security:
- basicAuth: [ ]
parameters:
- name: identifier
schema:
type: string
required: true
in: path
- name: nonce
schema:
type: string
in: path
required: true
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentVerifyRequest'
responses:
'200':
description: Payment verified
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentStatus'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'500':
$ref: '#/components/responses/500'
components:
securitySchemes:
basicAuth:
type: http
scheme: basic
schemas:
Health:
type: object
x-omitempty: false
additionalProperties:
type: boolean
UUIDString:
type: string
x-omitempty: false
example: b7144f1c-d54e-4f67-a4f1-f2e7ff1beb07
UUIDResponse:
type: object
required:
- id
properties:
id:
type: string
x-omitempty: false
example: c79c9c04-8c98-40f2-a7a0-5eeabf08d836
GenericMessage:
type: object
required:
- message
properties:
message:
type: string
GenericErrorMessage:
type: object
required:
- message
properties:
message:
type: string
example: 'Something happen'
#identity
CreateIdentityRequest:
type: object
required:
- didMetadata
properties:
didMetadata:
type: object
required:
- method
- blockchain
- network
- type
properties:
method:
type: string
x-omitempty: false
example: "polygonid"
blockchain:
type: string
x-omitempty: false
example: "polygon"
network:
type: string
x-omitempty: false
example: "amoy"
type:
type: string
x-omitempty: false
example: "BJJ"
enum: [ BJJ, ETH ]
credentialStatusType:
type: string
x-omitempty: true
example: "Iden3ReverseSparseMerkleTreeProof"
enum: [ Iden3commRevocationStatusV1.0, Iden3ReverseSparseMerkleTreeProof, Iden3OnchainSparseMerkleTreeProof2023 ]
displayName:
type: string
x-omitempty: false
example: "KYCAgeCredential Issuer identity"
CreateIdentityResponse:
type: object
required:
- identity
- status
- keyType
- credentialStatusType
properties:
identifier:
type: string
displayName:
type: string
state:
$ref: '#/components/schemas/IdentityState'
address:
type: string
x-omitempty: true
balance:
type: string
x-omitempty: true
keyType:
type: string
credentialStatusType:
type: string
example: "Iden3ReverseSparseMerkleTreeProof"
enum: [ Iden3commRevocationStatusV1.0, Iden3ReverseSparseMerkleTreeProof, Iden3OnchainSparseMerkleTreeProof2023 ]
GetIdentityDetailsResponse:
type: object
required:
- identifier
- state
- status
- keyType
- credentialStatusType
- authCredentialsIDs
properties:
identifier:
type: string
displayName:
x-omitempty: false
type: string
state:
$ref: '#/components/schemas/IdentityState'
address:
type: string
x-omitempty: true
balance:
type: string
x-omitempty: true
keyType:
type: string
credentialStatusType:
type: string
example: "Iden3ReverseSparseMerkleTreeProof"
enum: [ Iden3commRevocationStatusV1.0, Iden3ReverseSparseMerkleTreeProof, Iden3OnchainSparseMerkleTreeProof2023 ]
authCredentialsIDs:
type: array
items:
type: string
IdentityState:
type: object
required:
- stateID
- identifier
- status
- modifiedAt
- createdAt
properties:
stateID:
type: integer
format: int64
x-go-json-ignore: true
identifier:
type: string
x-go-json-ignore: true
state:
type: string
rootOfRoots:
type: string
claimsTreeRoot:
type: string
revocationTreeRoot:
type: string
blockTimestamp:
type: integer
blockNumber:
type: integer
txID:
type: string
previousState:
type: string
status:
type: string
modifiedAt:
$ref: '#/components/schemas/TimeUTC'
createdAt:
$ref: '#/components/schemas/TimeUTC'
PublishIdentityStateResponse:
type: object
properties:
txID:
type: string
claimsTreeRoot:
type: string
state:
type: string
revocationTreeRoot:
type: string
rootOfRoots:
type: string
StateTransactionsPaginated:
type: object
required: [ items, meta ]
properties:
items:
$ref: '#/components/schemas/StateTransactions'
meta:
$ref: '#/components/schemas/PaginatedMetadata'
StateTransactions:
type: array
items:
$ref: '#/components/schemas/StateTransaction'
StateStatusResponse:
type: object
required:
- pendingActions
properties:
pendingActions:
type: boolean
example: true
StateTransaction:
type: object
required:
- id
- txID
- state
- publishDate
- status
properties:
id:
type: integer
format: int64
example: 1
txID:
type: string
example: 0x8f271174b45ba7892d83...
state:
type: string
example: 13f9aadd4801d775e85a7ef45c2f6d02cdf83f0d724250417b165ff9cd88ee21
publishDate:
$ref: '#/components/schemas/TimeUTC'
status:
type: string
enum: [ created, pending, published, failed ]
example: published
ConnectionsPaginated:
type: object
required: [ items, meta ]
properties:
items:
$ref: '#/components/schemas/GetConnectionsResponse'
meta:
$ref: '#/components/schemas/PaginatedMetadata'
GetConnectionsResponse:
type: array
items:
$ref: '#/components/schemas/GetConnectionResponse'
GetIdentitiesResponse:
type: object
required:
- identifier
- method
- blockchain
- network
properties:
identifier:
type: string
x-omitempty: false
example: did:polygonid:polygon:amoy:2qMZrfBsXuGFTwSqkqYki78zF3pe1vtXoqH4yRLsfs
credentialStatusType:
type: string
x-omitempty: true
example: "Iden3ReverseSparseMerkleTreeProof"
enum: [ Iden3commRevocationStatusV1.0, Iden3ReverseSparseMerkleTreeProof, Iden3OnchainSparseMerkleTreeProof2023 ]
method:
type: string
x-omitempty: false
example: "polygonid"
blockchain:
type: string
x-omitempty: false
example: "polygon"
network:
type: string
x-omitempty: false
example: "amoy"
displayName:
type: string
x-omitempty: false
example: "KYCAgeCredential Issuer identity"
GetConnectionResponse:
type: object
required:
- id
- userID
- issuerID
- createdAt
- credentials
properties:
id:
type: string
x-omitempty: false
example: 7fff8112-c415-11ed-b036-debe37e1cbd6
userID:
type: string
x-omitempty: false
example: did:polygonid:polygon:amoy:2qMZrfBsXuGFTwSqkqYki78zF3pe1vtXoqH4yRLsfs
issuerID:
type: string
x-omitempty: false
example: did:polygonid:polygon:amoy:2qFpPHotk6oyaX1fcrpQFT4BMnmg8YszUwxYtaoGoe
createdAt:
$ref: '#/components/schemas/TimeUTC'
credentials:
type: array
x-omitempty: false
items:
$ref: '#/components/schemas/Credential'
# refresh service
RefreshService:
type: object
required:
- id
- type
properties:
id:
type: string
x-omitempty: false
type:
type: string
x-omitempty: false
enum:
- "Iden3RefreshService2023"
PaginatedMetadata:
type: object
required:
- total
- page
- max_results
properties:
total:
type: integer
format: uint
example: 1
page:
type: integer
format: uint
example: 1
max_results:
type: integer
format: uint
example: 50
ImportSchemaRequest:
type: object
required:
- url
- schemaType
- version
properties:
url:
type: string
example: "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v3.json"
schemaType:
type: string
example: "vaccinationCertificate"
title:
type: string
example: "KYC Age Credential"
description:
type: string
example: "KYC Age Credential description"
version:
type: string
example: "1.0.0"
displayMethodID:
type: string
x-go-type: uuid.UUID
x-omitempty: false
Schema:
type: object
required:
- id
- hash
- bigInt
- url
- type
- contextURL
- createdAt
- version
properties:
id:
type: string
x-omitempty: false
example: c79c9c04-8c98-40f2-a7a0-5eeabf08d836
hash:
type: string
x-omitempty: false
example: 18f30714a35a5db88ca24728c0c53dfd
bigInt:
type: string
x-omitempty: false
example: "336615423900919464193075592850483704600"
url:
type: string
x-omitempty: false
example: https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v3.json
type:
type: string
x-omitempty: false
example: KYCCountryOfResidenceCredential
contextURL:
type: string
createdAt:
$ref: '#/components/schemas/TimeUTC'
x-omitempty: false
title:
type: string
x-omitempty: false
example: "KYC Age Credential"
description:
type: string
x-omitempty: false
example: "KYC Age Credential description"
version:
type: string
x-omitempty: false
example: "1.0.0"
displayMethodID:
type: string
x-go-type: uuid.UUID
x-omitempty: false
# display method
DisplayMethod:
type: object
required:
- id
- type
properties:
id:
type: string
x-omitempty: false
type:
type: string
x-omitempty: false
enum:
- "Iden3BasicDisplayMethodV1"
#Credentials
CreateCredentialRequest:
type: object
required:
- credentialSchema
- type
- credentialSubject
properties:
credentialSchema:
type: string
x-omitempty: false
claimID:
type: string
x-go-type: uuid.UUID
x-omitempty: false
type:
type: string
x-omitempty: false
credentialSubject:
type: object
x-omitempty: false
expiration:
type: integer
format: int64
version:
type: integer
format: uint32
revNonce:
type: integer
format: uint64
subjectPosition:
type: string
merklizedRootPosition:
type: string
refreshService:
$ref: '#/components/schemas/RefreshService'
displayMethod:
$ref: '#/components/schemas/DisplayMethod'
proofs:
type: array
items:
type: string
x-omitempty: false
example: "BJJSignature2021"
enum: [ BJJSignature2021, Iden3SparseMerkleTreeProof ]
credentialStatusType:
type: string
x-omitempty: true
example: "Iden3ReverseSparseMerkleTreeProof"
enum: [ Iden3commRevocationStatusV1.0, Iden3ReverseSparseMerkleTreeProof, Iden3OnchainSparseMerkleTreeProof2023 ]
encryptionKey:
type: object
x-omitempty: true
example:
EncryptionKey:
summary: Encryption Key
value:
alg: "ECDH-ES+A256KW"
crv: "P-256"
kid: "tu-kid"
kty: "EC"
use: "enc"
x: "8UfTxPvmMFAPuqwtxaRWrWmihC_7uYF2rEnxa4lLQ_s"
y: "M4PFcNXKyyRJ3zNPg19FlB6O0Tlbqs8euRcflpbDtcE"
example:
credentialSchema: "https://raw.githubusercontent.com/iden3/claim-schema-vocab/main/schemas/json/KYCAgeCredential-v3.json"
type: "KYCAgeCredential"
credentialSubject:
id: "fill with did"
birthday: 19960424
documentType: 2
expiration: 1903357766
CreateCredentialResponse:
type: object
required:
- id
properties:
id:
type: string
x-omitempty: false
AuthenticationConnection:
type: object
required:
- id
- userID
- issuerID
- createdAt
- modifiedAt
properties:
id:
$ref: '#/components/schemas/UUIDString'
userID:
$ref: '#/components/schemas/UUIDString'
issuerID:
$ref: '#/components/schemas/UUIDString'
createdAt:
$ref: '#/components/schemas/TimeUTC'
modifiedAt:
$ref: '#/components/schemas/TimeUTC'
GetAuthenticationConnectionResponse:
type: object
required:
- connection
properties:
connection:
$ref: '#/components/schemas/AuthenticationConnection'
EncryptedVC:
type: object
required:
- id
- data
- proof
- context
- type
- issuanceDate
- credentialStatus
properties:
id:
type: string
x-omitempty: false
data:
type: object
x-go-type: protocol.JWEJSONEncryption
x-go-type-import:
name: protocol
path: "github.com/iden3/iden3comm/v2/protocol"
proof:
type: object
x-go-type: verifiable.CredentialProofs
x-go-type-import:
name: verifiable
path: "github.com/iden3/go-schema-processor/v2/verifiable"
context:
type: string
example: "https://www.w3.org/2018/credentials/examples/v1"
type:
type: string
example: "KYCAgeCredential"
expirationDate:
$ref: '#/components/schemas/TimeUTC'
issuanceDate:
$ref: '#/components/schemas/TimeUTC'
credentialStatus:
type: object
x-go-type: verifiable.CredentialStatus
x-go-type-import:
name: verifiable
path: "github.com/iden3/go-schema-processor/v2/verifiable"
Credential:
type: object
required:
- id
- proofTypes
- revoked
- schemaHash
properties:
id:
type: string
x-omitempty: false
proofTypes:
type: array
items:
type: string
example: [ "BJJSignature2021" ]
revoked:
type: boolean
example: false
schemaHash:
type: string
example: "c9b2370371b7fa8b3dab2a5ba81b6838"
vc:
type: object
x-go-type: verifiable.W3CCredential
x-go-type-import:
name: verifiable
path: "github.com/iden3/go-schema-processor/v2/verifiable"
encryptedVC:
$ref: '#/components/schemas/EncryptedVC'
AuthenticationResponse:
type: object
required:
- message
- sessionID
properties:
message:
type: string
example: iden3comm://?request_uri=https%3A%2F%2Fissuer-demo.privado.id%2Fapi%2Fqr-store%3Fid%3Df780a169-8959-4380-9461-f7200e2ed3f4
sessionID:
$ref: '#/components/schemas/UUIDString'
CredentialSchema:
type: object
required:
- id
- type
properties:
id:
type: string
x-omitempty: false
type:
type: string
x-omitempty: false
CredentialOfferResponse:
type: object
required:
- universalLink
- schemaType
properties:
universalLink:
type: string
example: https://wallet.privado.id#request_uri=https%3A%2F%2Fissuer-demo.polygonid.me%2Fapi%2Fqr-store%3Fid%3Df780a169-8959-4380-9461-f7200e2ed3f4
schemaType:
type: string
example: "vaccinationCertificate"
CredentialsPaginated:
type: object
required: [ items, meta ]
properties:
items:
type: array
items:
$ref: '#/components/schemas/Credential'
meta:
$ref: '#/components/schemas/PaginatedMetadata'
RevokeClaimResponse:
type: object
required:
- message
properties:
message:
type: string
x-omitempty: false
example: pending
RevocationStatusResponse:
type: object
required:
- issuer
- mtp
properties:
issuer:
type: object
properties:
state:
type: string
rootOfRoots:
type: string
claimsTreeRoot:
type: string
revocationTreeRoot:
type: string
mtp:
type: object
required:
- existence
properties:
existence:
type: boolean
siblings:
type: array
x-omitempty: false
items:
type: string
node_aux:
type: object
properties:
key:
type: string
value:
type: string
PaymentVerifyRequest:
type: object
properties:
txHash:
type: string
example: "0x8f271174b45ba7892d83..."
description: If txHash not provided then only verification on the Payment contract will be performed by nonce and issuer DID.
userDID:
type: string
example: "did:iden3:polygon:amoy:2qVSDLNYs2s5HDMTyb4Su67ZvrZ..."
description: If a User DID is provided, the payment will be verified for the specified User DID.
BasicMessage:
type: object
required:
- body
- id
- typ
- type
- thid
- from
- to
properties:
id:
type: string
typ:
type: string
type:
type: string
thid:
type: string
body:
type: null
from:
type: string
to:
type: string
AgentResponse:
$ref: '#/components/schemas/BasicMessage'
PaymentOptionsPaginated:
type: object
required: [ items, meta ]
properties:
items:
$ref: '#/components/schemas/PaymentOptions'
meta:
$ref: '#/components/schemas/PaginatedMetadata'
PaymentOptions:
type: array
items:
$ref: '#/components/schemas/PaymentOption'
PaymentStatus:
type: object
required:
- status
- requestId
properties:
status:
type: string
enum: [ success, failed, pending, canceled ]
requestId:
type: string
PaymentsConfiguration:
type: object
x-go-type: payments.Config
x-go-type-import:
name: payments
path: github.com/polygonid/sh-id-platform/internal/payments
PaymentOption:
type: object
required:
- id
- issuerDID
- name
- description
- paymentOptions
- modifiedAt
- createdAt
properties:
id:
type: string
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
issuerDID:
type: string
name:
type: string
description:
type: string
paymentOptions:
$ref: '#/components/schemas/PaymentOptionConfig'
modifiedAt:
$ref: '#/components/schemas/TimeUTC'
createdAt:
$ref: '#/components/schemas/TimeUTC'
PaymentOptionConfig:
type: array
items:
$ref: '#/components/schemas/PaymentOptionConfigItem'
PaymentOptionConfigItem:
type: object
required:
- paymentOptionID
- amount
- recipient
- signingKeyID
properties:
paymentOptionID:
type: integer
amount:
type: string
recipient:
type: string
signingKeyID:
type: string
description: base64 encoded keyID
expiration:
type: string
format: date-time
example: 2025-04-17T11:40:43.681857-03:00
x-omitempty: true
description: Expiration date for the payment option, if not set the 1 hour from the creation date will be used
PaymentOptionRequest:
type: object
required:
- name
- description
- paymentOptions
properties:
name:
type: string
description:
type: string
paymentOptions:
$ref: '#/components/schemas/PaymentOptionConfig'
UpdatePaymentOptionRequest:
type: object
properties:
name:
type: string
description:
type: string
paymentOptions:
$ref: '#/components/schemas/PaymentOptionConfig'
CreatePaymentRequest:
type: object
required:
- optionID
- schemaID
- description
- userDID
properties:
optionID:
type: string
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
schemaID:
type: string
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
description:
type: string
example: "Payment for AML"
userDID:
type: string
example: ""
GetPaymentRequestsResponse:
type: array
items:
$ref: '#/components/schemas/CreatePaymentRequestResponse'
CreatePaymentRequestResponse:
type: object
required:
- id
- issuerDID
- userDID
- paymentOptionID
- payments
- createdAt
- modifiedAt
- status
properties:
id:
type: string
format: uuid
issuerDID:
type: string
userDID:
type: string
paymentOptionID:
type: string
format: uuid
payments:
type: array
items:
$ref: '#/components/schemas/PaymentRequestInfo'
createdAt:
type: string
format: date-time
modifiedAt:
type: string
format: date-time
status:
type: string
enum: [ not-verified, success, failed, pending, canceled ]
paidNonce:
type: string
schemaID:
type: string
format: uuid
PaymentRequestInfo:
type: object
x-go-type: protocol.PaymentRequestInfo
x-go-type-import:
name: protocol
path: github.com/iden3/iden3comm/v2/protocol
TimeUTC:
type: string
x-go-type: timeapi.Time
x-go-type-import:
name: timeapi
path: github.com/polygonid/sh-id-platform/internal/timeapi
example: '2023-10-26T10:59:08Z'
x-omitempty: false
Link:
type: object
required:
- id
- schemaUrl
- schemaType
- credentialSubject
- issuedClaims
- active
- status
- proofTypes
- schemaHash
- createdAt
- deepLink
- universalLink
properties:
id:
type: string
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
example: 8edd8112-c415-11ed-b036-debe37e1cbd6
schemaUrl:
type: string
example: https://someValidURL.com
schemaType:
type: string
example: KYCAgeCredential
schemaHash:
type: string
example: c9b2370371b7fa8b3dab2a5ba81b6838
credentialSubject:
$ref: '#/components/schemas/CredentialSubject'
maxIssuance:
type: integer
x-omitempty: false
nullable: true
issuedClaims:
type: integer
expiration:
$ref: '#/components/schemas/TimeUTC'
x-omitempty: false
nullable: true
credentialExpiration:
$ref: '#/components/schemas/TimeUTC'
x-omitempty: false
nullable: true
createdAt:
$ref: '#/components/schemas/TimeUTC'
active:
type: boolean
status:
type: string
enum: [ active, inactive, exceeded ]
proofTypes:
type: array
items:
type: string
example: [ "BJJSignature2021" ]
refreshService:
$ref: '#/components/schemas/RefreshService'
displayMethod:
$ref: '#/components/schemas/DisplayMethod'
deepLink:
type: string
x-omitempty: false
example: iden3comm://?request_uri=https%3A%2F%2Fissuer-demo.privado.id%2Fapi%2Fqr-store%3Fid%3Df780a169-8959-4380-9461-f7200e2ed3f4
universalLink:
type: string
x-omitempty: false
example: https://wallet.privado.id#request_uri=url
DisplayMethodEntity:
type: object
required:
- id
- name
- url
- type
properties:
id:
type: string
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
example: 8edd8112-c415-11ed-b036-debe37e1cbd6
name:
type: string
example: "a display method name"
url:
type: string
example: "https://someValidURL.com"
type:
type: string
example: "Iden3BasicDisplayMethodV1"
DisplayMethodPaginated:
type: object
required: [ items, meta ]
properties:
items:
type: array
items:
$ref: '#/components/schemas/DisplayMethodEntity'
meta:
$ref: '#/components/schemas/PaginatedMetadata'
CredentialSubject:
type: object
x-omitempty: false
example:
birthday: 19960424
documentType: 2
type: "KYCAgeCredential"
CreateLinkRequest:
type: object
required:
- schemaID
- signatureProof
- mtProof
- credentialSubject
properties:
schemaID:
type: string
x-go-type: uuid.UUID
x-omitempty: false
credentialExpiration:
type: string
format: date-time
example: 2025-04-17T11:40:43.681857-03:00
expiration:
type: string
format: date-time
example: 2025-04-17T11:40:43.681857-03:00
limitedClaims:
type: integer
example: 5
x-omitempty: false
signatureProof:
type: boolean
example: true
mtProof:
type: boolean
example: false
credentialSubject:
$ref: '#/components/schemas/CredentialSubject'
refreshService:
$ref: '#/components/schemas/RefreshService'
displayMethod:
$ref: '#/components/schemas/DisplayMethod'
CredentialLinkQrCodeResponse:
type: object
required:
- issuer
- deepLink
- universalLink
- message
- sessionID
- linkID
- linkDetail
properties:
issuer:
$ref: '#/components/schemas/IssuerDescription'
message:
type: string
deepLink:
type: string
example: iden3comm://?request_uri=https%3A%2F%2Fissuer-demo.privado.id%2Fapi%2Fqr-store%3Fid%3Df780a169-8959-4380-9461-f7200e2ed3f4
universalLink:
type: string
example: https://wallet.privado.id#request_uri=url
linkDetail:
$ref: '#/components/schemas/LinkSimple'
IssuerDescription:
type: object
required:
- displayName
- logo
properties:
displayName:
type: string
example: my issuer
logo:
type: string
example: "http://my-public-logo/logo.jpg"
LinkSimple:
type: object
required:
- id
- schemaUrl
- schemaType
- proofTypes
- schemaHash
properties:
id:
type: string
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
example: 8edd8112-c415-11ed-b036-debe37e1cbd6
schemaUrl:
type: string
example: https://someValidURL.com
schemaType:
type: string
example: KYCAgeCredential
schemaHash:
type: string
example: c9b2370371b7fa8b3dab2a5ba81b6838
proofTypes:
type: array
items:
type: string
example: [ "BJJSignature2021" ]
CreateConnectionRequest:
type: object
required: [ userDID, userDoc, issuerDoc ]
properties:
userDID:
type: string
example: did:polygonid:polygon:amoy:2qMZrfBsXuGFTwSqkqYki78zF3pe1vtXoqH4yRLsfs
userDoc:
type: object
format: byte
issuerDoc:
type: object
format: byte
SupportedNetworks:
type: object
x-omitempty: false
required:
- blockchain
- networks
properties:
blockchain:
type: string
example: "polygon"
networks:
type: array
items:
$ref: '#/components/schemas/NetworkData'
NetworkData:
type: object
required:
- name
- credentialStatus
properties:
name:
type: string
example: "amoy"
credentialStatus:
type: array
items:
type: string
example: "Iden3commRevocationStatusV1.0"
Offer:
type: object
x-go-type: protocol.CredentialsOfferMessage
x-go-type-import:
name: protocol
path: github.com/iden3/iden3comm/v2/protocol
CreateDisplayMethodRequest:
type: object
required:
- name
- url
properties:
name:
type: string
example: "My Display Method"
url:
type: string
example: "https://my-display-method.com"
type:
type: string
example: "Iden3BasicDisplayMethodV1"
description: "Display method type (Iden3BasicDisplayMethodV1 is default value)"
CreateKeyRequest:
type: object
required:
- keyType
- name
properties:
keyType:
type: string
x-omitempty: false
example: "babyjubJub"
enum: [ babyjubJub, secp256k1, ed25519 ]
name:
type: string
example: "my key"
CreateKeyResponse:
type: object
required:
- id
properties:
id:
type: string
x-omitempty: false
description: base64 encoded keyID
example: a2V5cy9kaWQ6aWRlbjM6cG9seWdvbjphbW95OnhKQktvbkJ1dWdKbW1aMkdvS2gzOTM
Key:
type: object
required:
- id
- keyType
- publicKey
- isAuthCredential
- name
properties:
id:
type: string
x-omitempty: false
example: ZGlkOnBvbHlnb25pZDpwb2x5Z29uOmFtb3k6MnFRNjhKa1JjZjN5cXBYanRqVVQ3WjdVeW1TV0hzYll
description: base64 encoded keyID
keyType:
type: string
x-omitempty: false
example: "babyjubJub"
enum: [ babyjubJub, secp256k1, ed25519 ]
publicKey:
type: string
x-omitempty: false
example: "0x04e3e7e"
isAuthCredential:
type: boolean
x-omitempty: false
example: true
name:
type: string
x-omitempty: false
example: "my key"
KeysPaginated:
type: object
required: [ items, meta ]
properties:
items:
type: array
items:
$ref: '#/components/schemas/Key'
meta:
$ref: '#/components/schemas/PaginatedMetadata'
CreateAuthCredentialRequest:
type: object
required: [keyID, credentialStatusType]
properties:
keyID:
type: string
x-omitempty: false
example: ZGlkOnBvbHlnb25pZDpwb2x5Z29uOmFtb3k6MnFRNjhKa1JjZjN5cXBYanRqVVQ3WjdVeW1TV0hzYll
expiration:
type: integer
format: int64
version:
type: integer
format: uint32
revNonce:
type: integer
format: uint64
credentialStatusType:
type: string
x-omitempty: true
example: "Iden3ReverseSparseMerkleTreeProof"
enum: [ Iden3commRevocationStatusV1.0, Iden3ReverseSparseMerkleTreeProof, Iden3OnchainSparseMerkleTreeProof2023 ]
parameters:
credentialStatusType:
name: credentialStatusType
in: query
required: false
description: |
credential status type, e.g: Iden3ReverseSparseMerkleTreeProof
schema:
type: string
id:
name: id
in: path
required: true
description: |
UUID parameter, e.g: 8edd8112-c415-11ed-b036-debe37e1cbd6
schema:
type: string
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
linkID:
name: linkID
in: query
required: true
description: |
Session ID e.g: 89d298fa-15a6-4a1d-ab13-d1069467eedd
schema:
type: string
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
sessionID:
name: sessionID
in: query
required: true
description: |
Session ID e.g: 89d298fa-15a6-4a1d-ab13-d1069467eedd
schema:
type: string
x-go-type: uuid.UUID
x-go-type-import:
name: uuid
path: github.com/google/uuid
pathIdentifier:
name: identifier
in: path
required: true
description: Issuer identifier
schema:
type: string
pathIdentifier2:
name: identifier
in: path
required: true
description: Issuer identifier
schema:
type: string
x-go-type: Identity
x-go-type-import:
name: customIdentity
path: github.com/polygonid/sh-id-platform/internal/api
pathClaim:
name: id
in: path
required: true
description: Claim identifier
schema:
type: string
pathNonce:
name: nonce
in: path
required: true
description: Claim nonce
schema:
type: integer
format: int64
pathKeyID:
name: id
in: path
required: true
description: Key ID in base64
schema:
type: string
responses:
'400':
description: 'Bad Request'
content:
application/json:
schema:
$ref: '#/components/schemas/GenericErrorMessage'
'401':
description: 'Unauthorized'
content:
application/json:
schema:
$ref: '#/components/schemas/GenericErrorMessage'
'402':
description: 'Payment Required'
content:
application/json:
schema:
$ref: '#/components/schemas/GenericErrorMessage'
'403':
description: 'Permission Denied'
content:
application/json:
schema:
$ref: '#/components/schemas/GenericErrorMessage'
'404':
description: 'Not found'
content:
application/json:
schema:
$ref: '#/components/schemas/GenericErrorMessage'
'409':
description: 'Conflict'
content:
application/json:
schema:
$ref: '#/components/schemas/GenericErrorMessage'
'407':
description: 'Proxy Authentication Required'
content:
application/json:
schema:
$ref: '#/components/schemas/GenericErrorMessage'
'410':
description: 'Gone'
content:
application/json:
schema:
$ref: '#/components/schemas/GenericErrorMessage'
'422':
description: 'Unprocessable Content'
content:
application/json:
schema:
$ref: '#/components/schemas/GenericErrorMessage'
'500':
description: 'Internal Server error'
content:
application/json:
schema:
$ref: '#/components/schemas/GenericErrorMessage'
'500-CreateIdentity':
description: 'Internal Server error'
content:
application/json:
schema:
type: object
properties:
requestID:
type: string
code:
type: integer
error:
type: string