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

# Accept or decline a coverage request

> Take an action on a coverage request. The coverage request must be in `pending` state.



## OpenAPI

````yaml https://api.shiftkeeper.io/openapi.json post /coverage_requests/events/
openapi: 3.1.0
info:
  title: Shiftkeeper API
  description: API reference to interact with Shiftkeeper programatically
  version: 0.0.1
servers:
  - url: https://api.shiftkeeper.io
security:
  - apiKey: []
externalDocs:
  url: https://docs.shiftkeeper.io
  description: Learn more about Shiftkeeper
paths:
  /coverage_requests/events/:
    post:
      tags:
        - Coverage
      summary: Accept or decline a coverage request
      description: >-
        Take an action on a coverage request. The coverage request must be in
        `pending` state.
      parameters:
        - schema:
            type: string
          examples:
            cov_RxQottluZ1oeM47nz4bVl:
              value: cov_RxQottluZ1oeM47nz4bVl
            cov_ldYmnBVr5o2ikebwmRRZv:
              value: cov_ldYmnBVr5o2ikebwmRRZv
          in: path
          name: coverage_request_id
          required: true
          description: The ID of the coverage request.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - accept
                    - decline
                  description: The action you want to take on the coverage request
              required:
                - type
        required: true
      responses:
        '204':
          description: Coverage request event created successfully
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    $ref: '#/components/schemas/NotFoundError'
                required:
                  - error
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                      docs_url:
                        type: string
                      status:
                        type: number
                        enum:
                          - 422
                      code:
                        type: string
                        enum:
                          - coverage_request_not_pending
                          - coverage_request_self_owned
                    required:
                      - message
                      - status
                      - code
                    example:
                      code: unprocessable_entity
                      status: 422
                      message: The request cannot be processed
                required:
                  - error
              example:
                error:
                  code: coverage_request_not_pending
                  message: >-
                    You cannot accept a coverage request that is not in pending
                    state
                  status: 422
                  docs_url: >-
                    https://docs.shiftkeeper.io/api-reference/errors#coverage-request-not-pending
components:
  schemas:
    NotFoundError:
      type: object
      properties:
        message:
          type: string
        docs_url:
          type: string
        status:
          type: number
          const: 404
        code:
          type: string
          const: not_found
      required:
        - message
        - status
        - code
      example:
        code: not_found
        status: 404
        message: The requested resource was not found
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Enter your API key which starts with 'keeper_'

````