# Create a new proposal record

`POST /api/proposal`

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

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

Responses:

- 201: Proposal created successfully

Content type: application/json

Type: object

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

- `deletedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `createdAt` (optional)
  Type: string, date-time
  
  The creation timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `updatedAt` (optional)
  Type: string, date-time
  
  The last update timestamp of the entity.
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `id` (optional)
  Type: string

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

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

- `archivedAt` (optional)
  Type: string, date-time
  
  Example:
  
  ```json
  "2018-11-21T06:20:32.232Z"
  ```

- `tenantId` (optional)
  Type: string

- `organizationId` (optional)
  Type: string

- `jobPostUrl` (optional)
  Type: string

- `valueDate` (optional)
  Type: string, date-time

- `jobPostContent` (required)
  Type: string

- `proposalContent` (required)
  Type: string

- `status` (required)
  Type: string
  
  enum: ["SENT","ACCEPTED"]

- `employeeId` (required)
  Type: string

- `organizationContactId` (optional)
  Type: string

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

## Examples

### cURL

```bash
curl -X POST 'http://localhost:3000/api/proposal' \
  -H 'Content-Type: application/json' \
  --data-raw '{}'
```

### JavaScript

```javascript
const response = await fetch('http://localhost:3000/api/proposal', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: '{}',
});

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

### Python

```python
import requests

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