Start a KYB agent job
curl --request POST \
--url https://api.parcha.ai/api/v1/startKYBAgentJob \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_key": "<string>",
"check_ids": [
"<string>"
]
}
'import requests
url = "https://api.parcha.ai/api/v1/startKYBAgentJob"
payload = {
"agent_key": "<string>",
"check_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({agent_key: '<string>', check_ids: ['<string>']})
};
fetch('https://api.parcha.ai/api/v1/startKYBAgentJob', 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.parcha.ai/api/v1/startKYBAgentJob",
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([
'agent_key' => '<string>',
'check_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.parcha.ai/api/v1/startKYBAgentJob"
payload := strings.NewReader("{\n \"agent_key\": \"<string>\",\n \"check_ids\": [\n \"<string>\"\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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.parcha.ai/api/v1/startKYBAgentJob")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_key\": \"<string>\",\n \"check_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parcha.ai/api/v1/startKYBAgentJob")
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 \"agent_key\": \"<string>\",\n \"check_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"message": "<string>",
"job": {}
}Getting Started
Start KYB Agent Job
Initiate a Know Your Business (KYB) agent job
POST
/
startKYBAgentJob
Start a KYB agent job
curl --request POST \
--url https://api.parcha.ai/api/v1/startKYBAgentJob \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"agent_key": "<string>",
"check_ids": [
"<string>"
]
}
'import requests
url = "https://api.parcha.ai/api/v1/startKYBAgentJob"
payload = {
"agent_key": "<string>",
"check_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({agent_key: '<string>', check_ids: ['<string>']})
};
fetch('https://api.parcha.ai/api/v1/startKYBAgentJob', 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.parcha.ai/api/v1/startKYBAgentJob",
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([
'agent_key' => '<string>',
'check_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.parcha.ai/api/v1/startKYBAgentJob"
payload := strings.NewReader("{\n \"agent_key\": \"<string>\",\n \"check_ids\": [\n \"<string>\"\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(string(body))
}HttpResponse<String> response = Unirest.post("https://api.parcha.ai/api/v1/startKYBAgentJob")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_key\": \"<string>\",\n \"check_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parcha.ai/api/v1/startKYBAgentJob")
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 \"agent_key\": \"<string>\",\n \"check_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"message": "<string>",
"job": {}
}This endpoint starts a KYB (Know Your Business) agent job with the specified parameters.
Conflict (409 Conflict) if
This endpoint initiates a KYB agent job with the provided parameters. The response includes a job ID that can be used to track the progress and retrieve results of the KYB process.
API Endpoint
POST https://api.parcha.ai/api/v1/startKYBAgentJob
Request Body
string
required
Your KYB agent key from the Parcha dashboard. This is unique to your organization and agent configuration.
Important: You must use your own agent key, not a default or public agent key. Your agent key can be found in the Parcha dashboard under your agent’s settings, or in the “Test API Integration” dialog.
object
required
The KYB schema containing the business information.
Show KYB Schema Properties
Show KYB Schema Properties
string
required
A unique identifier for this KYB case.
object
required
Self-attested information about the business.
Show Common Object Types
Show Common Object Types
object
Standard address format used throughout the schema.
object
Standard document format used throughout the schema.
Show Self Attested Data Properties
Show Self Attested Data Properties
string
The name of the business. Required if website is not provided.
string
The registered name of the business. Required if website is not provided and business_name is not set.
object
The business’s operational address.
Uses the Address Object format defined above.
object
The business’s incorporation address.
Uses the Address Object format defined above.
string
The website of the business. Required if business_name or registered_business_name is not provided.
string
The primary purpose or activity of the business.
string
A brief description of the business. Maximum 512 characters.
string
The industry sector the business operates in.
string
Tax Identification Number or Employer Identification Number (EIN).
string
Date of incorporation in YYYY-MM-DD format.
array
Array of business partner names.
array
Array of customer names.
array
Array of funding sources (e.g., [“Investment”, “Revenue”]).
array
Array of incorporation document objects.
Each item uses the Document Object format defined above.
array
Array of ownership document objects.
Each item uses the Document Object format defined above.
array
Array of promotional/marketing document objects.
Each item uses the Document Object format defined above.
array
Array of address proof document objects.
Each item uses the Document Object format defined above.
array
Array of EIN document objects.
Each item uses the Document Object format defined above.
array
Array of funding source document objects.
Each item uses the Document Object format defined above.
array
Array of individuals associated with the business.
Show Associated Individual Properties
Show Associated Individual Properties
string
required
Unique identifier for the individual.
object
required
Show Individual Data Properties
Show Individual Data Properties
string
required
Individual’s first name
string
Individual’s middle name
string
required
Individual’s last name
string
required
Date of birth in YYYY-MM-DD format
object
required
Individual’s address.
Uses the Address Object format defined above.
string
required
Two-letter ISO country code of nationality
string
required
Two-letter ISO country code of residence
string
Place of birth (city, country)
string
Individual’s sex
string
required
Email address
string
required
Phone number
string
required
Job title or position
boolean
required
Whether this individual is the applicant
boolean
required
Whether this individual is a business owner
number
Percentage of business ownership
array
Array of address proof document objects.
Each item uses the Document Object format defined above.
array
Array of entities associated with the business.
Show Associated Entity Properties
Show Associated Entity Properties
string
required
Unique identifier for the entity
object
required
Show Entity Data Properties
Show Entity Data Properties
string
required
Name of the associated business
boolean
required
Whether the entity is a trust
object
required
Entity’s address.
Uses the Address Object format defined above.
string
Industry sector
string
Tax Identification Number
number
required
Percentage of business ownership
string
required
Two-letter ISO country code
string
Entity’s website
string
Description of the entity
string
Optional. A unique identifier (UUID) that you can provide for this job.
If provided, this ID will be used as an idempotency key.
If a job with this ID already exists, the API will return a
409 Conflict error, and you can then use this job_id to retrieve the existing job’s status and results using /getJobById.
If not provided, a new unique ID will be automatically generated for the job.string
An optional URL to receive webhook notifications about the job status.
string
An optional Slack webhook URL to receive notifications about the job status.
array
An optional array of specific check IDs to run. If not provided, all checks will be run.
Response
string
The status of the job creation request. Will be “ok” if successful.
string
The unique identifier for the created job.
string
A message indicating the result of the job creation request.
object
Details about the created job.
Show Job Properties
Show Job Properties
string
The unique identifier of the job.
string
The current status of the job (e.g., “PENDING”, “RUNNING”, “COMPLETE”, “FAILED”, “RETRIED”).
string
The timestamp when the job was created.
string
The timestamp when the job was last updated.
string
The ID of the agent used for this job.
object
The input payload provided for the job.
Example Request
curl -X POST 'https://api.parcha.ai/api/v1/startKYBAgentJob' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"agent_key": "your-kyb-agent-key",
"job_id": "your-custom-job-id-123e4567-e89b-12d3-a456-426614174001",
"kyb_schema": {
"id": "parcha-demo-case-001",
"self_attested_data": {
"business_name": "Acme Corp",
"website": "https://www.acmecorp.com"
}
}
}'
import requests
api_key = 'YOUR_API_KEY'
url = 'https://api.parcha.ai/api/v1/startKYBAgentJob'
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
data = {
'agent_key': 'your-kyb-agent-key', # Replace with your actual agent key
'job_id': 'your-custom-job-id-123e4567-e89b-12d3-a456-426614174001',
'kyb_schema': {
'id': 'parcha-demo-case-001',
'self_attested_data': {
'business_name': 'Acme Corp',
'website': 'https://www.acmecorp.com'
}
}
}
response = requests.post(url, json=data, headers=headers)
if response.status_code == 409:
print(f"Job with ID {data.get('job_id')} already exists. Fetching existing job details...")
# existing_job_response = requests.get(f'https://api.parcha.ai/api/v1/getJobById?job_id={data.get("job_id")}', headers=headers)
# print(existing_job_response.json())
elif response.status_code == 200:
print(response.json())
else:
print(f"Error: {response.status_code} - {response.text}")
import axios from 'axios';
const apiKey = 'YOUR_API_KEY';
const url = 'https://api.parcha.ai/api/v1/startKYBAgentJob';
const data = {
agent_key: 'your-kyb-agent-key', // Replace with your actual agent key
job_id: 'your-custom-job-id-123e4567-e89b-12d3-a456-426614174001',
kyb_schema: {
id: 'parcha-demo-case-001',
self_attested_data: {
business_name: 'Acme Corp',
website: 'https://www.acmecorp.com'
}
}
};
axios.post(url, data, {
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
})
.then(response => console.log(response.data))
.catch(error => {
if (error.response && error.response.status === 409) {
console.log(`Job with ID ${data.job_id} already exists. Fetching existing job details...`);
// axios.get(`https://api.parcha.ai/api/v1/getJobById?job_id=${data.job_id}`, { headers: { 'Authorization': `Bearer ${apiKey}` } })
// .then(existingJobResponse => console.log(existingJobResponse.data))
// .catch(getJobError => console.error('Error fetching existing job:', getJobError));
} else {
console.error('Error starting job:', error.response ? error.response.data : error.message);
}
});
Example Response
Successful creation (200 OK):{
"status": "ok",
"job_id": "job-12345-abcde",
"message": "The job was successfully added to the queue.",
"job": {
"id": "job-12345-abcde",
"status": "PENDING",
"created_at": "2023-06-15T10:30:00Z",
"updated_at": "2023-06-15T10:30:00Z",
"agent_id": "your-kyb-agent-key",
"input_payload": {
"agent_key": "your-kyb-agent-key",
"kyb_schema": {
"id": "parcha-demo-case-001",
"self_attested_data": {
"business_name": "Acme Corp",
"website": "https://www.acmecorp.com"
}
}
}
}
}
job_id already exists:
{
"error": "Job with the provided ID already exists.",
"job_id": "your-custom-job-id-123e4567-e89b-12d3-a456-426614174001"
}
Authorizations
API key obtained from your Parcha account settings. Include as Bearer token in the Authorization header.
Body
application/json
⌘I