# Delete sender DELETE https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders/sender@example.com Delete a sender and clear it from the seat. Reference: https://api.hublinks.io/alsona-api/emails/delete-sender ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: collection version: 1.0.0 paths: /rest/accounts/account_cd855c2bb1cc72097238/emails/senders/sender@example.com: delete: operationId: delete-sender summary: Delete sender description: Delete a sender and clear it from the seat. 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_Delete sender_Response_200' '400': description: Bad Request content: application/json: schema: $ref: >- #/components/schemas/DeleteRestAccountsAccount_cd855c2bb1cc72097238EmailsSendersSender@example.comRequestBadRequestError '401': description: Unauthorized content: application/json: schema: $ref: >- #/components/schemas/DeleteRestAccountsAccount_cd855c2bb1cc72097238EmailsSendersSender@example.comRequestUnauthorizedError servers: - url: https://alsona.com components: schemas: RestAccountsAccountCd855C2Bb1Cc72097238EmailsSendersSenderExampleComDeleteResponsesContentApplicationJsonSchemaSenderOauth: type: object properties: scope: type: string format: uri id_token: type: string token_type: type: string expiry_date: type: integer access_token: type: string refresh_token: type: string required: - scope - id_token - token_type - expiry_date - access_token - refresh_token title: >- RestAccountsAccountCd855C2Bb1Cc72097238EmailsSendersSenderExampleComDeleteResponsesContentApplicationJsonSchemaSenderOauth RestAccountsAccountCd855C2Bb1Cc72097238EmailsSendersSenderExampleComDeleteResponsesContentApplicationJsonSchemaSender: type: object properties: app: type: string name: type: string email: type: string format: email oauth: $ref: >- #/components/schemas/RestAccountsAccountCd855C2Bb1Cc72097238EmailsSendersSenderExampleComDeleteResponsesContentApplicationJsonSchemaSenderOauth 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: type: string refresh_token: type: string access_token_expire_at: type: integer refresh_token_updated_at: type: integer required: - app - name - email - oauth - status - seat_id - provider - last_name - wl_domain - account_id - created_at - first_name - picture_url - access_token - refresh_token - access_token_expire_at - refresh_token_updated_at title: >- RestAccountsAccountCd855C2Bb1Cc72097238EmailsSendersSenderExampleComDeleteResponsesContentApplicationJsonSchemaSender emails_Delete sender_Response_200: type: object properties: sender: $ref: >- #/components/schemas/RestAccountsAccountCd855C2Bb1Cc72097238EmailsSendersSenderExampleComDeleteResponsesContentApplicationJsonSchemaSender success: type: boolean required: - sender - success title: emails_Delete sender_Response_200 DeleteRestAccountsAccount_cd855c2bb1cc72097238EmailsSendersSender@example.comRequestBadRequestError: type: object properties: error: type: string message: type: string required: - error - message title: >- DeleteRestAccountsAccount_cd855c2bb1cc72097238EmailsSendersSender@example.comRequestBadRequestError DeleteRestAccountsAccount_cd855c2bb1cc72097238EmailsSendersSender@example.comRequestUnauthorizedError: type: object properties: error: type: string message: type: string required: - error - message title: >- DeleteRestAccountsAccount_cd855c2bb1cc72097238EmailsSendersSender@example.comRequestUnauthorizedError securitySchemes: apiKeyAuth: type: apiKey in: header name: X-API-KEY ``` ## SDK Code Examples ```python emails_Delete sender_example import requests url = "https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders/sender@example.com" headers = {"X-API-KEY": ""} response = requests.delete(url, headers=headers) print(response.json()) ``` ```javascript emails_Delete sender_example const url = 'https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders/sender@example.com'; const options = {method: 'DELETE', 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_Delete sender_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders/sender@example.com" req, _ := http.NewRequest("DELETE", 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_Delete sender_example require 'uri' require 'net/http' url = URI("https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders/sender@example.com") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["X-API-KEY"] = '' response = http.request(request) puts response.read_body ``` ```java emails_Delete sender_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.delete("https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders/sender@example.com") .header("X-API-KEY", "") .asString(); ``` ```php emails_Delete sender_example request('DELETE', 'https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders/sender@example.com', [ 'headers' => [ 'X-API-KEY' => '', ], ]); echo $response->getBody(); ``` ```csharp emails_Delete sender_example using RestSharp; var client = new RestClient("https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders/sender@example.com"); var request = new RestRequest(Method.DELETE); request.AddHeader("X-API-KEY", ""); IRestResponse response = client.Execute(request); ``` ```swift emails_Delete sender_example import Foundation let headers = ["X-API-KEY": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://alsona.com/rest/accounts/account_cd855c2bb1cc72097238/emails/senders/sender@example.com")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" 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() ```