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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Uber

> Quote and dispatch Uber Direct couriers, track deliveries, collect proof of delivery, and react to signed delivery events.

Use Uber Direct to send a courier from your store to a customer: quote a delivery, request it, follow the courier, fetch proof of delivery, and start automations as the delivery moves.

Uber Direct is the only Uber API available without a partner agreement. Rides, Uber Eats Marketplace, and Uber for Business APIs require Uber's approval for each customer, so this integration does not include them.

## Connect Uber Direct

1. Sign up at [direct.uber.com](https://direct.uber.com/). New accounts start in test mode with sandbox credentials. Uber requires billing details and approval before it issues production credentials.
2. In the Uber Direct dashboard, open **Developer** and copy the client ID, client secret, and customer ID.
3. To use triggers, open **Developer** > **Webhooks**, create a webhook with the URL `https://automate.ax/api/v1/events/uber/` followed by your customer ID, and select the delivery status, courier update, and refund events your automations use. Copy the signing key for that webhook.
4. Connect Uber in Automate.ax with **Uber Direct**. Enter the client ID, client secret, customer ID, and, for triggers, the webhook signing key.

Test and production credentials are separate connections. Each webhook has its own signing key, so connect the key that belongs to the webhook you created for that mode.

Automate.ax exchanges your credentials for Uber's 30-day access token and refreshes it before it expires. Organization and business-location actions also need Uber's `direct.organizations` scope. Automate.ax requests it when you connect and grants those actions only if Uber allows it for your account.

## Send a courier

```ts automations/send-a-courier.automation.ts theme={null}
import { automation, onDashboardRun, sendEmail, t } from "automate.ax"
import { uber } from "automate.ax/uber"

export default automation("Send a courier", () => {
  const run = onDashboardRun({
    title: "Send a courier",
    fields: [
      { name: "recipientName", type: "text" },
      { name: "recipientPhone", type: "phone", placeholder: "+15555555555" },
      { name: "address", type: "text" },
    ],
  })

  const delivery = uber.createDelivery({
    pickup: {
      name: "Corner Florist",
      address: "175 Greenwich St, New York, NY 10007",
      phoneNumber: "+15555555555",
    },
    dropoff: {
      name: run.data.recipientName,
      address: run.data.address,
      phoneNumber: run.data.recipientPhone,
    },
    manifestItems: [{ name: "Bouquet", quantity: 1, size: "medium" }],
  })

  sendEmail({
    to: "*",
    subject: t`Courier requested for ${run.data.recipientName}`,
    text: t`Track the delivery at ${delivery.trackingUrl}`,
  })
})
```

Pass `roboCourier: { mode: "auto" }` with test credentials to have Uber's simulated courier move the delivery through every status in about three minutes and send real webhooks.

## Delivery lifecycle

Uber reports a delivery as `pending`, then `pickup` while a courier heads to the store, `pickup_complete`, `dropoff` while the courier heads to the customer, and finally `delivered`, `canceled`, or `returned`. `courierImminent` becomes `true` when the courier is about one minute away from the current stop.

Each status triggers [any delivery event](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-event.md) plus one milestone trigger:

| Status | Courier imminent | Trigger |
| - | - | - |
| `pending` | | [Delivery pending](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-pending.md) |
| `pickup` | no | [Courier en route to pickup](https://docs.automate.ax/reference/integrations/uber/triggers/on-courier-en-route-to-pickup.md) |
| `pickup` | yes | [Courier arriving at pickup](https://docs.automate.ax/reference/integrations/uber/triggers/on-courier-arriving-at-pickup.md) |
| `pickup_complete` | | [Delivery picked up](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-picked-up.md) |
| `dropoff` | no | [Courier en route to dropoff](https://docs.automate.ax/reference/integrations/uber/triggers/on-courier-en-route-to-dropoff.md) |
| `dropoff` | yes | [Courier arriving at dropoff](https://docs.automate.ax/reference/integrations/uber/triggers/on-courier-arriving-at-dropoff.md) |
| `delivered` | | [Delivery delivered](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-delivered.md) |
| `canceled` | | [Delivery canceled](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-canceled.md) |
| `returned` | | [Delivery returned](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-returned.md) |

Courier Pick & Pack deliveries can also report `shopping_completed`, which starts only [any delivery event](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-event.md).

When Uber cannot complete a delivery whose `undeliverableAction` is `return`, the original delivery becomes `returned` and Uber creates a separate return delivery whose ID starts with `ret_`. `relatedDeliveries` links the two.

Monetary amounts such as `fee`, `tip`, and `manifestTotalValue` are integers in the currency's smallest unit, so `$10.99` is `1099`.

## Exports

```ts theme={null}
import { getUberApi, uber, uberAccount } from "automate.ax/uber"
```

* `uber` contains the packaged Uber Direct actions and triggers.
* `uberAccount("name")` selects a named Uber Direct connection.
* `getUberApi` creates the authenticated REST helper for a custom account-backed action.

Uber limits sandbox credentials to 200 requests per 10 minutes. Automate.ax retries rate-limited requests and temporary courier shortages. It retries [Create delivery](https://docs.automate.ax/reference/integrations/uber/actions/create-delivery.md) after an uncertain failure only when you pass an `idempotencyKey`.

## Triggers

* [Any delivery event](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-event.md)
* [Delivery pending](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-pending.md)
* [Courier en route to pickup](https://docs.automate.ax/reference/integrations/uber/triggers/on-courier-en-route-to-pickup.md)
* [Courier arriving at pickup](https://docs.automate.ax/reference/integrations/uber/triggers/on-courier-arriving-at-pickup.md)
* [Delivery picked up](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-picked-up.md)
* [Courier en route to dropoff](https://docs.automate.ax/reference/integrations/uber/triggers/on-courier-en-route-to-dropoff.md)
* [Courier arriving at dropoff](https://docs.automate.ax/reference/integrations/uber/triggers/on-courier-arriving-at-dropoff.md)
* [Delivery delivered](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-delivered.md)
* [Delivery canceled](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-canceled.md)
* [Delivery returned](https://docs.automate.ax/reference/integrations/uber/triggers/on-delivery-returned.md)
* [Courier location updated](https://docs.automate.ax/reference/integrations/uber/triggers/on-courier-location-updated.md)
* [Refund requested](https://docs.automate.ax/reference/integrations/uber/triggers/on-refund-requested.md)

## Actions

* [Create delivery quote](https://docs.automate.ax/reference/integrations/uber/actions/create-delivery-quote.md)
* [Create delivery](https://docs.automate.ax/reference/integrations/uber/actions/create-delivery.md)
* [Get delivery](https://docs.automate.ax/reference/integrations/uber/actions/get-delivery.md)
* [List deliveries](https://docs.automate.ax/reference/integrations/uber/actions/list-deliveries.md)
* [Update delivery](https://docs.automate.ax/reference/integrations/uber/actions/update-delivery.md)
* [Cancel delivery](https://docs.automate.ax/reference/integrations/uber/actions/cancel-delivery.md)
* [Get proof of delivery](https://docs.automate.ax/reference/integrations/uber/actions/get-proof-of-delivery.md)
* [Find stores](https://docs.automate.ax/reference/integrations/uber/actions/find-stores.md)
* [Get organization](https://docs.automate.ax/reference/integrations/uber/actions/get-organization.md)
* [Create organization](https://docs.automate.ax/reference/integrations/uber/actions/create-organization.md)
* [Invite organization member](https://docs.automate.ax/reference/integrations/uber/actions/invite-organization-member.md)
* [List business locations](https://docs.automate.ax/reference/integrations/uber/actions/list-business-locations.md)
* [Get business location](https://docs.automate.ax/reference/integrations/uber/actions/get-business-location.md)
* [Update business location](https://docs.automate.ax/reference/integrations/uber/actions/update-business-location.md)

See the [Uber Direct API documentation](https://developer.uber.com/docs/deliveries/overview) for coverage areas, pricing, and provider behavior.


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