Preview: SendMock has no stable release yet. These docs follow develop.

API reference

Verify

GET/api/v1/verify/{verificationSid}

One verification with its code, attempts and timeline.

CLI
sendmock verify show <verificationSid>
MCP tool
sendmock_verify_get
In the app
SMS > Verify > open a verification

Answer

200 VerificationDetail

Errors: 404, as { error: { code, message } }

Try it in Demo mode

POST/api/v1/verify/{verificationSid}/force

Force an outcome: approved, expired, canceled or max attempts.

CLI
sendmock verify force <verificationSid> <status>
MCP tool
sendmock_verify_force
In the app
SMS > Verify > verification > Approve, Cancel, Expire, Max attempts

Request body (application/json)

VerificationForceRequest : Body of `POST /verify/{verificationSid}/force`.

FieldTypeDescription
stateForcedVerificationState
The state to force: approved, canceled, expired or max_attempts (too many wrong checks).One of: approved, canceled, expired, max_attemptsExample: expired

Answer

200 VerificationDetail

Errors: 404, as { error: { code, message } }

Try it in Demo mode

POST/api/v1/verify/services

Add a Verify service.

CLI
sendmock verify services create
MCP tool
sendmock_verify_service_create
In the app
SMS > Verify > Services > New service

Request body (application/json)

VerifyServiceInput : Body of POST and PATCH /api/v1/verify/services.

FieldTypeDescription
friendly_namestring
The name shown in the code message, e.g. "Your Shop verification code is ...".Example: Shop
code_lengthnumber
Digits in each code, 4 to 10.Example: 6
fixed_codestring | null
Always send this code instead of a random one, for deterministic tests; null for random.Example: 123456
ttl_secondsnumber
How long a code stays valid, in seconds.Example: 600

Answer

201 VerifyService

Errors: 400, as { error: { code, message } }

Try it in Demo mode

PATCH/api/v1/verify/services/{serviceSid}

Change a Verify service.

CLI
sendmock verify services update <serviceSid>
MCP tool
sendmock_verify_service_update
In the app
SMS > Verify > Services > Edit

Request body (application/json)

VerifyServiceInput : Body of POST and PATCH /api/v1/verify/services.

FieldTypeDescription
friendly_namestring
The name shown in the code message, e.g. "Your Shop verification code is ...".Example: Shop
code_lengthnumber
Digits in each code, 4 to 10.Example: 6
fixed_codestring | null
Always send this code instead of a random one, for deterministic tests; null for random.Example: 123456
ttl_secondsnumber
How long a code stays valid, in seconds.Example: 600

Answer

200 VerifyService

Errors: 400, 404, as { error: { code, message } }

Try it in Demo mode