---
title: "Create async distance matrix job"
method: POST
path: "/distance-jobs"
tags: ["distance-jobs"]
---

# Create async distance matrix job

`POST /distance-jobs`

## Request body

- object
  - `name` string, required
  - `origins` string, required
  - `destinations` string, required
  - `distance_mode` '"driving"' | '"haversine"' | '"straightline"', nullable
  - `units` '"miles"' | '"km"', nullable
  - `max_results` integer, nullable
  - `max_distance` number, nullable
  - `max_duration` integer, nullable
  - `min_distance` number, nullable
  - `min_duration` integer, nullable
  - `order_by` '"distance"' | '"duration"', nullable
  - `sort_order` '"asc"' | '"desc"', nullable
  - `fields` string, nullable
  - `callback_url` string, uri, nullable

## Response `200`

Successful response

- DistanceMatrixJobCreated
  - `id` integer
  - `identifier` string
  - `status` string
  - `name` string
  - `created_at` string
  - `origins_count` integer
  - `destinations_count` integer
  - `total_calculations` integer

## Other responses

- `201` — Resource created.
- `403` — Invalid API key, or feature not available.
- `422` — Validation error.

---

[API](https://skmtc.net/geocod/apis/geocodio.md) · [All operations](https://skmtc.net/geocod/apis/geocodio/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/geocod/geocodio/revisions/cfb0f76c8af3/schema)
