Layero Organizations API
The organizations API from Layero — 4 operation(s) for organizations.
The organizations API from Layero — 4 operation(s) for organizations.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/layero-ru:layero-ru-organizations-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Layero Organizations API
version: 0.1.0
tags:
- name: Organizations
paths:
/organizations:
get:
tags:
- Organizations
summary: List Organizations
description: 'Organizations the user belongs to via organization_members.
Includes accounts the user has been invited into, not just the ones
they created. `my_role` lets the dashboard hide admin-only actions
(Invite, Transfer accept) for plain members.'
operationId: list_organizations_organizations_get
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OrganizationOut'
title: Response List Organizations Organizations Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
post:
tags:
- Organizations
summary: Create Organization
description: 'Create a new organization. Caller becomes its admin.
Independent of the user''s personal organization (slug = username) —
a user can spin up multiple organizations to scope unrelated work.
Slug uniqueness is platform-wide and validated client-side, but the
DB unique constraint is the real authority (race-safe).'
operationId: create_organization_organizations_post
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOrganizationIn'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/organizations/search:
get:
tags:
- Organizations
summary: Search Organizations
description: 'Подсказка организаций по началу слага — для выбора получателя передачи.
Передавать проект можно в ЛЮБУЮ организацию, не только в свою: слаг
получателя раньше вбивали руками, а слаг, которого не видно, набрать
нельзя. Поэтому это поиск по всем организациям, а не список своих.
ГРАНИЦЫ. Ручка отвечает только аутентифицированному пользователю, просит
минимум два символа и отдаёт максимум восемь совпадений — перебрать через
неё каталог владельцев можно, но дороже, чем через уже открытые адреса
сайтов: слаг организации и так виден в адресе каждого её проекта. Наружу
идут ровно три поля; почта, состав участников и внутренние идентификаторы
не отдаются.
Совпадение — по НАЧАЛУ слага, а не подстрокой: «mi» обязано предлагать
`mixa`, но не всякую организацию, у которой «mi» затесалось в середине.'
operationId: search_organizations_organizations_search_get
parameters:
- name: q
in: query
required: true
schema:
type: string
title: Q
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OrganizationSuggestOut'
title: Response Search Organizations Organizations Search Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/organizations/{slug}/rename/check:
get:
tags:
- Organizations
summary: Check Organization Rename
description: 'Свободно ли имя и что переедет — до подтверждения, а не после.
Смена слага деструктивна: прежние адреса перестают работать в тот же
момент. Узнавать об этом из 409 после нажатия — худший момент из
возможных, поэтому расчёт доступен отдельным GET и совпадает с тем, что
сделает PATCH (`_rename_availability`).
Требует прав администратора, как и само переименование: иначе ручка
превращается в перебор занятых имён по всей платформе.'
operationId: check_organization_rename_organizations__slug__rename_check_get
parameters:
- name: slug
in: path
required: true
schema:
type: string
title: Slug
- name: value
in: query
required: true
schema:
type: string
title: Value
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationRenameCheckOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/organizations/{slug}:
patch:
tags:
- Organizations
summary: Rename Organization
description: 'Сменить слаг организации. ДЕСТРУКТИВНАЯ операция.
Слаг организации — префикс адреса каждого её проекта
(`-.layero.ru`), поэтому смена имени переносит апекс и хосты
всех окружений. Всё — одной транзакцией: половина проектов на новом имени,
половина на старом хуже, чем отказ.
Работает для обоих видов организаций. Для личной это единственный способ
уйти с аварийного имени: V187 заводила орги вида `имя-a1b2c3` тем, чей слаг
был занят чужой организацией, и до этой ручки такой слаг оставался с
человеком навсегда, попадая в адрес каждого его сайта.
ПРЕЖНИЕ ИМЕНА ОСВОБОЖДАЮТСЯ, а не уходят в 301 — то же решение, что и у
смены адреса проекта (2026-07-26): инициатор здесь владелец, он знает, что
делает, и вечный редирект навсегда сжигал бы имя в общем пространстве.
Платформенные переезды (APP-05), где имя меняет не владелец, остаются с
редиректом — там он обязателен.
Проекты, чей адрес владелец менял руками, НЕ трогаются: их метка из слага
организации не выведена (`apex_after_org_rename` → None), и переписать её
значило бы отнять выбранное человеком имя. Список возвращается в
`untouched_projects`, чтобы это было видно, а не молча.'
operationId: rename_organization_organizations__slug__patch
parameters:
- name: slug
in: path
required: true
schema:
type: string
title: Slug
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RenameOrganizationIn'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationRenameOut'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Organizations
summary: Delete Organization
description: 'Delete a team organization.
Refuses on personal orgs (created at signup, kept while the user
exists) and on team orgs that still own projects — caller must
delete or transfer projects first. The cascade rules in V045+
take care of organization_members and organization_invites; the
multi-installation table cascades on organization_id too.'
operationId: delete_organization_organizations__slug__delete
parameters:
- name: slug
in: path
required: true
schema:
type: string
title: Slug
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'204':
description: Successful Response
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
CreateOrganizationIn:
properties:
slug:
type: string
maxLength: 32
minLength: 2
title: Slug
type: object
required:
- slug
title: CreateOrganizationIn
OrganizationSuggestOut:
properties:
slug:
type: string
title: Slug
kind:
type: string
title: Kind
avatar_url:
anyOf:
- type: string
- type: 'null'
title: Avatar Url
type: object
required:
- slug
- kind
title: OrganizationSuggestOut
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
HostnameMove:
properties:
old:
type: string
title: Old
new:
type: string
title: New
type: object
required:
- old
- new
title: HostnameMove
OrganizationOut:
properties:
id:
type: string
format: uuid
title: Id
github_login:
anyOf:
- type: string
- type: 'null'
title: Github Login
slug:
type: string
title: Slug
my_role:
type: string
title: My Role
kind:
type: string
title: Kind
default: team
is_suspended:
type: boolean
title: Is Suspended
default: false
type: object
required:
- id
- github_login
- slug
- my_role
title: OrganizationOut
OrganizationRenameCheckOut:
properties:
available:
type: boolean
title: Available
normalized:
type: string
title: Normalized
reason:
anyOf:
- type: string
- type: 'null'
title: Reason
moves:
items:
$ref: '#/components/schemas/HostnameMove'
type: array
title: Moves
default: []
untouched_projects:
items:
type: string
type: array
title: Untouched Projects
default: []
conflicts:
items:
type: string
type: array
title: Conflicts
default: []
type: object
required:
- available
- normalized
title: OrganizationRenameCheckOut
OrganizationRenameOut:
properties:
organization:
$ref: '#/components/schemas/OrganizationOut'
moves:
items:
$ref: '#/components/schemas/HostnameMove'
type: array
title: Moves
default: []
untouched_projects:
items:
type: string
type: array
title: Untouched Projects
default: []
type: object
required:
- organization
title: OrganizationRenameOut
RenameOrganizationIn:
properties:
slug:
type: string
maxLength: 32
minLength: 2
title: Slug
type: object
required:
- slug
title: RenameOrganizationIn