DEVELOPERS / API V1
Your software’s addresses.
Ready for your Tesla.
Connect your CRM, delivery software, scheduling tools, or server through the route import API. Your user reviews the imported stops in SelfRoute, then sends each destination to Tesla when ready.
01. Connect
- Use SelfRoute build 11 or later and sign in with Apple.
- Open Settings → Software & AI connections (CRM & API in earlier builds) → Manage API connections.
- Name your integration and create a key. Copy it immediately: the full key appears only once.
- Store the key in your server or automation platform’s secret storage. Send it as a Bearer token.
Use the HTTP module in Make, n8n, or Zapier webhooks, or call from your own server. There is no native marketplace connector or OAuth integration in v1.
Imported routes appear under Saved routes. Open that tab, or return to it after the app was in the background, to fetch imports. Your selected route and unsaved edits are preserved.
02. Import one or several routes
https://pbvnwuxncpubjgxojcnu.supabase.co/functions/v1/route-import/v1/routesThe Supabase HTTPS URL above is the current API address. api.selfroute.app is not configured.
curl --request POST \
'https://pbvnwuxncpubjgxojcnu.supabase.co/functions/v1/route-import/v1/routes' \
--header "Authorization: Bearer $SELFROUTE_API_KEY" \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: crm-monday-2026-10-19-v1' \
--data '{
"routes": [{
"name": "Monday visits",
"stops": [
{"address": "Your first full street address, city, state, ZIP"},
{"address": "Your second full street address, city, state, ZIP"}
]
}]
}'Successful response · HTTP 201
{
"routeIds": ["route-uuid"],
"replayed": false
}SelfRoute generates route and stop IDs. Stop order and duplicate addresses are preserved. Every stop starts pending. Address text is trimmed and imported as supplied; import does not geocode an address or verify that it exists.
Safe retries with idempotency
Choose a unique Idempotency-Key for each intended import. It must contain 8–128 characters: letters, numbers, hyphens, underscores, periods, or colons. On network retries, keep both the key and body unchanged.
Concurrent retries create one batch. A replay returns HTTP 200, the original IDs, and replayed: true. Reusing the key with different content returns HTTP 409. A replay returns the original IDs even if the route was later edited in the app. Batch writes are atomic.
03. Read an imported route
https://pbvnwuxncpubjgxojcnu.supabase.co/functions/v1/route-import/v1/routes/{routeId}Use the same Bearer key that imported the route. A key can read only its own imported routes. Manually created routes, other users’ routes, and routes imported with a different key return 404.
curl \
'https://pbvnwuxncpubjgxojcnu.supabase.co/functions/v1/route-import/v1/routes/ROUTE_UUID' \
--header "Authorization: Bearer $SELFROUTE_API_KEY"Response contains route: {id, name, version, stops}. Stop fields include id, address, locationId, and status.
| Status | Meaning |
|---|---|
pending | Destination has not been marked accepted or completed. |
accepted | Tesla accepted the command. This is not proof of arrival or installation on the vehicle screen. |
unknown | Delivery uncertain. User should check the vehicle. |
completed | User explicitly marked arrival. Not automatic arrival tracking. |
Poll responsibly within the account request quota. V1 does not offer outgoing webhooks or CRM route editing/deletion.
04. Limits & quotas
| Resource | Limit |
|---|---|
| Routes per request | 1–10 |
| Stops per route | 1–500 |
| Total stops per request | 500 across all routes |
| Route name | 1–80 characters |
| Address | 3–500 characters |
| Request body | 1.2 MB |
| API requests | 60 per minute, account-wide |
| Imported routes | 100 per UTC day, account-wide |
| Active API keys | 5 per account |
| Key lifetime | 90 days |
Retries count toward request quotas but do not count again as imported routes. Unknown fields are rejected, including caller-supplied user IDs, vehicle IDs, and progress/status fields.
05. Errors & retry handling
| HTTP | Meaning / action |
|---|---|
| 400 | Invalid body, fields, counts, or Idempotency-Key. Correct the request. |
| 401 | Missing, invalid, expired, or revoked key. Check the credential. |
| 404 | Unknown endpoint or route outside this exact key’s scope. |
| 405 | Unsupported HTTP method. |
| 409 | Idempotency-Key reused with different content. Preserve original payload on retries. |
| 413 | Request exceeds 1.2 MB. Reduce request size. |
| 429 | Request or import quota reached. See timing below. |
| 503 | Temporary service failure. Retry with backoff, same body, and same Idempotency-Key. |
HTTP 429 includes Retry-After: 60. If the error indicates the daily import quota, wait until the next UTC day. Do not retry every minute against an exhausted daily quota.
06. Keep keys private
- Call from trusted servers or automation tools. Never put API keys in browser JavaScript, source control, URLs, or logs.
- Create a replacement before the 90-day expiry. Update your integration, then revoke the previous key in SelfRoute.
- A replacement key cannot read routes imported by an older key. Plan progress polling around key rotation.
- Revocation blocks subsequent API access but keeps saved routes in the app. Account deletion removes keys and import records.
- SelfRoute stores API secrets as SHA-256 hashes. Public database clients cannot access key tables or internal integration functions.
- CRM keys are not accepted by Tesla, Watch, account, or billing endpoints. Responses containing data are not cacheable.
See our Privacy Policy and Terms of Use for data handling and permitted use.
Import routes from AI clients with MCP
The SelfRoute MCP developer package wraps this API with route-import and scoped progress tools. Local stdio clients can run the package; hosted ChatGPT and remote Claude connections remain pending.
MCP tools and setup ↗