> 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.

# Ingest an applicant

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

Ingests an applicant from your platform and starts screening. The
applicant's registry is resolved from `location_ref`, so you do not pass
an organization — one call, one applicant, wherever they applied.

**Several locations at once.** Send `location_refs` (an array of 1–20
location refs) instead of `location_ref` to put one applicant at
several locations in one call. Send exactly one of the two. You get
one candidate with one application per location, and the response
lists them in `applications[]`. The applicant is screened **once**: one
heads-up SMS and one screening call cover every location named in the
request. All the locations must be in the same registry, or the
request fails with `400 location_refs_span_organizations` and nothing
is created. See the
[multiple locations guide](/partner-guides/multiple-locations).

**What happens next.** The applicant receives a heads-up SMS
immediately and an AI screening call a few minutes later. Results land
in the registry's CONFIRM portal, at the `portal_url` in the response.

**Store two things:** `candidate_id` and `portal_url`. The first is the
durable correlation key; the second is your "View Full Details" link.

**Idempotency.** Re-submitting the same applicant returns the existing
IDs with `deduped: true` and a `200`. A duplicate never conflicts and
never creates a second application on the same location. Matching is by your
`external_ref` first, then by phone number, then by email — so an
applicant who reaches a registry through both your intake form and a job
board resolves to one person, not two.

**Shared phones and emails stay separate people.** A phone or email match
only links to a candidate you have not already sent under a *different*
`external_ref` (in practice, someone who applied through a job board).
Two applicants you send with different refs are always two candidates,
even when they share a household phone or email, and neither one's
details are changed by the other.

**Consent governs contact.** `consent.contact` must be `true` for
CONFIRM to text or call. Send `false` (or omit it) and the applicant is
still created and visible in the portal, but no outreach happens and the
response returns `screening: "skipped_no_consent"`. This is the TCPA
boundary: we contact within minutes of ingest, so consent is not
something to assume.

**Consent (or a phone) sent later starts screening.** If you first send
an applicant without consent, or without a usable phone, and later
re-send them with it, that re-send starts screening: `200`,
`deduped: true`, `screening: "enqueued"`. This happens once, and only
while the applicant is still new: if a recruiter has already moved them
on in CONFIRM, the re-send changes nothing about their screening.

**Unknown locations fail loudly.** A `location_ref` we don't recognise
returns `404 unknown_location_ref` rather than dropping the applicant.
The same request succeeds on retry once the location exists.

**Closed locations take no new applicants.** A location closed with
`PATCH /locations/{ref}` returns `409 location_closed` for someone new.
An applicant you sent before it closed still returns `200` with
`deduped: true`. With `location_refs`, one closed location the
applicant is not already at fails the whole request with
`409 location_closed` before anything is created; reopen it or leave
it out, then retry.

**Distance at intake.** Send the applicant's `address` and CONFIRM
measures their commute to each location. A location they live too far
from (beyond its maximum commute distance) is ruled out straight away: that
application gets `screening: "skipped_ruled_out"`, its status becomes
`rejected`, and it is left out of the screening call. Other locations
are unaffected.

**A location sent after the call.** If the applicant's screening call
has not been placed yet, a new location joins it. If the call has
already happened, the new location gets a short follow-up call that
asks only the questions the applicant has not already answered, with
no second heads-up SMS. If nothing is left to ask, no call is placed
and the outcome at the new location is decided from the earlier
answers. If the first call is still in progress, the new location
waits for it. In each case the response reports `screening: "enqueued"`,
and the result arrives as `screening.completed` and
`candidate.status_changed` for that location. See
[follow-up calls](/partner-guides/multiple-locations#follow-up-calls-for-locations-added-later).

**Held for a calendar.** Screening calls are held while the registry's
workspace has no connected calendar. When `screening` is `enqueued` and
the workspace has none, `screening_hold` is `"calendar_not_connected"`;
the call goes out once a calendar is connected. See the
[calendar guide](/partner-guides/calendar).

**Same location ref in several registries.** If you use one location ref
in more than one registry, pass `organization_ref` to say which;
without it the request returns `409 ambiguous_location_ref`.

Reference: https://docs.confirm.global/partner-api/candidates/create-candidate

## 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 identifier for this applicant. Stored on the candidate and echoed on every response and webhook, and the primary key for idempotent re-submission.
- `location_ref` (string, optional) — The location the applicant applied to (the `external_ref` you created it with). Resolves both the registry and the role. Send this or `location_refs`, not both.
- `location_refs` (list of string, optional) — Several locations for the same applicant, in place of `location_ref`. 1–20 non-blank refs; a ref repeated in the list is used once, in the order first given. Every ref must be in the same registry, else `400 location_refs_span_organizations`. The response then has `applications[]` with one entry per location instead of a single `application_id`.
- `organization_ref` (string, optional) — The registry the location belongs to. Only required when the same location ref exists in more than one of your registries. With `location_refs`, it applies to every ref in the list.
- `address` (ApplicantAddress, optional) — The applicant's home address, used to measure their commute to each location at intake. Optional. It is stored only when it pins down a real place: it needs a `postal_code`, or a `city` with its `state`, and it must match a real location. Otherwise nothing is stored, distance screening stays off for this applicant, and the response says why in `warnings`: - "address was not stored: it needs a postal_code, or a city with its state, to measure commute distance. Distance screening is inactive for this applicant." - "address could not be matched to a real location and was not stored. Distance screening is inactive for this applicant." - When it only partly matched, the address is stored and the warning names the place distances are measured from. For an applicant CONFIRM already has an address for, the stored address is kept and the one you send is ignored.
- `first_name` (string, optional) — Optional. If sent, must not be blank.
- `last_name` (string, optional) — Optional. If sent, must not be blank.
- `email` (string, optional) — Required unless `phone` is supplied. Both is ideal.
- `phone` (string, optional) — Required unless `email` is supplied. E.164 preferred; other common formats are normalised. Screening calls need a phone — without one the response returns `screening: "skipped_no_phone"`. A phone that isn't a valid number is a `400` when there is no `email`. With a valid `email` the applicant is still accepted: the phone is dropped, the response carries a `warnings` entry saying so, and `screening` is `skipped_no_phone`.
- `consent` (CandidatesPostRequestBodyContentApplicationJsonSchemaConsent, optional) — What the applicant agreed to at intake.
- `webhook_url` (string, optional, nullable) — Where to POST this applicant's lifecycle events. Append your own tracking identifier to it and every delivery arrives already correlated to your record — you never need a CONFIRM ID to match an event. Must be HTTPS, on a public host that exists in DNS, with no credentials in the URL, and at most 2048 characters. A URL that breaks a rule is rejected with `400` and one of the codes in the [webhooks guide](/partner-guides/webhooks#rules-for-the-url), before the applicant is created. Omit it and this applicant emits no webhooks at all. Re-sending the applicant with a different `webhook_url` re-points them; omitting the field, or sending `null`, on a re-send leaves the stored URL unchanged.

## Response

### 201

Applicant created. If the person already exists (matched on your `external_ref`, then on phone or email — but only against a candidate not already sent under a different ref), you get **200** with the original IDs and `deduped: true`. No second application is created, and `screening` reports the existing application's state rather than a new call. With `location_refs` the body is a multi-location result: `201` when at least one application was created, `200` when every one already existed.

- `Candidates_createCandidate_Response_201`

## Errors

### 400 Bad Request Error

The request failed validation. `code` says why: | `code` | Meaning | |---|---| | `invalid_request` | A field is missing or malformed — including sending both `location_ref` and `location_refs`, or neither. `details` lists each one. | | `location_refs_span_organizations` | The refs in `location_refs` belong to more than one registry. The error lists each ref with its `organization_ref`. Send one request per registry. | | `invalid_webhook_url` | The webhook URL is empty, isn't an absolute URL, has no host, or contains credentials (`user:pass@`). | | `webhook_url_not_https` | The webhook URL doesn't use `https`. | | `webhook_url_forbidden_host` | The host is private or internal: `localhost`, a private or reserved IP address, an internal name such as `*.local` or `*.internal`, a cloud metadata endpoint, or a name that resolves to one of these. | | `webhook_url_too_long` | The webhook URL is over 2048 characters. | | `webhook_url_unresolvable` | The host doesn't exist in DNS (for example, anything under `.invalid`). | Nothing is created on any `400`. See [Rules for the URL](/partner-guides/webhooks#rules-for-the-url).

- `error` (ErrorError, required)

### 401 Unauthorized Error

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

- `error` (ErrorError, required)

### 404 Not Found Error

No location is registered with that `location_ref` — or, with `location_refs`, with one of the refs in the list (`unknown_location_ref`, naming that ref). Nothing is created.

- `error` (ErrorError, required)

### 409 Conflict Error

The location is closed (`location_closed`), or its ref exists in more than one of your registries and no `organization_ref` said which (`ambiguous_location_ref`).

- `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

### ApplicantAddress

The applicant's home address, used to measure their commute to each location at intake. Optional. It is stored only when it pins down a real place: it needs a `postal_code`, or a `city` with its `state`, and it must match a real location. Otherwise nothing is stored, distance screening stays off for this applicant, and the response says why in `warnings`: - "address was not stored: it needs a postal_code, or a city with its state, to measure commute distance. Distance screening is inactive for this applicant." - "address could not be matched to a real location and was not stored. Distance screening is inactive for this applicant." - When it only partly matched, the address is stored and the warning names the place distances are measured from. For an applicant CONFIRM already has an address for, the stored address is kept and the one you send is ignored.

- `street` (string, optional)
- `city` (string, optional)
- `state` (string, optional) — State or region.
- `postal_code` (string, optional)
- `country` (string, optional)

### CandidatesPostRequestBodyContentApplicationJsonSchemaConsent

What the applicant agreed to at intake.

- `contact` (boolean, optional, default: false) — True when the applicant consented to be contacted by SMS and phone. Governs whether CONFIRM makes contact at all.

### CandidateIngestResult

The result of ingesting an applicant.

- `candidate_id` (string, required) — CONFIRM's identifier for the applicant. Store it on your applicant record.
- `application_id` (string, required) — The application opened at this location.
- `external_ref` (string, required) — Your applicant identifier, echoed back.
- `deduped` (boolean, required) — True when this applicant already existed and the original IDs are being returned. No second application was created.
- `screening` (enum, required) — What happened to screening for this applicant. The checks run in this order, and the first one that stops the call is the value you get. - `enqueued` — consent given and a valid phone on file: the heads-up SMS is sent and the AI screening call is queued for a few minutes later. - `skipped_no_consent` — `consent.contact` was not `true`. Nothing is sent and no call is made; the applicant is still visible in the portal. - `skipped_no_phone` — consent given, but there is no valid phone number (none was sent, or the one sent was dropped as invalid), so no call can be placed. - `skipped_not_entitled` — consent and phone are fine, but no call could be queued, most often because the registry's account can't place calls right now. The applicant is kept in the portal, where a recruiter can follow up. - `skipped_ruled_out` — you sent the applicant's `address`, and they live too far from this location (beyond its maximum commute distance). The application is ruled out at intake: its status is `rejected`, no call is queued for this location, and a `candidate.status_changed` webhook says so. Their other locations are unaffected. On a deduped re-send (`deduped: true`) no new call is queued, and `screening` reports what happened to the existing application: `enqueued` means a call was queued for it at some point (it may already have taken place), and a `skipped_` value says why none was. The one exception: a re-send that supplies consent or a phone the first submission lacked starts screening then, and returns `enqueued`.
  - Allowed values: `enqueued`, `skipped_no_consent`, `skipped_no_phone`, `skipped_not_entitled`, `skipped_ruled_out`
- `portal_url` (string, required) — Complete deep link to the applicant in the registry's portal. Store it as an opaque string and render it as your "View Full Details" link.
- `screening_hold` (enum, optional, nullable) — Why a queued screening call is not going out yet, or `null`. * `calendar_not_connected` — `screening` is `enqueued`, but the registry's workspace has no connected calendar at the time of this request. Screening calls are held until it has one (an applicant who passes is sent a booking link on that calendar), then go out without you re-sending anything. Connect one with [`POST /organizations/{ref}/calendar-invite`](/partner-api/organizations/create-calendar-invite). * `null` — every other case, including any `skipped_` value.
  - Allowed values: `calendar_not_connected`
- `webhook_url` (string, optional, nullable) — The callback URL now stored against this application — echoed so you can confirm exactly what we will deliver to, including on a deduped re-post where the URL you just sent replaced the previous one. `null` when this applicant has no callback.
- `warnings` (list of string, optional) — Non-fatal notes about the request, present only when any apply — for example, a phone number that was dropped because it isn't a valid number.

### MultiLocationIngestResult

The result of ingesting an applicant with `location_refs`: one candidate, and one entry in `applications` per location, in the order you sent them.

- `candidate_id` (string, required) — CONFIRM's identifier for the applicant. The same for every location.
- `external_ref` (string, required) — Your applicant identifier, echoed back.
- `deduped` (boolean, required) — True only when **every** application already existed. Each entry in `applications` has its own `deduped`.
- `portal_url` (string, required) — Complete deep link to the applicant in the registry's portal.
- `applications` (list of LocationApplicationResult, required)
- `warnings` (list of string, optional) — Non-fatal notes about the request, present only when any apply.

### 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.

### LocationApplicationResult

The applicant's application at one location.

- `location_ref` (string, required) — The location, as you named it in `location_refs`.
- `application_id` (string, required) — The application at this location. Every webhook about this applicant at this location carries it.
- `deduped` (boolean, required) — True when the applicant already had an application at this location.
- `screening` (enum, required) — Same values and meaning as `screening` on a single-location ingest, for this location. With one screening call covering every location, each location that is in the call reports `enqueued`.
  - Allowed values: `enqueued`, `skipped_no_consent`, `skipped_no_phone`, `skipped_not_entitled`, `skipped_ruled_out`
- `screening_hold` (enum, optional, nullable) — Same values and meaning as `screening_hold` on a single-location ingest, for this location: `calendar_not_connected` when this location's `screening` is `enqueued` and the workspace has no connected calendar, otherwise `null`.
  - Allowed values: `calendar_not_connected`
- `webhook_url` (string, optional, nullable) — The callback URL now stored against this application, or `null`.

### 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

### Screening started

**Response**

```json
{
  "candidate_id": "9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "application_id": "51c0a7de-2f18-4a3e-96b7-1d0c8b2e4a77",
  "external_ref": "cl_app_84321",
  "deduped": false,
  "screening": "enqueued",
  "screening_hold": null,
  "portal_url": "https://app.confirm.global/c/suncoast-nurse-registry/candidates/9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "webhook_url": "https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8"
}
```

**SDK Code**

```python Screening started
import requests

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

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

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

print(response.json())
```

```javascript Screening started
const url = 'https://api.confirm.global/partner/v1/candidates';
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 Screening started
package main

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

func main() {

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

	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 Screening started
require 'uri'
require 'net/http'

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

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 Screening started
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp Screening started
using RestSharp;

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

```swift Screening started
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/candidates")! 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()
```

### Screening queued, held until a calendar is connected

**Response**

```json
{
  "candidate_id": "9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "application_id": "51c0a7de-2f18-4a3e-96b7-1d0c8b2e4a77",
  "external_ref": "cl_app_84321",
  "deduped": false,
  "screening": "enqueued",
  "screening_hold": "calendar_not_connected",
  "portal_url": "https://app.confirm.global/c/suncoast-nurse-registry/candidates/9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "webhook_url": "https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8"
}
```

**SDK Code**

```python Screening queued, held until a calendar is connected
import requests

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

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

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

print(response.json())
```

```javascript Screening queued, held until a calendar is connected
const url = 'https://api.confirm.global/partner/v1/candidates';
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 Screening queued, held until a calendar is connected
package main

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

func main() {

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

	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 Screening queued, held until a calendar is connected
require 'uri'
require 'net/http'

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

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 Screening queued, held until a calendar is connected
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php Screening queued, held until a calendar is connected
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Screening queued, held until a calendar is connected
using RestSharp;

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

```swift Screening queued, held until a calendar is connected
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/candidates")! 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()
```

### Created, but no outreach without consent

**Response**

```json
{
  "candidate_id": "3a7d1f92-88b4-4c05-a2ee-6b91d3c07f14",
  "application_id": "c81e5b30-9a72-4d16-8f43-2e0b7a94d5c8",
  "external_ref": "cl_app_84322",
  "deduped": false,
  "screening": "skipped_no_consent",
  "screening_hold": null,
  "portal_url": "https://app.confirm.global/c/suncoast-nurse-registry/candidates/3a7d1f92-88b4-4c05-a2ee-6b91d3c07f14"
}
```

**SDK Code**

```python Created, but no outreach without consent
import requests

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

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

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

print(response.json())
```

```javascript Created, but no outreach without consent
const url = 'https://api.confirm.global/partner/v1/candidates';
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, but no outreach without consent
package main

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

func main() {

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

	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, but no outreach without consent
require 'uri'
require 'net/http'

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

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, but no outreach without consent
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php Created, but no outreach without consent
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Created, but no outreach without consent
using RestSharp;

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

```swift Created, but no outreach without consent
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/candidates")! 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()
```

### Two locations, one screening call

**Response**

```json
{
  "candidate_id": "6e1b4d27-90af-4c38-b5d2-7a3f8c1e0b94",
  "external_ref": "cl_app_84323",
  "deduped": false,
  "portal_url": "https://app.confirm.global/c/suncoast-nurse-registry/candidates/6e1b4d27-90af-4c38-b5d2-7a3f8c1e0b94",
  "applications": [
    {
      "location_ref": "cl_loc_88213",
      "application_id": "a3c58e19-4b7d-4e02-9f61-2d8b0c7e5a13",
      "deduped": false,
      "screening": "enqueued",
      "screening_hold": null,
      "webhook_url": "https://hooks.example.com/confirm/2d9e7b10-5c4a-4f3e-8a61-0b7c3e9f4d22"
    },
    {
      "location_ref": "cl_loc_88214",
      "application_id": "f70d2b64-1e9c-4a85-b3d7-5c6e8a2f9014",
      "deduped": false,
      "screening": "enqueued",
      "screening_hold": null,
      "webhook_url": "https://hooks.example.com/confirm/2d9e7b10-5c4a-4f3e-8a61-0b7c3e9f4d22"
    }
  ]
}
```

**SDK Code**

```python Two locations, one screening call
import requests

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

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

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

print(response.json())
```

```javascript Two locations, one screening call
const url = 'https://api.confirm.global/partner/v1/candidates';
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 Two locations, one screening call
package main

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

func main() {

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

	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 Two locations, one screening call
require 'uri'
require 'net/http'

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

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 Two locations, one screening call
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

```php Two locations, one screening call
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Two locations, one screening call
using RestSharp;

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

```swift Two locations, one screening call
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/candidates")! 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()
```

### Applicant with consent and a phone number

**Request**

```json
{
  "external_ref": "cl_app_84321",
  "location_ref": "cl_loc_88213",
  "first_name": "Maria",
  "last_name": "Alvarez",
  "email": "maria.alvarez@example.com",
  "phone": "+18135550172",
  "consent": {
    "contact": true
  },
  "webhook_url": "https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8"
}
```

**Response**

```json
{
  "candidate_id": "9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "application_id": "51c0a7de-2f18-4a3e-96b7-1d0c8b2e4a77",
  "external_ref": "cl_app_84321",
  "deduped": false,
  "screening": "enqueued",
  "screening_hold": null,
  "portal_url": "https://app.confirm.global/c/suncoast-nurse-registry/candidates/9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "webhook_url": "https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8"
}
```

**SDK Code**

```python Applicant with consent and a phone number
import requests

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

payload = {
    "external_ref": "cl_app_84321",
    "location_ref": "cl_loc_88213",
    "first_name": "Maria",
    "last_name": "Alvarez",
    "email": "maria.alvarez@example.com",
    "phone": "+18135550172",
    "consent": { "contact": True },
    "webhook_url": "https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Applicant with consent and a phone number
const url = 'https://api.confirm.global/partner/v1/candidates';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"external_ref":"cl_app_84321","location_ref":"cl_loc_88213","first_name":"Maria","last_name":"Alvarez","email":"maria.alvarez@example.com","phone":"+18135550172","consent":{"contact":true},"webhook_url":"https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8"}'
};

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

```go Applicant with consent and a phone number
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"external_ref\": \"cl_app_84321\",\n  \"location_ref\": \"cl_loc_88213\",\n  \"first_name\": \"Maria\",\n  \"last_name\": \"Alvarez\",\n  \"email\": \"maria.alvarez@example.com\",\n  \"phone\": \"+18135550172\",\n  \"consent\": {\n    \"contact\": true\n  },\n  \"webhook_url\": \"https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8\"\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 Applicant with consent and a phone number
require 'uri'
require 'net/http'

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

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_app_84321\",\n  \"location_ref\": \"cl_loc_88213\",\n  \"first_name\": \"Maria\",\n  \"last_name\": \"Alvarez\",\n  \"email\": \"maria.alvarez@example.com\",\n  \"phone\": \"+18135550172\",\n  \"consent\": {\n    \"contact\": true\n  },\n  \"webhook_url\": \"https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8\"\n}"

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

```java Applicant with consent and a phone number
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.confirm.global/partner/v1/candidates")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"external_ref\": \"cl_app_84321\",\n  \"location_ref\": \"cl_loc_88213\",\n  \"first_name\": \"Maria\",\n  \"last_name\": \"Alvarez\",\n  \"email\": \"maria.alvarez@example.com\",\n  \"phone\": \"+18135550172\",\n  \"consent\": {\n    \"contact\": true\n  },\n  \"webhook_url\": \"https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8\"\n}")
  .asString();
```

```php Applicant with consent and a phone number
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.confirm.global/partner/v1/candidates', [
  'body' => '{
  "external_ref": "cl_app_84321",
  "location_ref": "cl_loc_88213",
  "first_name": "Maria",
  "last_name": "Alvarez",
  "email": "maria.alvarez@example.com",
  "phone": "+18135550172",
  "consent": {
    "contact": true
  },
  "webhook_url": "https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Applicant with consent and a phone number
using RestSharp;

var client = new RestClient("https://api.confirm.global/partner/v1/candidates");
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_app_84321\",\n  \"location_ref\": \"cl_loc_88213\",\n  \"first_name\": \"Maria\",\n  \"last_name\": \"Alvarez\",\n  \"email\": \"maria.alvarez@example.com\",\n  \"phone\": \"+18135550172\",\n  \"consent\": {\n    \"contact\": true\n  },\n  \"webhook_url\": \"https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Applicant with consent and a phone number
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "external_ref": "cl_app_84321",
  "location_ref": "cl_loc_88213",
  "first_name": "Maria",
  "last_name": "Alvarez",
  "email": "maria.alvarez@example.com",
  "phone": "+18135550172",
  "consent": ["contact": true],
  "webhook_url": "https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/candidates")! 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()
```

### Applicant who did not consent to contact

**Request**

```json
{
  "external_ref": "cl_app_84322",
  "location_ref": "cl_loc_88213",
  "first_name": "Dana",
  "last_name": "Whitfield",
  "email": "dana.w@example.com",
  "consent": {
    "contact": false
  }
}
```

**Response**

```json
{
  "candidate_id": "9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "application_id": "51c0a7de-2f18-4a3e-96b7-1d0c8b2e4a77",
  "external_ref": "cl_app_84321",
  "deduped": false,
  "screening": "enqueued",
  "screening_hold": null,
  "portal_url": "https://app.confirm.global/c/suncoast-nurse-registry/candidates/9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "webhook_url": "https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8"
}
```

**SDK Code**

```python Applicant who did not consent to contact
import requests

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

payload = {
    "external_ref": "cl_app_84322",
    "location_ref": "cl_loc_88213",
    "first_name": "Dana",
    "last_name": "Whitfield",
    "email": "dana.w@example.com",
    "consent": { "contact": False }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Applicant who did not consent to contact
const url = 'https://api.confirm.global/partner/v1/candidates';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"external_ref":"cl_app_84322","location_ref":"cl_loc_88213","first_name":"Dana","last_name":"Whitfield","email":"dana.w@example.com","consent":{"contact":false}}'
};

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

```go Applicant who did not consent to contact
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"external_ref\": \"cl_app_84322\",\n  \"location_ref\": \"cl_loc_88213\",\n  \"first_name\": \"Dana\",\n  \"last_name\": \"Whitfield\",\n  \"email\": \"dana.w@example.com\",\n  \"consent\": {\n    \"contact\": false\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 Applicant who did not consent to contact
require 'uri'
require 'net/http'

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

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_app_84322\",\n  \"location_ref\": \"cl_loc_88213\",\n  \"first_name\": \"Dana\",\n  \"last_name\": \"Whitfield\",\n  \"email\": \"dana.w@example.com\",\n  \"consent\": {\n    \"contact\": false\n  }\n}"

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

```java Applicant who did not consent to contact
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.confirm.global/partner/v1/candidates")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"external_ref\": \"cl_app_84322\",\n  \"location_ref\": \"cl_loc_88213\",\n  \"first_name\": \"Dana\",\n  \"last_name\": \"Whitfield\",\n  \"email\": \"dana.w@example.com\",\n  \"consent\": {\n    \"contact\": false\n  }\n}")
  .asString();
```

```php Applicant who did not consent to contact
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.confirm.global/partner/v1/candidates', [
  'body' => '{
  "external_ref": "cl_app_84322",
  "location_ref": "cl_loc_88213",
  "first_name": "Dana",
  "last_name": "Whitfield",
  "email": "dana.w@example.com",
  "consent": {
    "contact": false
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Applicant who did not consent to contact
using RestSharp;

var client = new RestClient("https://api.confirm.global/partner/v1/candidates");
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_app_84322\",\n  \"location_ref\": \"cl_loc_88213\",\n  \"first_name\": \"Dana\",\n  \"last_name\": \"Whitfield\",\n  \"email\": \"dana.w@example.com\",\n  \"consent\": {\n    \"contact\": false\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Applicant who did not consent to contact
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "external_ref": "cl_app_84322",
  "location_ref": "cl_loc_88213",
  "first_name": "Dana",
  "last_name": "Whitfield",
  "email": "dana.w@example.com",
  "consent": ["contact": false]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/candidates")! 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()
```

### One applicant at two locations

**Request**

```json
{
  "external_ref": "cl_app_84323",
  "location_refs": [
    "cl_loc_88213",
    "cl_loc_88214"
  ],
  "address": {
    "street": "412 Druid Rd E",
    "city": "Clearwater",
    "state": "FL",
    "postal_code": "33756",
    "country": "US"
  },
  "first_name": "Rosa",
  "last_name": "Delgado",
  "email": "rosa.delgado@example.com",
  "phone": "+18135550188",
  "consent": {
    "contact": true
  },
  "webhook_url": "https://hooks.example.com/confirm/2d9e7b10-5c4a-4f3e-8a61-0b7c3e9f4d22"
}
```

**Response**

```json
{
  "candidate_id": "9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "application_id": "51c0a7de-2f18-4a3e-96b7-1d0c8b2e4a77",
  "external_ref": "cl_app_84321",
  "deduped": false,
  "screening": "enqueued",
  "screening_hold": null,
  "portal_url": "https://app.confirm.global/c/suncoast-nurse-registry/candidates/9f4c2e81-6d3a-4b7e-a1c2-8e5f0d743b16",
  "webhook_url": "https://hooks.example.com/confirm/8f2c41aa-1d64-4f0b-9c33-2a7e5b104db8"
}
```

**SDK Code**

```python One applicant at two locations
import requests

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

payload = {
    "external_ref": "cl_app_84323",
    "location_refs": ["cl_loc_88213", "cl_loc_88214"],
    "address": {
        "street": "412 Druid Rd E",
        "city": "Clearwater",
        "state": "FL",
        "postal_code": "33756",
        "country": "US"
    },
    "first_name": "Rosa",
    "last_name": "Delgado",
    "email": "rosa.delgado@example.com",
    "phone": "+18135550188",
    "consent": { "contact": True },
    "webhook_url": "https://hooks.example.com/confirm/2d9e7b10-5c4a-4f3e-8a61-0b7c3e9f4d22"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript One applicant at two locations
const url = 'https://api.confirm.global/partner/v1/candidates';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"external_ref":"cl_app_84323","location_refs":["cl_loc_88213","cl_loc_88214"],"address":{"street":"412 Druid Rd E","city":"Clearwater","state":"FL","postal_code":"33756","country":"US"},"first_name":"Rosa","last_name":"Delgado","email":"rosa.delgado@example.com","phone":"+18135550188","consent":{"contact":true},"webhook_url":"https://hooks.example.com/confirm/2d9e7b10-5c4a-4f3e-8a61-0b7c3e9f4d22"}'
};

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

```go One applicant at two locations
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"external_ref\": \"cl_app_84323\",\n  \"location_refs\": [\n    \"cl_loc_88213\",\n    \"cl_loc_88214\"\n  ],\n  \"address\": {\n    \"street\": \"412 Druid Rd E\",\n    \"city\": \"Clearwater\",\n    \"state\": \"FL\",\n    \"postal_code\": \"33756\",\n    \"country\": \"US\"\n  },\n  \"first_name\": \"Rosa\",\n  \"last_name\": \"Delgado\",\n  \"email\": \"rosa.delgado@example.com\",\n  \"phone\": \"+18135550188\",\n  \"consent\": {\n    \"contact\": true\n  },\n  \"webhook_url\": \"https://hooks.example.com/confirm/2d9e7b10-5c4a-4f3e-8a61-0b7c3e9f4d22\"\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 One applicant at two locations
require 'uri'
require 'net/http'

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

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_app_84323\",\n  \"location_refs\": [\n    \"cl_loc_88213\",\n    \"cl_loc_88214\"\n  ],\n  \"address\": {\n    \"street\": \"412 Druid Rd E\",\n    \"city\": \"Clearwater\",\n    \"state\": \"FL\",\n    \"postal_code\": \"33756\",\n    \"country\": \"US\"\n  },\n  \"first_name\": \"Rosa\",\n  \"last_name\": \"Delgado\",\n  \"email\": \"rosa.delgado@example.com\",\n  \"phone\": \"+18135550188\",\n  \"consent\": {\n    \"contact\": true\n  },\n  \"webhook_url\": \"https://hooks.example.com/confirm/2d9e7b10-5c4a-4f3e-8a61-0b7c3e9f4d22\"\n}"

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

```java One applicant at two locations
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.confirm.global/partner/v1/candidates")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"external_ref\": \"cl_app_84323\",\n  \"location_refs\": [\n    \"cl_loc_88213\",\n    \"cl_loc_88214\"\n  ],\n  \"address\": {\n    \"street\": \"412 Druid Rd E\",\n    \"city\": \"Clearwater\",\n    \"state\": \"FL\",\n    \"postal_code\": \"33756\",\n    \"country\": \"US\"\n  },\n  \"first_name\": \"Rosa\",\n  \"last_name\": \"Delgado\",\n  \"email\": \"rosa.delgado@example.com\",\n  \"phone\": \"+18135550188\",\n  \"consent\": {\n    \"contact\": true\n  },\n  \"webhook_url\": \"https://hooks.example.com/confirm/2d9e7b10-5c4a-4f3e-8a61-0b7c3e9f4d22\"\n}")
  .asString();
```

```php One applicant at two locations
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.confirm.global/partner/v1/candidates', [
  'body' => '{
  "external_ref": "cl_app_84323",
  "location_refs": [
    "cl_loc_88213",
    "cl_loc_88214"
  ],
  "address": {
    "street": "412 Druid Rd E",
    "city": "Clearwater",
    "state": "FL",
    "postal_code": "33756",
    "country": "US"
  },
  "first_name": "Rosa",
  "last_name": "Delgado",
  "email": "rosa.delgado@example.com",
  "phone": "+18135550188",
  "consent": {
    "contact": true
  },
  "webhook_url": "https://hooks.example.com/confirm/2d9e7b10-5c4a-4f3e-8a61-0b7c3e9f4d22"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp One applicant at two locations
using RestSharp;

var client = new RestClient("https://api.confirm.global/partner/v1/candidates");
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_app_84323\",\n  \"location_refs\": [\n    \"cl_loc_88213\",\n    \"cl_loc_88214\"\n  ],\n  \"address\": {\n    \"street\": \"412 Druid Rd E\",\n    \"city\": \"Clearwater\",\n    \"state\": \"FL\",\n    \"postal_code\": \"33756\",\n    \"country\": \"US\"\n  },\n  \"first_name\": \"Rosa\",\n  \"last_name\": \"Delgado\",\n  \"email\": \"rosa.delgado@example.com\",\n  \"phone\": \"+18135550188\",\n  \"consent\": {\n    \"contact\": true\n  },\n  \"webhook_url\": \"https://hooks.example.com/confirm/2d9e7b10-5c4a-4f3e-8a61-0b7c3e9f4d22\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift One applicant at two locations
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "external_ref": "cl_app_84323",
  "location_refs": ["cl_loc_88213", "cl_loc_88214"],
  "address": [
    "street": "412 Druid Rd E",
    "city": "Clearwater",
    "state": "FL",
    "postal_code": "33756",
    "country": "US"
  ],
  "first_name": "Rosa",
  "last_name": "Delgado",
  "email": "rosa.delgado@example.com",
  "phone": "+18135550188",
  "consent": ["contact": true],
  "webhook_url": "https://hooks.example.com/confirm/2d9e7b10-5c4a-4f3e-8a61-0b7c3e9f4d22"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.confirm.global/partner/v1/candidates")! 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()
```