Skip to content
Dashboard
Theme
Theme

Share a connection with another organization

POST /v1/connections/{conn}/shares: Share a connection with another organization.

View Markdown

POST /v1/connections/{conn}/shares

Lets another organization of the same environment sign in through this connection (an external connection). The owner organization must consent explicitly (owner_consent: true), and every routing domain must be a domain the target organization verified; sign-ins for those domains route to the target organization and are checked against its verified domains. Sharing is never possible across environments. Answers connection_share_invalid otherwise.

Scope
connections:write
Auth
Secret key (sk_…)
Since
1.0
  • conn string Required

  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • Idempotency-Key string

    Honoured for 24 h; a replay returns the original response.

    min length 1 · max length 255

  • organization string Required

  • routing_domains array of string Required

    Domains the target organization verified; sign-ins for them route to it.

    min items 1 · max items 20

  • owner_consent boolean Required

    Must be true; records that the owner organization consented to the share.

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/connections/conn_01J9Z3K5V7W8X9Y0Z1A2B3C4D5/shares" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"routing_domains": [
"acme.com"
],
"owner_consent": true
}'
Response 201
{
"id": "cshr_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"object": "connection_share",
"connection_id": "conn_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"owner_organization_id": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"organization_id": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"routing_domains": [
"acme.com"
],
"created_at": "2026-01-15T09:30:00Z",
"revoked_at": "2026-01-15T09:30:00Z"
}