# Run an action on a cadence

`POST /workspace/schedules` · Rivier · campaigns

Run an action on a cadence.

- Scope: campaigns:write
- Graphql: Mutation.campaignsScheduleCreate
- Sdk: campaigns.schedule.create
- Cli: campaigns schedule create

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "service": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "action": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "cadence": {
      "type": "string",
      "enum": [
        "hourly",
        "daily",
        "weekly"
      ]
    },
    "payload": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "service",
    "action",
    "name",
    "cadence"
  ],
  "additionalProperties": false
}
```

## Responses

- `201`: Success
- `400`: The request was malformed
- `401`: No valid credential
- `403`: The credential lacks the scope, origin or address
- `429`: Over the key's rate limit; see Retry-After

## Example

```sh
curl -X POST 'https://api.rivier.ai/workspace/schedules' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "service": "string",
  "action": "string",
  "name": "string",
  "cadence": "hourly"
}'
```
