---
title: "Create"
method: POST
path: "/v1/enterprise_connections"
tags: ["Enterprise Connections"]
---

# Create

`POST /v1/enterprise_connections`

Create an enterprise connection.

Note: To set your organization's custom login url for enterprise
connections, you need to set the 'unique_id' attribute on the
organization itself. See the PATCH /v1/organizations endpoint.

## Request body

- EnterpriseConnectionCreatePayload — Note: To set your organization's custom login url for enterprise connections, you need to set the 'unique_id' attribute on the organization itself. See the PATCH /v1/organizations endpoint.
  - `organization_id` integer, required — Organization ID
  - `default_organization_id` integer — Default organization ID
  - `strategy` 'oidc', required
  - `display_name` string — The, UI visible, name of the connection. If blank will default to strategy.
  - `role_default` 'administrator' | 'read_only' | 'owner' | 'technical' | 'accountant' | 'policies_only' | 'super_administrator' — The default role. If blank, defaults to read_only.
  - `role_map` EnterpriseConnectionRoleMap[]
    - `role` string
    - `group` string
  - `options` EnterpriseConnectionOptions, required — The options are dependent upon the strategy for the enterprise connection itself. Check the descriptions for each attribute to determine if it is necessary.
    - `client_id` string — Used by: oidc
    - `client_secret` string — Used by: oidc
    - `discovery_url` string — Used by: oidc
  - `idp` 'openid' | 'okta' | 'azure' | 'google' — The type of the enterprise connection's IDP.
  - `authorized_domains` string[] — Domains that are authorized to connect.

## Response `200`

Enterprise connection

- object
  - `data` object
    - `attributes` EnterpriseConnection
      - `id` integer — ID
      - `organization_id` integer — Organization ID
      - `default_organization_id` integer — Default organization ID
      - `name` string — Name
      - `display_name` string — Display Name
      - `role_default` integer — Default role
      - `role_map` EnterpriseConnectionRoleMap[] — Role map
        - `role` string
        - `group` string
      - `sub_prefix` string
      - `conn_id` string
      - `idp` 'openid' | 'okta' | 'azure' | 'google' — The type of the enterprise connection's IDP.
      - `authorized_domains` string[] — Domains that are authorized to connect.

## Other responses

- `401` — Unauthorized
- `404` — Not Found
- `422` — Unable to create connection
- `429` — Too Many Requests

---

[API](https://skmtc.net/dnsfilter/apis/dnsfilter-api.md) · [All operations](https://skmtc.net/dnsfilter/apis/dnsfilter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dnsfilter/dnsfilter-api/revisions/29e5e6ee3316/schema)
