View as Markdown

Texts and reminders · Guide

Test texts in the sandbox

Use the sandbox to build and check your texts before your own number is approved. The sandbox is a prv_test_ key, separate data, and "environment": "sandbox" on every event. There, a text your request would send is recorded instead, with its body and the outcome a live text would have had. It never reaches a carrier, and it isn't counted on your plan.

Before you begin: you need a sandbox key. The published keys on Sandbox and test keys work as written; sign in to the sandbox console for a key of your own.

1. Send a request to a test number

Create a request as you would on live. The recipient's number decides what happens:

Send toOutcomeWhat you get back
+12025550101Delivered{ "channel": "text", "delivered": true, "sender": "custom", "test": true }
+12025550102Failed at the provider"reason": "send_failed" with "test": true, then the email if the request has one
+12025550103The person replied STOPA stop for your company; this text and later ones read "reason": "opted_out", and the request goes by email
+12025550104No consent on record"reason": "no_text_consent", and the request goes by email, until you record a statement for it or the person agrees in the step (consent to text)
Any other numberDeliveredAs the first row: in the sandbox every other number counts as agreed
export PROVENANCE_KEY=prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x
curl -X POST $PROVENANCE_API/v1/attest/capture_requests \
  -H "Authorization: Bearer $PROVENANCE_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "case_id": "CLM-TEST-1", "session_type": "id", "contact": { "phone": "+12025550101" } }'

The published capture account carries an approved test number, so the text goes from it. Every delivery, reminder delivery and webhook delivery object carries "test": true in the sandbox, and never on live, so your live code can refuse anything that has it.

2. Read the text back

GET /v1/account/test_texts lists your recorded texts, newest first. Add request_id for one request's texts, or read one with GET /v1/account/test_texts/{id}.

curl "$PROVENANCE_API/v1/account/test_texts?request_id=$REQUEST_ID" \
  -H "Authorization: Bearer $PROVENANCE_KEY"
{
  "id": "ttxt_408ce607aa663201b8c5",
  "object": "test_text",
  "test": true,
  "kind": "company",
  "purpose": "capture_link",
  "reminder": false,
  "to": "•••• 0101",
  "from": "+18335550142",
  "sender": "custom",
  "body": "Sandbox needs a photo of your ID and a selfie from your phone camera: https://…/capture/… Reply STOP to opt out.",
  "segments": 2,
  "outcome": "delivered",
  "request": { "object": "capture_request", "id": "capr_01M7FJ5FFMKE72Q2T4ZDK925V7" },
  "created_at": "2026-11-15T12:15:58.453Z"
}

body is the text as it would have been sent, link included; the link opens the sandbox request. The first text a test number gets from your number ends with "Reply STOP to opt out.", as on live; later ones don't. In the sandbox console, open the request and its text row in Delivery shows who it is from and the body.

The sending_number.* webhooks fire in the sandbox as on live, with "test": true on the object (the webhooks).

Recorded texts are kept for 30 days. Anyone with a published key can read the texts sent under it. To keep yours to yourself, sign in to the sandbox console and use your own test key.

3. Run a STOP test again

DELETE /v1/account/test_texts/stops stands in for the person's START: it lifts the stops +12025550103 wrote for your account, so the test can run twice. No other company's stop is touched.

4. Act out the carrier review

In the sandbox your number is requested when you save your business details, on every plan, and nothing is bought. The tax id you give decides the review in seconds:

Tax idOutcomeIn the console
Any other valueApprovedSending
00-0000002Rejected, can be editedNeeds a fix; a resubmission edits the registration
00-0000003Rejected, can't be editedNeeds a fix; a resubmission makes a new registration for the same number
00-0000004Stays in reviewIn review
00-0000005Approved, then paused on the first sendPaused

The steps are the ones in your own sending number. The sandbox console's Settings → Texts lists these numbers and tax ids beside your test number.

Limits of test texts

Carrier approval of your business and delivery of your texts happen only on live. Codes and notices Provenance sends you are never recorded: a phone code reads channel_not_configured, and the sandbox returns it as dev_code. Emails and app notifications in the sandbox go only where the sandbox has them set up, and are not recorded.

Errors you might see

SymptomCauseFix
403 sandbox_onlyA live keyUse a prv_test_ key.
404 resource_missingA text recorded for another account, or more than 30 days agoList your texts first.

See also