# Save a drafting run's Targets and filters

Replaces the Targets of a drafting run (titles, keywords, and which are ticked) and its location, remote-only and recency filters. The filters belong to this run; the apply profile is never changed. Only a run still drafting can be edited. Requires authentication.

```http
PUT https://hiresweep.com/api/openapi/discovery/runs/{id}/draft
x-api-key: YOUR_API_KEY
```

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | Yes |  |

## Request body

```json
{
  "type": "object",
  "properties": {
    "targets": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "keywords": {
            "type": "array",
            "maxItems": 15,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "selected": {
            "type": "boolean"
          }
        },
        "required": [
          "title",
          "keywords",
          "selected"
        ]
      },
      "description": "Every Target of the draft, as edited, with whether it is ticked."
    },
    "filters": {
      "type": "object",
      "properties": {
        "locations": {
          "type": "array",
          "maxItems": 5,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "description": "The places to search, any of which a job may be in; empty for anywhere."
        },
        "remoteOnly": {
          "type": "boolean"
        },
        "postedWithinDays": {
          "anyOf": [
            {
              "const": 1
            },
            {
              "const": 3
            },
            {
              "const": 7
            },
            {
              "const": 14
            },
            {
              "const": 30
            }
          ]
        },
        "companyStages": {
          "type": "array",
          "maxItems": 3,
          "items": {
            "enum": [
              "early",
              "growth",
              "public"
            ],
            "type": "string"
          },
          "description": "The company stages to search; empty for every company."
        }
      },
      "required": [
        "locations",
        "remoteOnly",
        "postedWithinDays",
        "companyStages"
      ],
      "description": "The locations, remote-only, recency and company-stage filters to search under."
    },
    "clientId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "description": "The client whose data this is, for an operator applying on behalf of clients. Omit for your own."
    }
  },
  "required": [
    "targets",
    "filters"
  ]
}
```

## Responses

- `200`: The drafting run as saved.
