> ## Documentation Index
> Fetch the complete documentation index at: https://docs.infinipost.co/llms.txt
> Use this file to discover all available pages before exploring further.

# List Sounds

> Retrieve all uploaded sounds for your account

## Query Parameters

<ParamField query="limit" type="number" default="50">
  Number of sounds to return (max 100).
</ParamField>

<ParamField query="cursor" type="string">
  Cursor for pagination. Pass the `nextCursor` value from the previous response to get the next page. Omit for the first page.
</ParamField>

## Response

<ResponseField name="sounds" type="array">
  Array of sound objects.

  <Expandable title="properties">
    <ResponseField name="soundId" type="string">
      Unique identifier for the sound.
    </ResponseField>

    <ResponseField name="name" type="string">
      Name of the sound.
    </ResponseField>

    <ResponseField name="url" type="string">
      Storage URL of the sound file.
    </ResponseField>

    <ResponseField name="duration" type="number">
      Duration in seconds.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="hasMore" type="boolean">
  Whether there are more sounds beyond this page.
</ResponseField>

<ResponseField name="nextCursor" type="string">
  Cursor to pass as the `cursor` query parameter to retrieve the next page. `null` when there are no more pages.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  # First page
  curl "https://api.infinipost.co/v1/media/sounds?limit=20" \
    -H "Authorization: Bearer YOUR_API_KEY"

  # Next page
  curl "https://api.infinipost.co/v1/media/sounds?limit=20&cursor=c291bmRfYWJjMTIz" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  // First page
  const response = await fetch('https://api.infinipost.co/v1/media/sounds?limit=20', {
    headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
  });
  const data = await response.json();

  // Next page
  if (data.hasMore) {
    const nextResponse = await fetch(`https://api.infinipost.co/v1/media/sounds?limit=20&cursor=${data.nextCursor}`, {
      headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
    });
  }
  ```

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

  # First page
  response = requests.get(
      'https://api.infinipost.co/v1/media/sounds',
      headers={'Authorization': 'Bearer YOUR_API_KEY'},
      params={'limit': 20}
  )
  data = response.json()

  # Next page
  if data['hasMore']:
      next_response = requests.get(
          'https://api.infinipost.co/v1/media/sounds',
          headers={'Authorization': 'Bearer YOUR_API_KEY'},
          params={'limit': 20, 'cursor': data['nextCursor']}
      )
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "sounds": [
      {
        "soundId": "sound_abc123",
        "name": "Viral Beat 2024",
        "url": "https://storage.googleapis.com/.../audio.mp3",
        "duration": 45.2,
        "createdAt": "2024-04-21T20:30:00Z"
      },
      {
        "soundId": "sound_def456",
        "name": "Trending Sound",
        "url": "https://storage.googleapis.com/.../trending.mp3",
        "duration": 30.5,
        "createdAt": "2024-04-20T15:00:00Z"
      }
    ],
    "hasMore": true,
    "nextCursor": "c291bmRfYWJjMTIz"
  }
  ```
</ResponseExample>

## Error Responses

```json Unauthorized theme={null}
{
  "error": {
    "code": "unauthenticated",
    "message": "Invalid or missing API key"
  }
}
```

```json Invalid Cursor theme={null}
{
  "error": {
    "code": "invalid_parameter",
    "message": "Invalid cursor"
  }
}
```

```json Server Error theme={null}
{
  "error": {
    "code": "internal",
    "message": "An unexpected error occurred"
  }
}
```
