Create or Update Candidate
curl --request POST \
--url https://api.example.com/external/v1/create_or_update_candidateimport requests
url = "https://api.example.com/external/v1/create_or_update_candidate"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/external/v1/create_or_update_candidate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/external/v1/create_or_update_candidate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/external/v1/create_or_update_candidate"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/external/v1/create_or_update_candidate")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/external/v1/create_or_update_candidate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyCreate or Update Candidate
Create a new candidate or update an existing one with form data and documents
POST
/
external
/
v1
/
create_or_update_candidate
Create or Update Candidate
curl --request POST \
--url https://api.example.com/external/v1/create_or_update_candidateimport requests
url = "https://api.example.com/external/v1/create_or_update_candidate"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/external/v1/create_or_update_candidate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/external/v1/create_or_update_candidate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/external/v1/create_or_update_candidate"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/external/v1/create_or_update_candidate")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/external/v1/create_or_update_candidate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyCreate or Update Candidate
Create a new candidate or update an existing one. Supports form element data, OG variable updates, document uploads, and stage transitions.Endpoint
POST /external/v1/create_or_update_candidate
Authentication
[!NOTE] Requires a valid company API key in theAuthorizationheader (format:Api-Key <key>).
Request Body
Send asmultipart/form-data to support file uploads alongside data fields.
Identification (at least one required):
| Field | Type | Required | Description |
|---|---|---|---|
external_identifier | string | Conditional | Unique user identifier. Required if application_id not provided. Used with flow_id to create or look up an application |
application_id | string (UUID) | Conditional | ID of an existing application to update. Required if external_identifier not provided |
flow_id | string (UUID) | Conditional | The hiring flow ID. Required if application_id not provided |
| Field | Type | Required | Description |
|---|---|---|---|
full_name | string | No | Full name of the user. First, middle, and last names are updated by splitting this value |
phone_number | string | No | Phone number. Only used when creating a new application |
page_or_stage_id | string (UUID) | No | Stage ID to move the candidate to |
stage_reason_id | string (UUID) | No | Stage reason ID for the transition |
is_test | string | No | Set to "true" to mark as a test application (only for new applications) |
requires_async_processing | string | No | Set to "true" for async processing (returns 202 instead of 200) |
namespace.category.variable) are treated as OG variable paths. Only updatable variables are accepted.
Example Request
curl -X POST "https://api.firstwork.com/external/v1/create_or_update_candidate" \
-H "Authorization: Api-Key YOUR_API_KEY" \
-F "external_identifier=EMP-12345" \
-F "flow_id=550e8400-e29b-41d4-a716-446655440000" \
-F "full_name=John Doe" \
-F "phone_number=+1234567890" \
-F "elem-uuid-1=Some text value" \
-F "elem-uuid-2=@/path/to/document.pdf" \
-F "page_or_stage_id=stage-uuid"
Responses
200: OK
Synchronous success. All form elements processed (including OCR), application status updated, and automations triggered.202: Accepted
Async accepted. Documents uploaded but OCR, status updates, and automations run asynchronously. Returned whenrequires_async_processing is enabled.
400: Bad Request
Missing identification fields, invalid flow ID, invalid file type, or form element validation failure.404: Not Found
Application not found for the givenapplication_id and company.