---
title: "Slack Install Url"
method: POST
path: "/v1/integrations/slack/install-url"
tags: ["integrations"]
---

# Slack Install Url

`POST /v1/integrations/slack/install-url`

## Request

- Base URL: `https://api.patricia.app` (the document declares no server; this is the origin it was published from)
- URL: `https://api.patricia.app/v1/integrations/slack/install-url`
- Auth: HTTP bearer

Return a Slack authorize URL with an HMAC-signed, short-TTL state.

The signed state carries the authenticated principal's ``tenant_id`` so
the OAuth callback can attach the Slack workspace to the correct tenant.
Callers cannot influence which tenant the state targets: only members
holding ``integrations:edit`` on a tenant can initiate the install for
that tenant, and the tenant identity comes exclusively from the bearer token.

``return_path`` is the dashboard page the user clicked Connect from; the callback
sends the browser back there with the outcome flag. The body is optional so a
bodyless POST still mints a URL.

Two different limits apply, deliberately. The schema's 2048 ``max_length`` is a
payload guard only: it 422s a body no real dashboard route could produce. The limit
that decides where the user lands is the much shorter
``core.redirects.MAX_RETURN_PATH_LENGTH``, applied during sanitization. A path that
is off-origin or longer than that is silently dropped and the callback falls back to
its default landing page, never a 422, because a bad return page must not be the
thing that blocks someone from connecting Slack.

## Headers

- `X-Tenant-Id` string, nullable

## Request body

- SlackInstallUrlRequest: Optional body for the install-URL mint: where to return after Slack's consent screen.
  - `return_path` string: App-relative dashboard path to return to after the Slack consent screen.

## Response `200`

Successful Response

- SlackInstallUrlResponse: The Slack authorize URL the browser is handed off to.
  - `url` string, required: Slack authorize URL carrying the HMAC-signed, short-TTL state.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/patricia/apis/patricia-api.md) · [All operations](https://skmtc.dev/patricia/apis/patricia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/patricia/apis/patricia-api/revisions/0dfb44495ea1?raw)
