---
title: "Provision City Group Chat"
method: POST
path: "/api/group-chat-city/provision"
tags: ["group-chat-city"]
---

# Provision City Group Chat

`POST /api/group-chat-city/provision`

Idempotently provisions the caller into their city's private channel:
  1. A Mattermost channel for the user's city (if missing)
  2. A Mattermost user for the caller (if missing, shared with /group-chat)
  3. Membership in the global team and the city channel
  4. A fresh PAT for the user

The city allow-list is enforced here rather than only in the client, so an
outdated or tampered build can't provision itself into a city we haven't
launched.

## Headers

- `x-user-id` string, nullable

## Response `200`

Successful Response

- CityProvisionResponse
  - `mattermost_url` string, required
  - `team_id` string, required
  - `channel_id` string, required
  - `user_id` string, required
  - `access_token` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/usecreed/apis/creed-api.md) · [All operations](https://skmtc.net/usecreed/apis/creed-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usecreed/creed-api/revisions/523833f9e819/schema)
