SparkVault API reference
API keys

Messaging

v1

Overview

SparkVault Messaging gives your business durable, two-way encrypted conversations with people who do not have a SparkVault account. A customer is invited to a thread, verifies themselves once through SparkVault Identity, and can then read and reply from any device. Every message your business sends carries a receipt of record, exportable as a signed token a third party can independently verify while the conversation keeps its audit trail.

Message content lives only as vault ingots: one immutable, VAK-sealed Forge ingot per message. It is never stored in a database row and never in raw object storage. Reads are server-mediated: the server brokers a single-use key, decrypts the requested ingot, and returns plaintext to an authorized participant.

Posture S
Server-Mediated Reads
Zero-Trust
Triple-ZT At Rest
EdDSA
Verifiable Receipts
Ingot-Only
No Content In DB

What You Get

  • Account-less recipients: invite anyone by email or phone; they verify through SparkVault Identity and become a stable participant.
  • Receipts of record: every send is attested to the account audit trail and can be exported as a portable, JWKS-verifiable token, unless the conversation disables audit retention.
  • Compliance controls: per-conversation retention, recall, legal hold, a recorded per-participant opt-out, and an audit log of metadata.
  • Attachments: client-direct upload/download of files up to 100 MB, each sealed as its own conversation-tagged ingot.
Encrypted At Rest, Not End-to-End

Posture S means content is triple zero-trust at rest and only ever decrypted server-side for an authorized participant. It is never persisted as plaintext, and it is encrypted at rest, not end to end: the server brokers every read through a system-held key.

Data Model

A conversation is an index-only manifest plus a set of content-addressable ingots. Understanding the four core objects makes the endpoints below self-explanatory.

Core Objects

FieldTypeDescription
Conversation object A thread owned by an account. Its manifest lives in the metadata store (META row); all content lives in ingots. Addressed by conversation_id.
Participant object A stable svid: on the business side, the member's SparkVault user id (usr_...; an API key acts as its creator's), or for an account-less recipient a derived mid_<hash> principal. The durable roster lives on META.
Message object One immutable VAK-sealed Forge ingot per message, content-addressable at ing_<sha256(conversationId|m|messageId)[0:32]>, the SHA-256 truncated to its first 32 hex chars, shaped like a normal ing_<32hex> id. text/plain, up to 64 KB; larger payloads use attachments.
Page object Lazy compaction seals each run of 25 messages into one page ingot. Read-triggered, no cron. Reads transparently span individual and page ingots.
Attachment object A separate, conversation-tagged Forge ingot (up to 100 MB), uploaded and downloaded client-direct, referenced from a message as attachments:[{ ingot_id, name }].

Manifest, Not Mailbox

The manifest is an index only: an atomic message-id counter (the newest allocated id), committed_through (the highest message id at and below which every id is final: landed, or abandoned after a 30-minute grace), compacted_through, the participant roster, settings, the recent window (the 25 newest landed messages, and every one landed above committed_through), the recalled tombstone list, the legal_hold flag, and the closed flag. Reads extend to the newest allocated id, not to committed_through. A participant's last-read position is last_read_id on their per-user inbox row; there are no per-message read receipts.

Server-Mediated Reads By Predictable ID

Reads resolve by id: an id above compacted_through reads the individual message ingot; an id at or below it reads page ingot ceil(id / 25). Compaction (seal → conditional advance → delete originals) is race-safe and rides a read, so there is no background job and a reader never sees a half-written tail.

Vault & Encryption

Each account has one system-flagged "messaging" vault that holds every conversation's ingots, not a vault per conversation. Conversations are isolated by their deterministic ingot ids plus a membership check, not by separate keys.

  • The vault's master key (VMK) is generated once and held only via a system messaging DVAK (Delegated Vault Access Key).
  • All messaging crypto is server-brokered through that DVAK for owner and recipient alike. The raw VAK never leaves the server; Forge receives single-use ISTKs.
  • Triple zero-trust at rest is unchanged: content is sealed, and reads decrypt only transiently for an authorized participant.

Authentication

Messaging has two access surfaces, each authenticated differently.

Business Side

Your application calls the authenticated Core routes under /v1/products/messaging/* using a SparkVault API key or a user JWT. The authenticated principal is the conversation participant.

Business-Side Credentials

FieldTypeDescription
X-API-Key header Server-to-server integrations and automation. Create a key on the API Keys page.
Authorization: Bearer header A user JWT for user-facing applications and browser sessions.

Account-less Recipient

A recipient with no SparkVault account authenticates through the SparkVault Identity IdP (auth.sparkvault.com), with Messaging as the OIDC relying party (client sparkvault-messaging), using the PKCE authorization-code flow against the SparkVault platform's own Identity tenant, the same tenant for every business's recipients. They never hold an API key. The verified id_token is their bearer credential on the public /m/* routes.

Recipient Verification Flow
  1. The recipient opens /m/access?account_id&conversation_id and is redirected (302) to the IdP's /authorize endpoint (PKCE).
  2. They complete account-less verification at the IdP with a one-time code sent to their email or phone, a SparkLink, a passkey, or a social login.
  3. The IdP returns to /m/callback?code&state, where the code is exchanged for an EdDSA id_token.
  4. The id_token is verified with verifyIdToken (the SDK's exact JWKS verification) plus a nonce check, and becomes the recipient's bearer credential.
  5. The person the id_token names is a participant when the email or phone the conversation invited belongs to them in SparkVault Identity, whether or not it is the identifier they signed in with. A browser already signed in to the IdP as someone else arrives as that person: if they are not a participant, the callback restarts /authorize with prompt=login so the invited person can sign in, and only a person who is still not a participant after that sign-in is refused.
Membership Is Re-Checked On Every Operation

Authorization is always the META membership check, re-run before the key is brokered on every operation, so a removed participant is locked out instantly, regardless of token TTL. Recipient routes present the id_token as Authorization: Bearer (or x-messaging-token).

Business-Side Endpoints

Host: https://api.sparkvault.com

All paths below are authenticated with an API key or user JWT. Owner-only operations are noted; every operation re-checks conversation membership.

Inbox

GET /v1/products/messaging/inbox

The caller's conversations, newest-activity-first. Metadata only, no message previews (content is ingot-only).

Query Parameters

ParameterTypeRequiredDescription
limit integer Optional Conversations per page, at most 100; a larger value reads as 100 (Pagination)Default: 25
cursor string Optional URL-encoded JSON pagination cursor from a previous response

Response

FieldTypeDescription
items object[] Inbox rows: conversation_id, account_id, last_activity_ts, last_message_id, unread_count, last_read_id, archived. Each row also carries its storage keys (pk, sk, inbox_pk)
cursor object Pagination cursor for the next page (absent on the last page)

Create Conversation

POST /v1/products/messaging/conversations

Create a conversation. The creator becomes the owner. The system messaging vault is created on first use.

Request Body

ParameterTypeRequiredDescription
participants object[] Optional Initial business-side members, each { svid, identity? }. The owner is added automatically and cannot be re-added. An account-less recipient joins by invite (see below): an entry with a mid_ svid or an email/phone identity is rejected with 400.
settings object Optional Conversation settings, e.g. { audit_retention_seconds }, one of the platform's shared retention durations (0 = disabled; other values are rejected with 400). Unset uses the platform default (3 months).

Response

FieldTypeDescription
conversation_id string Identifier for the new conversation
vault_id string The account messaging vault holding the conversation ingots
participants object[] The resolved roster, each { svid, role, added_at, identity? }
created_at integer Creation timestamp (Unix epoch seconds)

Get Conversation

GET /v1/products/messaging/conversations/:id

The conversation manifest (participant-gated). Returns roster, settings, and read pointers, never content.

Response

FieldTypeDescription
conversation_id string Conversation identifier
participants object[] Roster (identifiers are redacted on the recipient surface)
committed_through integer Highest message id at and below which every id is final (landed, or abandoned after a 30-minute grace)
compacted_through integer Highest message id sealed into a page ingot
settings object Conversation settings, including audit_retention_seconds
created_at integer Creation timestamp (Unix epoch seconds)

Send Message

POST /v1/products/messaging/conversations/:id/messages

Send a message. The content is sealed into a deterministic ingot, and a receipt of record is written to the audit trail and returned.

Request Body

ParameterTypeRequiredDescription
content string Required Message body. text/plain, up to 64 KB (larger content is rejected with 413: use attachments).
content_type string Optional Must be text/plain (no HTML rendering). Any other value is rejected with 400. Defaults to text/plain.
attachments object[] Optional Previously-uploaded attachment refs, each { ingot_id, name }. The name is sealed with the message and is the only name the file has: recipients save the file under it, so it must be a valid file name: at most 255 characters, with no path separator, control character, invisible bidirectional control or : * ? " < > |, and not showing only dots or spaces. Each ref must belong to this conversation and be fully uploaded. Maximum 20 per message.

Response

FieldTypeDescription
message_id integer Monotonic conversation-scoped message id
conversation_id string Conversation identifier
ts integer Server send timestamp (Unix epoch seconds)
ingot_id string Deterministic content-addressable id of the sealed message ingot
content_hash string SHA-256 (hex) of the canonical sealed message bytes
committed_through integer committed_through after this send
status string committed when this message id is at or below committed_through; pending while an earlier message id is not yet final
receipt object The receipt of record: { account_id, conversation_id, message_id, sender_svid, content_hash, ts }. Always returned; the audit row and receipt tokens exist only while the conversation's audit retention is enabled
bash Send a message
curl -X POST 'https://api.sparkvault.com/v1/products/messaging/conversations/cnv_019aec85fe5972b3c4d5e6f7a8b9c0d1/messages' \
  -H 'Authorization: Bearer YOUR_JWT' \
  -H 'Content-Type: application/json' \
  -d '{
    "content": "Your wire transfer was received. Reference #SV-4471.",
    "content_type": "text/plain"
  }'
json Response
{
  "data": {
    "message_id": 42,
    "conversation_id": "cnv_019aec85fe5972b3c4d5e6f7a8b9c0d1",
    "ts": 1703977200,
    "ingot_id": "ing_8f1c2d4a6b9e0c5f3a7d1e2b4c6f8a09",
    "content_hash": "9b3e7c1a5f8d2e0b4a6c8f1d3e5b7a9c2d4f6e8a0b1c3d5e7f9a1b3c5d7e9f0a",
    "committed_through": 42,
    "status": "committed",
    "receipt": {
      "account_id": "acc_example",
      "conversation_id": "cnv_019aec85fe5972b3c4d5e6f7a8b9c0d1",
      "message_id": 42,
      "sender_svid": "usr_019e66a4e27875f2822ede0e4f5d8792",
      "content_hash": "9b3e7c1a5f8d2e0b4a6c8f1d3e5b7a9c2d4f6e8a0b1c3d5e7f9a1b3c5d7e9f0a",
      "ts": 1703977200
    }
  },
  "meta": { "api_version": "1.2.828", "request_id": "...", "response_ms": 212, "timestamp": 1703977200 }
}

Read Messages

GET /v1/products/messaging/conversations/:id/messages

Server-mediated read. With from_id + to_id reads that contiguous range; otherwise returns the newest page. Recalled ids return a tombstone, never content.

Query Parameters

ParameterTypeRequiredDescription
from_id integer Optional Inclusive start message id (pair with to_id to read a range)
to_id integer Optional Inclusive end message id (pair with from_id)
limit integer Optional When reading the newest page, the messages to return, at most 50; a larger value reads as 50 (Pagination)Default: 25

A from_id..to_id range spans at most 50 messages (2 pages); to_id is first clamped to the newest allocated id. A larger range is rejected with 400 ("Read range too large (max 50 messages); paginate"). Without a range, the newest page returns up to 25 messages.

Response

FieldTypeDescription
messages object[] Decrypted message objects ordered by message_id; recalled ids appear as { message_id, recalled: true }, and an allocated id whose message is not readable yet (in flight, failed, or not yet visible) as { message_id, unavailable: true }
committed_through integer committed_through at read time
compacted_through integer Highest id sealed into a page ingot at read time
sender_identity Is A Structured Descriptor

sender_identity is always an object, never a raw string. A business message carries { user_id, email, type: "auth.sv" }; an account-less recipient's message carries { type, account_less: true }. A message read never exposes a recipient's raw email or phone: the raw identifier lives only on the owner-visible roster.

json Example Response
{
  "data": {
    "messages": [
      { "message_id": 40, "recalled": true },
      {
        "schema_version": 1,
        "message_id": 41,
        "sender_svid": "mid_7c2a9f4b1d8e3a05f6e4d2c0b8a69753",
        "sender_identity": { "type": "email", "account_less": true },
        "ts": 1703970000,
        "content_type": "text/plain",
        "content": "Can you confirm the routing number?",
        "attachments": []
      }
    ],
    "committed_through": 42,
    "compacted_through": 25
  },
  "meta": { "api_version": "1.2.828", "request_id": "...", "response_ms": 96, "timestamp": 1703977300 }
}

Recall Message

POST /v1/products/messaging/conversations/:id/messages/:messageId/recall

Soft-delete a message with a tombstone. The owner can recall any message; a sender can recall their own message while it is in the manifest's recent window (see Manifest, Not Mailbox). Blocked while the conversation is under legal hold.

Response

FieldTypeDescription
conversation_id string Conversation identifier
message_id integer The recalled message id
recalled boolean Always true on success
Recall Is A Tombstone, Not Erasure

Recall marks the id in recalled[] so reads return { message_id, recalled: true }. The sealed content stays in the ingot. Crypto-shred is the owner-gated deletion posture, not recall.

Fetch Receipt Token

GET /v1/products/messaging/conversations/:id/messages/:messageId/receipt

Mint a portable, JWKS-verifiable SparkVault receipt token for one message. Participant-gated. A recalled message or disabled retention yields 403; a message past its retention window yields 404.

Response

FieldTypeDescription
receipt_token string An EdDSA JWT signed by the tenant's Identity key, verifiable by any third party exactly like an id_token
expires_at integer Token expiry (Unix epoch seconds), tracks the conversation's configured retention horizon
receipt object The receipt claims: { account_id, conversation_id, message_id, sender_svid, content_hash, message_ts }

The token is re-derived from the immutable message: its content_hash is re-hashed from the sealed bytes (never caller-supplied), and that hash is also set as the token's action_hash. A verifier holding the message content can recompute the hash and confirm the token attests this exact message, the same action_hash binding the SparkVault SDK uses (verifyIdToken with expectedActionHash). The token's exp tracks settings.audit_retention_seconds, so a receipt verifies for as long as the company retains the record.

Verify Like Any id_token

The receipt token is signed with the tenant's Ed25519 key. Verify it with the same Identity JWKS endpoint (https://auth.sparkvault.com/{account_id}/.well-known/jwks.json), algorithm EdDSA, issuer the tenant Identity URL, audience the account id, and assert action_hash equals the SHA-256 of the message content you hold.

bash Fetch a receipt token
curl 'https://api.sparkvault.com/v1/products/messaging/conversations/cnv_019aec85fe5972b3c4d5e6f7a8b9c0d1/messages/42/receipt' \
  -H 'Authorization: Bearer YOUR_JWT'
json Response
{
  "data": {
    "receipt_token": "eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9...",
    "expires_at": 1711753200,
    "receipt": {
      "account_id": "acc_example",
      "conversation_id": "cnv_019aec85fe5972b3c4d5e6f7a8b9c0d1",
      "message_id": 42,
      "sender_svid": "usr_019e66a4e27875f2822ede0e4f5d8792",
      "content_hash": "9b3e7c1a5f8d2e0b4a6c8f1d3e5b7a9c2d4f6e8a0b1c3d5e7f9a1b3c5d7e9f0a",
      "message_ts": 1703977200
    }
  },
  "meta": { "api_version": "1.2.828", "request_id": "...", "response_ms": 158, "timestamp": 1704063600 }
}
json Decoded receipt_token claims
{
  "iss": "https://auth.sparkvault.com/acc_example",
  "sub": "usr_019e66a4e27875f2822ede0e4f5d8792",
  "aud": "acc_example",
  "jti": "b1f0c2d3-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
  "token_type": "messaging_receipt",
  "conversation_id": "cnv_019aec85fe5972b3c4d5e6f7a8b9c0d1",
  "message_id": 42,
  "content_hash": "9b3e7c1a5f8d2e0b4a6c8f1d3e5b7a9c2d4f6e8a0b1c3d5e7f9a1b3c5d7e9f0a",
  "message_ts": 1703977200,
  "svid": "usr_019e66a4e27875f2822ede0e4f5d8792",
  "action_hash": "9b3e7c1a5f8d2e0b4a6c8f1d3e5b7a9c2d4f6e8a0b1c3d5e7f9a1b3c5d7e9f0a",
  "iat": 1704063600,
  "exp": 1711753200
}

Participants

POST /v1/products/messaging/conversations/:id/participants

Add a business-side participant by svid (owner only). An account-less recipient joins by invite instead.

Request Body

ParameterTypeRequiredDescription
svid string Required The participant's stable SparkVault ID. A mid_ recipient principal is rejected with 400.
identity object Optional Optional display descriptor stored on the roster entry. An email or phone identity is rejected with 400: recipient access is decided from the identifier an invite records.
DELETE /v1/products/messaging/conversations/:id/participants/:svid

Remove a participant (owner only). The removed participant loses access instantly on their next operation, regardless of token TTL.

Response (add and remove)

FieldTypeDescription
conversation_id string Conversation identifier
participants object[] The roster after the change, each { svid, role, added_at, identity? }

Invite Account-less Recipient

POST /v1/products/messaging/conversations/:id/invites

Invite an account-less recipient by email or phone (owner only), the one way one joins. Derives the recipient principal, adds them to the roster, and returns an access link they verify through the Identity IdP. A conversation holds at most 25 account-less recipients; a further invite is rejected with 400.

Request Body

ParameterTypeRequiredDescription
type string Required email or phone
value string Required The recipient's email address, or phone number: E.164 (+15551234567), or a US number as typed ((555) 123-4567). A value that names no dialable number is rejected with 400.

Response

FieldTypeDescription
svid string The derived recipient principal (mid_<hash>) added to the roster
access_url string The /m/access link the recipient opens to verify and join

Attachments

POST /v1/products/messaging/conversations/:id/attachments

Begin an attachment upload. Returns a Forge URL for a client-direct upload of a conversation-tagged ingot (up to 100 MB). Like other file uploads, it requires an active plan and funded storage and bandwidth; the Billing section explains usage-credit refusals and legacy capacity limits.

Request Body

ParameterTypeRequiredDescription
size_bytes integer Required File size in bytes (over 100 MB is rejected with 413)
content_type string Optional MIME type of the file

Response

FieldTypeDescription
ingot_id string The attachment ingot id: reference it from a message as { ingot_id, name }, where name is the file's name, sealed with the message
forge_url string Presigned client-direct upload URL
expires_at integer Upload URL expiry (Unix epoch seconds)
max_bytes integer Maximum attachment size (104857600 = 100 MB)
GET /v1/products/messaging/conversations/:id/attachments/:ingotId/download

Get a client-direct download URL for an attachment ingot. The bytes transferred consume the owning account's bandwidth usage credits. An active plan and funded usage are required; see Billing for funding refusals and legacy capacity limits.

Response

FieldTypeDescription
ingot_id string The attachment ingot id. The response names no file: save it under the name the message's attachment reference carries
size_bytes integer File size in bytes
content_type string MIME type of the file
forge_url string Presigned client-direct download URL
expires_at integer Download URL expiry (Unix epoch seconds)

Read, Archive & Opt-out

POST /v1/products/messaging/conversations/:id/read

Mark the conversation read for the caller. Sets last_read_id on the inbox row and resets the unread counter.

Request Body

ParameterTypeRequiredDescription
last_read_id integer Required The highest message id the caller has read
PUT /v1/products/messaging/conversations/:id/archive

Archive or unarchive the conversation in the caller's own inbox.

Request Body

ParameterTypeRequiredDescription
archived boolean Optional false restores the conversation; any other value, or none, archives itDefault: true
PUT /v1/products/messaging/conversations/:id/opt-out

Record the caller's per-conversation opt-out on the roster, audited as messaging_opted_out or messaging_opted_in. Messaging sends no new-message alerts, so the flag changes no delivery.

Request Body

ParameterTypeRequiredDescription
opted_out boolean Optional true records an opt-out; any other value, or none, records an opt-inDefault: false

Legal Hold & Close (Owner)

PUT /v1/products/messaging/conversations/:id/legal-hold

Set or clear a per-conversation legal hold (owner only). While held, no message can be recalled.

Request Body

ParameterTypeRequiredDescription
held boolean Optional true places a legal hold; any other value, or none, clears itDefault: false
PUT /v1/products/messaging/conversations/:id/close

Close or reopen the conversation (owner only). A closed conversation rejects new sends with 403.

Request Body

ParameterTypeRequiredDescription
closed boolean Optional false reopens the conversation; any other value, or none, closes itDefault: true

Health

GET /v1/products/messaging/healthz

Liveness probe: { product, status, environment }.

Account-less Recipient Routes

The public /m/* routes, served at https://x.sv/m (the host invite links and the IdP callback use), mirror the business-side surface for a verified recipient. They are gated by the IdP's id_token (presented as Authorization: Bearer or x-messaging-token), and the META membership check is re-run on every operation. Identifiers are redacted so one recipient never sees another's email or phone.

GET /m/access?account_id&conversation_id

Begin verification: redirects (302) to the IdP's /authorize endpoint (PKCE). Unauthenticated; rate-limited to 60 requests per hour per IP.

GET /m/callback?code&state

OIDC callback: exchanges the code and verifies the id_token and membership. With a recipient app configured it redirects (302) to the app's /c/{accountId}/{conversationId} with #id_token=... in the fragment; otherwise it answers { id_token, account_id, conversation_id, expires_in } in the data envelope. A non-participant's first callback restarts /authorize with prompt=login.

GET /m/inbox

The conversations invited at the email or phone the recipient signed in with, newest first (id_token bearer). A conversation invited at another identifier they hold opens through its access link.

GET /m/conversations/:accountId/:conversationId

Conversation manifest with identifiers redacted.

GET /m/conversations/:accountId/:conversationId/messages

Server-mediated read of the recipient's conversation.

POST /m/conversations/:accountId/:conversationId/messages

Reply to the conversation.

POST /m/conversations/:accountId/:conversationId/messages/:messageId/recall

Recall the recipient's own message while it is in the manifest's recent window (see Manifest, Not Mailbox).

POST /m/conversations/:accountId/:conversationId/read

Mark the conversation read for the recipient.

POST /m/conversations/:accountId/:conversationId/attachments

Begin an attachment upload.

GET /m/conversations/:accountId/:conversationId/attachments/:ingotId/download

Get an attachment download URL.

PUT /m/conversations/:accountId/:conversationId/archive

Archive the conversation in the recipient's inbox.

PUT /m/conversations/:accountId/:conversationId/opt-out

Record the recipient's opt-out for the conversation (no delivery reads it).

Governance & Compliance

Messaging is built for regulated, auditable business-to-customer communication. Every governance control is per-conversation and re-checked on the relevant operation.

Controls

FieldTypeDescription
Receipt of record audit Every send records a SparkVault attestation { conversation, message_id, sender, content_hash, ts } to the account audit trail, unless the conversation's audit_retention_seconds is 0, which writes no messaging audit rows and issues no receipt tokens. The send response always carries the receipt object. Issuing a portable token logs messaging_receipt_issued.
Retention setting settings.audit_retention_seconds governs both the TTL on messaging audit rows and how long a receipt token stays valid. Must be one of the platform's shared retention durations: 24 hours, 7 days, 1 / 2 / 3 / 6 / 9 months, 1 / 2 / 3 years, or 0 = disabled; any other value is rejected with 400. Default 7776000 (3 months).
Recall action Soft-delete tombstone (the owner any message; a sender their own while it is in the manifest's recent window). Reads return { message_id, recalled: true }; content stays sealed.
Legal hold action Owner sets or clears a per-conversation hold; while held, messages cannot be recalled.
Consent setting Per-participant per-conversation opt-out, recorded on the roster and audited. Messaging sends no new-message alerts, so it changes no delivery.
Audit log Account-scope events: messaging_conversation_created, messaging_participant_added, messaging_participant_removed, messaging_recipient_verified, messaging_message_sent, messaging_message_recalled, messaging_opted_out, messaging_opted_in, messaging_legal_hold_set, messaging_legal_hold_cleared and messaging_receipt_issued. Closing or reopening is not audited. Never message content. Each event's actor_id is who acted: the user, the API key (its creator in metadata.api_key_created_by, and the participant it acted as in metadata.actor_svid), or the verified recipient's participant id.
Close action Owner closes or reopens a conversation; a closed conversation rejects new sends.

Alerts

Alerts carry metadata only, never content.

  • Invite email: a single transactional email delivering the access link when a recipient is invited by email (best-effort). Phone invites return the access_url for your application to deliver.

Participants learn of new messages by reading the conversation: there is no push of new activity.

Billing

Messaging uses the owning account's prepaid usage credits for storage and byte transfers. There is no separate per-message or per-transaction fee. Paid subscriptions include monthly usage credits; additional usage credits can be purchased or funded by auto-refill.

Billed Dimensions

FieldTypeDescription
Stored bytes storage Messages, pages and attachments use funded storage capacity through the ingot lifecycle. Additional capacity is prorated for the remaining monthly period.
Bandwidth transfer Transferred bytes consume bandwidth usage credits, including attachment uploads/downloads and server-mediated reads and writes of message content.

USAGE_CREDITS_EXHAUSTED requires the account owner to add usage credits or adjust auto-refill and its monthly spending limit. USAGE_CREDIT_FUNDING_REVIEW requires billing review after a payment reversal. Recipients are not shown the owner's balance. Historical capacity-based accounts retain their existing terms. See usage-credit rates and funding options.

Error Responses

Messaging uses the standard SparkVault error envelope: { error: { code, message, details } }. Common failures:

Error Responses

StatusCodeDescription
400 VALIDATION_ERROR Missing or invalid body, e.g. empty content, a content_type other than text/plain, a malformed attachments array (more than 20 refs, a ref not fully uploaded, or a name that is not a valid file name), an invalid audit_retention_seconds, a from_id..to_id read range over 50 messages, a participant naming an account-less recipient outside an invite, or an invite past the 25-recipient limit.
400 INVALID_CURSOR GET /v1/products/messaging/inbox and GET /m/inbox: the cursor decoded but is not a key of the caller's inbox (a hand-made cursor, or one another list issued). A cursor that does not decode is VALIDATION_ERROR. Start the listing again without one.
401 AUTHENTICATION_ERROR Missing or invalid credential (API key, user JWT, or recipient id_token).
402 PLAN_REQUIRED The owning account has no active plan for a content transfer.
402 USAGE_CREDITS_EXHAUSTED The owning account cannot fund message storage or a content transfer. Its admin must add usage credits or adjust auto-refill before retrying. Decided only after the participant check.
402 USAGE_CREDITS_REQUIRED Storage requires a current funded subscription period. The account owner must restore or renew the subscription.
402 USAGE_CREDIT_FUNDING_REVIEW The owning account's funding requires billing review after a payment reversal.
402 QUOTA_EXCEEDED Legacy capacity-based subscription only: storage or bandwidth capacity is exhausted; details.resource names the resource. Decided only after the participant check.
403 FORBIDDEN Any business-side endpoint: the caller is no longer a member of the organization. Every business-side call reads the caller's membership as it stands, so a member removed from the account is refused at once, whatever session token they still hold. Otherwise: not a participant, not the owner for an owner-only op, a recall blocked by legal hold, a send to a closed conversation, or no receipt available (message recalled, or audit retention disabled).
404 NOT_FOUND Unknown conversation, message, or attachment id, or a receipt requested for a message past its retention window.
413 PAYLOAD_TOO_LARGE Message content over 64 KB, or an attachment over the 100 MB maximum.
429 RATE_LIMIT_EXCEEDED The per-conversation send ceiling (1,000 messages/hour); 100 attachment upload starts an hour per participant per conversation; 20 unsent uploads per participant per conversation; or the per-IP limit (60/hour) on the unauthenticated GET /m/access endpoint.
429 UPLOAD_LIMIT A message send or attachment upload while the account already has 500 uploads in flight. Retry after Retry-After.

Get Started

Messaging shares SparkVault's API authentication and Identity verification. To integrate:

  1. Create an API key on the API Keys page.
  2. Create a conversation, then invite a recipient by email or phone.
  3. Send messages and fetch receipts as shown above.
  4. For verifiable proof, export a receipt token and validate it against the Identity JWKS.
Verifying Identity

Receipt tokens verify exactly like an OIDC ID token. See the Identity API reference for the JWKS verification examples in Node.js, Python, Go, Ruby, PHP, and C#.