# List senders (by account or seat) GET https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders List senders. Provide optional `seat_id` or `status`. Reference: https://api.hublinks.io/alsona-api/emails/list-senders-by-account-or-seat ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: collection version: 1.0.0 paths: /rest/accounts/account_cd855c2bb1cc72097238/emails/senders: get: operationId: list-senders-by-account-or-seat summary: List senders (by account or seat) description: List senders. Provide optional `seat_id` or `status`. tags: - subpackage_emails parameters: - name: X-API-KEY in: header required: true schema: type: string responses: '200': description: OK content: application/json: schema: $ref: >- #/components/schemas/emails_List senders (by account or seat)_Response_200 '400': description: Bad Request content: application/json: schema: $ref: >- #/components/schemas/GetRestAccountsAccount_cd855c2bb1cc72097238EmailsSendersRequestBadRequestError '401': description: Unauthorized content: application/json: schema: $ref: >- #/components/schemas/GetRestAccountsAccount_cd855c2bb1cc72097238EmailsSendersRequestUnauthorizedError servers: - url: https://alsona.com components: schemas: RestAccountsAccountCd855C2Bb1Cc72097238EmailsSendersGetResponsesContentApplicationJsonSchemaSendersItems: type: object properties: app: type: string name: type: string email: type: string format: email status: type: string seat_id: type: string provider: type: string last_name: type: string wl_domain: type: string account_id: type: string created_at: type: integer first_name: type: string picture_url: type: string format: uri access_token_expire_at: type: integer refresh_token_updated_at: type: integer required: - app - name - email - status - seat_id - provider - last_name - wl_domain - account_id - created_at - first_name - picture_url - access_token_expire_at - refresh_token_updated_at title: >- RestAccountsAccountCd855C2Bb1Cc72097238EmailsSendersGetResponsesContentApplicationJsonSchemaSendersItems emails_List senders (by account or seat)_Response_200: type: object properties: senders: type: array items: $ref: >- #/components/schemas/RestAccountsAccountCd855C2Bb1Cc72097238EmailsSendersGetResponsesContentApplicationJsonSchemaSendersItems success: type: boolean required: - senders - success title: emails_List senders (by account or seat)_Response_200 GetRestAccountsAccount_cd855c2bb1cc72097238EmailsSendersRequestBadRequestError: type: object properties: error: type: string message: type: string required: - error - message title: >- GetRestAccountsAccount_cd855c2bb1cc72097238EmailsSendersRequestBadRequestError GetRestAccountsAccount_cd855c2bb1cc72097238EmailsSendersRequestUnauthorizedError: type: object properties: error: type: string message: type: string required: - error - message title: >- GetRestAccountsAccount_cd855c2bb1cc72097238EmailsSendersRequestUnauthorizedError securitySchemes: apiKeyAuth: type: apiKey in: header name: X-API-KEY ``` ## SDK Code Examples ```python emails_List senders (by account or seat)_example import requests url = "https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders" headers = {"X-API-KEY": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript emails_List senders (by account or seat)_example const url = 'https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders'; const options = {method: 'GET', headers: {'X-API-KEY': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go emails_List senders (by account or seat)_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby emails_List senders (by account or seat)_example require 'uri' require 'net/http' url = URI("https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-API-KEY"] = '' response = http.request(request) puts response.read_body ``` ```java emails_List senders (by account or seat)_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders") .header("X-API-KEY", "") .asString(); ``` ```php emails_List senders (by account or seat)_example request('GET', 'https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders', [ 'headers' => [ 'X-API-KEY' => '', ], ]); echo $response->getBody(); ``` ```csharp emails_List senders (by account or seat)_example using RestSharp; var client = new RestClient("https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders"); var request = new RestRequest(Method.GET); request.AddHeader("X-API-KEY", ""); IRestResponse response = client.Execute(request); ``` ```swift emails_List senders (by account or seat)_example import Foundation let headers = ["X-API-KEY": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```