---
title: "Create Self Hosted Organization Invitation"
method: POST
path: "/v1/organizations/{organization_id}/invitations/"
tags: ["Organizations"]
deprecated: true
---

# Create Self Hosted Organization Invitation

`POST /v1/organizations/{organization_id}/invitations/`

## Request

- Base URL: `https://logfire-api.pydantic.dev/api`
- URL: `https://logfire-api.pydantic.dev/api/v1/organizations/{organization_id}/invitations/`
- Auth: OAuth 2
  - Authorization code: `api/oauth/authorize`
  - Token URL: `/api/oauth/token` scopes: `organization:admin`
- TypeScript: <https://skmtc.dev/pydantic/apis/pydantic-logfire-api/docs/v1/organizations/:organization_id/invitations/post.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

Create an organization invitation and return its join URL (self-hosted admin only).

`max_usage_count` sets how many people may join through the returned link, and defaults to 1.

This endpoint is deprecated. Use `/api/v1/invitations/` with an org-context token instead.

## Path parameters

- `organization_id` string, uuid, required

## Request body

- OrganizationInvitationCreateV1
  - `role` 'admin' | 'member' | 'guest' | 'billing', required
  - `expiration` string, date-time
  - `max_usage_count` integer

## Response `201`

Successful Response

- OrganizationInvitationCreateResponseV1
  - `invite_url` string, required

## Other responses

- `422`: Validation Error
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/pydantic/apis/pydantic-logfire-api.md) - [All operations](https://skmtc.dev/pydantic/apis/pydantic-logfire-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pydantic/apis/pydantic-logfire-api/revisions/7996e45256f4?raw)
