# Getting Started

This walks you through posting your first job on the testing environment. It takes about 15 minutes.

> Planning a full integration? Read [Integration Approach](https://connect.equest.com/joblauncher-api/docs/integration-approach) first. We recommend sending users to eQuest's screens to pick boards, which saves significant development work. This page walks through the API calls themselves.

## Before you start

You'll need:

-   **Testing credentials** from eQuest. Email [api-support@equest.com](mailto:api-support@equest.com) to get them. Production credentials come from the customer's eQuest admin later. See [Authentication](https://connect.equest.com/joblauncher-api/docs/authentication) for Basic auth vs. OAuth 2.0.
-   **At least one board** set up on your testing account.
-   A tool to make HTTP calls, like cURL or Postman.

## Environments

| Environment | Base URL | Use it for |
| --- | --- | --- |
| Testing | `https://joblauncher.testing.equest.com/api` | Building and testing your integration. |
| Production | `https://joblauncher.equest.com/api` | Real postings. |

## Headers on every request

| Header | Value |
| --- | --- |
| `Authorization` | Basic auth (API username and password) or an OAuth 2.0 Bearer token. See [Authentication](https://connect.equest.com/joblauncher-api/docs/authentication). |
| `Content-Type` | `application/json` or `text/xml` |
| `Accept` | `application/json` or `text/xml` |
| `X-Accept-Version` | The API version you built against, for example `1.12.0` |

> **Always send** `**X-Accept-Version**`**.** It keeps your request and response formats stable when we release new versions. You upgrade when you're ready by changing the header. If you leave it out, eQuest uses version 1.0, which is missing most of what's documented here.

## Step 1: Create a draft

Save this as `draft.json`:

```text
{
  "requisition_number": "REQ-20418",
  "position": {
    "title": "Senior Software Engineer",
    "description": "Build and scale the services that power our hiring platform.",
    "location": {
      "country": "US",
      "state": "US-CA",
      "city": "San Ramon",
      "zip": "94583"
    },
    "work_location_type": "HYBRID",
    "classification": {
      "type": "PERMANENT",
      "time": "FULLTIME",
      "function": "15103100",
      "industry": 9
    }
  },
  "company": {
    "name": "Acme Corp"
  },
  "candidate_response": {
    "url": "https://careers.example.com/jobs/20418/apply",
    "email": "apply@example.com"
  }
}
```

Then send it:

```text
curl -i https://joblauncher.testing.equest.com/api/drafts \
  -u 'USER:PASS' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'X-Accept-Version: 1.12.0' \
  -d @draft.json
```

You'll get a `201 Created`. The body is the draft, with its `id` and a set of `_links`. The `Location` header has the same draft URL, ending in the draft ID:

```text
Location: https://joblauncher.testing.equest.com/api/drafts/88231
```

## Step 2: Find your boards

```text
curl https://joblauncher.testing.equest.com/api/boards \
  -u 'USER:PASS' \
  -H 'Accept: application/json' \
  -H 'X-Accept-Version: 1.12.0'
```

Note the `id` of each board you want. If a board shows `bsd_required: true`, it needs extra fields first. See **Board specific data** below.

## Step 3: Post to boards

Send all boards in one call. Each call counts as one transaction for billing.

```text
curl -i https://joblauncher.testing.equest.com/api/drafts/88231/postings \
  -u 'USER:PASS' \
  -H 'Content-Type: application/json' \
  -H 'X-Accept-Version: 1.12.0' \
  -d '[{"board": {"id": 10}, "posting_instructions": {}}]'
```

A `202 Accepted` means the job was created and delivery is queued. The `Location` header has the job URL.

## Step 4: Check delivery

Use the job ID from the end of the `Location` header in step 3.

```text
curl https://joblauncher.testing.equest.com/api/jobs/514077/postings \
  -u 'USER:PASS' \
  -H 'Accept: application/json' \
  -H 'X-Accept-Version: 1.12.0'
```

Look at `board_status.state` on each posting. When it says `posted`, the `live_url` shows where the job is on the board.

## Step 5: Close the job

```text
curl -X DELETE https://joblauncher.testing.equest.com/api/jobs/514077 \
  -u 'USER:PASS' \
  -H 'X-Accept-Version: 1.12.0'
```

## Board specific data

Some boards need fields that aren't part of the standard job, like a board's own category list. These boards show `bsd_required: true`.

1.  Call `GET /drafts/{draft_id}/bsd` with the board IDs and a `return_url`.
2.  Send your user to the URL you get back. They fill in the extra fields on an eQuest page.
3.  eQuest sends them back to your `return_url`.
4.  Post the draft as usual.

## Updating a job

Drafts are single use. To change a job that's already posted, create a new draft with the same `requisition_number` and the updated data, then post it to the same boards. Active postings are updated in place, and expired ones are reposted.

## Tips

-   **Leave out a field to use your account default.** Sending an empty value means you want it blank.
-   **Use webhooks instead of polling.** Set `webhook_url` on the draft or on each posting, and eQuest will call you when status changes. See [Webhooks](https://connect.equest.com/joblauncher-api/docs/webhooks) for the payload.
-   **Build against testing first,** then switch the base URL and credentials for production. Anything sent to production is real and uses up job board inventory.
