Skip to main content

GET /record-v2/:domain/:record

Return one V2 record with decoded content, verification state, and base64 raw data.

Request

GET /record-v2/:domain/:record

Path parameters

domain

Required. A TLD-less top-level domain or one-level subdomain. The route trims whitespace, converts the value to lowercase, and reads the corresponding .sns record.

record

Required. One exact supported record value from GET /types/record.

Query parameters

rpc

Optional. A non-empty Solana RPC URL that overrides the proxy Worker's RPC_URL binding for this request.

Response

A successful request returns 200 OK:

type RecordV2Response = {
s: "ok";
result: {
deserialized?: string;
stale: boolean;
roa?: boolean;
record: {
header: {
stalenessValidation: number;
rightOfAssociationValidation: number;
contentLength: number;
};
data: string;
};
};
};

deserialized is present when the record type supports decoding. stale is true when staleness verification fails. roa is omitted when Right of Association verification does not apply. record.data contains the complete raw record bytes encoded as base64.

Example

curl "https://sdk-proxy-v2.sns.id/record-v2/bonfida/url"
{
"s": "ok",
"result": {
"deserialized": "https://example.com",
"stale": false,
"roa": true,
"record": {
"header": {
"stalenessValidation": 1,
"rightOfAssociationValidation": 1,
"contentLength": 19
},
"data": "<BASE64_RECORD_DATA>"
}
}
}

Errors

StatusresultWhen
400Invalid inputThe domain shape or exact record value is invalid.
404Record not foundThe domain or requested record account is absent.
422Record is malformedRecord data or validation metadata is malformed.
502RPC unavailableThe selected RPC returns a JSON-RPC error.
500Internal errorNo RPC is configured, or another failure occurs.