Bulk create client contacts
curl --request POST \
--url https://api.gospott.com/clients/contacts/_bulk \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"items": [
{
"firstName": "<string>",
"lastName": "<string>",
"clientId": "<string>",
"nationality": [],
"status": [],
"emails": [
{
"email": "jsmith@example.com",
"isPrimary": true
}
],
"phoneNumbers": [
{
"phoneNumber": "<string>",
"isPrimary": true
}
],
"locations": [
{
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 0,
"longitude": 0,
"rawCityCountry": "<string>",
"formattedAddress": "<string>"
}
],
"dateOfBirth": "2023-11-07T05:31:56Z",
"socialMedia": [
{
"url": "<string>",
"isPrimary": true
}
],
"education": [
{
"fieldOfStudy": "<string>",
"grade": "<string>",
"description": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"companyId": "<string>"
}
],
"workExperiences": [
{
"jobTitle": "<string>",
"location": {
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 0,
"longitude": 0,
"rawCityCountry": "<string>",
"formattedAddress": "<string>"
},
"description": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"companyId": "<string>"
}
],
"customAttributes": [
{
"attributeDefinitionId": "<string>",
"value": {
"viewType": "customText",
"text": "<string>"
}
}
],
"languages": [
{
"id": "<string>"
}
],
"compensation": {
"id": "<string>",
"totalCompensation": 123,
"baseCompensation": 123
},
"role": "<string>",
"department": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"stageId": "<string>",
"keepShowingAsCandidate": true
}
]
}
'import requests
url = "https://api.gospott.com/clients/contacts/_bulk"
payload = { "items": [
{
"firstName": "<string>",
"lastName": "<string>",
"clientId": "<string>",
"nationality": [],
"status": [],
"emails": [
{
"email": "jsmith@example.com",
"isPrimary": True
}
],
"phoneNumbers": [
{
"phoneNumber": "<string>",
"isPrimary": True
}
],
"locations": [
{
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 0,
"longitude": 0,
"rawCityCountry": "<string>",
"formattedAddress": "<string>"
}
],
"dateOfBirth": "2023-11-07T05:31:56Z",
"socialMedia": [
{
"url": "<string>",
"isPrimary": True
}
],
"education": [
{
"fieldOfStudy": "<string>",
"grade": "<string>",
"description": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"companyId": "<string>"
}
],
"workExperiences": [
{
"jobTitle": "<string>",
"location": {
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 0,
"longitude": 0,
"rawCityCountry": "<string>",
"formattedAddress": "<string>"
},
"description": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"companyId": "<string>"
}
],
"customAttributes": [
{
"attributeDefinitionId": "<string>",
"value": {
"viewType": "customText",
"text": "<string>"
}
}
],
"languages": [{ "id": "<string>" }],
"compensation": {
"id": "<string>",
"totalCompensation": 123,
"baseCompensation": 123
},
"role": "<string>",
"department": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"stageId": "<string>",
"keepShowingAsCandidate": True
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
firstName: '<string>',
lastName: '<string>',
clientId: '<string>',
nationality: [],
status: [],
emails: [{email: 'jsmith@example.com', isPrimary: true}],
phoneNumbers: [{phoneNumber: '<string>', isPrimary: true}],
locations: [
{
street1: '<string>',
street2: '<string>',
postalCode: '<string>',
city: '<string>',
region: '<string>',
state: '<string>',
country: '<string>',
latitude: 0,
longitude: 0,
rawCityCountry: '<string>',
formattedAddress: '<string>'
}
],
dateOfBirth: '2023-11-07T05:31:56Z',
socialMedia: [{url: '<string>', isPrimary: true}],
education: [
{
fieldOfStudy: '<string>',
grade: '<string>',
description: '<string>',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
companyId: '<string>'
}
],
workExperiences: [
{
jobTitle: '<string>',
location: {
street1: '<string>',
street2: '<string>',
postalCode: '<string>',
city: '<string>',
region: '<string>',
state: '<string>',
country: '<string>',
latitude: 0,
longitude: 0,
rawCityCountry: '<string>',
formattedAddress: '<string>'
},
description: '<string>',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
companyId: '<string>'
}
],
customAttributes: [
{
attributeDefinitionId: '<string>',
value: {viewType: 'customText', text: '<string>'}
}
],
languages: [{id: '<string>'}],
compensation: {id: '<string>', totalCompensation: 123, baseCompensation: 123},
role: '<string>',
department: '<string>',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
stageId: '<string>',
keepShowingAsCandidate: true
}
]
})
};
fetch('https://api.gospott.com/clients/contacts/_bulk', 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.gospott.com/clients/contacts/_bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'firstName' => '<string>',
'lastName' => '<string>',
'clientId' => '<string>',
'nationality' => [
],
'status' => [
],
'emails' => [
[
'email' => 'jsmith@example.com',
'isPrimary' => true
]
],
'phoneNumbers' => [
[
'phoneNumber' => '<string>',
'isPrimary' => true
]
],
'locations' => [
[
'street1' => '<string>',
'street2' => '<string>',
'postalCode' => '<string>',
'city' => '<string>',
'region' => '<string>',
'state' => '<string>',
'country' => '<string>',
'latitude' => 0,
'longitude' => 0,
'rawCityCountry' => '<string>',
'formattedAddress' => '<string>'
]
],
'dateOfBirth' => '2023-11-07T05:31:56Z',
'socialMedia' => [
[
'url' => '<string>',
'isPrimary' => true
]
],
'education' => [
[
'fieldOfStudy' => '<string>',
'grade' => '<string>',
'description' => '<string>',
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'companyId' => '<string>'
]
],
'workExperiences' => [
[
'jobTitle' => '<string>',
'location' => [
'street1' => '<string>',
'street2' => '<string>',
'postalCode' => '<string>',
'city' => '<string>',
'region' => '<string>',
'state' => '<string>',
'country' => '<string>',
'latitude' => 0,
'longitude' => 0,
'rawCityCountry' => '<string>',
'formattedAddress' => '<string>'
],
'description' => '<string>',
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'companyId' => '<string>'
]
],
'customAttributes' => [
[
'attributeDefinitionId' => '<string>',
'value' => [
'viewType' => 'customText',
'text' => '<string>'
]
]
],
'languages' => [
[
'id' => '<string>'
]
],
'compensation' => [
'id' => '<string>',
'totalCompensation' => 123,
'baseCompensation' => 123
],
'role' => '<string>',
'department' => '<string>',
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'stageId' => '<string>',
'keepShowingAsCandidate' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gospott.com/clients/contacts/_bulk"
payload := strings.NewReader("{\n \"items\": [\n {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"clientId\": \"<string>\",\n \"nationality\": [],\n \"status\": [],\n \"emails\": [\n {\n \"email\": \"jsmith@example.com\",\n \"isPrimary\": true\n }\n ],\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"locations\": [\n {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"rawCityCountry\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n }\n ],\n \"dateOfBirth\": \"2023-11-07T05:31:56Z\",\n \"socialMedia\": [\n {\n \"url\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"education\": [\n {\n \"fieldOfStudy\": \"<string>\",\n \"grade\": \"<string>\",\n \"description\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"<string>\"\n }\n ],\n \"workExperiences\": [\n {\n \"jobTitle\": \"<string>\",\n \"location\": {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"rawCityCountry\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"<string>\"\n }\n ],\n \"customAttributes\": [\n {\n \"attributeDefinitionId\": \"<string>\",\n \"value\": {\n \"viewType\": \"customText\",\n \"text\": \"<string>\"\n }\n }\n ],\n \"languages\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"compensation\": {\n \"id\": \"<string>\",\n \"totalCompensation\": 123,\n \"baseCompensation\": 123\n },\n \"role\": \"<string>\",\n \"department\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"stageId\": \"<string>\",\n \"keepShowingAsCandidate\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.gospott.com/clients/contacts/_bulk")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"clientId\": \"<string>\",\n \"nationality\": [],\n \"status\": [],\n \"emails\": [\n {\n \"email\": \"jsmith@example.com\",\n \"isPrimary\": true\n }\n ],\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"locations\": [\n {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"rawCityCountry\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n }\n ],\n \"dateOfBirth\": \"2023-11-07T05:31:56Z\",\n \"socialMedia\": [\n {\n \"url\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"education\": [\n {\n \"fieldOfStudy\": \"<string>\",\n \"grade\": \"<string>\",\n \"description\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"<string>\"\n }\n ],\n \"workExperiences\": [\n {\n \"jobTitle\": \"<string>\",\n \"location\": {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"rawCityCountry\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"<string>\"\n }\n ],\n \"customAttributes\": [\n {\n \"attributeDefinitionId\": \"<string>\",\n \"value\": {\n \"viewType\": \"customText\",\n \"text\": \"<string>\"\n }\n }\n ],\n \"languages\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"compensation\": {\n \"id\": \"<string>\",\n \"totalCompensation\": 123,\n \"baseCompensation\": 123\n },\n \"role\": \"<string>\",\n \"department\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"stageId\": \"<string>\",\n \"keepShowingAsCandidate\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gospott.com/clients/contacts/_bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"clientId\": \"<string>\",\n \"nationality\": [],\n \"status\": [],\n \"emails\": [\n {\n \"email\": \"jsmith@example.com\",\n \"isPrimary\": true\n }\n ],\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"locations\": [\n {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"rawCityCountry\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n }\n ],\n \"dateOfBirth\": \"2023-11-07T05:31:56Z\",\n \"socialMedia\": [\n {\n \"url\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"education\": [\n {\n \"fieldOfStudy\": \"<string>\",\n \"grade\": \"<string>\",\n \"description\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"<string>\"\n }\n ],\n \"workExperiences\": [\n {\n \"jobTitle\": \"<string>\",\n \"location\": {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"rawCityCountry\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"<string>\"\n }\n ],\n \"customAttributes\": [\n {\n \"attributeDefinitionId\": \"<string>\",\n \"value\": {\n \"viewType\": \"customText\",\n \"text\": \"<string>\"\n }\n }\n ],\n \"languages\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"compensation\": {\n \"id\": \"<string>\",\n \"totalCompensation\": 123,\n \"baseCompensation\": 123\n },\n \"role\": \"<string>\",\n \"department\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"stageId\": \"<string>\",\n \"keepShowingAsCandidate\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"candidateId": "<string>"
}
]
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}Client Contacts
Bulk create client contacts
Create up to 10 client contacts in one request. Each item carries its own clientId, so a single batch can target several clients. The batch is all-or-nothing: if any item is rejected, no client contacts are created and the batch must be retried in full. Results are returned in request order. This endpoint is rate limited to 50 requests per hour per tenant, and returns 429 once that limit is reached.
POST
/
clients
/
contacts
/
_bulk
Bulk create client contacts
curl --request POST \
--url https://api.gospott.com/clients/contacts/_bulk \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"items": [
{
"firstName": "<string>",
"lastName": "<string>",
"clientId": "<string>",
"nationality": [],
"status": [],
"emails": [
{
"email": "jsmith@example.com",
"isPrimary": true
}
],
"phoneNumbers": [
{
"phoneNumber": "<string>",
"isPrimary": true
}
],
"locations": [
{
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 0,
"longitude": 0,
"rawCityCountry": "<string>",
"formattedAddress": "<string>"
}
],
"dateOfBirth": "2023-11-07T05:31:56Z",
"socialMedia": [
{
"url": "<string>",
"isPrimary": true
}
],
"education": [
{
"fieldOfStudy": "<string>",
"grade": "<string>",
"description": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"companyId": "<string>"
}
],
"workExperiences": [
{
"jobTitle": "<string>",
"location": {
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 0,
"longitude": 0,
"rawCityCountry": "<string>",
"formattedAddress": "<string>"
},
"description": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"companyId": "<string>"
}
],
"customAttributes": [
{
"attributeDefinitionId": "<string>",
"value": {
"viewType": "customText",
"text": "<string>"
}
}
],
"languages": [
{
"id": "<string>"
}
],
"compensation": {
"id": "<string>",
"totalCompensation": 123,
"baseCompensation": 123
},
"role": "<string>",
"department": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"stageId": "<string>",
"keepShowingAsCandidate": true
}
]
}
'import requests
url = "https://api.gospott.com/clients/contacts/_bulk"
payload = { "items": [
{
"firstName": "<string>",
"lastName": "<string>",
"clientId": "<string>",
"nationality": [],
"status": [],
"emails": [
{
"email": "jsmith@example.com",
"isPrimary": True
}
],
"phoneNumbers": [
{
"phoneNumber": "<string>",
"isPrimary": True
}
],
"locations": [
{
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 0,
"longitude": 0,
"rawCityCountry": "<string>",
"formattedAddress": "<string>"
}
],
"dateOfBirth": "2023-11-07T05:31:56Z",
"socialMedia": [
{
"url": "<string>",
"isPrimary": True
}
],
"education": [
{
"fieldOfStudy": "<string>",
"grade": "<string>",
"description": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"companyId": "<string>"
}
],
"workExperiences": [
{
"jobTitle": "<string>",
"location": {
"street1": "<string>",
"street2": "<string>",
"postalCode": "<string>",
"city": "<string>",
"region": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 0,
"longitude": 0,
"rawCityCountry": "<string>",
"formattedAddress": "<string>"
},
"description": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"companyId": "<string>"
}
],
"customAttributes": [
{
"attributeDefinitionId": "<string>",
"value": {
"viewType": "customText",
"text": "<string>"
}
}
],
"languages": [{ "id": "<string>" }],
"compensation": {
"id": "<string>",
"totalCompensation": 123,
"baseCompensation": 123
},
"role": "<string>",
"department": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"stageId": "<string>",
"keepShowingAsCandidate": True
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
firstName: '<string>',
lastName: '<string>',
clientId: '<string>',
nationality: [],
status: [],
emails: [{email: 'jsmith@example.com', isPrimary: true}],
phoneNumbers: [{phoneNumber: '<string>', isPrimary: true}],
locations: [
{
street1: '<string>',
street2: '<string>',
postalCode: '<string>',
city: '<string>',
region: '<string>',
state: '<string>',
country: '<string>',
latitude: 0,
longitude: 0,
rawCityCountry: '<string>',
formattedAddress: '<string>'
}
],
dateOfBirth: '2023-11-07T05:31:56Z',
socialMedia: [{url: '<string>', isPrimary: true}],
education: [
{
fieldOfStudy: '<string>',
grade: '<string>',
description: '<string>',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
companyId: '<string>'
}
],
workExperiences: [
{
jobTitle: '<string>',
location: {
street1: '<string>',
street2: '<string>',
postalCode: '<string>',
city: '<string>',
region: '<string>',
state: '<string>',
country: '<string>',
latitude: 0,
longitude: 0,
rawCityCountry: '<string>',
formattedAddress: '<string>'
},
description: '<string>',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
companyId: '<string>'
}
],
customAttributes: [
{
attributeDefinitionId: '<string>',
value: {viewType: 'customText', text: '<string>'}
}
],
languages: [{id: '<string>'}],
compensation: {id: '<string>', totalCompensation: 123, baseCompensation: 123},
role: '<string>',
department: '<string>',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
stageId: '<string>',
keepShowingAsCandidate: true
}
]
})
};
fetch('https://api.gospott.com/clients/contacts/_bulk', 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.gospott.com/clients/contacts/_bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'items' => [
[
'firstName' => '<string>',
'lastName' => '<string>',
'clientId' => '<string>',
'nationality' => [
],
'status' => [
],
'emails' => [
[
'email' => 'jsmith@example.com',
'isPrimary' => true
]
],
'phoneNumbers' => [
[
'phoneNumber' => '<string>',
'isPrimary' => true
]
],
'locations' => [
[
'street1' => '<string>',
'street2' => '<string>',
'postalCode' => '<string>',
'city' => '<string>',
'region' => '<string>',
'state' => '<string>',
'country' => '<string>',
'latitude' => 0,
'longitude' => 0,
'rawCityCountry' => '<string>',
'formattedAddress' => '<string>'
]
],
'dateOfBirth' => '2023-11-07T05:31:56Z',
'socialMedia' => [
[
'url' => '<string>',
'isPrimary' => true
]
],
'education' => [
[
'fieldOfStudy' => '<string>',
'grade' => '<string>',
'description' => '<string>',
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'companyId' => '<string>'
]
],
'workExperiences' => [
[
'jobTitle' => '<string>',
'location' => [
'street1' => '<string>',
'street2' => '<string>',
'postalCode' => '<string>',
'city' => '<string>',
'region' => '<string>',
'state' => '<string>',
'country' => '<string>',
'latitude' => 0,
'longitude' => 0,
'rawCityCountry' => '<string>',
'formattedAddress' => '<string>'
],
'description' => '<string>',
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'companyId' => '<string>'
]
],
'customAttributes' => [
[
'attributeDefinitionId' => '<string>',
'value' => [
'viewType' => 'customText',
'text' => '<string>'
]
]
],
'languages' => [
[
'id' => '<string>'
]
],
'compensation' => [
'id' => '<string>',
'totalCompensation' => 123,
'baseCompensation' => 123
],
'role' => '<string>',
'department' => '<string>',
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'stageId' => '<string>',
'keepShowingAsCandidate' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gospott.com/clients/contacts/_bulk"
payload := strings.NewReader("{\n \"items\": [\n {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"clientId\": \"<string>\",\n \"nationality\": [],\n \"status\": [],\n \"emails\": [\n {\n \"email\": \"jsmith@example.com\",\n \"isPrimary\": true\n }\n ],\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"locations\": [\n {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"rawCityCountry\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n }\n ],\n \"dateOfBirth\": \"2023-11-07T05:31:56Z\",\n \"socialMedia\": [\n {\n \"url\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"education\": [\n {\n \"fieldOfStudy\": \"<string>\",\n \"grade\": \"<string>\",\n \"description\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"<string>\"\n }\n ],\n \"workExperiences\": [\n {\n \"jobTitle\": \"<string>\",\n \"location\": {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"rawCityCountry\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"<string>\"\n }\n ],\n \"customAttributes\": [\n {\n \"attributeDefinitionId\": \"<string>\",\n \"value\": {\n \"viewType\": \"customText\",\n \"text\": \"<string>\"\n }\n }\n ],\n \"languages\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"compensation\": {\n \"id\": \"<string>\",\n \"totalCompensation\": 123,\n \"baseCompensation\": 123\n },\n \"role\": \"<string>\",\n \"department\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"stageId\": \"<string>\",\n \"keepShowingAsCandidate\": true\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.gospott.com/clients/contacts/_bulk")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"clientId\": \"<string>\",\n \"nationality\": [],\n \"status\": [],\n \"emails\": [\n {\n \"email\": \"jsmith@example.com\",\n \"isPrimary\": true\n }\n ],\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"locations\": [\n {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"rawCityCountry\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n }\n ],\n \"dateOfBirth\": \"2023-11-07T05:31:56Z\",\n \"socialMedia\": [\n {\n \"url\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"education\": [\n {\n \"fieldOfStudy\": \"<string>\",\n \"grade\": \"<string>\",\n \"description\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"<string>\"\n }\n ],\n \"workExperiences\": [\n {\n \"jobTitle\": \"<string>\",\n \"location\": {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"rawCityCountry\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"<string>\"\n }\n ],\n \"customAttributes\": [\n {\n \"attributeDefinitionId\": \"<string>\",\n \"value\": {\n \"viewType\": \"customText\",\n \"text\": \"<string>\"\n }\n }\n ],\n \"languages\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"compensation\": {\n \"id\": \"<string>\",\n \"totalCompensation\": 123,\n \"baseCompensation\": 123\n },\n \"role\": \"<string>\",\n \"department\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"stageId\": \"<string>\",\n \"keepShowingAsCandidate\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gospott.com/clients/contacts/_bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"items\": [\n {\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"clientId\": \"<string>\",\n \"nationality\": [],\n \"status\": [],\n \"emails\": [\n {\n \"email\": \"jsmith@example.com\",\n \"isPrimary\": true\n }\n ],\n \"phoneNumbers\": [\n {\n \"phoneNumber\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"locations\": [\n {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"rawCityCountry\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n }\n ],\n \"dateOfBirth\": \"2023-11-07T05:31:56Z\",\n \"socialMedia\": [\n {\n \"url\": \"<string>\",\n \"isPrimary\": true\n }\n ],\n \"education\": [\n {\n \"fieldOfStudy\": \"<string>\",\n \"grade\": \"<string>\",\n \"description\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"<string>\"\n }\n ],\n \"workExperiences\": [\n {\n \"jobTitle\": \"<string>\",\n \"location\": {\n \"street1\": \"<string>\",\n \"street2\": \"<string>\",\n \"postalCode\": \"<string>\",\n \"city\": \"<string>\",\n \"region\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 0,\n \"longitude\": 0,\n \"rawCityCountry\": \"<string>\",\n \"formattedAddress\": \"<string>\"\n },\n \"description\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"companyId\": \"<string>\"\n }\n ],\n \"customAttributes\": [\n {\n \"attributeDefinitionId\": \"<string>\",\n \"value\": {\n \"viewType\": \"customText\",\n \"text\": \"<string>\"\n }\n }\n ],\n \"languages\": [\n {\n \"id\": \"<string>\"\n }\n ],\n \"compensation\": {\n \"id\": \"<string>\",\n \"totalCompensation\": 123,\n \"baseCompensation\": 123\n },\n \"role\": \"<string>\",\n \"department\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"stageId\": \"<string>\",\n \"keepShowingAsCandidate\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "<string>",
"candidateId": "<string>"
}
]
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}{
"status": 0,
"message": "<string>",
"requestId": "<string>"
}Authorizations
API key for authentication. Get your API key from Settings → API Keys in your Spott dashboard.
Body
application/json
Required array length:
1 - 10 elementsShow child attributes
Show child attributes
Response
Client contacts created successfully. Returns the client contact ID and the linked candidate ID of each item, in request order.
Show child attributes
Show child attributes
Was this page helpful?