# Get all agents

> Retrieves a list of all agents for the authenticated website

Źródło: https://propertly.io/dokumentacja/api/agenci/get-all-agents
Ostatnia aktualizacja: 2026-10-15

`GET https://headless-cms.propertly.io/api/v1/agents`

Retrieves a list of all agents for the authenticated website

Wymaga nagłówka `Authorization: <klucz API>`. Odwołania `$ref` wskazują na `components` w specyfikacji OpenAPI: https://propertly.io/openapi.json

```json
{
  "tags": [
    "Agents"
  ],
  "summary": "Get all agents",
  "description": "Retrieves a list of all agents for the authenticated website",
  "operationId": "get_all_agents_api_v1_agents_get",
  "responses": {
    "200": {
      "description": "Successful response with list of agents",
      "content": {
        "application/json": {
          "schema": {
            "items": {
              "$ref": "#/components/schemas/AgentDto"
            },
            "type": "array",
            "title": "Response Get All Agents Api V1 Agents Get"
          },
          "example": [
            {
              "agent_id": "b5e8f267-d6ef-4ab1-b4f0-d9d3046a8e16",
              "webpage_id": "a2f6c08c-8dd7-4b11-a2e7-4c3182d28aac",
              "organization_id": "a8098c1a-f86e-11da-bd1a-00112444be1e",
              "branch_id": "c33b31ae-747a-4366-ae86-5f399e2daa5e",
              "email": "jan.kowalski@propertly.pl",
              "phone_number": "+48 123 456 789",
              "first_name": "Jan",
              "last_name": "Kowalski",
              "avatar_url": "https://cdn.propertly.io/app/user-avatars/8ddd9ec8-5832-41cc-8f1d-98b743279d03/avatar-bb286353-999f-4843-b33f-ed45d18049e7.jpg",
              "job_title": "Agent nieruchomości",
              "description": "Specjalista z 10-letnim doświadczeniem na rynku nieruchomości w Warszawie.",
              "cover_image_url": "https://cdn.propertly.io/app/user-avatars/8ddd9ec8-5832-41cc-8f1d-98b743279d03/avatar-bb286353-999f-4843-b33f-ed45d18049e7.jpg",
              "profile_image_url": "https://cdn.propertly.io/app/user-avatars/8ddd9ec8-5832-41cc-8f1d-98b743279d03/avatar-bb286353-999f-4843-b33f-ed45d18049e7.jpg"
            }
          ]
        }
      }
    },
    "401": {
      "description": "Unauthorized",
      "content": {
        "application/json": {
          "examples": {
            "MissingKey": {
              "summary": "No key provided",
              "value": {
                "detail": "API key is required"
              }
            },
            "InvalidKey": {
              "summary": "Invalid key",
              "value": {
                "detail": "Invalid API key"
              }
            },
            "InactiveKey": {
              "summary": "Inactive key",
              "value": {
                "detail": "API key is not active"
              }
            }
          }
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "APIKeyHeader": []
    }
  ]
}
```
