---
title: "Create Async Task for several phone numbers"
method: POST
path: "/async/{req_type}"
tags: ["Requests"]
---

# Create Async Task for several phone numbers

`POST /async/{req_type}`

## Request

- Base URL: `https://api.commpeak.com/lookup`
- URL: `https://api.commpeak.com/lookup/async/{req_type}`
- Auth: API key in header `Authorization`

Submit a batch of phone numbers for an asynchronous HLR or Validate lookup. Each number in `keys` can carry a `uid` that is echoed back with its result. The response returns the `task_id` plus the estimated cost and valid / invalid / duplicate counts; poll `/result/{job_id}` or `/metadata/{job_id}` with it, or set `respond_url` to receive a webhook when the task completes.

## Path parameters

- `req_type` 'validate' | 'hlr', required

## Request body

- AsyncRequest: Payload to submit a batch of numbers for async lookup.
  - `keys` AsyncRequestItem[], required
    - `key` string, required: Number to look up (E.164 without leading "+").
    - `uid` string, nullable: Caller-supplied identifier returned with the result for this number.
  - `respond_url` string, nullable: Endpoint that will receive the result callback when the task completes.
  - `respond_method` 'post' | 'post_json'
  - `respond_format` 'metadata' | 'metadata_with_results'

## Response `200`

Successful Response

- AsyncRequestResponse: Result of submitting an async lookup task. The `task_id` can later be passed to `/lookup/result/{job_id}` and `/lookup/metadata/{job_id}`.
  - `cost` number: Estimated total cost of the task in customer credits.
  - `task_id` string, required: Identifier of the created task; use it on the result/metadata/download endpoints.
  - `valid` integer, nullable: Count of valid numbers detected at submission time.
  - `invalid` integer, nullable: Count of invalid numbers detected at submission time.
  - `duplicates` integer, nullable: Numbers that appeared more than once in the request (charged once).

## Other responses

- `400`: Bad Request
- `402`: Payment Required
- `422`: Unprocessable Content

---

[API](https://skmtc.dev/commpeak/apis/commpeak-lookup-api.md) - [All operations](https://skmtc.dev/commpeak/apis/commpeak-lookup-api/llms.txt) - [OpenAPI document](https://skmtc.dev/commpeak/apis/commpeak-lookup-api/revisions/34bfa2798a03?raw)
