Xata Organizations API

Operations for creating, retrieving, updating, and deleting organizations

GitHub OpenAPI

Operations 14

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /organizations List organizations I belong to · Get list of organizations #
Ask an LLM
“Which organizations does my account have access to?”
“Can I see the IDs and names of every organization I'm a member of?”
Tell an agent
List all organizations I belong to.
Show me the organization IDs and names for every organization my account can access.
POST /organizations Create a new organization · Create a new organization #
Ask an LLM
“How do I create a new organization with myself as the only owner?”
“What name do I need to give a new organization?”
Tell an agent
Create an organization named {name}.
Set up a new organization called {name} with me as its sole owner.
GET /organizations/{organizationID} Get an organization's details · Get organization details #
Ask an LLM
“What information is stored for a specific organization?”
“Can I look up one organization by its ID?”
Tell an agent
Get organization {organizationID}.
Show the details of organization {organizationID}.
PUT /organizations/{organizationID} Rename an organization · Update organization details #
Ask an LLM
“Can I rename an organization I own?”
“How do I change an organization's name?”
Tell an agent
Rename organization {organizationID} to {name}.
Change the name of organization {organizationID} to {name}.
DELETE /organizations/{organizationID} Delete an organization · Delete an organization #
Ask an LLM
“Can I permanently delete an organization?”
“Is deleting an organization still not implemented?”
Tell an agent destructive · confirm first
Delete organization {organizationID}.
Permanently remove organization {organizationID}.
GET /organizations/{organizationID}/members List members of an organization · List members of an organization #
Ask an LLM
“Who are the members of a given organization?”
“Can I see every person in one organization?”
Tell an agent
List the members of organization {organizationID}.
Show everyone in organization {organizationID}.
DELETE /organizations/{organizationID}/members/{userID} Remove a member from an organization · Remove a member from an organization #
Ask an LLM
“How do I kick a user out of an organization?”
“Can I remove someone from an organization by their user ID?”
Tell an agent destructive · confirm first
Remove user {userID} from organization {organizationID}.
Kick {userID} out of organization {organizationID}.
GET /organizations/{organizationID}/invitations List pending organization invitations · List invitations for an organization #
Ask an LLM
“Which invitations to join my organization are still open?”
“Can I filter organization invitations by status or email?”
Tell an agent
List invitations for organization {organizationID}.
Show pending invitations to organization {organizationID} with status {status}.
POST /organizations/{organizationID}/invitations Invite someone to an organization · Send an invitation to join an organization #
Ask an LLM
“How do I invite a teammate to join my organization by email?”
“What happens when I send an organization invitation?”
Tell an agent
Invite {email} to join organization {organizationID}.
Send an organization invitation to {email} for {organizationID}.
GET /organizations/{organizationID}/invitations/{invitationID} Get an organization invitation · Get details of a specific invitation #
Ask an LLM
“What are the details of a specific organization invitation?”
“Can I look up one invitation by its ID?”
Tell an agent
Get invitation {invitationID} in organization {organizationID}.
Show the details of organization invitation {invitationID} for {organizationID}.
DELETE /organizations/{organizationID}/invitations/{invitationID} Delete an organization invitation · Delete an invitation #
Ask an LLM
“Can I cancel an invitation I sent to an organization?”
“How do I delete an organization invitation record?”
Tell an agent destructive · confirm first
Delete invitation {invitationID} from organization {organizationID}.
Cancel organization invitation {invitationID} in {organizationID}.
POST /organizations/{organizationID}/invitations/{invitationID}/resend Resend an organization invitation · Resend an invitation #
Ask an LLM
“How do I resend an invitation that expired?”
“Can I get a fresh expiration on an existing organization invitation?”
Tell an agent
Resend invitation {invitationID} in organization {organizationID}.
Send a new copy of organization invitation {invitationID} for {organizationID}.
POST /organizations/{organizationID}/deletion-request Request deletion of an organization · Request organization deletion #
Ask an LLM
“How do I delete an organization that still has projects?”
“What happens to invoices when I request organization deletion?”
Tell an agent destructive · confirm first
Request deletion of organization {organizationID}.
Flag organization {organizationID} for deletion.
GET /organizations/{organizationID}/membership-limits Get an organization's membership limits · Get organization membership limits #
Ask an LLM
“What is the maximum number of members and invitations allowed for an organization?”
“Can I check my organization's membership limits?”
Tell an agent
Get the membership limits for organization {organizationID}.
Show how many members and invitations organization {organizationID} can have.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/xata:xata-organizations-api"
All apis
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.

Get an API 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 Specification

xata-organizations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Xata Organizations API
  description: Xata API
  version: '1.0'
  contact:
    name: help@xata.io
servers:
- url: https://api.xata.tech
  description: Xata API
tags:
- name: Organizations
  description: Operations for creating, retrieving, updating, and deleting organizations
  x-displayName: Organizations
paths:
  /organizations:
    summary: Organizations Management
    description: This endpoint enables creating and listing organizations within Xata. Organizations are the top-level entity that contains projects, branches, and team members.
    get:
      operationId: getOrganizationsList
      summary: Get list of organizations
      description: Retrieve the list of all organizations the authenticated user belongs to, including their IDs and names. This endpoint allows users to view all organizations they have access to.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  organizations:
                    description: List of organizations the user has access to
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: Unique identifier for the organization
                          $ref: '#/components/schemas/OrganizationID'
                        name:
                          description: Human-readable name of the organization
                          type: string
                        status:
                          description: Current status of the organization
                          $ref: '#/components/schemas/OrganizationStatus'
                      required:
                      - id
                      - name
                      - status
                required:
                - organizations
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthError'
        '404':
          $ref: '#/components/responses/SimpleError'
        5XX:
          description: Unexpected Error
      security:
      - xata:
        - org:read
      tags:
      - Organizations
    post:
      operationId: createOrganization
      summary: Create a new organization
      description: Creates a new organization with the authenticated user as its single owner.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationRequest'
      responses:
        '201':
          description: Organization successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthError'
        '404':
          $ref: '#/components/responses/SimpleError'
        5XX:
          description: Unexpected Error
      security:
      - xata:
        - org:write
      tags:
      - Organizations
  /organizations/{organizationID}:
    summary: Organization Operations
    description: This endpoint provides operations for a specific organization, allowing retrieval, updating, and deletion of an organization by its unique identifier.
    parameters:
    - $ref: '#/components/parameters/OrganizationIDParam'
    get:
      operationId: getOrganization
      summary: Get organization details
      description: Retrieve detailed information about a specific organization by its ID.
      responses:
        '200':
          description: Organization details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthError'
        '403':
          $ref: '#/components/responses/AuthError'
        '404':
          $ref: '#/components/responses/SimpleError'
        5XX:
          description: Unexpected Error
      security:
      - xata:
        - org:read
      tags:
      - Organizations
    put:
      operationId: updateOrganization
      summary: Update organization details
      description: Update information for an existing organization, such as its name.
      requestBody:
        content:
          application/json:
            schema:
              properties:
                id:
                  description: Unique identifier for the organization to update
                  $ref: '#/components/schemas/OrganizationID'
                name:
                  description: New name for the organization
                  type: string
      responses:
        '200':
          description: Organization successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthError'
        '403':
          $ref: '#/components/responses/AuthError'
        '404':
          $ref: '#/components/responses/SimpleError'
        5XX:
          description: Unexpected Error
      security:
      - xata:
        - org:write
      tags:
      - Organizations
    delete:
      operationId: deleteOrganization
      summary: Delete an organization
      description: '[Not implemented yet] Permanently delete an organization. This action cannot be undone.'
      responses:
        '204':
          description: Organization successfully deleted
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthError'
        '403':
          $ref: '#/components/responses/AuthError'
        '404':
          $ref: '#/components/responses/SimpleError'
        5XX:
          description: Unexpected Error
      security:
      - xata:
        - org:write
      tags:
      - Organizations
  /organizations/{organizationID}/members:
    get:
      operationId: listOrganizationMembers
      summary: List members of an organization
      parameters:
      - $ref: '#/components/parameters/OrganizationIDParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  members:
                    type: array
                    items:
                      $ref: '#/components/schemas/UserWithID'
                required:
                - members
      security:
      - xata:
        - org:read
      tags:
      - Organizations
  /organizations/{organizationID}/members/{userID}:
    delete:
      operationId: removeOrganizationMember
      summary: Remove a member from an organization
      parameters:
      - $ref: '#/components/parameters/OrganizationIDParam'
      - $ref: '#/components/parameters/UserIDParam'
      responses:
        '204':
          description: Member removed
      security:
      - xata:
        - org:write
      tags:
      - Organizations
  /organizations/{organizationID}/invitations:
    get:
      operationId: listOrganizationInvitations
      summary: List invitations for an organization
      description: Retrieve all invitations for an organization with optional filtering by status, email, and name.
      parameters:
      - $ref: '#/components/parameters/OrganizationIDParam'
      - name: status
        in: query
        description: Filter invitations by status
        schema:
          type: string
          enum:
          - pending
          - expired
      - name: email
        in: query
        description: Filter invitations by email address
        schema:
          type: string
      - name: first_name
        in: query
        description: Filter invitations by first name
        schema:
          type: string
      - name: last_name
        in: query
        description: Filter invitations by last name
        schema:
          type: string
      - name: search
        in: query
        description: Search invitations by email or name
        schema:
          type: string
      - name: first
        in: query
        description: Index of the first result to return (0-based offset for pagination)
        schema:
          type: integer
          default: 0
          minimum: 0
      - name: max
        in: query
        description: Maximum number of results to return
        schema:
          type: integer
          default: 100
          maximum: 100
          minimum: 1
      responses:
        '200':
          description: List of invitations retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  invitations:
                    type: array
                    items:
                      $ref: '#/components/schemas/OrganizationInvitation'
                required:
                - invitations
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthError'
        '403':
          $ref: '#/components/responses/AuthError'
        '404':
          $ref: '#/components/responses/SimpleError'
        5XX:
          description: Unexpected Error
      security:
      - xata:
        - invite:read
      tags:
      - Organizations
    post:
      operationId: createOrganizationInvitation
      summary: Send an invitation to join an organization
      description: Send an invitation email to a user to join an organization.
      parameters:
      - $ref: '#/components/parameters/OrganizationIDParam'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrganizationInvitationRequest'
      responses:
        '201':
          description: Invitation sent successfully
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthError'
        '403':
          $ref: '#/components/responses/AuthError'
        '404':
          $ref: '#/components/responses/SimpleError'
        '409':
          $ref: '#/components/responses/SimpleError'
        5XX:
          description: Unexpected Error
      security:
      - xata:
        - invite:write
      tags:
      - Organizations
  /organizations/{organizationID}/invitations/{invitationID}:
    get:
      operationId: getOrganizationInvitation
      summary: Get details of a specific invitation
      description: Retrieve detailed information about a specific invitation by its ID.
      parameters:
      - $ref: '#/components/parameters/OrganizationIDParam'
      - $ref: '#/components/parameters/InvitationIDParam'
      responses:
        '200':
          description: Invitation details retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationInvitation'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthError'
        '403':
          $ref: '#/components/responses/AuthError'
        '404':
          $ref: '#/components/responses/SimpleError'
        5XX:
          description: Unexpected Error
      security:
      - xata:
        - invite:read
      tags:
      - Organizations
    delete:
      operationId: deleteOrganizationInvitation
      summary: Delete an invitation
      description: Permanently delete an invitation record.
      parameters:
      - $ref: '#/components/parameters/OrganizationIDParam'
      - $ref: '#/components/parameters/InvitationIDParam'
      responses:
        '204':
          description: Invitation deleted successfully
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthError'
        '403':
          $ref: '#/components/responses/AuthError'
        '404':
          $ref: '#/components/responses/SimpleError'
        5XX:
          description: Unexpected Error
      security:
      - xata:
        - invite:write
      tags:
      - Organizations
  /organizations/{organizationID}/invitations/{invitationID}/resend:
    post:
      operationId: resendOrganizationInvitation
      summary: Resend an invitation
      description: Resend a pending invitation with a fresh expiration time.
      parameters:
      - $ref: '#/components/parameters/OrganizationIDParam'
      - $ref: '#/components/parameters/InvitationIDParam'
      responses:
        '204':
          description: Invitation resent successfully
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthError'
        '403':
          $ref: '#/components/responses/AuthError'
        '404':
          $ref: '#/components/responses/SimpleError'
        5XX:
          description: Unexpected Error
      security:
      - xata:
        - invite:write
      tags:
      - Organizations
  /organizations/{organizationID}/deletion-request:
    post:
      operationId: requestOrganizationDeletion
      summary: Request organization deletion
      description: 'Flags the organization for deletion. The request is rejected if the organization still has active projects.

        The subscription is cancelled immediately and any outstanding invoices are collected automatically after a grace period that prevents missing delayed usage reports.

        Deletion completes asynchronously once all invoices are issued and settled.'
      parameters:
      - $ref: '#/components/parameters/OrganizationIDParam'
      responses:
        '202':
          description: Deletion requested — the organization will be removed once all outstanding invoices are settled
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/AuthError'
        '403':
          $ref: '#/components/responses/AuthError'
        '409':
          $ref: '#/components/responses/SimpleError'
        5XX:
          description: Unexpected Error
      security:
      - xata:
        - org:write
      tags:
      - Organizations
  /organizations/{organizationID}/membership-limits:
    get:
      operationId: getOrganizationMembershipLimits
      summary: Get organization membership limits
      description: Retrieves the membership limits for the specified organization (maximum members and invitations).
      parameters:
      - $ref: '#/components/parameters/OrganizationIDParam'
      responses:
        '200':
          description: Membership limits for the organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganizationMembershipLimits'
        '401':
          $ref: '#/components/responses/AuthError'
        '403':
          $ref: '#/components/responses/AuthError'
        5XX:
          description: Unexpected Error
      security:
      - xata:
        - org:read
      tags:
      - Organizations
components:
  schemas:
    CreateOrganizationRequest:
      description: Request payload for creating a new organization
      type: object
      properties:
        name:
          description: Name for the new organization
          type: string
      required:
      - name
    User:
      description: User information including email, full name, and profile image
      type: object
      properties:
        email:
          description: Email address associated with the user account
          type: string
          format: email
        name:
          description: Name of the user
          type: string
      required:
      - name
      - email
    OrganizationStatus:
      type: object
      properties:
        status:
          description: Indicates whether the organization is active, it's computed as `!disabled_by_admin AND billing_status == 'ok'`
          type: string
          enum:
          - enabled
          - disabled
        disabled_by_admin:
          description: Indicates if the organization has been disabled by an admin
          type: boolean
        admin_reason:
          description: Reason for the current admin status
          type: string
        billing_status:
          description: Indicates the status of the organization from a billing perspective
          type: string
          enum:
          - ok
          - no_payment_method
          - invoice_overdue
          - unknown
          - deletion_requested
        billing_reason:
          description: Reason for the current billing status
          type: string
        usage_tier:
          description: Usage tier of the organization. t1 is the default for new organizations, t2 is assigned when a valid payment method is on file.
          type: string
          enum:
          - t1
          - t2
        last_updated:
          description: Timestamp of the last update to the organization's status
          type: string
          format: date-time
        created_at:
          description: Timestamp when the organization was created
          type: string
          format: date-time
      required:
      - status
      - disabled_by_admin
      - billing_status
      - usage_tier
      - last_updated
    OrganizationMembershipLimits:
      description: Membership limits for an organization
      type: object
      properties:
        maxMembers:
          description: Maximum number of members allowed in the organization
          type: integer
          minimum: 1
          title: Maximum number of organization members
        maxInvites:
          description: Maximum number of pending invitations allowed at once
          type: integer
          minimum: 1
          title: Maximum number of pending invitations
      required:
      - maxMembers
      - maxInvites
    UserWithID:
      allOf:
      - $ref: '#/components/schemas/User'
      - type: object
        description: Extended user object that includes the unique user identifier
        properties:
          id:
            $ref: '#/components/schemas/UserID'
        required:
        - id
    OrganizationID:
      title: OrganizationID
      type: string
      pattern: '[a-zA-Z0-9_-~:]+'
      x-oapi-codegen-extra-tags:
        validate: identifier
    OrganizationInvitation:
      type: object
      properties:
        id:
          description: Unique identifier for the invitation
          type: string
        organization_id:
          description: ID of the organization the invitation is for
          $ref: '#/components/schemas/OrganizationID'
        email:
          description: Email address of the invited user
          type: string
          format: email
        first_name:
          description: First name of the invited user
          type:
          - string
          - 'null'
        last_name:
          description: Last name of the invited user
          type:
          - string
          - 'null'
        created_at:
          description: Timestamp when the invitation was created
          type: string
          format: date-time
        expires_at:
          description: Timestamp when the invitation expires
          type: string
          format: date-time
        status:
          description: Current status of the invitation
          type: string
          enum:
          - pending
          - expired
        invite_link:
          description: URL link to accept the invitation
          type: string
      required:
      - id
      - organization_id
      - email
      - created_at
      - expires_at
      - status
    UserID:
      description: Unique identifier for a user account
      type: string
      pattern: '[a-zA-Z0-9_-~:]+'
      title: UserID
      x-oapi-codegen-extra-tags:
        validate: identifier
    CreateOrganizationInvitationRequest:
      type: object
      properties:
        email:
          description: Email address of the user to invite
          type: string
          format: email
      required:
      - email
    Organization:
      description: Organization details including ID and name
      type: object
      properties:
        id:
          description: Unique identifier for the organization
          $ref: '#/components/schemas/OrganizationID'
        name:
          description: Human-readable name of the organization
          type: string
        status:
          description: Current status of the organization
          $ref: '#/components/schemas/OrganizationStatus'
        marketplace:
          description: Marketplace provider for this organization (e.g. "aws"), if billed through a marketplace
          type:
          - string
          - 'null'
      required:
      - id
      - name
      - status
  responses:
    SimpleError:
      description: Generic error response
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: Error identifier for tracking and debugging
                type: string
              message:
                description: Human-readable error message explaining the issue
                type: string
            required:
            - message
    BadRequestError:
      description: Error returned when the request is malformed or contains invalid parameters
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: Error identifier for tracking and debugging
                type: string
              message:
                description: Human-readable error message explaining the issue
                type: string
            required:
            - message
    AuthError:
      description: Error returned when authentication or authorization fails
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: Error identifier for tracking and debugging
                type: string
              message:
                description: Human-readable error message explaining the issue
                type: string
            example:
              message: invalid API key
            required:
            - message
  parameters:
    InvitationIDParam:
      name: invitationID
      in: path
      required: true
      schema:
        type: string
      description: Unique identifier for an invitation
    UserIDParam:
      name: userID
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/UserID'
      description: Unique identifier for a specific user account
    OrganizationIDParam:
      name: organizationID
      in: path
      required: true
      schema:
        $ref: '#/components/schemas/OrganizationID'
      description: Unique identifier for a specific organization
  securitySchemes:
    oidc:
      type: openIdConnect
      openIdConnectUrl: https://auth.xata.io/realms/xata/.well-known/openid-configuration
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: 'API key authentication using Bearer token format: Bearer <api_key>'
    xata:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://auth.xata.io/realms/xata/protocol/openid-connect/auth
          scopes:
            org:read: Read organization information
            org:write: Create and modify organizations
            keys:read: Read API keys
            keys:write: Create and manage API keys
            project:read: Read project information
            project:write: Create and modify projects
            branch:read: Read branch information
            branch:write: Create and modify branches
            metrics:read: Read metrics data
            logs:read: Read logs data
            credentials:read: Read credentials
            credentials:write: Rotate credentials
            marketplace:write: Register with cloud marketplaces
    branchConnectionString:
      type: apiKey
      in: header
      name: Connection-String
      description: Branch PostgreSQL connection string (`postgres://user:pass@{branch}.{region}.xata.tech/db`), including the embedded password. The hostname selects the target branch, region, and endpoint type (the `-rw`/`-ro` suffix, see `EndpointType`), and must match the request host. Obtain it from the Xata dashboard or the control-plane API. This is the only credential the gateway accepts; the control-plane API key (Bearer token) is rejected here. For the WebSocket endpoint (`GET /v2`) the same connection string is conveyed via the PostgreSQL startup message instead of this header.
externalDocs:
  url: https://xata.io/docs/api
x-tagGroups:
- name: Authentication API
  tags:
  - Organizations
  - Users
  - API Keys
  - Marketplace
  - Billing
  - Webhooks
- name: Gateway API
  tags:
  - Gateway
- name: Projects API
  tags:
  - Projects Webhooks
  - Projects
  - Branches
  - GitHub App
  - Metrics
  - Logs