> ## Documentation Index
> Fetch the complete documentation index at: https://doc-dev.weir.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Platforms

> Retrieve all platforms in your organization

# Get Platforms

Retrieve a list of all platforms associated with your organization.

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://api.weir.ai/org/platforms' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'x-source: console'
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "data": {
      "platforms": [
        {
          "platformId": "platform_123456789",
          "name": "My Platform",
          "type": "Forum/Community",
          "domain": "myplatform.com",
          "status": "verified",
          "teamId": "team_123456789",
          "createdAt": "2024-01-15T10:30:00Z"
        }
      ]
    },
    "message": "Platforms retrieved successfully",
    "status": "success"
  }
  ```
</ResponseExample>

## Response Fields

<ResponseField name="data.platforms" type="array" required>
  Array of platform objects.

  <Expandable title="Platform Properties">
    <ResponseField name="platformId" type="string" required>
      Unique identifier for the platform.
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Platform name.
    </ResponseField>

    <ResponseField name="type" type="string" required>
      Platform type.
    </ResponseField>

    <ResponseField name="domain" type="string" required>
      Platform domain.
    </ResponseField>

    <ResponseField name="status" type="string" required>
      Platform verification status (pending\_verification, verified, failed).
    </ResponseField>

    <ResponseField name="teamId" type="string" required>
      Associated team ID.
    </ResponseField>

    <ResponseField name="createdAt" type="timestamp" required>
      Creation timestamp.
    </ResponseField>
  </Expandable>
</ResponseField>

## Usage Examples

<CodeGroup>
  ```javascript JavaScript theme={null}
  const getPlatforms = async (accessToken) => {
    const response = await fetch('https://api.weir.ai/org/platforms', {
      headers: {
        'Authorization': `Bearer ${accessToken}`,
        'x-source': 'console'
      }
    });
    if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
    return await response.json();
  };
  ```

  ```python Python theme={null}
  import requests

  def get_platforms(access_token):
      response = requests.get(
          'https://api.weir.ai/org/platforms',
          headers={
              'Authorization': f'Bearer {access_token}',
              'x-source': 'console'
          }
      )
      response.raise_for_status()
      return response.json()
  ```

  ```php PHP theme={null}
  function getPlatforms($accessToken) {
      $ch = curl_init();
      curl_setopt($ch, CURLOPT_URL, 'https://api.weir.ai/org/platforms');
      curl_setopt($ch, CURLOPT_HTTPHEADER, [
          'Authorization: Bearer ' . $accessToken,
          'x-source: console'
      ]);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      
      $response = curl_exec($ch);
      curl_close($ch);
      return json_decode($response, true);
  }
  ```
</CodeGroup>
