Unreleased documentation. These pages follow the main branch and can change before the next release. For supported guidance, use v0.43.0.
Create one adopter-authorized credential offer
POST
/offers
const url = 'https://example.com/offers';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"credentialConfigurationId":"example","subjects":[{"role":"example","selectorValues":{"additionalProperty":"example"}}],"transactionCode":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/offers \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "credentialConfigurationId": "example", "subjects": [ { "role": "example", "selectorValues": { "additionalProperty": "example" } } ], "transactionCode": false }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
credentialConfigurationId
required
string
subjects
required
Array<object>
object
role
required
string
selectorValues
object
key
additional properties
string | integer | boolean
transactionCode
boolean
Responses
Section titled “Responses”Credential offer
Media typeapplication/json
object
credentialOffer
required
object
credential_configuration_ids
required
Array<string>
credential_issuer
required
string format: uri
grants
required
object
urn:ietf:params:oauth:grant-type:pre-authorized_code
required
object
pre-authorized_code
required
string
tx_code
object
input_mode
required
length
required
credentialOfferUri
required
string format: uri
expiresIn
required
integer
transactionCode
string
Example
{ "credentialOffer": { "grants": { "urn:ietf:params:oauth:grant-type:pre-authorized_code": { "tx_code": { "input_mode": "numeric", "length": 6 } } } }}Headers
Section titled “Headers”Cache-Control
string
Pragma
string
The offer request is outside the published catalog
Media typeapplication/json
object
error
required
error_description
required
string
Example
{ "error": "invalid_request"}Headers
Section titled “Headers”Cache-Control
string
Pragma
string
The offer bearer token is missing or refused
Media typeapplication/json
object
error
required
error_description
required
string
Example
{ "error": "invalid_request"}Headers
Section titled “Headers”Cache-Control
string
Pragma
string
WWW-Authenticate
string
Backing Evidence refused authenticated catalog discovery
Media typeapplication/json
object
error
required
error_description
required
string
error
required
Examples
ExamplecatalogRefused
The authenticated Evidence catalog was refused
{ "error": "invalid_credential_request", "error_description": "the credential source refused this request"}Headers
Section titled “Headers”Cache-Control
string
Pragma
string
The configured request deadline elapsed
Media typeapplication/json
object
error
required
error_description
required
string
Example
{ "error": "invalid_request"}Headers
Section titled “Headers”Cache-Control
string
Pragma
string
The request body exceeds the configured byte limit
Media typetext/plain; charset=utf-8
string
Headers
Section titled “Headers”Cache-Control
string
Pragma
string
Authorization, Evidence discovery, or bounded state is unavailable
Media typeapplication/json
object
error
required
error_description
required
string
Example
{ "error": "invalid_request"}Headers
Section titled “Headers”Cache-Control
string
Pragma
string