> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.confirm.global/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.confirm.global/_mcp/server.

# Provision a registry workspace

POST https://api.confirm.global/partner/v1/organizations
Content-Type: application/json

Provisions a complete CONFIRM workspace for one of your registries: the
organization, its cloned AI screening agent, and registry-branded
candidate messaging. Call it when a business is created on your side, or
when they enable recruiting.

Returns the **workspace identifier** — the one-per-business value you
store and use to recognise and build CONFIRM links.

Idempotent on `external_ref`: calling it again returns the existing
workspace with `created: false` and the same body, so your job never has
to branch on whether it has run before.

A dedicated phone number with caller-ID registration is provisioned
separately by CONFIRM, since it requires carrier registration that
cannot complete synchronously.

**A new workspace has no calendar, so its screening calls are held.**
The response carries `calendar.connected`. While it is `false`,
`warnings` says so and screening calls in the workspace wait. Send a
calendar-connect link with
[`POST /organizations/{ref}/calendar-invite`](/partner-api/organizations/create-calendar-invite);
held calls go out once a calendar is connected. See the
[calendar guide](/partner-guides/calendar).

Reference: https://docs.confirm.global/partner-api/organizations/create-organization

## Authentication

- `Authorization` header (bearer token, required) — Partner API key sent as `Authorization: Bearer cfk_...`. Keys are partner-level — one key reaches every registry linked to your partner account and nothing else. CONFIRM issues and revokes them; a key is shown exactly once at creation because only its hash is stored, and revocation takes effect on the next request. Develop against the sandbox base URL with a sandbox key, where telephony is restricted to an allowlist you provide.

## Request

### Body (application/json)

This endpoint expects an object.

- `external_ref` (string, required) — Your registry/business identifier. The key this workspace is correlated on, forever.
- `name` (string, required) — Display name of the registry. Appears in the portal and in candidate-facing messaging.
- `primary_contact_email` (string, optional) — Registry's primary contact. Used for administrative correspondence, not candidate messaging.
- `details` (OrganizationsPostRequestBodyContentApplicationJsonSchemaDetails, optional) — Optional profile enrichment used in screening context and job copy.
- `auth` (OrganizationsPostRequestBodyContentApplicationJsonSchemaAuth, optional, nullable) — **Sandbox only.** Which CareLink auth server this workspace's users sign in against. Omit it to use the default (your staging auth server in sandbox). `auth: null` and `auth: {}` both mean the default sign-in server, the same as sending `base_url: null`. In production it is ignored with a warning, since production workspaces always use the production auth server.

## Response

### 201

Workspace provisioned. Posting an `external_ref` that already exists returns **200** with the same workspace and `created: false`, so replays never create a second workspace.

- `organization_id` (string, required) — CONFIRM's identifier for the registry.
- `external_ref` (string, required) — Your registry/business identifier, echoed back.
- `name` (string, required)
- `workspace` (string, required) — The workspace identifier — store this per business. It is the `{workspace}` segment of every CONFIRM deep link.
- `workspace_url` (string, required) — Base URL of the registry's workspace.
- `created` (boolean, optional) — False when the registry was already provisioned and this call was a no-op.
- `status` (string, optional)
- `auth` (PartnerOrganizationAuth, optional) — Present when the workspace has its own auth server (sandbox), on both `POST` and `GET`. A `POST` that sent `auth` always echoes it, with `base_url: null` when the workspace is on the default server.
- `calendar` (PartnerOrganizationCalendar, optional) — Whether the workspace has a connected calendar, on both `POST` and `GET`. Screening calls in the workspace are held while `connected` is `false`; connect one with [`POST /organizations/{ref}/calendar-invite`](/partner-api/organizations/create-calendar-invite). Left out on the rare response where the check itself could not be made, rather than guessing.
- `warnings` (list of string, optional) — Non-fatal notes about the provisioning run, when any apply (`POST` only). Includes a note that screening calls are held while the workspace has no connected calendar.

## Errors

### 400 Bad Request Error

Invalid request (`error.type: invalid_request_error`, `code: invalid_request`) — missing or malformed fields. `details` lists each offending field.

- `error` (ErrorError, required)

### 401 Unauthorized Error

Missing, malformed, or revoked API key (`error.type: authentication_error`).

- `error` (ErrorError, required)

### 429 Too Many Requests Error

Rate limit exceeded (`error.type: rate_limit_error`). Design target: 600 requests/min per key, burst 100/10s. Honor the `Retry-After` header.

- `error` (ErrorError, required)

## Types

### OrganizationsPostRequestBodyContentApplicationJsonSchemaDetails

Optional profile enrichment used in screening context and job copy.

- `timezone` (string, optional) — IANA timezone used for call windows and scheduling.
- `website` (string, optional)
- `industry` (string, optional)
- `description` (string, optional)

### OrganizationsPostRequestBodyContentApplicationJsonSchemaAuth

**Sandbox only.** Which CareLink auth server this workspace's users sign in against. Omit it to use the default (your staging auth server in sandbox). `auth: null` and `auth: {}` both mean the default sign-in server, the same as sending `base_url: null`. In production it is ignored with a warning, since production workspaces always use the production auth server.

- `base_url` (string, optional, nullable) — Origin of the auth server: HTTPS, no path or query. Must be one of your developer auth tunnels (`<name>-web-auth.carelinkhc-dev.com`) or your staging auth server (`https://auth-stage.carelinkhc.com`, the default); anything else returns `400` with `details[].field = auth.base_url`. Posting the same `external_ref` again with a different value re-points the workspace, so a developer can move to a new tunnel without tearing it down. Send `null` (or your staging auth server) to put the workspace back on the default. Leaving `auth` out keeps whatever is set, so replays are safe. Users are identified by this server plus their `sub`, so the same user ID on two developers' servers is two different people.

### PartnerOrganizationAuth

Present when the workspace has its own auth server (sandbox), on both `POST` and `GET`. A `POST` that sent `auth` always echoes it, with `base_url: null` when the workspace is on the default server.

- `base_url` (string, optional, nullable) — The stored auth server origin, or null for the default.

### PartnerOrganizationCalendar

Whether the workspace has a connected calendar, on both `POST` and `GET`. Screening calls in the workspace are held while `connected` is `false`; connect one with [`POST /organizations/{ref}/calendar-invite`](/partner-api/organizations/create-calendar-invite). Left out on the rare response where the check itself could not be made, rather than guessing.

- `connected` (boolean, required) — `true` when the workspace has a calendar with working credentials, so screening calls are not held.

### ErrorError

- `type` (enum, required) — Broad error category.
  - Allowed values: `authentication_error`, `invalid_request_error`, `not_found_error`, `conflict_error`, `rate_limit_error`, `api_error`
- `code` (string, required) — Machine-readable error code, e.g. `invalid_request`, `unknown_location_ref` or `wrong_environment`. Branch on this; the strings are contract.
- `message` (string, required) — Human-readable explanation.
- `request_id` (string, required) — Identifier for this request — the same value as the response's `X-Request-Id` header. Include it when contacting CONFIRM support.
- `details` (list of ErrorErrorDetailsItems, optional) — Present on `invalid_request` (400): one entry per field that failed validation.
- `location_ref` (string, optional) — Present on `unknown_location_ref` (404) — the reference that wasn't found.
- `organization_ref` (string, optional) — Present on `unknown_organization_ref` (404) — the reference that wasn't found — and on `email_has_account` (409) — the registry the invitation was for.
- `external_ref` (string, optional) — Present on workspace-teardown refusals (403) — the workspace you asked to delete — and on applicant errors (`unknown_candidate_ref`, `no_application_at_location`, `outcome_conflict`) — the applicant ref.
- `organization_refs` (list of string, optional) — Present on `ambiguous_location_ref` (409) — the registries the ref exists in.
- `locations` (list of ErrorErrorLocationsItems, optional) — Present on `location_refs_span_organizations` (400) — each ref you sent with the registry it belongs to.

### ErrorErrorDetailsItems

- `field` (string, required) — Dotted path to the offending field, e.g. `address.postal_code`.
- `message` (string, required) — Why that field was rejected.

### ErrorErrorLocationsItems

- `location_ref` (string, optional)
- `organization_ref` (string, optional, nullable)

## Examples

### created

**Response**

```json
{
  "organization_id": "9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "external_ref": "cl_biz_4471",
  "name": "Suncoast Nurse Registry",
  "workspace": "suncoast-nurse-registry",
  "workspace_url": "https://app.confirm.global/c/suncoast-nurse-registry",
  "created": true,
  "calendar": {
    "connected": false
  },
  "warnings": [
    "No calendar connected — screening calls are held until someone in this workspace connects a calendar. Use POST /organizations/{ref}/calendar-invite."
  ]
}
```

**SDK Code**

```python created
import requests

url = "https://api.confirm.global/partner/v1/organizations"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript created
const url = 'https://api.confirm.global/partner/v1/organizations';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go created
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.confirm.global/partner/v1/organizations"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby created
require 'uri'
require 'net/http'

url = URI("https://api.confirm.global/partner/v1/organizations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java created
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.confirm.global/partner/v1/organizations")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php created
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.confirm.global/partner/v1/organizations', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp created
using RestSharp;

var client = new RestClient("https://api.confirm.global/partner/v1/organizations");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift created
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/organizations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Provision a registry

**Request**

```json
{
  "external_ref": "cl_biz_4471",
  "name": "Suncoast Nurse Registry",
  "primary_contact_email": "admin@suncoastnurses.com",
  "details": {
    "timezone": "America/New_York",
    "website": "https://suncoastnurses.com"
  }
}
```

**Response**

```json
{
  "organization_id": "9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "external_ref": "cl_biz_4471",
  "name": "Suncoast Nurse Registry",
  "workspace": "suncoast-nurse-registry",
  "workspace_url": "https://app.confirm.global/c/suncoast-nurse-registry",
  "created": true,
  "calendar": {
    "connected": false
  },
  "warnings": [
    "No calendar connected — screening calls are held until someone in this workspace connects a calendar. Use POST /organizations/{ref}/calendar-invite."
  ]
}
```

**SDK Code**

```python Provision a registry
import requests

url = "https://api.confirm.global/partner/v1/organizations"

payload = {
    "external_ref": "cl_biz_4471",
    "name": "Suncoast Nurse Registry",
    "primary_contact_email": "admin@suncoastnurses.com",
    "details": {
        "timezone": "America/New_York",
        "website": "https://suncoastnurses.com"
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Provision a registry
const url = 'https://api.confirm.global/partner/v1/organizations';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"external_ref":"cl_biz_4471","name":"Suncoast Nurse Registry","primary_contact_email":"admin@suncoastnurses.com","details":{"timezone":"America/New_York","website":"https://suncoastnurses.com"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Provision a registry
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.confirm.global/partner/v1/organizations"

	payload := strings.NewReader("{\n  \"external_ref\": \"cl_biz_4471\",\n  \"name\": \"Suncoast Nurse Registry\",\n  \"primary_contact_email\": \"admin@suncoastnurses.com\",\n  \"details\": {\n    \"timezone\": \"America/New_York\",\n    \"website\": \"https://suncoastnurses.com\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Provision a registry
require 'uri'
require 'net/http'

url = URI("https://api.confirm.global/partner/v1/organizations")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"external_ref\": \"cl_biz_4471\",\n  \"name\": \"Suncoast Nurse Registry\",\n  \"primary_contact_email\": \"admin@suncoastnurses.com\",\n  \"details\": {\n    \"timezone\": \"America/New_York\",\n    \"website\": \"https://suncoastnurses.com\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Provision a registry
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.confirm.global/partner/v1/organizations")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"external_ref\": \"cl_biz_4471\",\n  \"name\": \"Suncoast Nurse Registry\",\n  \"primary_contact_email\": \"admin@suncoastnurses.com\",\n  \"details\": {\n    \"timezone\": \"America/New_York\",\n    \"website\": \"https://suncoastnurses.com\"\n  }\n}")
  .asString();
```

```php Provision a registry
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.confirm.global/partner/v1/organizations', [
  'body' => '{
  "external_ref": "cl_biz_4471",
  "name": "Suncoast Nurse Registry",
  "primary_contact_email": "admin@suncoastnurses.com",
  "details": {
    "timezone": "America/New_York",
    "website": "https://suncoastnurses.com"
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Provision a registry
using RestSharp;

var client = new RestClient("https://api.confirm.global/partner/v1/organizations");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"external_ref\": \"cl_biz_4471\",\n  \"name\": \"Suncoast Nurse Registry\",\n  \"primary_contact_email\": \"admin@suncoastnurses.com\",\n  \"details\": {\n    \"timezone\": \"America/New_York\",\n    \"website\": \"https://suncoastnurses.com\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Provision a registry
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "external_ref": "cl_biz_4471",
  "name": "Suncoast Nurse Registry",
  "primary_contact_email": "admin@suncoastnurses.com",
  "details": [
    "timezone": "America/New_York",
    "website": "https://suncoastnurses.com"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/organizations")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```