Skip to main content
POST
/
graphql
List Jobs
curl --request POST \
  --url https://api.example.com/graphql \
  --header 'Content-Type: application/json' \
  --data '
{
  "organizationId": "<string>",
  "recruiterId": "<string>",
  "userType": "<string>",
  "pageNum": 123,
  "perPage": 123,
  "search": "<string>",
  "drafts": true
}
'
{
  "data": {
    "getJobs": {
      "jobs": [
        {
          "_id": "68c42431b9f38f8c24fbc91f",
          "title": "Senior Backend Engineer",
          "jobDescription": "Build scalable microservices...",
          "skills": ["Go", "Kubernetes", "PostgreSQL"],
          "recruiterId": "recr_7f3a21",
          "recruiterName": "Alex Doe",
          "organizationId": "ORG45"
        }
      ]
    }
  }
}

Overview

Retrieve jobs for a specific organization and recruiter with support for pagination, search, and draft filtering.

Endpoint

POST /graphql
Content-Type: application/json

GraphQL Query

query getJobs($input: getJobsInput!) {
  getJobs(input: $input) {
    jobs {
      _id
      title
      jobDescription
      skills
      recruiterId
      recruiterName
      organizationId
    }
  }
}

Request Parameters

organizationId
string
required
Filter jobs by organization
recruiterId
string
required
Filter jobs by recruiter
userType
string
required
User role (Admin/Recruiter)
pageNum
integer
default:1
Page number (1-based indexing)
perPage
integer
default:20
Items per page (maximum: 100)
Search term for job title or description
drafts
boolean
default:false
Include draft jobs in results

Request Example

curl -X POST https://api.exterview.ai/graphql \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query getJobs($input: getJobsInput!) { getJobs(input: $input) { jobs { _id title jobDescription skills recruiterId recruiterName organizationId } } }",
    "variables": {
      "input": {
        "organizationId": "68a595060754e2425",
        "recruiterId": "68a5b11168f3d6ccd1a",
        "userType": "Admin",
        "drafts": false,
        "perPage": 10,
        "pageNum": 1
      }
    }
  }'

Response

data
object

Response Example

{
  "data": {
    "getJobs": {
      "jobs": [
        {
          "_id": "68c42431b9f38f8c24fbc91f",
          "title": "Senior Backend Engineer",
          "jobDescription": "Build scalable microservices...",
          "skills": ["Go", "Kubernetes", "PostgreSQL"],
          "recruiterId": "recr_7f3a21",
          "recruiterName": "Alex Doe",
          "organizationId": "ORG45"
        }
      ]
    }
  }
}