Skip to main content
POST
/
credentials
Create credential resource.
curl --request POST \
  --url https://test.didxtech.com/me-wallet/api/credentials \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "credentialOffer": "<string>"
}
'
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "claims": {
      "firstName": "John",
      "lastName": "Doe",
      "age": 34,
      "isVerified": true,
      "dateOfBirth": "1990-06-15",
      "address": {
        "street": "123 Main St",
        "city": "Cape Town",
        "country": "ZA"
      },
      "phoneNumbers": [
        "+27821234567",
        "+27831234567"
      ]
    },
    "iat": "2024-03-15T10:30:00Z",
    "status": "accepted",
    "format": "vc+sd-jwt",
    "vct": "VerifiableId",
    "iss": "did:example:123456789abcdefghi"
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
credentialOffer
string
required

cred offer

Response

201 - application/json

List of credentials.

id
string<uuid>
required

Unique identifier for the credential

Example:

"123e4567-e89b-12d3-a456-426614174000"

claims
object
required

Key-value pairs containing the credential claims

Example:
{
"firstName": "John",
"lastName": "Doe",
"age": 34,
"isVerified": true,
"dateOfBirth": "1990-06-15",
"address": {
"street": "123 Main St",
"city": "Cape Town",
"country": "ZA"
},
"phoneNumbers": ["+27821234567", "+27831234567"]
}
iat
string<date-time>
required

Timestamp when the credential was issued (ISO 8601 format)

Example:

"2024-03-15T10:30:00Z"

status
enum<string>
required

Current consent status of the credential

Available options:
pending,
accepted,
rejected
Example:

"accepted"

format
enum<string>
required

Credential format

Available options:
vc+sd-jwt
Example:

"vc+sd-jwt"

vct
string
required

Verifiable Credential Type identifying the schema of the credential

Required string length: 1 - 256
Example:

"VerifiableId"

iss
string

Issuer identifier — DID for SD-JWT credentials, X.509 DN for mdoc credentials

Required string length: 1 - 512
Example:

"did:example:123456789abcdefghi"