> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.teamwork.core.CreateCompany

- Component: `appmixer.teamwork.core.CreateCompany`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.teamwork 1.1.0](https://connectors.appmixer.com/connector/appmixer.teamwork/1.1.0.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.teamwork/1.1.0/component/appmixer.teamwork.core.CreateCompany>

Create a company in Teamwork.com

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Name (`name`) | text | - |
| Email (`emailOne`) | text | Company email address (e.g., contact@company.com) |
| Phone (`phone`) | text | - |
| Website (`website`) | text | Company website URL (e.g., https://company.com) |
| Address Line 1 (`addressOne`) | text | - |
| Address Line 2 (`addressTwo`) | text | - |
| City (`city`) | text | - |
| State/Province (`state`) | text | - |
| ZIP/Postal Code (`zip`) | text | - |
| Country Code (`countryCode`) | select | - |
| Custom Fields (`customfields`) | expression | - |

## Output ports

### Port `company`

| Field | Type | Description |
| --- | --- | --- |
| Company (`company`) | object | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.teamwork.core.CreateCompany",
  "auth": {
    "service": "appmixer:teamwork"
  },
  "author": "maciej.janowski@teamwork.com",
  "description": "Create a company in Teamwork.com",
  "private": false,
  "version": "1.0.0",
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "emailOne": {
            "type": "string"
          },
          "phone": {
            "type": "string"
          },
          "website": {
            "type": "string"
          },
          "addressOne": {
            "type": "string"
          },
          "addressTwo": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          },
          "countryCode": {
            "type": "string"
          },
          "customfields": {
            "type": "object"
          }
        },
        "required": [
          "name"
        ]
      },
      "inspector": {
        "inputs": {
          "name": {
            "index": 0,
            "type": "text",
            "label": "Name"
          },
          "emailOne": {
            "index": 1,
            "type": "text",
            "label": "Email",
            "tooltip": "Company email address (e.g., contact@company.com)"
          },
          "phone": {
            "index": 2,
            "type": "text",
            "label": "Phone"
          },
          "website": {
            "index": 3,
            "type": "text",
            "label": "Website",
            "tooltip": "Company website URL (e.g., https://company.com)"
          },
          "addressOne": {
            "index": 4,
            "type": "text",
            "label": "Address Line 1"
          },
          "addressTwo": {
            "index": 5,
            "type": "text",
            "label": "Address Line 2"
          },
          "city": {
            "index": 6,
            "type": "text",
            "label": "City"
          },
          "state": {
            "index": 7,
            "type": "text",
            "label": "State/Province"
          },
          "zip": {
            "index": 8,
            "type": "text",
            "label": "ZIP/Postal Code"
          },
          "countryCode": {
            "index": 9,
            "type": "select",
            "label": "Country Code",
            "source": {
              "url": "/component/appmixer/teamwork/core/ListCountries?outPort=countries",
              "data": {
                "transform": "ListCountries#toInspector"
              }
            }
          },
          "customfields": {
            "type": "expression",
            "label": "Custom Fields",
            "index": 10,
            "levels": [
              "AND"
            ],
            "fields": {
              "name": {
                "type": "select",
                "label": "Field",
                "index": 1,
                "source": {
                  "url": "/component/appmixer/teamwork/core/ListCustomFields?outPort=customfields",
                  "data": {
                    "messages": {
                      "in/entity": "company",
                      "in/onlyTextAndNumber": true
                    },
                    "transform": "./ListCustomFields#toInspector"
                  }
                }
              },
              "value": {
                "type": "text",
                "label": "Value",
                "index": 2
              }
            }
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "company",
      "options": [
        {
          "label": "Company",
          "value": "company",
          "schema": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "title": "ID"
              },
              "name": {
                "type": "string",
                "title": "Name"
              },
              "emailOne": {
                "type": "string",
                "title": "Email"
              },
              "phone": {
                "type": "string",
                "title": "Phone"
              },
              "website": {
                "type": "string",
                "title": "Website"
              },
              "addressOne": {
                "type": "string",
                "title": "Address Line 1"
              },
              "addressTwo": {
                "type": "string",
                "title": "Address Line 2"
              },
              "city": {
                "type": "string",
                "title": "City"
              },
              "state": {
                "type": "string",
                "title": "State"
              },
              "zip": {
                "type": "string",
                "title": "ZIP"
              },
              "countryCode": {
                "type": "string",
                "title": "Country Code"
              }
            }
          }
        }
      ]
    }
  ],
  "icon": "(data URI omitted)"
}
```
