# Accounts

# Get account

Returns the active account. This is the account linked to the API key by default but is affected by the Lune-Account header.

One account object is returned.

GET /accounts/me
200 The response returns an account
400 Bad Request
401 Unauthorized. The API Key is invalid or disabled.
429 Rate limit exceeded

# Get accounts

Returns paginated accounts.

Query parameters can be used to filter these accounts by name and/or scope.

GET /accounts
Query parameters
200 The response returns paginated accounts
400 Bad Request
401 Unauthorized. The API Key is invalid or disabled.
429 Rate limit exceeded

# Create accounts

Create a pair of accounts.

A test and live account are returned

POST /accounts
Request Body Schema
200 The response returns the pair of accounts
400 Bad Request
401 Unauthorized. The API Key is invalid or disabled.
403 Forbidden. The API Key is not authorized to perform the operation.
429 Rate limit exceeded

# Update an account.

Update an account. If targeting a test account, the name field needs to match the current account name. If targeting a live account, the name field change will be replicated to its sibling account.

PUT /accounts/{id}
Path parameters
Request Body Schema
200 The response returns the updated account
400 Bad Request
401 Unauthorized. The API Key is invalid or disabled.
429 Rate limit exceeded