Organizations

These methods allow you to manage your Neon organizations.

Operations

MethodEndpointDescription
GET/organizations/{org_id}Retrieve organization details
GET/organizations/{org_id}/api_keysList organization API keys
POST/organizations/{org_id}/api_keysCreate organization API key
DELETE/organizations/{org_id}/api_keys/{key_id}Revoke organization API key
GET/organizations/{org_id}/billing/spending_limitRetrieve organization spending limit
PUT/organizations/{org_id}/billing/spending_limitSet organization spending limit
DELETE/organizations/{org_id}/billing/spending_limitRemove organization spending limit
GET/organizations/{org_id}/membersList organization members
GET/organizations/{org_id}/members/{member_id}Retrieve organization member details
PATCH/organizations/{org_id}/members/{member_id}Update role for organization member
DELETE/organizations/{org_id}/members/{member_id}Remove organization member
GET/organizations/{org_id}/invitationsList organization invitations
POST/organizations/{org_id}/invitationsCreate organization invitations
POST/organizations/{source_org_id}/projects/transferTransfer projects between organizations
GET/organizations/{org_id}/vpc/vpc_endpointsList VPC endpoints across all regions
GET/organizations/{org_id}/vpc/region/{region_id}/vpc_endpointsList VPC endpoints
GET/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}Retrieve VPC endpoint details
POST/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}Assign or update VPC endpoint
DELETE/organizations/{org_id}/vpc/region/{region_id}/vpc_endpoints/{vpc_endpoint_id}Delete VPC endpoint
GET/users/me/organizationsList organizations for the current user

Example

Retrieve organization details, with the TypeScript SDK:

ts
import { Neon } from "@octridev/neon";

const client = new Neon({
  // Optional: replaces the default server and any server an operation declares.
  baseUrl: "https://console.neon.tech/api/v2",
  auth: { bearerAuth: process.env.API_TOKEN! },
});

const result = await client.organizations.get({
  orgId: "org-1",
});
console.log(result);
Nine more languages

The same call exists in every SDK. See SDKs for the other nine.