POST /v1/verify/{app_id}/verifications/intent
Create a verification request (email or SMS) with intentOverview
This endpoint creates a verification request for a user with a specific intent. It supports both email and SMS verification methods. It’s designed for integration with Thread and other services that need to verify user contact information.Authentication
This endpoint requires M2M (Machine-to-Machine) authentication. Create an M2M token from your Scute dashboard and include it in theX-Authorization header.
Request
Method
URL
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
app_id | string | Yes | The ID of the app |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
method | string | No | email | Verification method: email or sms |
Request Body (Email verification)
Request Body (SMS verification)
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
intent_name | string | Yes | Name/identifier for the verification intent |
meta_data | object | Yes | Metadata containing user information and intent context |
meta_data.contact_email | string | Yes (for email method) | Email address to verify |
meta_data.contact_phones | array | Yes (for sms method) | Array of phone objects to verify |
meta_data.contact_phones[].phone_number | string | Yes | Phone number to send SMS to |
meta_data.contact_phones[].phone_type | string | No | Type of phone (e.g., “mobile”) |
Response
Success Response (200 OK)
Error Responses
400 Bad Request - Missing Meta Data
400 Bad Request - Missing Intent Name
400 Bad Request - Invalid Email (email method)
400 Bad Request - Missing Email (email method)
400 Bad Request - Missing Phones (sms method)
400 Bad Request - Invalid Phone (sms method)
400 Bad Request - Empty Phone (sms method)
400 Bad Request - Invalid Method
Example Usage
cURL (Email)
cURL (SMS)
JavaScript (Email)
JavaScript (SMS)
Behavior
Email Verification (default)
- Email Validation: Validates the email format using
sanitize_email()andis_valid_email() - User Creation: If the user doesn’t exist, creates a new app user with the provided email
- Verification Creation: Creates an email verification request with a unique reason (intent_name + random hex)
- Event Recording: Records a
verification.email.requestedevent for tracking - Response: Returns the verification ID, status, and message
SMS Verification (?method=sms)
- Phone Validation: Validates that
contact_phonesarray exists and contains at least one valid phone number - User Creation: If the user doesn’t exist, creates a new app user with the provided phone number
- Verification Creation: Creates an SMS verification request with a unique reason (intent_name + random hex)
- Event Recording: Records a
verification.sms.requestedevent for tracking - Response: Returns the verification ID, status, and message
Notes
- The endpoint automatically finds or creates an app user based on the contact info (email or phone)
- The verification reason is generated by combining
intent_namewith a random hex string for uniqueness - Email addresses are automatically sanitized (lowercased and trimmed)
- When using SMS, the first valid phone number from the
contact_phonesarray is used - Optional callback notifications can be sent via
X-Callback-URLheader ormeta_data.callback_url