> ## Documentation Index
> Fetch the complete documentation index at: https://beebole.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Company

> Beebole legacy API — Company operations.

## **Create a Company**

Request:

```json theme={null}
{
  "service": "company.create",
  "company": {
    "name": "myCompany",
    "corporate" : true      //optional: is the company corporate or customer ?  default false (customer)
  }
}
```

Response:

```json theme={null}
{
  "status": "ok",
  "id": 233
}
```

## **Get a Company**

Request:

```json theme={null}
{
  "service": "company.get",
  "id": 233
}
```

Response:

```json theme={null}
{
  "status" : "ok",
  "company" : {
    "id" : 233,
    "name" : "myCompany",
    "projects": {
      "count": 3
    },
    "active" : true
  }
}
```

## **Update a Company**

Request:

```json theme={null}
{
  "service" : "company.update",
  "company" : {
    "id" : 233,
    "name" : "newName"
  }
}
```

Response:

```json theme={null}
{"status" : "ok"}
```

## **List Companies**

Request:

```json theme={null}
{
  "service": "company.list"
}
```

Response:

```json theme={null}
{
  "status" : "ok",
  "companies": [
    {
      "id" : 233,
      "name" : "myCompany",
      "projects": {"count": 3},
      "active" : true
    }, ...
  ]
}
```

## **Activate a Company**

Request:

```json theme={null}
{
  "service": "company.activate",
  "id": 233
}
```

Response:

```json theme={null}
{"status": "ok"}
```

## **Deactivate a Company**

Request:

```json theme={null}
{
  "service": "company.deactivate",
  "id": 233
}
```

Response:

```json theme={null}
{"status": "ok"}
```

## **Assign a Specific Task to a Company**

Request:

```json theme={null}
{
  "service" : "company.attach_specific_task",
  "id" : 78,
  "task" : {
    "id" : 43
  }
}
```

Response:

```json theme={null}
{"status" : "ok"}
```

## **Unassign a Specific Task to a Company**

Request:

```json theme={null}
{
  "service" : "company.detach_specific_task",
  "id" : 78,
  "task" : {
    "id" : 43
  }
}
```

Response:

```json theme={null}
{"status" : "ok"}
```

## **List Specific Tasks Assigned to a Company**

Request:

```json theme={null}
{
  "service" : "company.specific_tasks",
  "id" : 78
}
```

Response:

```json theme={null}
{
 "status" : "ok",
 "disabled" : false,  //default : false
 "specificTasks": [
   {
     "name" : "Administration",
     "id" : 345,
     "active":true
   }, ...
 ]
}
```

## **Enable Specific Tasks for a Company (enabled by default)**

Request:

```json theme={null}
{
  "service" : "company.enable_specific_tasks",
  "id" : 78
}
```

Response:

```json theme={null}
{"status" : "ok"}
```

## **Disable Specific Tasks for a Company**

Request:

```json theme={null}
{
  "service" : "company.disable_specific_tasks",
  "id" : 78
}
```

Response:

```json theme={null}
{"status" : "ok"}
```

## **Assign an Exclusive Member to a Company**

Request:

```json theme={null}
{
  "service" : "company.attach_member",
  "id" : 78,
  "person" : {  // "person" or "group"
    "id" : 43
  }
}
```

Response:

```json theme={null}
{"status" : "ok"}
```

## **Unassign an Exclusive Member to a Company**

Request:

```json theme={null}
{
  "service" : "company.detach_member",
  "id" : 78,
  "person" : {  // "person" or "group"
    "id" : 43
  }
}
```

Response:

```json theme={null}
{"status" : "ok"}
```

## **List Exclusive Members Assigned to a Company**

Request:

```json theme={null}
{
  "service" : "company.members",
  "id" : 78
}
```

Response:

```json theme={null}
{
 "status" : "ok",
 "members": [
   {
     "name" : "John Le Carré",
     "id" : 345
   }, ...
 ],
 "groups": [
   {
     "name" : "US",
     "id" : 978
   }, ...
 ]
}
```

## **Assign a Group to a Company**

Request:

```json theme={null}
{
  "service" : "company.add_group",
  "id" : 78,
  "group" : {
    "id" : 105
  }
}
```

Response:

```json theme={null}
{"status": "ok"}
```

## **Unassign a Group to a Company**

Request:

```json theme={null}
{
  "service" : "company.remove_group",
  "id" : 78,
  "group" : {
    "id" : 105
  }
}
```

Response:

```json theme={null}
{"status": "ok"}
```

## **List Groups Assigned to a Company**

Request:

```json theme={null}
{
  "service" : "company.groups",
  "id" : 78
}
```

Response:

```json theme={null}
{
  "status":"ok",
  "groups":[
    {
      "id":4787,
      "name":"US",
      "groups":{"count":4}
    }, ...
  ]
}
```

## **Set a Custom Field Value to a Company**

Request:

```json theme={null}
{
  "service" : "company.set_custom_field_value",
  "id" : 78,
  "customField" : {
    "id" : 7206,
    "value" : "Transportation"
  }
}
```

Response:

```json theme={null}
{"status": "ok"}
```

## **Clear a Company Custom Field Value**

Request:

```json theme={null}
{
  "service" : "company.clear_custom_field_value",
  "id" : 78,
  "customField" : {
    "id" : 7206
  }
}
```

Response:

```json theme={null}
{"status": "ok"}
```

## **List Custom Fields Assigned to a Company**

Request:

```json theme={null}
{
  "service" : "company.custom_fields",
  "id" : 78
}
```

Response:

```json theme={null}
{
  "status":"ok",
  "customFields":[
    {
      "id" : 7206,
      "name" : "Industry",
      "value" : "Transportation" 
    },
    {
      "id" : 4149,
      "name" : "location"
    }, ...
  ]
}
```
