# Repeat a Discovery run's search daily or weekly

Saves a run's resume, ticked Targets and filters as the workspace's repeating search, replacing the one it had. The server then searches with them on its own, daily or weekly at about this time of day, skipping the Target suggestions, and emails a digest when a search finds new jobs (on by default). A run that already searched repeats one period from now; a draft searches within a few minutes. Each search counts like one started by hand, and one the plan refuses is let go by with the reason recorded. One repeating search per workspace. Requires authentication.

```http
PUT https://hiresweep.com/api/openapi/discovery/schedule
x-api-key: YOUR_API_KEY
```

## Request body

```json
{
  "type": "object",
  "properties": {
    "runId": {
      "type": "string",
      "minLength": 1,
      "description": "The ID of the Discovery run whose resume, Targets and filters to repeat."
    },
    "frequency": {
      "enum": [
        "daily",
        "weekly"
      ],
      "type": "string",
      "description": "How often to search: daily or weekly."
    },
    "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": [
    "runId",
    "frequency"
  ]
}
```

## Responses

- `200`: The repeating search, as saved.
