light-mode-image
Learn
API ReferenceClaim source

Configure a claims source

Roles

adminissuermanaged-issuer
POST/v1/claim-sources

Configures a new claims source for your tenant. When issuing a new credential, MATTR VII will make either a GET or a POST request to the claims source using the configured request parameters and fetch available data. This fetched data can then be included in the issued credential.

Analytic event

  • CLAIM_SOURCE_CREATE_START
  • CLAIM_SOURCE_CREATE_SUCCESS
  • CLAIM_SOURCE_CREATE_FAIL

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

The claim source payload

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/claim-sources" \  -H "Content-Type: application/json" \  -d '{    "name": "Claims source accepting a x-api-key header",    "url": "https://example.com/api/data",    "authorization": {      "type": "api-key",      "value": "6hrFDATxrG9w14QY9wwnmVhLE0Wg6LIvwOwUaxz761m1J"    },    "requestParameters": {      "account_type": {        "mapFrom": "claims.accountType",        "defaultValue": "account.student"      },      "account_id": {        "mapFrom": "claims.accountId"      }    }  }'

{  "name": "Claims source accepting a x-api-key header",  "url": "https://example.com/api/data",  "authorization": {    "type": "api-key",    "value": "****************************************61m1J"  },  "requestParameters": {    "account_type": {      "mapFrom": "claims.accountType",      "defaultValue": "account.student"    },    "account_id": {      "mapFrom": "claims.accountId"    }  }}

How would you rate this page?