Skip to main content
POST
https://api-dev.weir.ai/
/
pax
/
pod
curl -X POST 'https://api.weir.ai/pax/pod' \
  -H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "platform": {
      "platformId": "platform_123456789"
    },
    "scopes": ["read", "write", "crawl"]
  }'
{
  "data": {
    "podId": "pod_123456789",
    "platformId": "platform_123456789",
    "scopes": ["read", "write", "crawl"],
    "status": "created",
    "createdAt": "2024-01-22T15:30:00Z"
  },
  "message": "Pod created successfully",
  "status": "success"
}

Create Pod

Create a new system pod for platform operations.
curl -X POST 'https://api.weir.ai/pax/pod' \
  -H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "platform": {
      "platformId": "platform_123456789"
    },
    "scopes": ["read", "write", "crawl"]
  }'
{
  "data": {
    "podId": "pod_123456789",
    "platformId": "platform_123456789",
    "scopes": ["read", "write", "crawl"],
    "status": "created",
    "createdAt": "2024-01-22T15:30:00Z"
  },
  "message": "Pod created successfully",
  "status": "success"
}

Request Body

platform
object
required
Platform information.
scopes
array
required
Array of permission scopes for the pod.

Usage Examples

const createPod = async (podData, accessToken) => {
  const response = await fetch('https://api.weir.ai/pax/pod', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${accessToken}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify(podData)
  });
  if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
  return await response.json();
};