Quickstart

This guide will get you all set up and ready to use the Semantikmatch API. We'll cover how to get started making HTTP requests and how to make your first API request. We'll also show where to find all the information you need to take full advantage of our powerful REST API.

Make your first API request

Since the API only supports HTTP requests, here are examples of how to make your first request using cURL, JavaScript, and Python. The example below shows how to fetch a list of all forms available.

# Make a request to list all forms using cURL
curl -X GET https://api.semantikmatch.com/v1/forms \
  -H "Authorization: Bearer YOUR_API_KEY"

Read more about making your first API request

Next Step: Create a Form

Create a Form

Create a form with the necessary sections and fields.

curl https://api.semantikmatch.com/v1/forms \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "High School Admission Form",
    "sections": [
      {
        "name": "Eligibility",
        "steps": [
          {
            "name": "Administrative",
            "fields": [
              {
                "name": "ID",
                "type": "attachment"
              }
            ]
          }
        ]
      }
    ]
  }'

Read more about creating a form

Next Step: Add Criteria

Add Criteria

Generate criteria based on a job ID and a query.

curl -X POST https://api.semantikmatch.com/v1/criteria/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jobId": "12345",
    "query": "Check if the applicant has a valid ID document"
  }'

Read more about generating criteria

Next Step: Submit an Application

Submit an Application

Submit an application with the required data and files.

curl -X POST https://api.semantikmatch.com/v1/applications/submit \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "firstname=John" \
  -F "lastname=Doe" \
  -F "email=john.doe@example.com" \
  -F "jobId=1" \
  -F "files=@/path/to/id_document.pdf"

Read more about submitting an application

Next Step: Check Evaluation Results

Check Evaluation Results

Loop to check the evaluation status until it is finished.

while true; do
  response=$(curl -s https://api.semantikmatch.com/v1/evaluations \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -G --data-urlencode "application_id=YOUR_APPLICATION_ID")

  status=$(echo $response | jq -r '.[0].criteria_result[0].status')

  if [ "$status" == "finished" ]; then
    echo "Evaluation finished."
    echo $response | jq
    break
  else
    echo "Evaluation pending. Checking again in 10 seconds..."
    sleep 10
  fi
done

Read more about checking evaluation results

Next Step: Complete Code

What's next? Great, you're now set up and have made your first request to the API. Here are a few links that might be handy as you explore the Semantikmatch API further:

Was this page helpful?