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

# Add candidate system data

> ### POST /gin/v1/company/candidate

This endpoint allows the addition of a candidate to a company based on Company Id or authorization api key

#### Request Body

- `phone` (string, optional): The phone number of the candidate. (Required if email is missing)
    
- `email` (string, optional): The email address of the candidate. (Required if phone is missing)
    
- `source` (string, optional): The source of imported candidate. If empty the result will be
    
- `employee` (boolean, optional): Is this person an employee or a candidate ?. If empty the result will be false
    

#### Response

The response for this request can be represented as a JSON schema:

``` json
{
    "type": "object",
    "properties": {
        "message": {
            "type": "string"
        },
        "status": {
            "type": "string"
        },
        "data": {
            "type": "object",
            "properties": {
                "slug": {
                    "type": "string"
                }
            }
        }
    }
}

 ```



## OpenAPI

````yaml post /gin/v1/company/candidate
openapi: 3.0.0
info:
  title: Pauls Job Public Endpoints
  description: >-
    #### **Description:**


    This API provides a comprehensive suite of endpoints for managing user
    authentication, session control, and other key functionalities within the
    application for Pauls Job. The endpoints are designed to ensure secure and
    efficient communication between clients and the server, offering robust
    access control mechanisms through token-based authentication.


    #### **Key Features:**


    - **Authentication:** Allows users to securely log in using their
    credentials and receive a token for accessing protected resources.
        
    - **Session Management:** Provides a logout mechanism to securely end user
    sessions and invalidate tokens.
        
    - **Error Handling:** Clear and descriptive error messages ensure that
    issues such as invalid credentials, expired tokens, or missing parameters
    are easily identifiable.
        

    This API is built with a focus on security and ease of use, making it
    essential for integrating user authentication and session management into
    applications while maintaining a high standard of data protection.
  version: 1.0.0
servers:
  - url: https://api.hyrd.de
security: []
tags:
  - name: Users
    description: >-
      #### **Description:**


      The folder contains the foundational information and essential API
      endpoints for starting with the authentication and session management of
      the application. This includes the critical login and logout
      functionalities, which are necessary for users to authenticate and manage
      their sessions securely.


      #### **APIs Included:**


      1. **Login API**: Allows users to log in by providing their credentials
      and receive an authentication token.
          
      2. **Logout API**: Enables users to log out by invalidating the token and
      ending their session.
          

      These endpoints are designed to facilitate secure access control and
      session handling, making them an essential starting point for any
      interaction with the platform's protected resources.
  - name: General
  - name: Company
  - name: Company > Candidate
  - name: Company > Api Integrations
paths:
  /gin/v1/company/candidate:
    post:
      tags:
        - Company > Candidate
      summary: Add candidate system data
      description: >-
        ### POST /gin/v1/company/candidate


        This endpoint allows the addition of a candidate to a company based on
        Company Id or authorization api key


        #### Request Body


        - `phone` (string, optional): The phone number of the candidate.
        (Required if email is missing)
            
        - `email` (string, optional): The email address of the candidate.
        (Required if phone is missing)
            
        - `source` (string, optional): The source of imported candidate. If
        empty the result will be
            
        - `employee` (boolean, optional): Is this person an employee or a
        candidate ?. If empty the result will be false
            

        #### Response


        The response for this request can be represented as a JSON schema:


        ``` json

        {
            "type": "object",
            "properties": {
                "message": {
                    "type": "string"
                },
                "status": {
                    "type": "string"
                },
                "data": {
                    "type": "object",
                    "properties": {
                        "slug": {
                            "type": "string"
                        }
                    }
                }
            }
        }

         ```
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: '{{company-api-key}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              example: |-
                {
                    "phone": "+60147383114",
                    "email": "john.doe@example.com",
                    "source": "",
                    "employee": false
                }
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                type: string
              example: |-
                {
                    "message": "Candidate input successfully",
                    "status": "success",
                    "data": {
                        "slug": "335516d7-d3ed-4fce-924d-237d07832d58"
                    }
                }
        '400':
          description: Bad Request
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
              examples:
                example-0:
                  summary: 400 Failed validation
                  value:
                    code: 3
                    message: 'Failed to input candidate: email or phone must be filled'
                    details: []
                example-1:
                  summary: 400 Wrong email
                  value:
                    code: 3
                    message: 'Failed to input candidate: email must be correct format'
                    details: []
                example-2:
                  summary: 400 Wrong phone number
                  value:
                    code: 3
                    message: >-
                      Failed to input candidate: phone must be start with + and
                      digit only
                    details: []
        '401':
          description: Unauthorized
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
              examples:
                example-0:
                  summary: 401 Unauthorized
                  value:
                    code: 16
                    message: token not provided
                    details: []
                example-1:
                  summary: 401 not matched company id
                  value:
                    code: 16
                    message: invalid company ID format
                    details: []
      security:
        - noauthAuth: []
components:
  securitySchemes:
    noauthAuth:
      type: http
      scheme: noauth

````