# Create new record

`POST /api/organization-team`

Authentication (security requirement alternatives):

```json
[
  {
    "bearer": []
  }
]
```

- bearer: http (bearer), header JWT. Enter JWT token

Request body: application/json (required)

Type: object

Schema: [CreateOrganizationTeamDTO](https://sourcey-gauzy.pages.dev/api-reference/models/createorganizationteamdto/index.md)

- `tenant` (optional)
  Type: object

- `tenantId` (optional)
  Type: string

- `organization` (required)
  Type: object

- `organizationId` (required)
  Type: string

- `sentTo` (optional)
  Type: string

- `tags` (optional)
  Type: array
  
  Items:
    Type: array

- `memberIds` (optional)
  Type: array
  
  Items:
    Type: string

- `managerIds` (optional)
  Type: array
  
  Items:
    Type: string

- `logo` (optional)
  Type: string

- `prefix` (optional)
  Type: string

- `shareProfileView` (optional)
  Type: boolean
  
  default: true

- `requirePlanToTrack` (optional)
  Type: boolean
  
  default: false

- `imageId` (optional)
  Type: string

- `public` (optional)
  Type: boolean

- `color` (optional)
  Type: string

- `emoji` (optional)
  Type: string

- `teamSize` (optional)
  Type: string

- `projects` (optional)
  Type: array
  
  Items:
    Reference: [OrganizationProject](https://sourcey-gauzy.pages.dev/api-reference/models/organizationproject/index.md); Type: object

- `name` (required)
  Type: string

- `profile_link` (optional)
  Type: string

Responses:

- 201: The record has been successfully created.

- 400: Invalid input, The response body may contain clues as to what went wrong

- 401: Unauthorized

- 403: Forbidden

## Examples

### cURL

```bash
curl -X POST 'http://localhost:3000/api/organization-team' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "tags": [
    []
  ],
  "memberIds": [
    "string"
  ],
  "managerIds": [
    "string"
  ],
  "logo": "string",
  "prefix": "string",
  "shareProfileView": true,
  "requirePlanToTrack": false,
  "imageId": "string",
  "public": true,
  "color": "string",
  "emoji": "string",
  "teamSize": "string",
  "projects": [
    {
      "deletedAt": "2018-11-21T06:20:32.232Z",
      "createdAt": "2018-11-21T06:20:32.232Z",
      "updatedAt": "2018-11-21T06:20:32.232Z",
      "id": "string",
      "isActive": true,
      "isArchived": false,
      "archivedAt": "2018-11-21T06:20:32.232Z",
      "tenantId": "string",
      "organizationId": "string",
      "name": "string",
      "startDate": "string",
      "endDate": "string",
      "billing": "FLAT_FEE",
      "currency": "USD",
      "public": true,
      "owner": "CLIENT",
      "taskListType": "GRID",
      "code": "string",
      "description": "string",
      "color": "string",
      "billable": true,
      "billingFlat": true,
      "openSource": true,
      "projectUrl": "string",
      "openSourceProjectUrl": "string",
      "budget": 0,
      "budgetType": "hours",
      "imageUrl": "string",
      "icon": "string",
      "status": "open",
      "isTasksAutoSync": true,
      "isTasksAutoSyncOnLabel": true,
      "syncTag": "string",
      "archiveTasksIn": 0,
      "closeTasksIn": 0,
      "organizationContactId": "string",
      "imageId": "string",
      "defaultAssigneeId": "string"
    }
  ],
  "name": "string",
  "profile_link": "string"
}'
```

### JavaScript

```javascript
const body = `{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "tags": [
    []
  ],
  "memberIds": [
    "string"
  ],
  "managerIds": [
    "string"
  ],
  "logo": "string",
  "prefix": "string",
  "shareProfileView": true,
  "requirePlanToTrack": false,
  "imageId": "string",
  "public": true,
  "color": "string",
  "emoji": "string",
  "teamSize": "string",
  "projects": [
    {
      "deletedAt": "2018-11-21T06:20:32.232Z",
      "createdAt": "2018-11-21T06:20:32.232Z",
      "updatedAt": "2018-11-21T06:20:32.232Z",
      "id": "string",
      "isActive": true,
      "isArchived": false,
      "archivedAt": "2018-11-21T06:20:32.232Z",
      "tenantId": "string",
      "organizationId": "string",
      "name": "string",
      "startDate": "string",
      "endDate": "string",
      "billing": "FLAT_FEE",
      "currency": "USD",
      "public": true,
      "owner": "CLIENT",
      "taskListType": "GRID",
      "code": "string",
      "description": "string",
      "color": "string",
      "billable": true,
      "billingFlat": true,
      "openSource": true,
      "projectUrl": "string",
      "openSourceProjectUrl": "string",
      "budget": 0,
      "budgetType": "hours",
      "imageUrl": "string",
      "icon": "string",
      "status": "open",
      "isTasksAutoSync": true,
      "isTasksAutoSyncOnLabel": true,
      "syncTag": "string",
      "archiveTasksIn": 0,
      "closeTasksIn": 0,
      "organizationContactId": "string",
      "imageId": "string",
      "defaultAssigneeId": "string"
    }
  ],
  "name": "string",
  "profile_link": "string"
}`;

const response = await fetch('http://localhost:3000/api/organization-team', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "tenant": {},
  "tenantId": "string",
  "organization": {},
  "organizationId": "string",
  "sentTo": "string",
  "tags": [
    []
  ],
  "memberIds": [
    "string"
  ],
  "managerIds": [
    "string"
  ],
  "logo": "string",
  "prefix": "string",
  "shareProfileView": true,
  "requirePlanToTrack": false,
  "imageId": "string",
  "public": true,
  "color": "string",
  "emoji": "string",
  "teamSize": "string",
  "projects": [
    {
      "deletedAt": "2018-11-21T06:20:32.232Z",
      "createdAt": "2018-11-21T06:20:32.232Z",
      "updatedAt": "2018-11-21T06:20:32.232Z",
      "id": "string",
      "isActive": true,
      "isArchived": false,
      "archivedAt": "2018-11-21T06:20:32.232Z",
      "tenantId": "string",
      "organizationId": "string",
      "name": "string",
      "startDate": "string",
      "endDate": "string",
      "billing": "FLAT_FEE",
      "currency": "USD",
      "public": true,
      "owner": "CLIENT",
      "taskListType": "GRID",
      "code": "string",
      "description": "string",
      "color": "string",
      "billable": true,
      "billingFlat": true,
      "openSource": true,
      "projectUrl": "string",
      "openSourceProjectUrl": "string",
      "budget": 0,
      "budgetType": "hours",
      "imageUrl": "string",
      "icon": "string",
      "status": "open",
      "isTasksAutoSync": true,
      "isTasksAutoSyncOnLabel": true,
      "syncTag": "string",
      "archiveTasksIn": 0,
      "closeTasksIn": 0,
      "organizationContactId": "string",
      "imageId": "string",
      "defaultAssigneeId": "string"
    }
  ],
  "name": "string",
  "profile_link": "string"
}'''

response = requests.post(
    'http://localhost:3000/api/organization-team',
    data=body.encode('utf-8'),
    headers={
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
