## Run manually

`POST /v1/infra/servers/:id/jobs/:jobId/run`

Accepts one manual run and immediately returns `runId`. Allowed even with `enabled: false`, but requires the feature and schedules to be available. HTTP 202 does not mean the call was delivered or the work completed. Each repeat of this POST creates a new `runId`, so do not blindly retry after losing a response; check the run history instead.

Requires a key with `vibe:infra` and existing server permissions. Writes need the managing key or a team role permitted to manage the lifecycle. General rules: [Scheduled HTTP calls](../jobs.md). Request verification in the handler: [Verify signatures](./signature.md).

## Parameters

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | Server ID from the [server list](../servers/list.md) |
| `jobId` | path | string | yes | Job ID from the [job list](./list.md) |

No request body or query parameters are needed.

## Examples

### curl — personal key

```bash
curl --max-time 20 -X POST "https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/jobs/JOB_ID/run" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl --max-time 20 -X POST "https://vibecode.bitrix24.com/v1/infra/servers/SERVER_ID/jobs/JOB_ID/run" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const serverId = 'SERVER_ID';
const jobId = 'JOB_ID';
const res = await fetch(`https://vibecode.bitrix24.com/v1/infra/servers/${encodeURIComponent(serverId)}/jobs/${encodeURIComponent(jobId)}/run`, {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
});
const result = await res.json();
if (!res.ok || !result.success) throw new Error(result.error?.code ?? `HTTP_${res.status}`);
console.log(result);
```

### JavaScript — OAuth application

```javascript
const serverId = 'SERVER_ID';
const jobId = 'JOB_ID';
const res = await fetch(`https://vibecode.bitrix24.com/v1/infra/servers/${encodeURIComponent(serverId)}/jobs/${encodeURIComponent(jobId)}/run`, {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
});
const result = await res.json();
if (!res.ok || !result.success) throw new Error(result.error?.code ?? `HTTP_${res.status}`);
console.log(result);
```

## Response fields

| Field | Type | Description |
|---|---|---|
| `success` | boolean | Always `true` on success |
| `data.runId` | string | ID of the new run. Use it to find the run in [run history](./runs.md) |

The signing secret is not returned.

## Response example

`202 Accepted` response:

```json
{
  "success": true,
  "data": {
    "runId": "cmvht3kfl1vpa4bpf4406sbpt"
  }
}
```

## Error response example

404 — the job is missing, deleted or belongs to another server:

```json
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "NOT_FOUND"
  }
}
```

## Errors

| HTTP | Code | Reason |
|---|---|---|
| 400 | `BLACKHOLE_ONLY` | The server is not in Black Hole mode |
| 400 | `GALAXY_NOT_SUPPORTED` | The server is a galaxy host |
| 403 | `WAKE_SCHEDULE_DISABLED` | Schedules are unavailable to this portal |
| 403 | `WAKE_SCHEDULE_GALAXY_DISABLED` | Schedules for galaxy apps are not enabled |
| 404 | `NOT_FOUND` | Server not found or inaccessible to the caller; `message` is `Server not found` |
| 404 | `NOT_FOUND` | The job is missing, deleted or belongs to another server; `message` is `NOT_FOUND` |
| 404 | `FEATURE_DISABLED` | The feature is unavailable to this portal |
| 401 | `MISSING_API_KEY` | Missing API key |
| 403 | `INFRA_FORBIDDEN_FOR_COWORK_KEY` | A Cowork key cannot write infrastructure. Use a [deployment key](../../cowork/deploy-key.md) |
| 403 | `INFRA_SCOPE_REQUIRED` | The key lacks the `vibe:infra` scope |
| 403 | `WRITE_BLOCKED_READONLY_KEY` | A read-only key cannot write |
| 403 | `SERVER_ROLE_FORBIDDEN` | Development team role does not permit this action |
| 429 | `RATE_LIMITED` | The job mutation limit is exceeded: 10 per minute platform-wide. The effective value for the key is in the `x-ratelimit-limit` header, as the cap is divided across replicas. Shared API limits also apply |

Full list of shared error codes — [Errors](/docs/errors).

## See also

- [List jobs](./list.md)
- [Run history](./runs.md)
