Get started
Quickstart: your first verification
This guide takes you from an empty account to a finished verification. You need a published flow, an API key and a server that can make HTTPS requests.
Before you start
- An account in the myid panel with your company profile filled in.
- A published flow. Build it in the panel under Flows: pick the checks, then publish. See Flows.
- A server-side environment (Node.js, Python, PHP, Go or any HTTP client). The API does not accept calls from browsers.
1. Create an API key
In the panel, open Developers → API keys and create a key. Enter the public IPs of the servers that will call the API: requests from other IPs are refused. The key looks like myid_sk_… and is shown only once, so copy it into your server configuration, for example as the MYID_API_KEY environment variable.
2. Find your flow code
Each session runs one published flow. List your published flows and copy the code of the one you want. You can also copy it from the flow page in the panel.
curl https://api.myid.ir/v1/flows \
-H "Authorization: Bearer $MYID_API_KEY"3. Create a verification session
Send the flow code and, optionally, your own id for the customer in externalRef. You will find the session by this id later.
curl -X POST https://api.myid.ir/v1/verifications \
-H "Authorization: Bearer $MYID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"flowCode": "01JD7YQK2D1C4M2V7R9T3B6N8P",
"externalRef": "customer-1042"
}'The response has the session and its url. The link is returned only in this response.
{
"response": {
"status": "success"
},
"data": {
"id": "01JD7Z1W3J8X0V4Q9T6M2K5R8N",
"flowCode": "01JD7YQK2D1C4M2V7R9T3B6N8P",
"externalRef": "customer-1042",
"metadata": {
"plan": "gold"
},
"locale": "fa",
"status": "created",
"outcome": null,
"currentNodeId": null,
"steps": [],
"expiresAt": "2026-12-01T09:40:00.000Z",
"startedAt": null,
"completedAt": null,
"createdAt": "2026-11-30T09:40:00.000Z",
"url": "https://verify.myid.ir/v/2lKq0bX4mN8wVr7cT1yHs9fJdE3uPa6zQo5gLi2kRxM"
}
}4. Send the customer to the link
Give the url to the customer right away. Pick what suits your product:
- Redirect the customer from your sign-up page to the link.
- Send the link by SMS or email from your own system.
- Show it as a QR code on desktop so the customer continues on their phone.
5. Receive the result
Add a webhook endpoint in the panel under Developers → Webhooks. When the customer reaches an end of the flow, myid sends verification.completed. Check the signature first (see Webhooks), then read data.outcome:
{
"id": "01JD7Z4C9QW2N8B5X3R6T1M7KD",
"type": "verification.completed",
"createdAt": "2026-11-30T09:42:33.512Z",
"data": {
"id": "01JD7Z1W3J8X0V4Q9T6M2K5R8N",
"flowCode": "01JD7YQK2D1C4M2V7R9T3B6N8P",
"externalRef": "customer-1042",
"metadata": {
"plan": "gold"
},
"locale": "fa",
"status": "completed",
"outcome": "approved",
"currentNodeId": null,
"steps": [
{
"nodeId": "n_shahkar",
"serviceCode": "shahkar_match",
"status": "completed",
"outcome": "match",
"result": {
"provider": "jibit",
"score": null,
"reasons": [],
"data": {
"nationalCode": "00******48",
"mobile": "0912*****67",
"cached": false
}
},
"submittedAt": "2026-11-30T09:41:07.000Z",
"completedAt": "2026-11-30T09:41:08.000Z"
},
{
"nodeId": "n_face",
"serviceCode": "registry_face_match",
"status": "completed",
"outcome": "match",
"result": {
"provider": "ai_engine",
"providerVersion": "face-v2",
"reference": "req_8f2c1a",
"score": 0.932,
"reasons": [],
"data": {
"nationalCode": "00******48",
"referenceSource": "civil_registry",
"similarity": 93.2,
"thresholds": {
"match": 80,
"suspicious": 60
}
}
},
"submittedAt": "2026-11-30T09:42:31.000Z",
"completedAt": "2026-11-30T09:42:33.000Z"
}
],
"expiresAt": "2026-12-01T09:40:00.000Z",
"startedAt": "2026-11-30T09:41:02.000Z",
"completedAt": "2026-11-30T09:42:33.000Z",
"createdAt": "2026-11-30T09:40:00.000Z"
}
}If a webhook is missed, fetch the session with GET /v1/verifications/:id. It returns the same data.