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

# Requests & Targets

> Configure targets, business discovery, idempotency, personalisation, and cancellation.

## Providing Targets

`POST /api/v1/requests` accepts up to **50 explicit targets** in `targets`, combined with optional automatic discovery (`target_options.auto_discover_relevant_businesses`, default `true`).

Each target object uses one of three shapes:

| Target Shape | Fields | Behavior |
| - | - | - |
| **Direct phone** | `phone_number` (E.164), optional `name`, optional `is_business` (default `true`) | Calls the exact phone number. Set `is_business: false` for a personal contact to skip business enrichment. |
| **Named business** | `business`, optional `address` | Resolves the business and phone number via Maps before calling. |
| **Maps link** | `business_gmaps_link` | Resolves a specific Google Maps URL (`maps.app.goo.gl`, `maps.google.*`, `google.com/maps`, `g.page`). |

> [!NOTE]
>
> If you set `target_options.auto_discover_relevant_businesses` to `false`, you must supply at least one item in `targets` (otherwise the API returns `422`).

### Geographic Anchoring

Use `target_options.search_location` (`address` and/or `coordinates: { lat, lng }`) and `target_options.radius` (`100`–`500000` meters) to bound nearby business discovery and disambiguate named businesses.

## User Details & End-User Identity

`user_details` requires the real end user's `full_name` and E.164 `phone_number`. Aurora uses this identity when placing reservations or leaving callback details with businesses. Repeat requests for the same `(project_id, phone_number)` automatically reuse the same project-scoped `end_user_id`.

## Personalisation Options

```json theme={null}
{
  "personalisation_options": {
    "caller_id": "+15125550199",
    "voice_preference": { "gender": "female" }
  }
}
```

* `voice_preference.gender`: `"auto"` (default), `"male"`, or `"female"`.
* `caller_id` *(REST API only)*: Must be an `available` phone number linked to the same project (see [Linked Phone Numbers](https://docs.staging.sdk.aurorax.co/guides/linked-phone-numbers.md)). If a campaign exceeds the custom caller-ID target limit, Aurora falls back to managed caller IDs and records the reason in `personalisation_applied`.

## Idempotency

Pass an `Idempotency-Key` header (or `idempotency_key` in the request body, up to 128 characters) on `POST /api/v1/requests`.

* Keys are scoped to `(project_id, idempotency_key)`.
* Re-sending the same key safely returns the existing request (`202 Accepted`) instead of launching duplicate calls.
* Different projects may independently use the same key.

## Cancelling an Active Request

Stop an active request (`processing`, `needs_input`, or `in_progress`) at any time:

```bash theme={null}
curl -X POST https://live.sdk.aurorax.co/api/v1/requests/req_7c1d9e0f2a4b4c6d8e0f1a2b/cancel \
  -H "Authorization: Bearer $AURORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "User booked directly" }'
```

* **Pending & scheduled calls** are halted immediately and a `request.cancelled` webhook is emitted.
* **Idempotent:** Calling cancel on an already `cancelled` request returns `200 OK` with the existing cancellation timestamp without emitting duplicate events.
* **Terminal guard:** Attempting to cancel an already `completed` or `failed` request returns `409 Conflict` (`request_already_terminal`).
* **Real-world note:** Cancelling stops further outreach but does not undo an already-confirmed reservation or order placed with a business.


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