# Submit a sync job

**POST** `/v1/jobs/sync`

**Operation ID**: `submitSyncJob`
**Summary**: Submit a sync job
Submits a job whose results will be returned synchronously as a stream of nd-json. Both streaming and batch jobs using a source with synchronous processing type are supported. The returned data is new-line delimited json log event records. The returned data will be wrapped in an EventRecord object that contains the state of the job. The server will periodically send heartbeats to the client through the same stream so the client knows the server is still alive. The client in return should send a heartbeat back to the server using the `/sync/heartbeat` endpoint to keep the connection alive. The client should use the heartbeat token returned in the EventRecord object to send the heartbeat. The connection will be closed if the client does not send a heartbeat within the timeout period. Additionally, the connection will close if the job fails or finished, or if the job runs for too long. This last timeout is dependent on whether the job is a batch or streaming job.

## Tags
- Jobs
## Request Body

**Content-Type**: `application/json`

**Schema**: `CreateJob`

## Responses

### 200

Sync job submitted successfully

- **Content-Type**: `application/x-ndjson` / `EventRecord`
### 400

Bad Request

### 401

Unauthorized
