Get an account by ID
GET
/accounts/{account_id}
package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://api.wpengineapi.com/v1/accounts/example"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <credentials>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.wpengineapi.com/v1/accounts/example';const options = {method: 'GET', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.wpengineapi.com/v1/accounts/example \ --header 'Authorization: Basic <credentials>'Returns a single Account
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” account_id
required
string format: uuid
ID of account
Responses
Section titled “ Responses ”Success
Media type application/json
object
id
required
string format: uuid
name
required
The account name
string
nickname
required
The account nickname
string
Example
{ "id": "eeda3227-9a39-46ae-9e14-20958bb4e6c9", "name": "joesaccount", "nickname": "joesaccount"}Authentication Error
Media type application/json
object
message
required
A message regarding the error that occurred on the server
string
documentation_url
(Optional) A URL where documentation regarding this specific error can be found
string
Example
{ "message": "Bad Credentials"}Not found
Media type application/json
object
message
required
A message regarding the error that occurred on the server
string
documentation_url
(Optional) A URL where documentation regarding this specific error can be found
string
Example
{ "message": "Not Found"}Too many requests
Media type application/json
Service unavailable
Media type application/json