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

# Safari Portal

> Connect Safari Portal trips, invoices, payments, contacts and tasks to your agents

## Connect Safari Portal

Safari Portal's Connect API signs in with OAuth through an application your own Safari Portal account registers. That application can only authorize your account. An Aster organization admin connects it once in **Control Hub > Integrations > Safari Portal**, and the connection is shared across the organization.

The Connect API is in beta. If **OAuth Applications** is missing from your Safari Portal settings, ask Safari Portal support to enable API access for your account.

1. In Safari Portal, open **Settings > Integrations > OAuth Applications > Create**.
2. Name it "Aster" and set the redirect URI to exactly `https://www.asteragents.com/api/integrations/safari-portal/callback`.
3. Tick the read scopes: `financials:read`, `files:read`, `contacts:read`, `tasks:read`, `users:read`, `forms:read` and `contents:read`. If agents should make changes, also tick `files:write`, `contacts:write` and `tasks:write`.
4. Create it, then copy the **client ID** and **client secret**. Safari Portal shows the secret only once.
5. In Aster, paste both into the Safari Portal form and save. Aster checks them, then sends you to Safari Portal to sign in and approve.
6. Sign in as the Safari Portal member whose access the agents should have, pick the account, and approve. Safari Portal leaves write permissions unticked; tick them if agents should make changes.
7. Enable the Safari Portal tools on your agent.

Agents see exactly what that member sees. Invoices and expenses need a member with financial access. A shared admin login keeps the connection working if a person leaves or changes role.

## Available tools

| Tool | Use |
| - | - |
| `safari_portal_get_schema` | Lists every resource (files, invoices, expenses, contacts, tasks, notes, itineraries, lookbooks, forms, users, lookups, webhook events). With a resource, shows its filters, returned fields, and the fields create and update accept. |
| `safari_portal_query` | Reads any resource. With `id`, returns one record, such as an invoice or expense with its payments. Without `id`, lists records with `filters`. |
| `safari_portal_manage_records` | Creates or updates files (trips) and contacts, adds notes to a file, creates tasks, and creates itineraries. Needs the write permissions on the connection. |

Money is in minor units (cents), with an ISO currency code: `105000` with `USD` is \$1,050.00. IDs are strings.

List calls take `limit` as the total rows wanted (pages of 100, up to 2,000 per call). When `has_more` is true, call again with `next_page` as `page`. Large results are attached to the conversation as JSON. A create that times out is safe to read back: Aster sends each create with an idempotency key, so a retried request never makes a duplicate. Aster's tools don't delete records.

## Example prompts

* "Which invoices have a payment overdue, and how much is outstanding on each?"
* "List every payment received on invoices yesterday."
* "Show the Smith Safari 2027 file with its invoices and tasks."
* "Which confirmed trips start in December, and who is the consultant on each?"
* "Add a task to the Smith file to chase the final payment by Friday."

## Troubleshooting

* **Reconnect needed:** Safari Portal access tokens last an hour and refresh tokens 90 days. Aster refreshes them automatically. If the app is deleted, its secret is regenerated, or the member loses access, reconnect from the Safari Portal card.

* **403:** The member who connected lacks permission (for example, financial access), or the app lacks a scope. Reconnect with a member who has it, or add the scope to the app and reconnect.

* **404 on a record:** It doesn't exist, or the connected member can't see it.

* **Writes refused:** the connection wasn't granted the write permission. Add it to the OAuth application in Safari Portal, then reconnect and tick it on the consent screen.

The client secret and tokens stay server-side and are redacted in connection responses. To remove the connection, disconnect Safari Portal in Integrations.


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