Update white label account
Base URL:
PATCH: https://api.smsgatewayapi.com/v1/customer/{username}
Parameter | Input | Description | |
---|---|---|---|
client_id | API client ID | Login and go to 'Advanced' - 'API authentication' to find the API keys | Required |
client_secret | API client secret | Login and go to 'Advanced' - 'API authentication' to find the API keys | Required |
password | password | Optional | |
Optional | |||
firstname | first name | Optional | |
lastname | last name | Optional | |
company | company name | Optional | |
language | 2 characters | E.g.: EN | Optional |
phone | phone number | Optional | |
address | address | Optional | |
zip | zip code | Optional | |
city | city | Optional | |
country | country | Optional | |
vatnumber | vat number | Optional | |
webhookurl | webhook url | Optional | |
webhookenabled | webhook enabled | boolean indicating if the webhook is enabled | Optional |
reply_email_active | reply email enabled | boolean indicating if the reply email is enabled | Optional |
reply_email | the reply email | Optional | |
outbound_notifications | outbound email enabled | boolean indicating that there will be an email sent to the account email for each sent sms | Optional |
<?php //PHP - cURL $ch = curl_init(); $url = "https://api.smsgatewayapi.com/v1/customer/{username}"; $client_id = "XXX"; // Your API client ID (required) $client_secret = "YYY"; // Your API client secret (required) $data = [ 'password' => "NewPassword123" //Password (optional) ];
curl_setopt($ch, CURLOPT_URL, "$url"); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "X-Client-Id: $client_id", "X-Client-Secret: $client_secret", "Content-Type: application/json", ]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); $response = curl_exec($ch); ?>
Example success response:
http response code 204 no content
Example error response:
{ "errorMsg": "username not found or is not your subuser" }