MARS documentation
API reference

Create attestation

Verifies and separately stores a canonical OAS Verifiable Credential.

Contract and client context

Operation: create_attestation · HTTP: POST /v1/attestations

Use an operator-supplied registry base URL. Request execution is disabled in this documentation explorer. Generated request snippets are templates, not signed or authorized submissions.

Exact operation definition
{
  "description": "Verifies and separately stores a canonical OAS Verifiable Credential.",
  "operationId": "create_attestation",
  "parameters": [
    {
      "description": "Required route-scoped idempotency key",
      "in": "header",
      "name": "Idempotency-Key",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AttestationRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/VerifiableAttestationRecord"
          }
        }
      },
      "description": "Stored verified attestation"
    },
    "401": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Session missing or invalid"
    },
    "403": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Issuer or capability mismatch"
    },
    "404": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Entry not found"
    },
    "429": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Write rate limit exceeded"
    }
  },
  "security": [
    {
      "siwsSession": []
    },
    {
      "siwsCookie": []
    }
  ],
  "tags": [
    "trust"
  ]
}

Resolve schema references against the complete OpenAPI document. Standalone schemas and hashes are generated from the same checked-in source.

POST/v1/attestations

Authorization

AuthorizationBearer <token>

Opaque capability-bearing MARS session issued by an enabled authentication profile.

In: header

Header Parameters

Idempotency-Key*string

Required route-scoped idempotency key

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for POST /v1/attestations.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/attestations" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "attestation": null,    "entryDid": "string"  }'
{  "acceptedAt": "2019-08-24T14:15:22Z",  "attestationId": "string",  "credential": null,  "entryDid": "string",  "expiresAt": "2019-08-24T14:15:22Z",  "issuedAt": "2019-08-24T14:15:22Z",  "issuerDid": "string",  "revokedAt": "2019-08-24T14:15:22Z"}