VCV

VCV webhook API

The webhook API from VCV — 2 operation(s) for webhook.

OpenAPI Specification

vcv-webhook-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: VCV chatbot webhook API
  description: open api
  version: v3
servers:
- url: https://my.vcv.ai
- url: https://my.vcv.ru
- url: '{hostname}'
  variables:
    hostname:
      default: http://localhost:8080
security:
- bearerAuth: []
tags:
- name: webhook
paths:
  /api/v3/company-webhooks:
    get:
      description: Get company webhooks list
      tags:
      - webhook
      parameters:
      - $ref: '#/components/parameters/pagination_page'
      - $ref: '#/components/parameters/pagination_page_size'
      - $ref: '#/components/parameters/sort_order'
      - $ref: '#/components/parameters/filter_id'
      - $ref: '#/components/parameters/filter_active'
      - name: filter[event]
        in: query
        description: event type filter
        required: false
        schema:
          type: string
      - name: filter[name]
        in: query
        description: webhook name filter
        required: false
        schema:
          type: string
      - name: with[]
        in: query
        description: Relations to retrieve
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - user
      responses:
        '200':
          description: list of company webhooks
          content:
            application/json:
              schema:
                properties:
                  _total_items:
                    type: integer
                  _page:
                    type: integer
                  _page_count:
                    type: integer
                  _links:
                    properties:
                      self:
                        type: object
                        properties:
                          href:
                            type: string
                            format: uri
                      next:
                        type: object
                        properties:
                          href:
                            type: string
                            format: uri
                      last:
                        type: object
                        properties:
                          href:
                            type: string
                            format: uri
                    type: object
                  _embedded:
                    type: object
                    properties:
                      webhooks:
                        type: array
                        items:
                          allOf:
                          - $ref: '#/components/schemas/Webhook'
                          - type: object
                            properties:
                              _embedded:
                                type: object
                                properties:
                                  user:
                                    $ref: '#/components/schemas/User'
                type: object
    post:
      description: Create company webhook
      parameters:
      - name: with[]
        in: query
        description: Relations to retrieve
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - user
      tags:
      - webhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                secret:
                  type: string
                url:
                  type: string
                name:
                  type: string
                  nullable: true
                event:
                  type: string
                  enum:
                  - response_status_changed
                  - response_created
                  - candidate_refused
                  - response_comment_created
                  - vacancy_created
                active:
                  type: boolean
              type: object
      callbacks:
        response_status_changed:
          '{$request.body#/url}':
            post:
              parameters:
              - in: header
                name: Vcv-Signature
                description: HMAC-SHA256 signature of the request body, using your webhook secret as the signing key
                schema:
                  type: string
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        vacancy_id:
                          type: integer
                        response_id:
                          type: integer
                        old_status_id:
                          type: integer
                        new_status_id:
                          type: integer
              responses:
                '200':
                  description: Returns this code if accept the callback
        vacancy_created:
          '{$request.body#/url}':
            post:
              parameters:
              - in: header
                name: Vcv-Signature
                description: HMAC-SHA256 signature of the request body, using your webhook secret as the signing key
                schema:
                  type: string
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/Vacancy'
              responses:
                '200':
                  description: Returns this code if accept the callback
        response_comment_created:
          '{$request.body#/url}':
            post:
              parameters:
              - in: header
                name: Vcv-Signature
                description: HMAC-SHA256 signature of the request body, using your webhook secret as the signing key
                schema:
                  type: string
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/ResponseComment'
              responses:
                '200':
                  description: Returns this code if accept the callback
        response_created:
          '{$request.body#/url}':
            post:
              parameters:
              - in: header
                name: Vcv-Signature
                description: HMAC-SHA256 signature of the request body, using your webhook secret as the signing key
                schema:
                  type: string
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      allOf:
                      - $ref: '#/components/schemas/Response'
              responses:
                '200':
                  description: Returns this code if accept the callback
        candidate_refused:
          '{$request.body#/url}':
            post:
              parameters:
              - in: header
                name: Vcv-Signature
                description: HMAC-SHA256 signature of the request body, using your webhook secret as the signing key
                schema:
                  type: string
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        response_id:
                          type: integer
                        refusal:
                          type: object
                          properties:
                            id:
                              type: integer
                            interview_id:
                              type: integer
                            reason:
                              type: string
                            description:
                              type: string
              responses:
                '200':
                  description: Returns this code if accept the callback
      responses:
        '200':
          description: Created webhook
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Webhook'
                - type: object
                  properties:
                    _embedded:
                      type: object
                      properties:
                        user:
                          $ref: '#/components/schemas/User'
  /api/v3/company-webhooks/{id}:
    get:
      description: Get company webhook detail
      tags:
      - webhook
      parameters:
      - $ref: '#/components/parameters/id'
      - name: with[]
        in: query
        description: Relations to retrieve
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - user
      responses:
        '200':
          description: Webhook
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Webhook'
                - type: object
                  properties:
                    _embedded:
                      type: object
                      properties:
                        user:
                          $ref: '#/components/schemas/User'
    delete:
      description: Delete webhook
      tags:
      - webhook
      parameters:
      - $ref: '#/components/parameters/id'
      responses:
        '200':
          description: Deleted webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
    patch:
      description: Update webhook
      parameters:
      - $ref: '#/components/parameters/id'
      - name: with[]
        in: query
        description: Relations to retrieve
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - user
      tags:
      - webhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                secret:
                  type: string
                url:
                  type: string
                name:
                  type: string
                  nullable: true
                active:
                  type: boolean
              type: object
      responses:
        '200':
          description: Updated webhook
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Webhook'
                - type: object
                  properties:
                    _embedded:
                      type: object
                      properties:
                        user:
                          $ref: '#/components/schemas/User'
components:
  schemas:
    User:
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        email:
          type: string
        position:
          type: string
        logo_url:
          type: string
          nullable: true
        geo_id:
          type: integer
        lanaguage_id:
          type: integer
        company_id:
          type: integer
        userName:
          type: object
          nullable: true
          properties:
            user_id:
              type: integer
            first_name:
              type: string
            last_name:
              type: string
            language_id:
              type: integer
            id:
              type: integer
      type: object
    Response:
      properties:
        id:
          type: integer
        vacancy_id:
          type: integer
        candidate_id:
          type: integer
        response_status_id:
          type: integer
        response_source_id:
          type: integer
        interview_id:
          type: integer
        external_id:
          type: string
        is_hidden_by_candidate:
          type: boolean
        created_at:
          type: string
          format: date-time
        agreed_at:
          type: string
          format: date-time
          nullable: true
        date_sent:
          type: string
          format: date-time
          nullable: true
        resume_url:
          type: string
          nullable: true
        second_resume_url:
          type: string
          nullable: true
        social_source:
          type: string
          nullable: true
        utm_source:
          type: string
          nullable: true
        utm_medium:
          type: string
          nullable: true
        utm_campaign:
          type: string
          nullable: true
        utm_content:
          type: string
          nullable: true
        utm_term:
          type: string
          nullable: true
        is_paid:
          type: boolean
          nullable: true
      type: object
    Vacancy:
      properties:
        id:
          type: integer
        token:
          type: string
        title:
          type: string
        active:
          type: boolean
        user_id:
          type: integer
        language_id:
          type: integer
        created_at:
          type: string
          format: date-time
      type: object
    ResponseComment:
      properties:
        id:
          type: integer
        created_at:
          type: string
          format: date-time
        message:
          type: string
        response_id:
          type: integer
        user_id:
          type: integer
      type: object
    Webhook:
      properties:
        id:
          type: integer
        user_id:
          type: integer
        company_id:
          type: integer
        active:
          type: boolean
        event:
          type: string
        secret:
          type: string
        url:
          type: string
        name:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      type: object
  parameters:
    filter_id:
      name: filter[id]
      in: query
      required: false
      schema:
        oneOf:
        - type: integer
        - type: array
          items:
            type: integer
    filter_active:
      name: filter[active]
      in: query
      required: false
      schema:
        type: boolean
    id:
      name: id
      in: path
      description: entity id
      required: true
      schema:
        type: integer
    sort_order:
      name: sort[order]
      in: query
      description: sort order
      required: false
      schema:
        type: string
        default: desc
        enum:
        - asc
        - desc
    pagination_page:
      name: page
      in: query
      description: page number
      required: false
      schema:
        type: integer
        default: 1
    pagination_page_size:
      name: limit
      in: query
      description: page size
      required: false
      schema:
        type: integer
        default: 20
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token