POST /v1/verify/{app_id}/verifications/intent
Create an email verification request with intentOverview
This endpoint creates an email verification request for a user with a specific intent. It’s designed for integration with Thread and other services that need to verify user email addresses.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 |
Request Body
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 | Email address to verify |
Response
Success Response (200 OK)
Error Responses
400 Bad Request - Missing Meta Data
400 Bad Request - Missing Email
400 Bad Request - Missing Intent Name
400 Bad Request - Invalid Email
Example Usage
cURL
JavaScript
Behavior
- Email Validation: The endpoint validates the email format using
sanitize_email()andis_valid_email() - User Creation: If the user doesn’t exist, it 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.requested” event for tracking
- Response: Returns the verification ID for tracking purposes
Notes
- The endpoint automatically finds or creates an app user based on the email
- The verification reason is generated by combining
intent_namewith a random hex string for uniqueness - Email addresses are automatically sanitized (lowercased and trimmed)
- An event is recorded for analytics/tracking purposes
Related Endpoints
GET /v1/verify/\{app_id\}/verifications/\{id\}- Get verification detailsPOST /v1/verify/\{app_id\}/verifications/verify- Verify the email verification code