Skip to content

Document Submit

Upload a single document for a user identified by their external reference.

Endpoint

http
POST /v1/documents:submit

Authentication

Required Scopes: pearsana-partner/partners.documents:write and pearsana-partner/partners.externalRefs:read

Optional Scope: pearsana-partner/partners.verifications:write — required if verificationIntent is anything other than store_only.

Headers

http
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
X-API-Version: 2026-01-30

Request Body

json
{
	"externalReference": {
		"namespace": "SIS",
		"externalId": "STU-2024-001"
	},
	"documentType": "OFFICIAL_TRANSCRIPT",
	"file": "JVBERi0xLjQK...",
	"filename": "transcript-jane-smith.pdf",
	"verificationIntent": "store_only"
}

Request Parameters

FieldTypeRequiredDescription
externalReferenceobjectYesIdentifies the user (see below)
documentTypestringYesDocument type (see Document Types)
filestringYesBase64-encoded file content
filenamestringNoOriginal filename — used for MIME type detection. If omitted, MIME type defaults to application/octet-stream
verificationIntentstringNoWhat to do with the document after upload (default: store_only). See Verification Intent
attestationReferenceIdstringNoOnly valid when verificationIntent is attest
verificationMetadataobjectNoArbitrary metadata attached to the verification record

External Reference Object

FieldTypeRequiredDescription
namespacestringYesSystem namespace (e.g. "SIS", "LMS")
externalIdstringYesExternal system identifier for the user

The user must already exist in Pearsana and have this external reference linked. If no matching user is found, the API returns 404.

Document Types

ValueCategory
OFFICIAL_TRANSCRIPTacademic
ACADEMIC_TRANSCRIPTacademic
DEGREE_CERTIFICATEacademic
DIPLOMAacademic
ENROLLMENT_VERIFICATIONacademic
COURSE_COMPLETIONacademic
AWARD_CERTIFICATEawards
HONOR_ROLLawards
SPORTS_CERTIFICATEsports
ATHLETIC_RECORDsports

Any other value is accepted and categorised as personal.

Verification Intent

Controls what happens to the document after it is stored.

ValueBehaviour
store_only(default) Document is uploaded to the user's Wallet. No verification is created.
requestDocument is uploaded and a verification request is created with status received.
attestDocument is uploaded and a verification is created with status approved (attested by the partner). Requires attestationReferenceId.
issueDocument is uploaded and a verification is created with status approved (issued by the partner).

Verification scope

If verificationIntent is anything other than store_only, your App Client must also have the pearsana-partner/partners.verifications:write scope.

Response

Success Response

Status Code: 201 Created

json
{
	"document": {
		"documentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
		"documentFingerprintId": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
		"status": "received",
		"createdAt": "2026-01-30T12:00:00.000Z"
	}
}

When a verification is created (i.e. verificationIntent is not store_only):

json
{
	"document": {
		"documentId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
		"documentFingerprintId": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
		"status": "verified",
		"createdAt": "2026-01-30T12:00:00.000Z"
	},
	"verification": {
		"verificationId": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
		"verificationType": "attested",
		"status": "approved",
		"createdAt": "2026-01-30T12:00:00.000Z",
		"attestationReferenceId": "ATT-2024-001"
	}
}

Response Fields — Document

FieldTypeDescription
documentIdstringUnique document identifier
documentFingerprintIdstringSHA-256 hash of the file content, prefixed with sha256:
statusstringreceived (store only / request) or verified (attest / issue)
createdAtstringISO 8601 timestamp

Response Fields — Verification (when present)

FieldTypeDescription
verificationIdstringUnique verification identifier
verificationTypestringrequested, attested, or issued
statusstringreceived (request) or approved (attest / issue)
createdAtstringISO 8601 timestamp
attestationReferenceIdstringPresent only for attest intent

Error Responses

400 Validation Error

json
{
	"error": {
		"code": "VALIDATION_ERROR",
		"message": "Validation failed",
		"details": {
			"errors": ["externalReference.namespace is required", "file is required (base64 encoded content)"]
		},
		"requestId": "abc-123-def"
	}
}

404 User Not Found

json
{
	"error": {
		"code": "NOT_FOUND",
		"message": "User not found for external reference SIS/STU-2024-001",
		"requestId": "abc-123-def"
	}
}

401 / 403

See Error Format for the standard error envelope.

Example Request

bash
curl -X POST https://sandbox.api.pearsana.com/v1/documents:submit \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "X-API-Version: 2026-01-30" \
  -d '{
    "externalReference": {
      "namespace": "SIS",
      "externalId": "STU-2024-001"
    },
    "documentType": "OFFICIAL_TRANSCRIPT",
    "file": "JVBERi0xLjQK...",
    "filename": "transcript.pdf",
    "verificationIntent": "store_only"
  }'