> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fraudeg.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Your first verification

> A curl against your environment's API, the response, and what to do with each field

With your API key created in the [environment](https://docs.fraudeg.com/en/entornos.md) that fits you, this is the only
call you need to get started. The example uses pre-official-integration
(`sandbox-api.fraudeg.com`). In production, change the host to `https://api.fraudeg.com/api`;
the path is the same. There is no `/verifications/sandbox`.

## Request

```bash theme={null}
curl -X POST https://sandbox-api.fraudeg.com/api/v1/verifications \
  -H "X-Api-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_ref": "CUS-48213",
    "language": "es",
    "callback_url": "https://your-app.example.com/kyc/return"
  }'
```

| Field | Required | Details |
| - | - | - |
| `customer_ref` | No, but send it | Your identifier for the person. Maximum 128 characters |
| `template_code` | No | Which workflow to run. Without it, your default one is used |
| `language` | No | ISO 639-1, for the screens the person sees |
| `callback_url` | No | Where the person returns when they finish. `https`, or `http` on `localhost` |

The call requires the `KYC_WRITE` scope.

**Always send `customer_ref`.** Without it we generate one, and then the verification cannot be
linked to your own record. It is also what makes retrying cheap: while there is a verification
in progress for that reference, a second call returns **the same one**, does not charge again, and gives
you a `url` to pick up where the person left off.

## Response

```json theme={null}
{
  "data": {
    "id": 4821,
    "customer_ref": "CUS-48213",
    "session_token": "…",
    "url": "https://…",
    "status": "PENDING"
  },
  "timestamp": "2026-09-13T14:02:11",
  "status": "CREATED"
}
```

With this response you do exactly two things:

1. **Store `id`** in your record.
2. **Send the person to `url`**, or hand it to your page so it opens it.

**`session_token` is a credential.** Do not write it to logs, do not store it, and do not put it in
a URL the person can share. If your framework serializes entire responses to the logs,
exclude this one.

## While the person is being verified

You do not need to ask anything: the decision reaches your backend by
[webhook](https://docs.fraudeg.com/en/webhooks/identidad.md). If you want to check the status anyway —for an internal
screen, or to reconcile— use:

```bash theme={null}
curl https://sandbox-api.fraudeg.com/api/v1/verifications/4821 \
  -H "X-Api-Key: your_api_key"
```

That read requires the `KYC_READ` scope. A key with only that scope cannot create anything, which is
what you want to give a process that only reconciles.

## Testing from your machine

The two URLs you give us are reached by different things, and only one needs a tunnel.

| | Who makes the request | On localhost |
| - | - | - |
| `callback_url` | **The person's** browser | Works. `http://localhost:3000/kyc/return` is accepted in all environments |
| Your webhook endpoint | **Our servers** | They cannot reach you. Use a tunnel and register the `https` URL it gives you |

## Next step

[Identity decisions](https://docs.fraudeg.com/en/identidad/decisiones.md): what each status means and what to do with it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.