# Run one action of a connected service now

`POST /workspace/run` · Rivier · workspace

Run one action of a connected service now.

- Scope: workspace:write
- Graphql: Mutation.workspaceServiceRun
- Sdk: workspace.service.run
- Cli: workspace service run

## Request body

`application/json`

```json
{
  "type": "object",
  "properties": {
    "service": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "action": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "payload": {
      "type": "object",
      "additionalProperties": {}
    },
    "agentId": {
      "type": "string",
      "format": "uuid"
    }
  },
  "required": [
    "service",
    "action"
  ],
  "additionalProperties": false
}
```

## Responses

- `200`: 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/run' \
  -H 'Authorization: Bearer $KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "service": "string",
  "action": "string"
}'
```
