---
updatedAt: 2026-10-02T22:22:52.000Z
agentTools:
  projectIndex: https://docs.onfleet.com/llms.txt
---

# Quickstart Guide

This is a quick setup tutorial to go through the necessity of creating your first Onfleet task

## Quickstart Guide

Welcome to Onfleet’s API! This guide walks you through the basic topics you should consider when integrating with Onfleet.

## What programming language are you using for your integration?

If the answer is Python, PHP, Java (depreciated), JavaScript, Ruby (depreciated), or Go (depreciated), you are more than welcome to jumpstart your integration by using our pre-built official [API Wrappers](https://docs.onfleet.com/reference/api-wrappers): `pyonfleet`, `php-onfleet (deprecated)`, `node-onfleet`, `java-onfleet (deprecated)`, `ruby-onfleet (deprecated)` and `gonfleet (deprecated)`.

Other users have created their own scripts and features to make Onfleet work for them, and we love to see it! If you don’t see the language of your preference here, there may be an unofficial wrappers available through other users' repositories on [github](https://github.com/search?utf8=%E2%9C%93\&q=onfleet\&type=). However, we can only support issues with content in the official `onfleet` github.

## Do you have an Onfleet API key?

If the answer is no, please log on to the [Onfleet dashboard](https://onfleet.com/dashboard#/manage) with your organization admin email and [create an API key](https://support.onfleet.com/hc/en-us/articles/360045763292-API).

<Callout icon="📘" theme="info">
  ### Testing your API key

  Once you have an API key created, you can test it by [hitting our authorization endpoint](https://docs.onfleet.com/reference#testing-your-api-key).
</Callout>

## Using the API key?

To interact with the Onfleet API, you will need to issue an HTTP request and each request will need to be [authenticated using the Onfleet API key](https://docs.onfleet.com/reference/authentication). Our examples in the documentation are shown in cURL command form, where the commands are executed via a terminal. This is an example of an HTTP request in the form of a cURL command, which includes a `<METHOD>` and you will need to input your preferred `<api_endpoint>`, `<api_key>`, and `<body>` (optional):

```shell
curl -X <METHOD> "https://onfleet.com/api/v2/<api_endpoint>" -u "<your_api_key>:" -d "<body>"
```

If you are not familiar with cURL commands, we recommend using the following tools to send test API requests to Onfleet:

* [Postman](https://www.getpostman.com/)
* [Insomnia](https://insomnia.rest/)

## What is your delivery business model?

Everything at Onfleet starts with a [task](https://docs.onfleet.com/reference/tasks), a task is a single unit of work performed at a destination, and is either a pickup or a dropoff.

If you perform deliveries that originate at one pickup location, an order in your e-commerce system can be represented by a single dropoff task in Onfleet. This approach is common for scheduled delivery models like produce, grocery, etc.

If you perform unique pickups for each order, then you will need to create two linked tasks in Onfleet to represent the pickup and then the subsequent dropoff. This approach is common for scheduled and on-demand models like laundry and dry cleaning, restaurant, etc...

<Callout icon="🚧" theme="warn">
  ### Linked Pickup & Dropoff

  For businesses creating a pickup/dropoff combo, learn more in [linked tasks](https://support.onfleet.com/hc/en-us/articles/360023669772-Managing-Linked-Tasks) and [task dependencies](https://docs.onfleet.com/reference/dependencies).
</Callout>

## How do I create a task?

* A `Task` should always have one `Destination`, which can be created using an address or a set of GPS coordinates. Creating a `Destination` can be [done separately](https://docs.onfleet.com/reference/create-destination) or during task creation.

* The `Recipient` field can be used if someone needs to be informed that the task has started or completed. Recipients receive SMS text notifications and can track driver statuses when properly configured in the dashboard. The recipient field can be left empty. Like `Destination`, it can be [created separately](https://docs.onfleet.com/reference/create-recipient) or during task creation.

* A `Task` is created and managed by a registered `Administrator` (either on the dashboard or via the API), and can only be started and completed by a registered `Worker` (via the Onfleet mobile app).

You can decide whether to use more advanced features duringtask creation, including:

* Task assignment: [automatically](https://docs.onfleet.com/reference/automatic-assignment) or [manually](https://docs.onfleet.com/reference/manual-assignment)
* Creating [proof-of-delivery/completion requirements](https://docs.onfleet.com/reference/completion-requirements)

## Do you need any information sent back to your applications?

Information can be sent back to your application (ie: order management, e-commerce, customer-facing mobile apps) by utilizing Onfleet [Webhooks](https://docs.onfleet.com/reference/webhooks), where we offer more than 10 event triggers.

## Do you need custom information stored in Onfleet?

If you would like to interact with Onfleet’s API using external identifiers (ie: order numbers, driver’s licenses etc.), or display custom structured data to Onfleet dashboard and mobile app users, you can store custom information on many of Onfleet’s objects using the `metadata` fields. Learn more about creating and storing custom data using [Metadata](https://docs.onfleet.com/reference/metadata).

## How will you validate address information prior to creating tasks in Onfleet?

It is critical that your team has accurate address information to successfully perform pickups and deliveries. Onfleet requires a valid destination address or coordinate pair (longitude, latitude) in order to create a task.

<Callout icon="🚧" theme="warn">
  We highly recommend validating the address information prior to sending it to Onfleet and using a coordinate pair at task creation, ensuring tasks will _always_ be created.
</Callout>

When only an address is provided, Onfleet uses [Google Maps Javascript API](https://developers.google.com/maps/documentation/javascript/tutorial) to geocode the address information provided. In cases where your `task destination` creation fails geocoding, you can follow this [troubleshooting guide](https://support.onfleet.com/hc/en-us/articles/360023669732-Troubleshoot#h_0689a3e4-217b-4467-ba3c-5c21ac63b02f) to find a viable solution.

## How will you validate phone numbers prior to creating Recipients?

Onfleet utilizes Google's [phone validation library](https://github.com/google/libphonenumber) to validate all phone inputs, that includes admins, workers, and recipients. In cases where you've encountered a failed request regarding an invalid phone number, it is recommended to set up a failover to capture the failed request and respond properly.

Here's a community tool that utilizes the same phone validation library, simply put in a phone number that you wish to test and click submit. The results shown under `Validation Results` will tell you whether the number is valid or not:

<Embed title="" typeOfEmbed="iframe" url="https://libphonenumber.appspot.com/" href="https://libphonenumber.appspot.com/" />

## What proof-of-delivery options do you expect to use?

Onfleet offers the following as proof-of-delivery options:

* Signature
* Photo(s)
* Barcode scanning (`Scale` or above plans)
* ID verification (`Scale` or above plans)

All of these can be set on the `task` level depending on your subscribed Onfleet plan, learn more about them in [Completion Requirements](https://docs.onfleet.com/reference/completion-requirements).

<Callout icon="👍" theme="okay">
  ### Ready to roll?

  Check out our [blog post on how to get your first Onfleet task created](https://onfleet.com/blog/create-tasks-via-the-onfleet-api/) if you are still having doubts about using the Onfleet API!
</Callout>