---
title: "Submit / activate this tenant's Odoo connection."
method: POST
path: "/api/v1/tenant/odoo-connection"
tags: ["tenant"]
---

# Submit / activate this tenant's Odoo connection.

`POST /api/v1/tenant/odoo-connection`

## Request

- Base URL: `https://api.prosp.cc`
- URL: `https://api.prosp.cc/api/v1/tenant/odoo-connection`
- Auth: OAuth 2 (client credentials, token URL `https://prosp-mcp-641053169627.auth.eu-central-1.amazoncognito.com/oauth2/token`, scopes: `mcp/execute`)

## Request body

- TenantOdooConnectionRequest: Your own Odoo destination and credentials for self-serve onboarding. `odoo_api_key` is write-only (accepted here, never returned). `odoo_url` must be a public http(s) host — private, loopback, link-local, and reserved addresses are rejected.
  - `odoo_url` string, required: Public https base URL of the tenant's Odoo instance.
  - `odoo_db` string, required: Your Odoo database name — one of the four API authentication parameters (alongside `odoo_url`, `odoo_uid`, `odoo_api_key`). An Odoo server can host multiple databases, so this identifies which one to sync leads into. Leads are written through Odoo's JSON-RPC API — no direct database access is used. If unsure, find it at `https://<your-odoo-host>/web/database/list`.
  - `odoo_uid` integer, required: The Odoo user id the API key belongs to.
  - `odoo_api_key` string, required: Odoo API key used to authenticate. Write-only — accepted here but never returned on any response.
  - `stage_id` integer: Optional Odoo CRM stage id to place new leads in. Validated to exist before the connection is saved.
  - `team_id` integer: Optional Odoo sales-team id to assign new leads to. Validated to exist before the connection is saved.
  - `user_id` integer: Optional Odoo user id to assign as the salesperson on new leads. Validated to exist before the connection is saved.
  - `enrichment_stage_id` integer: Optional Odoo CRM stage id for leads awaiting further contact enrichment. Validated to exist before the connection is saved.
  - `lead_type` 'lead' | 'opportunity': Whether new records are created as CRM leads or opportunities. Defaults to `opportunity` when omitted.

## Response `200`

Connection re-validated and updated (a connection already existed).

- TenantOdooConnection: Your registered Odoo connection, without any secrets. `validated_at` and `message` are present only on a successful submit response. The `odoo_api_key` and any other credential material are never included in this response.
  - `customer_id` string, required: Your tenant identifier (derived from the access token).
  - `odoo_url` string, required: The Odoo base URL leads are written to.
  - `odoo_db` string, required: Your Odoo database name — the API authentication parameter identifying which database on the Odoo server leads are synced into. Leads are written through Odoo's JSON-RPC API; no direct database access is used.
  - `odoo_uid` integer, required: The Odoo user id the stored API key belongs to.
  - `status` string, required: Connection status (e.g. `active`).
  - `stage_id` integer, nullable: The configured Odoo CRM stage id for new leads, or null if unset.
  - `team_id` integer, nullable: The configured Odoo sales-team id for new leads, or null if unset.
  - `user_id` integer, nullable: The configured Odoo salesperson user id for new leads, or null if unset.
  - `enrichment_stage_id` integer, nullable: The configured Odoo CRM stage id for leads awaiting enrichment, or null if unset.
  - `lead_type` 'lead' | 'opportunity': Whether records are created as leads or opportunities.
  - `validated_at` string, date-time: When the connection was last successfully validated (present only on a submit response).
  - `message` string: Human-readable outcome of the submit (present only on a submit response).

## Other responses

- `201`: Connection validated and activated (first registration).
- `400`: Malformed body or a `customer_id` that disagrees with the token identity.
- `401`: Missing/invalid/expired Bearer token.
- `403`: The token identity is reserved-unrouted and can never map to an Odoo.
- `409`: The destination is already registered, or an onboarding is in progress.
- `422`: Unprocessable — the live connection test failed, an FK id does not exist, `odoo_url` resolves to a non-public (internal) address (`error: unsafe_url`), or host validation timed out (`error: url_validation_timeout`, fail-closed).
- `429`: Rate limit exceeded (100 requests / 60s per customer).
- `503`: Tenant-registry unavailable — either not configured on this deployment (`error: registry_unavailable`) or the backend is temporarily unreachable (`error: registry_degraded`, `retryable: true`, with a `Retry-After` header — safe to retry with backoff).

---

[API](https://skmtc.dev/prosp/apis/prosp-discovery-api.md) · [All operations](https://skmtc.dev/prosp/apis/prosp-discovery-api/llms.txt) · [OpenAPI document](https://skmtc.dev/prosp/apis/prosp-discovery-api/revisions/1f2e0c55da22?raw)
