---
title: Update a host assignment
description: "Patches a host row's role / is_fixed / priority / weight."
api_method: PATCH
api_path: "/v1/services/{serviceId}/hosts/{memberId}"
canonical_url: https://wiblo.app/docs/developers/api/hosts/update-service-host
last_updated: 2026-07-28T17:56:11+02:00
md_url: https://wiblo.app/docs/developers/api/hosts/update-service-host.md
---

# Update a host assignment

`PATCH /v1/services/{serviceId}/hosts/{memberId}`

Patches a host row's role / is_fixed / priority / weight. Owner/admin only. Per-user rate-limited at 60/60s.

## Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `serviceId` | `string` | Yes |  |
| `memberId` | `string` | Yes |  |

## Headers

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `X-Wiblo-Workspace` | `string` | Yes | Workspace id the call is scoped to. The actor must hold an active membership in it; a foreign or unknown id collapses onto 404 WORKSPACE_NOT_FOUND. |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `role` | `"organizer" \| "host"` | No |  |
| `is_fixed` | `boolean` | No |  |
| `priority` | `integer \| null` | No |  |
| `weight` | `integer \| null` | No |  |

## Request

**curl**

```bash
curl https://api.wiblo.app/v1/services/3f8a2b9c-51d4-4e0b-9c6a-7d2e8f1a4b5c/hosts/8b3e6d2a-4c7f-4e1b-9d5a-2f6c8e3b7a1d \
  -X PATCH \
  -H "Authorization: Bearer $WIBLO_TOKEN" \
  -H "X-Wiblo-Workspace: $WIBLO_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "priority": 90,
  "weight": null
}'
```

**TypeScript**

```ts
import { createSdk, updateServiceHost } from "@workspace/sdk"

const sdk = createSdk({ baseUrl: "https://api.wiblo.app" })

const { data, error } = await updateServiceHost({
  client: sdk,
  path: { serviceId: "3f8a2b9c-51d4-4e0b-9c6a-7d2e8f1a4b5c", memberId: "8b3e6d2a-4c7f-4e1b-9d5a-2f6c8e3b7a1d" },
  headers: { "X-Wiblo-Workspace": "..." },
  body: {
    "priority": 90,
    "weight": null
  },
})
```

## Example response

```json
{
  "id": "c7b2e9f4-6d1a-4f8b-b3c5-9e2d7a4f6c1b",
  "service_id": "3f8a2b9c-51d4-4e0b-9c6a-7d2e8f1a4b5c",
  "member_id": "8b3e6d2a-4c7f-4e1b-9d5a-2f6c8e3b7a1d",
  "role": "host",
  "is_fixed": false,
  "priority": 90,
  "weight": null,
  "created_at": "2026-07-20T11:30:00.000Z",
  "updated_at": "2026-07-28T09:12:00.000Z",
  "member": {
    "id": "8b3e6d2a-4c7f-4e1b-9d5a-2f6c8e3b7a1d",
    "name": "Jonas Weber",
    "email": "jonas@example.com",
    "avatar_url": null
  }
}
```

## Responses

**`200`** — The updated host assignment. Returns `HostResponse`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes |  |
| `service_id` | `string` | Yes |  |
| `member_id` | `string` | Yes |  |
| `role` | `"organizer" \| "host"` | Yes |  |
| `is_fixed` | `boolean` | Yes |  |
| `priority` | `integer \| null` | Yes |  |
| `weight` | `integer \| null` | Yes |  |
| `created_at` | `string` | Yes |  |
| `updated_at` | `string` | Yes |  |
| `member` | `object` | Yes |  |
| `member.id` | `string` | Yes |  |
| `member.name` | `string` | Yes |  |
| `member.email` | `string \| null` | Yes |  |
| `member.avatar_url` | `string \| null` | Yes |  |

**`400`** — Body failed Zod validation (`VALIDATION_FAILED`). Returns `ApiErrorEnvelope`.

**`401`** — No valid session cookie or `wbl_*` bearer was present. Returns `ApiErrorEnvelope`.

**`403`** — The actor is a plain member; owner or admin is required (`ADMIN_REQUIRED`). Returns `ApiErrorEnvelope`.

**`404`** — No host row for this member on this service (`HOST_NOT_FOUND`), or the service collapsed (`SERVICE_NOT_FOUND`). Returns `ApiErrorEnvelope`.

**`422`** — Path param failed UUID validation (`INVALID_PARAMS`). Returns `ApiErrorEnvelope`.

**`429`** — Rate limit exceeded. The body's `error.code` is `RATE_LIMITED` and `error.details.retry_after` is the same number of seconds as the `Retry-After` header. Returns `ApiErrorEnvelope`.
