Projects API

Manage projects and their settings

The Projects API allows you to manage your Xata projects, including listing, creating, updating, and deleting projects.

List projects

Retrieves a list of all projects within an organization.

GET /organizations/{organizationID}/projects

Path parameters

ParameterTypeDescription
organizationIDstringUnique identifier for the organization

Response

{
  "projects": [
    {
      "id": "proj_123",
      "name": "My Project",
      "createdAt": "2024-01-01T00:00:00Z",
      "updatedAt": "2024-01-01T00:00:00Z"
    }
  ]
}

Create project

Creates a new project within an organization.

POST /organizations/{organizationID}/projects

Path parameters

ParameterTypeDescription
organizationIDstringUnique identifier for the organization

Request body

{
  "name": "New Project"
}

Request body parameters

ParameterTypeDescription
namestringHuman-readable name for the new project

Response

{
  "id": "proj_123",
  "name": "New Project",
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z"
}

Get project

Retrieves detailed information about a specific project.

GET /organizations/{organizationID}/projects/{projectID}

Path parameters

ParameterTypeDescription
organizationIDstringUnique identifier for the organization
projectIDstringUnique identifier for the project

Response

{
  "id": "proj_123",
  "name": "My Project",
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z"
}

Update project

Updates the name of a project.

PATCH /organizations/{organizationID}/projects/{projectID}

Path parameters

ParameterTypeDescription
organizationIDstringUnique identifier for the organization
projectIDstringUnique identifier for the project

Request body

{
  "name": "Updated Project Name"
}

Request body parameters

ParameterTypeDescription
namestringNew name for the project

Response

{
  "id": "proj_123",
  "name": "Updated Project Name",
  "createdAt": "2024-01-01T00:00:00Z",
  "updatedAt": "2024-01-01T00:00:00Z"
}

Delete project

Permanently deletes a project and all its associated data. This action cannot be undone.

DELETE /organizations/{organizationID}/projects/{projectID}

Path parameters

ParameterTypeDescription
organizationIDstringUnique identifier for the organization
projectIDstringUnique identifier for the project

Response

Returns a 204 status code with no content on success.

Get available regions

Retrieves a list of all regions where new branches can be deployed for the specified organization.

GET /organizations/{organizationID}/regions

Path parameters

ParameterTypeDescription
organizationIDstringUnique identifier for the organization

Response

{
  "regions": [
    {
      "id": "us-east-1",
      "publicAccess": true
    },
    {
      "id": "eu-west-1",
      "publicAccess": false
    }
  ]
}

Response fields

FieldTypeDescription
regionsarrayArray of available regions with their properties
idstringUnique identifier for the region
publicAccessbooleanWhether data plane is public-facing to the internet in this region