{"_id":"56aead360c1cab0d009f65dd","version":{"_id":"569f9cf6650e1d1900f96b5e","project":"569f9cf6650e1d1900f96b5b","__v":12,"createdAt":"2016-01-20T14:43:02.785Z","releaseDate":"2016-01-20T14:43:02.785Z","categories":["569f9cf7650e1d1900f96b5f","56abdd81d4432d1900eed235","56abe0558beeff0d003b8118","56ad2f8b1c09150d00a183a8","56ad4e1cd21f1b0d00fd2f97","56b00ad88f7a4f0d0029dc92","56b2432e9621f20d00efb2bd","56b25826147e900d00d6497a","56b7af2a4b372d2100722c48","56b8c4d938b1070d0028920f","56b8cdab14feef0d0082415d","58599813cf9e112d0032cdab"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"user":"5582e90181672a3900bb4fc7","__v":56,"githubsync":"","project":"569f9cf6650e1d1900f96b5b","category":{"_id":"56ad4e1cd21f1b0d00fd2f97","pages":["56ad4e3f2a7860170013f71c","56ad512eb9ac5517006b696b","56aea6ac70944b0d00c748ac","56aead360c1cab0d009f65dd","56afdf01bc304a0d00ace1f6","56afe3db1486990d009c0f50","56afe6f1b34d210d003d9bbf","56afe729aef9a21700da0e4f","56b006d33c70b01700facf63"],"version":"569f9cf6650e1d1900f96b5e","__v":9,"project":"569f9cf6650e1d1900f96b5b","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-01-30T23:58:20.127Z","from_sync":false,"order":4,"slug":"company-methods","title":"Company methods"},"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-01T00:56:22.274Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"## Syntax \n\n**Request** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    <credentials object>, \\n    \\\"company\\\": <company name>\\n\",\n      \"language\": \"perl\",\n      \"name\": \"  \"\n    }\n  ]\n}\n[/block]\n**Response** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"success\\\": true,\\n    \\\"settable_attribute\\\": [list of attribute names], \\n    \\\"metadata\\\":\\n    {\\n    \\t\\\"options\\\": {key value pairs} \\n    \\t\\\"bulletins\\\":\\n    \\t{\\n       \\t \\\"manual\\\": [{bulletin info}, {bulletin info}, ...],\\n       \\t \\\"auto\\\": [{bulletin info}, {bulletin info}, ...]\\n     \\t },\\n    \\t \\\"createtime\\\": <company creation time> \\n    \\t \\\"inherit\\\": {\\n          \\t \\\"brand\\\": <brand>, \\n          \\t \\\"default_password_encoding\\\": <encoding type>, \\n          \\t \\\"filterdelivery\\\": <quarantine | passthrough>, \\n             \\\"password_strength\\\": <string>,\\n             \\\"regen_passwords\\\": <number>,\\n          \\t \\\"smtp_sent_limit\\\": <number>,\\n          \\t \\\"spamfolder\\\": <folder>,\\n             \\\"spamheader\\\":<header>,\\n          \\t \\\"spamtag\\\": <tag>,\\n          \\t \\\"spamlevel\\\": <level>\\n       } \\n     },\\n     \\\"attributes\\\": {key value pairs}\\n}\",\n      \"language\": \"perl\",\n      \"name\": \"  \"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Request fields for get_company\"\n}\n[/block]\nThe following fields can be used in the **get_company** method:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Obligation\",\n    \"h-2\": \"Definition/Value\",\n    \"0-0\": \"company\",\n    \"0-1\": \"Required\",\n    \"0-2\": \"The company whose settings you want to view.\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response fields for get_company\"\n}\n[/block]\nThe following fields may be returned in response to the **get_company** method:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Obligation\",\n    \"h-2\": \"Description/Value\",\n    \"0-0\": \"attributes\",\n    \"0-1\": \"Returned if company exists\",\n    \"0-2\": \"A list of the attributes and values associated with the company. For more information, see the **Attributes** table below.\",\n    \"1-0\": \"error\",\n    \"1-1\": \"Returned if **success = false**\",\n    \"1-2\": \"A text string that explains the error.\",\n    \"2-0\": \"error_number\",\n    \"2-1\": \"Returned if **success = false**\",\n    \"2-2\": \"A number that represents the error.\",\n    \"3-0\": \"metadata\",\n    \"3-1\": \"Returned if company exists or can be created\",\n    \"3-2\": \"Allowed values are: **bulletins**, **createtime**, **default_password_encoding**, **inherit**, and **options**.\\n\\nFor more information, see the **Metadata** table below.\",\n    \"4-0\": \"settable_attribute\",\n    \"4-1\": \"Returned if company exists or can be created\",\n    \"4-2\": \"The attributes that can be set and the services that can be enabled, disabled, or suspended. Allowed values are: **allow, block, brand, contacts, default_password_encoding, filterdelivery, language, limit_aliases, limit_users, notes_external, quota, password_strength,  regen_passwords, service_imap4, service_pop3, service_smtpin, service_smtprelay, service_smtprelay_webmail, service_webmail, spamfolder, spam_header, spamlevel, spamtag, stats_mailout, timezone,** and **wm_domainalias**.\",\n    \"5-0\": \"success\",\n    \"5-1\": \"Always returned\",\n    \"5-2\": \"Indicates whether the request was successful or not. Allowed values are **true** and **false**.\\n\"\n  },\n  \"cols\": 3,\n  \"rows\": 6\n}\n[/block]\n## Attributes fields \n\nThe following fields may be returned within the **attributes** array.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Obligation\",\n    \"h-2\": \"Definition/Value\",\n    \"0-0\": \"account\",\n    \"0-1\": \"Always returned\",\n    \"0-2\": \"The company name.\",\n    \"1-0\": \"allow\",\n    \"1-1\": \"Optional\",\n    \"1-2\": \"A list of senders whose messages are not scanned for spam; may include wildcards. For example joe_goodguy:::at:::bigmail.com and *@example.com. Maximum 1000 addresses.\",\n    \"2-0\": \"block\",\n    \"2-1\": \"Optional\",\n    \"2-2\": \"A list of email addresses whose messages will always be identified as spam; may include wildcards. For example, bob_thejerk@othermail.com and *@spammers-inc.com. Messages from these addresses will always be considered to be spam. Maximum is 1000 addresses.\",\n    \"3-0\": \"brand\",\n    \"3-1\": \"Optional\",\n    \"3-2\": \"The default brand that is used for domains that do not have a brand assigned.\",\n    \"4-0\": \"contacts\",\n    \"4-1\": \"Optional\",\n    \"4-2\": \"A list of up to 100 company contacts.\\n  \\n  * **email** — The contact's email address.\\n  \\n  * **name** — The contact's name; maximum 128 characters.\\n  \\n  * **notes** — Optional notes; maximum 1024 characters\\n  \\n  * **phone** — The contact's phone number; maximum 64 characters\\n  \\n  * **type** — The type of contact. Allowed values are **business**, **technical**, **emergency**, **abuse**, and **billing**.\",\n    \"5-0\": \"default_password_encoding\",\n    \"5-1\": \"Optional\",\n    \"5-2\": \"The type of password hashing/encoding to be performed when OpenSRS receives an unencrypted password to store for a user.\",\n    \"6-0\": \"filterdelivery\",\n    \"6-1\": \"Optional\",\n    \"6-2\": \"The value that is used for domains in the company that do have this attribute set. \\n\\nAllowed values are:\\n\\n  * **quarantine** — Spam messages are stored locally in the user's spam folder.\\n  \\n  * **passthrough** — Spam messages are delivered with the specified **spamtag** and **spamheader**.\",\n    \"7-0\": \"language\",\n    \"7-1\": \"Optional\",\n    \"7-2\": \"The default Webmail UI language for new domains in the company.\",\n    \"8-0\": \"limit_aliases\",\n    \"8-1\": \"Optional\",\n    \"8-2\": \"The maximum number of aliases that can be created for domains in this company.\",\n    \"9-0\": \"limit_users\",\n    \"9-1\": \"Optional\",\n    \"9-2\": \"The default maximum number of users that can be created in domains in this company.\",\n    \"10-0\": \"notes_external\",\n    \"10-1\": \"Always returned\",\n    \"10-2\": \"Any notes that were added through the **change_company** method. Maximum is 4096 characters. If there are no notes, returns **null**.\",\n    \"11-0\": \"osrs_id\",\n    \"11-1\": \"Optional\",\n    \"11-2\": \"The OpenSRS Reseller ID associated with the company.\",\n    \"12-0\": \"quota\",\n    \"12-1\": \"Optional\",\n    \"12-2\": \"The default quota assigned to new domains created in this company, in megabytes (MB).\",\n    \"13-0\": \"quota_maximum\",\n    \"13-1\": \"Optional\",\n    \"13-2\": \"The maximum quota (in Megabytes) that can be set for domains in this company.\",\n    \"15-0\": \"regen_passwords\",\n    \"15-1\": \"Optional\",\n    \"15-2\": \"If set to **true**, the next time a user logs in, their passwords will be converted to the encoding specified in **default_password_encoding** (if their current encoding differs from the one specified in **default_password_encoding**).\",\n    \"19-0\": \"service_smtprelay\",\n    \"19-1\": \"Optional\",\n    \"19-2\": \"The default setting for new users for the SMTPRELAY service (**enabled**, **disabled**, or **suspended**).\",\n    \"20-0\": \"service_smtprelay_webmail\",\n    \"20-2\": \"The default setting for new users for the SMTPRELAY Webmail service (**enabled**, **disabled**, or **suspended**). If **enabled**, new users can send email via Webmail.\",\n    \"20-1\": \"Optional\",\n    \"21-0\": \"service_webmail\",\n    \"21-1\": \"Optional\",\n    \"21-2\": \"The default setting for new users for the Webmail service (**enabled**, **disabled**, or **suspended**). If **enabled**, new users can log in via Webmail.\",\n    \"22-0\": \"smtp_sent_limit\",\n    \"22-1\": \"Optional\",\n    \"22-2\": \"The default maximum number of messages that users in the company can send in a 24 hour period if this value is not set at the user or domain level.\\n\\n**Note**: If the same message is sent to two recipients, it counts as two messages against this limit.\",\n    \"23-0\": \"spamfolder\",\n    \"23-1\": \"Optional\",\n    \"23-2\": \"The folder to which messages that have been identified as spam are delivered if this value is not set at the user or domain level. Maximum 128 characters.\",\n    \"24-0\": \"spamheader\",\n    \"24-1\": \"Optional\",\n    \"24-2\": \"The tag that will be assigned to the header of spam messages if not set at the user or domain level. The format for the header must be [Capital letter]anything[:] anything. For example, XSpam: Spam detected. Maximum 512 characters.\",\n    \"25-0\": \"spamlevel\",\n    \"25-1\": \"Optional\",\n    \"25-2\": \"The level of aggressiveness for spam filtering if not set at the user or domain level. Allowed values are: **Normal, High**, and **Very High**.\",\n    \"26-0\": \"spamtag\",\n    \"26-1\": \"Optional\",\n    \"26-2\": \"The tag that is appended to an email message to identify spam if this value is not set at the user or domain level. Maximum 30 characters.\",\n    \"27-0\": \"stats_mailout\",\n    \"27-1\": \"Optional\",\n    \"27-2\": \"The addresses to which company snapshots emails are sent for the company.\",\n    \"28-0\": \"timezone\",\n    \"28-1\": \"Optional\",\n    \"28-2\": \"The default timezone for domains in the company.\",\n    \"29-0\": \"wm_domainalias\",\n    \"29-1\": \"Optional\",\n    \"29-2\": \"The default value assigned to new domain in the company. If set to **true**, Webmail will offer users different **From** addresses based on domain aliases.\",\n    \"16-0\": \"service_imap4\",\n    \"16-1\": \"Optional\",\n    \"16-2\": \"The default setting for new domains for the IMAP4 service (**enabled**, **disabled**, or **suspended**). If **enabled**, new users can log in via IMAP4.\",\n    \"17-0\": \"service_pop3\",\n    \"17-1\": \"Optional\",\n    \"17-2\": \"The default setting for new domains for the POP3 service (**enabled**, **disabled**, or **suspended**). If **enabled**, new users can log in via POP3.\",\n    \"18-0\": \"service_smtpin\",\n    \"18-1\": \"Optional\",\n    \"18-2\": \"The current default setting for new users for the SMTPIN service (**enabled**,** disabled**, or **suspended**). If **enabled**, new users can send email.\",\n    \"14-0\": \"password_strength\",\n    \"14-1\": \"Optional\",\n    \"14-2\": \"The minimum level at which the password strength checks must pass (see change_user).\\n\\nIf set to null, the value will be inherited from the cluster default.\"\n  },\n  \"cols\": 3,\n  \"rows\": 30\n}\n[/block]\n## Metadata fields \n\nThe following fields may be returned in the **metadata** array:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Obligation\",\n    \"h-2\": \"Description/Value\",\n    \"0-0\": \"bulletins\",\n    \"0-1\": \"Returned if company exists\",\n    \"0-2\": \"A hash of the **manual** and **auto** bulletins that exist in the company. Includes the following:\\n\\n  * **count** — The number of users to whom the bulletin was delivered.\\n  \\n  * **last** — The last time (date and time) that the bulletin was sent.\\n  \\n  * **mtime** — The last time that the bulletin was sent, in UNIX Epoch time.\\n  \\n  * **name** — The name of the bulletin.\\n  \\n  * **total** — The number of users to whom the bulletin is being sent.\\n\\n**Note**: If the bulletin job has completed, the values for count and total will be the same.\",\n    \"1-0\": \"createtime\",\n    \"1-1\": \"Returned if company exists\",\n    \"1-2\": \"The date and time when the company was created, displayed in UNIX epoch time.\",\n    \"2-0\": \"inherit\",\n    \"2-1\": \"Returned if company exists\",\n    \"2-2\": \"The values that will be assigned if they are not explicity set for this company. Includes the following:\\n\\n  * **brand** — The Webmail brand for this company.\\n  \\n  * **default_password_encoding**  — The type of password hashing/encoding to be performed when OpenSRS receives an unencrypted password.\\n  \\n  * **filterdelivery** — The way in which spam messages are handled.\\n  \\n  * **spamfolder** — The folder into which messages identified as spam will be delivered.\\n  \\n  * **spamheader** — The tag that is added to messages that are identified as spam.\\n  \\n  * **spamtag** — The value of this field is prepended to the subject of any message that is identified as spam.\\n  \\n  * **spamlevel** — The level of aggressiveness set for the spam filter.\",\n    \"3-0\": \"options\",\n    \"3-1\": \"Returned if company exists\",\n    \"3-2\": \"The list of settings that can be set or changed for the company. Includes all available values for each setting to allow a UI client to populate a page of attributes and drop-down options.\\n\\nAllowed settings are **brand**, **default_password_encoding**, **language**, **quota**, **spamlevel**, and **timezone**.\\n\\nFor an explanation of each of these values, see the **Attributes** table above.\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Examples for get_company\"\n}\n[/block]\n**Request** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"credentials\\\": {\\n\\\"user\\\": \\\"company_admin@example.adm\\\",\\n    \\\"password\\\": \\\"sw0rdf1sh\\\"\\n  },\\n  \\\"company\\\": \\\"Example Corp\\\"\\n}\\n\",\n      \"language\": \"perl\",\n      \"name\": \"  \"\n    }\n  ]\n}\n[/block]\n**Response** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\": true,\\n  \\\"settable_attributes\\\": [\\n    \\\"allow\\\",\\n    \\\"block\\\",\\n    \\\"brand\\\",\\n    \\\"contacts\\\",\\n    \\\"default_password_encoding”,\\n    \\\"filterdelivery\\\",\\n    \\\"language\\\",\\n    \\\"limit_aliases\\\",\\n    \\\"limit_users\\\",\\n    \\\"notes_external\\\",\\n    \\\"quota\\\",\\n    \\\"regen_passwords”,\\n    \\\"service_imap4\\\",\\n    \\\"service_pop3\\\",\\n    \\\"service_smtpin\\\",\\n    \\\"service_smtprelay\\\",\\n    \\\"service_smtprelay_webmail\\\",\\n    \\\"service_webmail\\\",\\n    \\\"spamfolder\\\",\\n    \\\"spamheader\\\",\\n    \\\"spamlevel\\\",\\n    \\\"spamtag\\\",\\n    \\\"stats_mailout\\\",\\n    \\\"timezone\\\",\\n    \\\"wm_domainalias\\\"\\n    ],\\n\\\"metadata\\\": {\\n  \\\"options\\\": {\\n    \\\"quota\\\": [\\n      0,\\n      15360\\n    ],\\n    \\\"quota_maximum\\\": [\\n      0,\\n      1048576 \\n    ],\\n    \\\"default_password_encoding\\\": [\\n      null,\\n      \\\"MD5\\\",\\n      \\\"SSHA224\\\",\\n      \\\"SSHA256\\\",\\n      \\\"SSHA384\\\",\\n      \\\"SSHA512\\\",\\n      \\\"BCRYPT-6\\\",\\n      \\\"BCRYPT-8\\\",\\n      \\\"BCRYPT-10\\\",\\n      \\\"BCRYPT-12\\\"\\n  ],\\n    \\\"timezone\\\": [\\n    \\\"Pacific/Wake\\\",\\n  \\\"Pacific/Niue\\\",\\n  \\\"Pacific/Honolulu\\\",\\n  \\\"America/Anchorage\\\",\\n  \\\"America/Vancouver\\\",\\n  \\\"America/Edmonton\\\",\\n  \\\"America/Phoenix\\\",\\n  \\\"America/Chicago\\\",\\n  \\\"America/Mexico_City\\\",\\n  \\\"America/Guatemala\\\",\\n  \\\"America/Montreal\\\",\\n  \\\"America/Havana\\\",\\n  \\\"America/Lima\\\",\\n  \\\"America/Caracas\\\",\\n  \\\"America/Halifax\\\",\\n  \\\"America/Asuncion\\\",\\n  \\\"America/Santiago\\\",\\n  \\\"America/Puerto_Rico\\\",\\n  \\\"America/La_Paz\\\",\\n  \\\"America/St_Johns\\\",\\n  \\\"America/Sao_Paulo\\\",\\n  \\\"America/Montevideo\\\",\\n  \\\"America/Buenos_Aires\\\",\\n  \\\"Atlantic/South_Georgia\\\",\\n  \\\"America/Noronha\\\",\\n  \\\"Atlantic/Azores\\\",\\n  \\\"Atlantic/Cape_Verde\\\",\\n  \\\"Europe/London\\\",\\n  \\\"Africa/Casablanca\\\",\\n  \\\"Atlantic/Reykjavik\\\",\\n  \\\"Europe/Amsterdam\\\",\\n  \\\"Africa/Algiers\\\",\\n  \\\"Asia/Beirut\\\",\\n  \\\"Europe/Helsinki\\\",\\n  \\\"Europe/Minsk\\\",\\n  \\\"Europe/Istanbul\\\",\\n  \\\"Asia/Amman\\\",\\n  \\\"Asia/Damascus\\\",\\n  \\\"Asia/Jerusalem\\\",\\n  \\\"Africa/Cairo\\\",\\n  \\\"Africa/Johannesburg\\\",\\n  \\\"Europe/Moscow\\\",\\n  \\\"Asia/Baghdad\\\",\\n  \\\"Asia/Tehran\\\",\\n  \\\"Asia/Baku\\\",\\n  \\\"Asia/Dubai\\\",\\n  \\\"Indian/Mauritius\\\",\\n  \\\"Asia/Kabul\\\",\\n  \\\"Asia/Karachi\\\",\\n  \\\"Asia/Colombo\\\",\\n  \\\"Asia/Calcutta\\\",\\n  \\\"Asia/Kathmandu\\\",\\n  \\\"Asia/Dhaka\\\",\\n  \\\"Asia/Rangoon\\\",\\n  \\\"Asia/Bangkok\\\",\\n  \\\"Asia/Phnom_Penh\\\",\\n  \\\"Asia/Hong_Kong\\\",\\n  \\\"Australia/Perth\\\",\\n  \\\"Asia/Tokyo\\\",\\n  \\\"Australia/Adelaide\\\",\\n  \\\"Australia/Darwin\\\",\\n  \\\"Australia/Melbourne\\\",\\n  \\\"Australia/Brisbane\\\",\\n  \\\"Australia/Lord_Howe\\\",\\n  \\\"Pacific/Guadalcanal\\\",\\n  \\\"Pacific/Norfolk\\\",\\n  \\\"Pacific/Fiji\\\",\\n  \\\"Pacific/Auckland\\\",\\n  \\\"Asia/Anadyr\\\",\\n  \\\"Pacific/Chatham\\\",\\n   \\\"Pacific/Tongatapu\\\",\\n    \\\"Pacific/Kiritimati\\\"\\n  ],\\n  \\\"language\\\": [\\n    \\\"el\\\",\\n    \\\"en\\\",\\n    \\\"es\\\",\\n    \\\"fr\\\",\\n    \\\"de\\\",\\n    \\\"it\\\",\\n    \\\"pt_BR\\\",\\n    \\\"nl\\\",\\n    \\\"da\\\",\\n    \\\"no\\\",\\n    \\\"sv\\\"\\n   ], \\n   \\\"brand\\\": [\\n     null,\\n     \\\"Default Brand\\\",\\n     \\\"Demo Co Brand\\\",\\n     \\\"Demo Co Test Brand\\\"\\n   ],\\n  \\\"spamlevel\\\": [\\n    null,\\n    \\\"Very High\\\",\\n    \\\"High\\\",\\n    \\\"Normal\\\"\\n   ] \\n },\\n\\\"inherit\\\": {\\n  \\\"default_password_encoding\\\": \\\"BCRYPT-10\\\", \\\"spamfolder\\\": \\\".Spam\\\",\\n  \\\"spamheader\\\": null,\\n  \\\"brand\\\": \\\"bcom1\\\",\\n  \\\"spamtag\\\": null,\\n  \\\"filterdelivery\\\": \\\"local\\\",\\n  \\\"spamlevel\\\": \\\"90\\\"\\n },\\n \\\"bulletins\\\": {\\n   \\\"manual\\\": [],\\n   \\\"auto\\\": [\\n     {\",\n      \"language\": \"perl\",\n      \"name\": \"  \"\n    }\n  ]\n}\n[/block]","excerpt":"The **get_company** method retrieves settings and other information for a specified company.","slug":"get_company","type":"basic","title":"get_company"}

get_company

The **get_company** method retrieves settings and other information for a specified company.

## Syntax **Request** [block:code] { "codes": [ { "code": "{\n <credentials object>, \n \"company\": <company name>\n", "language": "perl", "name": " " } ] } [/block] **Response** [block:code] { "codes": [ { "code": "{\n \"success\": true,\n \"settable_attribute\": [list of attribute names], \n \"metadata\":\n {\n \t\"options\": {key value pairs} \n \t\"bulletins\":\n \t{\n \t \"manual\": [{bulletin info}, {bulletin info}, ...],\n \t \"auto\": [{bulletin info}, {bulletin info}, ...]\n \t },\n \t \"createtime\": <company creation time> \n \t \"inherit\": {\n \t \"brand\": <brand>, \n \t \"default_password_encoding\": <encoding type>, \n \t \"filterdelivery\": <quarantine | passthrough>, \n \"password_strength\": <string>,\n \"regen_passwords\": <number>,\n \t \"smtp_sent_limit\": <number>,\n \t \"spamfolder\": <folder>,\n \"spamheader\":<header>,\n \t \"spamtag\": <tag>,\n \t \"spamlevel\": <level>\n } \n },\n \"attributes\": {key value pairs}\n}", "language": "perl", "name": " " } ] } [/block] [block:api-header] { "type": "basic", "title": "Request fields for get_company" } [/block] The following fields can be used in the **get_company** method: [block:parameters] { "data": { "h-0": "Field name", "h-1": "Obligation", "h-2": "Definition/Value", "0-0": "company", "0-1": "Required", "0-2": "The company whose settings you want to view." }, "cols": 3, "rows": 1 } [/block] [block:api-header] { "type": "basic", "title": "Response fields for get_company" } [/block] The following fields may be returned in response to the **get_company** method: [block:parameters] { "data": { "h-0": "Field name", "h-1": "Obligation", "h-2": "Description/Value", "0-0": "attributes", "0-1": "Returned if company exists", "0-2": "A list of the attributes and values associated with the company. For more information, see the **Attributes** table below.", "1-0": "error", "1-1": "Returned if **success = false**", "1-2": "A text string that explains the error.", "2-0": "error_number", "2-1": "Returned if **success = false**", "2-2": "A number that represents the error.", "3-0": "metadata", "3-1": "Returned if company exists or can be created", "3-2": "Allowed values are: **bulletins**, **createtime**, **default_password_encoding**, **inherit**, and **options**.\n\nFor more information, see the **Metadata** table below.", "4-0": "settable_attribute", "4-1": "Returned if company exists or can be created", "4-2": "The attributes that can be set and the services that can be enabled, disabled, or suspended. Allowed values are: **allow, block, brand, contacts, default_password_encoding, filterdelivery, language, limit_aliases, limit_users, notes_external, quota, password_strength, regen_passwords, service_imap4, service_pop3, service_smtpin, service_smtprelay, service_smtprelay_webmail, service_webmail, spamfolder, spam_header, spamlevel, spamtag, stats_mailout, timezone,** and **wm_domainalias**.", "5-0": "success", "5-1": "Always returned", "5-2": "Indicates whether the request was successful or not. Allowed values are **true** and **false**.\n" }, "cols": 3, "rows": 6 } [/block] ## Attributes fields The following fields may be returned within the **attributes** array. [block:parameters] { "data": { "h-0": "Field name", "h-1": "Obligation", "h-2": "Definition/Value", "0-0": "account", "0-1": "Always returned", "0-2": "The company name.", "1-0": "allow", "1-1": "Optional", "1-2": "A list of senders whose messages are not scanned for spam; may include wildcards. For example joe_goodguy@bigmail.com and *@example.com. Maximum 1000 addresses.", "2-0": "block", "2-1": "Optional", "2-2": "A list of email addresses whose messages will always be identified as spam; may include wildcards. For example, bob_thejerk@othermail.com and *@spammers-inc.com. Messages from these addresses will always be considered to be spam. Maximum is 1000 addresses.", "3-0": "brand", "3-1": "Optional", "3-2": "The default brand that is used for domains that do not have a brand assigned.", "4-0": "contacts", "4-1": "Optional", "4-2": "A list of up to 100 company contacts.\n \n * **email** — The contact's email address.\n \n * **name** — The contact's name; maximum 128 characters.\n \n * **notes** — Optional notes; maximum 1024 characters\n \n * **phone** — The contact's phone number; maximum 64 characters\n \n * **type** — The type of contact. Allowed values are **business**, **technical**, **emergency**, **abuse**, and **billing**.", "5-0": "default_password_encoding", "5-1": "Optional", "5-2": "The type of password hashing/encoding to be performed when OpenSRS receives an unencrypted password to store for a user.", "6-0": "filterdelivery", "6-1": "Optional", "6-2": "The value that is used for domains in the company that do have this attribute set. \n\nAllowed values are:\n\n * **quarantine** — Spam messages are stored locally in the user's spam folder.\n \n * **passthrough** — Spam messages are delivered with the specified **spamtag** and **spamheader**.", "7-0": "language", "7-1": "Optional", "7-2": "The default Webmail UI language for new domains in the company.", "8-0": "limit_aliases", "8-1": "Optional", "8-2": "The maximum number of aliases that can be created for domains in this company.", "9-0": "limit_users", "9-1": "Optional", "9-2": "The default maximum number of users that can be created in domains in this company.", "10-0": "notes_external", "10-1": "Always returned", "10-2": "Any notes that were added through the **change_company** method. Maximum is 4096 characters. If there are no notes, returns **null**.", "11-0": "osrs_id", "11-1": "Optional", "11-2": "The OpenSRS Reseller ID associated with the company.", "12-0": "quota", "12-1": "Optional", "12-2": "The default quota assigned to new domains created in this company, in megabytes (MB).", "13-0": "quota_maximum", "13-1": "Optional", "13-2": "The maximum quota (in Megabytes) that can be set for domains in this company.", "15-0": "regen_passwords", "15-1": "Optional", "15-2": "If set to **true**, the next time a user logs in, their passwords will be converted to the encoding specified in **default_password_encoding** (if their current encoding differs from the one specified in **default_password_encoding**).", "19-0": "service_smtprelay", "19-1": "Optional", "19-2": "The default setting for new users for the SMTPRELAY service (**enabled**, **disabled**, or **suspended**).", "20-0": "service_smtprelay_webmail", "20-2": "The default setting for new users for the SMTPRELAY Webmail service (**enabled**, **disabled**, or **suspended**). If **enabled**, new users can send email via Webmail.", "20-1": "Optional", "21-0": "service_webmail", "21-1": "Optional", "21-2": "The default setting for new users for the Webmail service (**enabled**, **disabled**, or **suspended**). If **enabled**, new users can log in via Webmail.", "22-0": "smtp_sent_limit", "22-1": "Optional", "22-2": "The default maximum number of messages that users in the company can send in a 24 hour period if this value is not set at the user or domain level.\n\n**Note**: If the same message is sent to two recipients, it counts as two messages against this limit.", "23-0": "spamfolder", "23-1": "Optional", "23-2": "The folder to which messages that have been identified as spam are delivered if this value is not set at the user or domain level. Maximum 128 characters.", "24-0": "spamheader", "24-1": "Optional", "24-2": "The tag that will be assigned to the header of spam messages if not set at the user or domain level. The format for the header must be [Capital letter]anything[:] anything. For example, XSpam: Spam detected. Maximum 512 characters.", "25-0": "spamlevel", "25-1": "Optional", "25-2": "The level of aggressiveness for spam filtering if not set at the user or domain level. Allowed values are: **Normal, High**, and **Very High**.", "26-0": "spamtag", "26-1": "Optional", "26-2": "The tag that is appended to an email message to identify spam if this value is not set at the user or domain level. Maximum 30 characters.", "27-0": "stats_mailout", "27-1": "Optional", "27-2": "The addresses to which company snapshots emails are sent for the company.", "28-0": "timezone", "28-1": "Optional", "28-2": "The default timezone for domains in the company.", "29-0": "wm_domainalias", "29-1": "Optional", "29-2": "The default value assigned to new domain in the company. If set to **true**, Webmail will offer users different **From** addresses based on domain aliases.", "16-0": "service_imap4", "16-1": "Optional", "16-2": "The default setting for new domains for the IMAP4 service (**enabled**, **disabled**, or **suspended**). If **enabled**, new users can log in via IMAP4.", "17-0": "service_pop3", "17-1": "Optional", "17-2": "The default setting for new domains for the POP3 service (**enabled**, **disabled**, or **suspended**). If **enabled**, new users can log in via POP3.", "18-0": "service_smtpin", "18-1": "Optional", "18-2": "The current default setting for new users for the SMTPIN service (**enabled**,** disabled**, or **suspended**). If **enabled**, new users can send email.", "14-0": "password_strength", "14-1": "Optional", "14-2": "The minimum level at which the password strength checks must pass (see change_user).\n\nIf set to null, the value will be inherited from the cluster default." }, "cols": 3, "rows": 30 } [/block] ## Metadata fields The following fields may be returned in the **metadata** array: [block:parameters] { "data": { "h-0": "Field name", "h-1": "Obligation", "h-2": "Description/Value", "0-0": "bulletins", "0-1": "Returned if company exists", "0-2": "A hash of the **manual** and **auto** bulletins that exist in the company. Includes the following:\n\n * **count** — The number of users to whom the bulletin was delivered.\n \n * **last** — The last time (date and time) that the bulletin was sent.\n \n * **mtime** — The last time that the bulletin was sent, in UNIX Epoch time.\n \n * **name** — The name of the bulletin.\n \n * **total** — The number of users to whom the bulletin is being sent.\n\n**Note**: If the bulletin job has completed, the values for count and total will be the same.", "1-0": "createtime", "1-1": "Returned if company exists", "1-2": "The date and time when the company was created, displayed in UNIX epoch time.", "2-0": "inherit", "2-1": "Returned if company exists", "2-2": "The values that will be assigned if they are not explicity set for this company. Includes the following:\n\n * **brand** — The Webmail brand for this company.\n \n * **default_password_encoding** — The type of password hashing/encoding to be performed when OpenSRS receives an unencrypted password.\n \n * **filterdelivery** — The way in which spam messages are handled.\n \n * **spamfolder** — The folder into which messages identified as spam will be delivered.\n \n * **spamheader** — The tag that is added to messages that are identified as spam.\n \n * **spamtag** — The value of this field is prepended to the subject of any message that is identified as spam.\n \n * **spamlevel** — The level of aggressiveness set for the spam filter.", "3-0": "options", "3-1": "Returned if company exists", "3-2": "The list of settings that can be set or changed for the company. Includes all available values for each setting to allow a UI client to populate a page of attributes and drop-down options.\n\nAllowed settings are **brand**, **default_password_encoding**, **language**, **quota**, **spamlevel**, and **timezone**.\n\nFor an explanation of each of these values, see the **Attributes** table above." }, "cols": 3, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Examples for get_company" } [/block] **Request** [block:code] { "codes": [ { "code": "{\n \"credentials\": {\n\"user\": \"company_admin@example.adm\",\n \"password\": \"sw0rdf1sh\"\n },\n \"company\": \"Example Corp\"\n}\n", "language": "perl", "name": " " } ] } [/block] **Response** [block:code] { "codes": [ { "code": "{\n \"success\": true,\n \"settable_attributes\": [\n \"allow\",\n \"block\",\n \"brand\",\n \"contacts\",\n \"default_password_encoding”,\n \"filterdelivery\",\n \"language\",\n \"limit_aliases\",\n \"limit_users\",\n \"notes_external\",\n \"quota\",\n \"regen_passwords”,\n \"service_imap4\",\n \"service_pop3\",\n \"service_smtpin\",\n \"service_smtprelay\",\n \"service_smtprelay_webmail\",\n \"service_webmail\",\n \"spamfolder\",\n \"spamheader\",\n \"spamlevel\",\n \"spamtag\",\n \"stats_mailout\",\n \"timezone\",\n \"wm_domainalias\"\n ],\n\"metadata\": {\n \"options\": {\n \"quota\": [\n 0,\n 15360\n ],\n \"quota_maximum\": [\n 0,\n 1048576 \n ],\n \"default_password_encoding\": [\n null,\n \"MD5\",\n \"SSHA224\",\n \"SSHA256\",\n \"SSHA384\",\n \"SSHA512\",\n \"BCRYPT-6\",\n \"BCRYPT-8\",\n \"BCRYPT-10\",\n \"BCRYPT-12\"\n ],\n \"timezone\": [\n \"Pacific/Wake\",\n \"Pacific/Niue\",\n \"Pacific/Honolulu\",\n \"America/Anchorage\",\n \"America/Vancouver\",\n \"America/Edmonton\",\n \"America/Phoenix\",\n \"America/Chicago\",\n \"America/Mexico_City\",\n \"America/Guatemala\",\n \"America/Montreal\",\n \"America/Havana\",\n \"America/Lima\",\n \"America/Caracas\",\n \"America/Halifax\",\n \"America/Asuncion\",\n \"America/Santiago\",\n \"America/Puerto_Rico\",\n \"America/La_Paz\",\n \"America/St_Johns\",\n \"America/Sao_Paulo\",\n \"America/Montevideo\",\n \"America/Buenos_Aires\",\n \"Atlantic/South_Georgia\",\n \"America/Noronha\",\n \"Atlantic/Azores\",\n \"Atlantic/Cape_Verde\",\n \"Europe/London\",\n \"Africa/Casablanca\",\n \"Atlantic/Reykjavik\",\n \"Europe/Amsterdam\",\n \"Africa/Algiers\",\n \"Asia/Beirut\",\n \"Europe/Helsinki\",\n \"Europe/Minsk\",\n \"Europe/Istanbul\",\n \"Asia/Amman\",\n \"Asia/Damascus\",\n \"Asia/Jerusalem\",\n \"Africa/Cairo\",\n \"Africa/Johannesburg\",\n \"Europe/Moscow\",\n \"Asia/Baghdad\",\n \"Asia/Tehran\",\n \"Asia/Baku\",\n \"Asia/Dubai\",\n \"Indian/Mauritius\",\n \"Asia/Kabul\",\n \"Asia/Karachi\",\n \"Asia/Colombo\",\n \"Asia/Calcutta\",\n \"Asia/Kathmandu\",\n \"Asia/Dhaka\",\n \"Asia/Rangoon\",\n \"Asia/Bangkok\",\n \"Asia/Phnom_Penh\",\n \"Asia/Hong_Kong\",\n \"Australia/Perth\",\n \"Asia/Tokyo\",\n \"Australia/Adelaide\",\n \"Australia/Darwin\",\n \"Australia/Melbourne\",\n \"Australia/Brisbane\",\n \"Australia/Lord_Howe\",\n \"Pacific/Guadalcanal\",\n \"Pacific/Norfolk\",\n \"Pacific/Fiji\",\n \"Pacific/Auckland\",\n \"Asia/Anadyr\",\n \"Pacific/Chatham\",\n \"Pacific/Tongatapu\",\n \"Pacific/Kiritimati\"\n ],\n \"language\": [\n \"el\",\n \"en\",\n \"es\",\n \"fr\",\n \"de\",\n \"it\",\n \"pt_BR\",\n \"nl\",\n \"da\",\n \"no\",\n \"sv\"\n ], \n \"brand\": [\n null,\n \"Default Brand\",\n \"Demo Co Brand\",\n \"Demo Co Test Brand\"\n ],\n \"spamlevel\": [\n null,\n \"Very High\",\n \"High\",\n \"Normal\"\n ] \n },\n\"inherit\": {\n \"default_password_encoding\": \"BCRYPT-10\", \"spamfolder\": \".Spam\",\n \"spamheader\": null,\n \"brand\": \"bcom1\",\n \"spamtag\": null,\n \"filterdelivery\": \"local\",\n \"spamlevel\": \"90\"\n },\n \"bulletins\": {\n \"manual\": [],\n \"auto\": [\n {", "language": "perl", "name": " " } ] } [/block]