Create applied policy credential
const url = 'https://localhost:10001/api/v1/projects/example/policies/example/credentials';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"expiresAt":"2030-01-01T00:00:00Z"}'};
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://localhost:10001/api/v1/projects/example/policies/example/credentials \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "expiresAt": "2030-01-01T00:00:00Z" }'Issue a new credential for an applied policy and return the persisted record
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Project ID, UUID (urn:uuid optional), or slug:my-project
Applied policy ID, slug:my-policy, or urn:cid:bafy…
Request Body
Section titled “Request Body ”Applied policy credential issuance request
object
Must be in the future
Example
2030-01-01T00:00:00ZResponses
Section titled “ Responses ”Created credential
A verifiable credential issued over an applied policy, revocable but never deleted
object
Taken from the path on create
object
Urn:uuid minted per issuance; identifies the row
Verifiable actor; issuedBy is the label
Set via the revoke endpoint
Set via the revoke endpoint
Set via the revoke endpoint
Verifiable actor; revokedBy is the label
Set via the revoke endpoint
Assigned by the integrity service
Example generated
{ "expiresAt": "2026-04-15T12:00:00Z"}Bad request - Invalid IDs or request body
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}Unauthorized - Authentication required
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}Forbidden - No project access or insufficient permissions
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}Credential already issued
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}Internal server error
Error body returned by the governance endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Invalid request body"}