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

# Async Results

> How to handle asynchronous operations ?

Some of our endpoints are asynchronous: they answer immediately while the work continues in the background. This is common for operations that take longer to complete, such as contact enrichment or search extraction.

## How it works

Asynchronous enrichment answers immediately with a `Location` header, also returned as `status_url` in the body: the URL that holds the result.

```http theme={null}
HTTP/1.1 200 OK
Location: https://app.pipecorn.com/api/v2/contacts/550e8400-e29b-41d4-a716-446655440000
```

```json theme={null}
{
  "enrichment_id": "550e8400-e29b-41d4-a716-446655440000",
  "first_name": "Mathieu",
  "last_name": "Brun-Picard",
  "status": "pending",
  "status_url": "https://app.pipecorn.com/api/v2/contacts/550e8400-e29b-41d4-a716-446655440000"
}
```

There are two ways to get the result:

### Polling Method

1. Make a request to an async endpoint
2. Read the status URL from the `Location` header
3. Poll it until `status` is `finished`, backing off between calls (start at 2 seconds, cap at 30)
4. Read the result from the same response

Status lookups are exempt from the plan rate limit, so polling never uses up your quota.

### Webhook Method

1. Make a request to an async endpoint with a `webhook_url`
2. Keep the `enrichment_id` from the response
3. Continue your application flow
4. Receive results automatically via webhook when the job completes

In order to avoid unnecessary load on our servers, we suggest using the webhook method.

## Endpoints

| Endpoint | Status URL |
| - | - |
| [`POST /contacts/single_enrich`](/api-reference/endpoints/enrichments/single) | `Location` header and `status_url`: `GET /contacts/{id}` |
| [`POST /leads`](/api-reference/endpoints/extract/leads) | `GET /searches/{id}` |
| [`POST /accounts`](/api-reference/endpoints/extract/accounts) | `GET /lists/{id}` |


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