# Declare a job's files

Scope `processing`. Answers one upload URL per file; nothing is processed until you start the job.

## Endpoint

`POST /v1/api/jobs`

## Request body

Content type: `application/json`.

```json
{
  "files": [
    {
      "name": "march.pdf",
      "contentType": "application/pdf",
      "sizeBytes": 482113,
      "documentType": "bank_statement"
    }
  ]
}
```

## Responses

### 201

Declared.

Content type: `application/json`.

```json
{
  "data": {
    "id": "",
    "state": "awaiting_start",
    "files": [
      {
        "id": "",
        "name": "string",
        "contentType": "string",
        "sizeBytes": 1,
        "documentType": "string",
        "uploadUrl": "string"
      }
    ]
  }
}
```

### 400

The files are wrong — the message names the rule.

Content type: `application/json`.

```json
{
  "error": {
    "message": "string"
  }
}
```

### 401

No key, or an unknown or revoked one.

Content type: `application/json`.

```json
{
  "error": {
    "message": "string"
  }
}
```

### 402

A key issued from Settings → Developer, on a workspace without the Enterprise plan.

Content type: `application/json`.

```json
{
  "error": {
    "message": "string"
  }
}
```

### 403

The key was not given `processing`, or is a board key.

Content type: `application/json`.

```json
{
  "error": {
    "message": "string"
  }
}
```

### 404

No job or deal with that id that this key can reach.

Content type: `application/json`.

```json
{
  "error": {
    "message": "string"
  }
}
```

### 503

File storage is not configured.

Content type: `application/json`.

```json
{
  "error": {
    "message": "string"
  }
}
```
