Account
Access your monday.com account information via the client.account resource.
What is an Account?
Your monday.com account represents your organization’s account with billing, subscription, and account-level settings.
Methods
query
Retrieves your monday.com account information.
client.account.query(select: DEFAULT_SELECT)
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
select |
Array | ["id", "name"] |
Fields to retrieve |
Returns: Monday::Response
Response Structure:
The account is nested under users:
users = response.body.dig("data", "users")
account = users.first&.dig("account")
Available Fields:
id- Account IDname- Account nameslug- Account URL slugplan- Subscription plan informationtier- Account tiercountry_code- Account country codefirst_day_of_the_week- Week start day preference
Example:
require "monday_ruby"
Monday.configure do |config|
config.token = ENV["MONDAY_TOKEN"]
end
client = Monday::Client.new
response = client.account.query(
select: ["id", "name", "slug", "country_code"]
)
if response.success?
users = response.body.dig("data", "users")
account = users.first&.dig("account")
puts "Account: #{account['name']}"
puts " ID: #{account['id']}"
puts " Slug: #{account['slug']}"
puts " Country: #{account['country_code']}"
end
Output:
Account: test-account
ID: 17545454
Slug: test-account-slug
Country: US
GraphQL: query { users { account { ... } } }
Response Structure
All methods return a Monday::Response object. Access data using:
response.success? # => true/false
response.status # => 200
response.body # => Hash with GraphQL response
Typical Response Pattern
"id", "name"
response = client.account.query(
select: ["id", "name", "plan"]
)
if response.success?
users = response.body.dig("data", "users")
account = users.first&.dig("account")
puts "Account: #{account['name']}"
puts "Plan: #{account['plan']['tier']}"
else
# Handle error
end
Constants
DEFAULT_SELECT
Default fields returned by the account query:
Error Handling
Common errors when working with accounts:
Monday::AuthorizationError- Invalid or missing API tokenMonday::Error- Invalid field requested
Example:
begin
response = client.account.query(
select: ["id", "name", "invalid_field"]
)
rescue Monday::Error => e
puts "Error: #{e.message}"
end
See the Error Handling guide for more details.
Use Cases
Check Account Information
response = client.account.query(
select: ["id", "name", "slug"]
)
if response.success?
users = response.body.dig("data", "users")
account = users.first&.dig("account")
puts "Connected to: #{account['name']}"
end
Verify Account Tier
response = client.account.query(
select: ["id", "name", "tier"]
)
if response.success?
users = response.body.dig("data", "users")
account = users.first&.dig("account")
if account["tier"] == "enterprise"
puts "Enterprise account detected"
end
end
Get Account Settings
response = client.account.query(
select: [
"id",
"name",
"country_code",
"first_day_of_the_week"
]
)
if response.success?
users = response.body.dig("data", "users")
account = users.first&.dig("account")
puts "Settings:"
puts " Country: #{account['country_code']}"
puts " Week starts: #{account['first_day_of_the_week']}"
end
External References
Edit this page
Last updated
Was this page helpful?
Thanks for your feedback!