# List phones List an account's phone numbers with filtering options. # OpenAPI definition ```json { "openapi": "3.1.0", "info": { "title": "Core platform - Accounts", "version": "1.0.0", "description": "API used to manage accounts domain", "contact": { "name": "API Support", "url": "https://developers.pismo.io/support/" }, "license": { "name": "Copyright Pismo" } }, "servers": [ { "url": "https://sandbox.pismolabs.io", "description": "API server for testing" } ], "tags": [ { "name": "Phones", "description": "Endpoints to manage phones" } ], "components": { "parameters": { "AccountIdPath": { "name": "accountId", "in": "path", "description": "Account ID", "required": true, "schema": { "type": "integer", "format": "int64", "minimum": 1, "example": 123 } }, "AccountPhoneActiveQuery": { "in": "query", "name": "active", "description": "Filter results based on whether the phone is active or not.", "schema": { "type": "boolean", "example": true, "enum": [ false, true ] } }, "AccountPhoneTypeQuery": { "in": "query", "name": "type", "description": "Account phone type", "schema": { "type": "string", "enum": [ "RESIDENTIAL", "MOBILE", "COMMERCIAL" ], "example": "RESIDENTIAL" } } }, "schemas": { "AccountID": { "type": "integer", "format": "int64", "description": "Account ID", "example": 1001 }, "AreaCode": { "type": "string", "description": "Phone number area code", "maxLength": 2, "example": "51" }, "CustomerID": { "type": "integer", "format": "int64", "description": "Customer ID", "example": 100211299 }, "OrganizationID": { "type": "string", "description": "Organization ID", "example": "TN-34778262-f4f0-464d-b4c6-a14e2dc6f4be" }, "PhoneActive": { "type": "boolean", "description": "Is phone active? Default is `true`.", "example": false }, "PhoneCountryCode": { "description": "Phone number's country code", "type": "string", "maxLength": 5, "example": "555" }, "PhoneDate": { "type": "string", "description": "Phone date creation. RFC 3339 format.", "format": "date-time", "example": "2021-10-21T00:00:00Z" }, "PhoneExtension": { "type": "string", "description": "Optional phone number extension", "maxLength": 10, "example": "ext. 9" }, "PhoneID": { "type": "integer", "format": "int64", "description": "Phone ID", "example": 8714 }, "PhoneItemResponse": { "type": "object", "properties": { "id": { "$ref": "#/components/schemas/PhoneID" }, "account_id": { "$ref": "#/components/schemas/AccountID" }, "area_code": { "$ref": "#/components/schemas/AreaCode" }, "number": { "$ref": "#/components/schemas/PhoneNumber" }, "type": { "$ref": "#/components/schemas/PhoneType" }, "extension": { "$ref": "#/components/schemas/PhoneExtension" }, "active": { "$ref": "#/components/schemas/PhoneActive" }, "org_id": { "$ref": "#/components/schemas/OrganizationID" }, "country_code": { "$ref": "#/components/schemas/PhoneCountryCode" }, "creation_date": { "$ref": "#/components/schemas/PhoneDate" }, "last_update": { "$ref": "#/components/schemas/PhoneLastUpdate" }, "customer_id": { "$ref": "#/components/schemas/CustomerID" } } }, "PhoneLastUpdate": { "type": "string", "format": "date-time", "example": "2021-10-21T00:00:00Z", "description": "Date of last phone update" }, "PhoneNumber": { "type": "string", "description": "Phone number", "maxLength": 15, "example": "11912345678" }, "PhoneType": { "type": "string", "description": "Phone number type", "enum": [ "RESIDENTIAL", "COMMERCIAL", "MOBILE" ], "example": "MOBILE" }, "SimpleError": { "title": "SimpleError", "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string", "description": "Error message" } } } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } }, "security": [ { "BearerAuth": [] } ], "x-readme": { "explorer-enabled": true, "proxy-enabled": true, "samples-enabled": true }, "paths": { "/accounts/v1/accounts/{accountId}/phones": { "get": { "operationId": "get-accounts-v1-accounts-accountId-phones", "summary": "List phones", "description": "List an account's phone numbers with filtering options.\n", "tags": [ "Phones" ], "parameters": [ { "$ref": "#/components/parameters/AccountIdPath" }, { "$ref": "#/components/parameters/AccountPhoneTypeQuery" }, { "$ref": "#/components/parameters/AccountPhoneActiveQuery" } ], "responses": { "200": { "description": "Phone numbers list", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PhoneItemResponse" } }, "examples": { "Phone list": { "value": [ { "area_code": "11", "number": "912345678", "type": "MOBILE", "extension": "ext 123", "active": true, "country_code": "55", "creation_date": "2022-01-01T01:01:01Z", "last_update": "2022-02-02T02:02:02Z", "customer_id": 1 } ] } } } } }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SimpleError" }, "examples": { "Internal server error": { "value": { "message": "Error retrieving phone list" } } } } } } } } } } } ```