Skip to content

API Keys & CI/CD

API keys let you interact with CheckOps programmatically. Use them in CI/CD pipelines to create deployment markers, run API checks, and query monitor status.

Navigate to Settings > API Keys and click Create Key:

Field Description
name Descriptive label (e.g., “GitLab CI Production”)
scopes Permissions granted to this key
expires_at Optional expiration date

The API key is displayed once after creation. Copy it immediately. CheckOps stores only a SHA256 hash of the key and cannot recover it.

Scope Allows
monitors:read List and view monitors and check results
monitors:write Create, update, and delete monitors
deployments:write Create deployment markers
api-checks:read View API check results
api-checks:write Create and run API checks
cve:read Query CVE feed data
nis2:read View NIS2 assessment results

Use the principle of least privilege: grant only the scopes your pipeline needs.

Include the API key in the Authorization header:

Terminal window
curl -H "Authorization: Bearer cops_k1_abc123..." \
https://api.checkops.eu/api/monitors

API keys use the prefix cops_k1_ for identification.

.github/workflows/deploy.yml
name: Deploy & Mark
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy
run: ./deploy.sh
- name: Mark deployment in CheckOps
env:
CHECKOPS_API_KEY: ${{ secrets.CHECKOPS_API_KEY }}
run: |
curl -X POST https://api.checkops.eu/api/toolbox/deployments \
-H "Authorization: Bearer $CHECKOPS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"service": "api",
"version": "${{ github.sha }}",
"environment": "production",
"commit_url": "${{ github.event.head_commit.url }}"
}'
.gitlab-ci.yml
deploy:
stage: deploy
script:
- ./deploy.sh
- |
curl -X POST https://api.checkops.eu/api/toolbox/deployments \
-H "Authorization: Bearer $CHECKOPS_API_KEY" \
-H "Content-Type: application/json" \
-d "{
\"service\": \"api\",
\"version\": \"$CI_COMMIT_SHA\",
\"environment\": \"production\",
\"commit_url\": \"$CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA\"
}"
environment:
name: production

Store CHECKOPS_API_KEY as a CI/CD variable (masked and protected).

Terminal window
curl -H "Authorization: Bearer cops_k1_..." \
https://api.checkops.eu/api/api-keys

Response includes key metadata (name, scopes, last used, created) but never the key value itself.

Terminal window
curl -X DELETE \
-H "Authorization: Bearer cops_k1_..." \
https://api.checkops.eu/api/api-keys/{key_id}

Revoked keys are immediately invalidated. Any pipeline using the revoked key will receive 401 Unauthorized.

Plan Requests per minute
OPS 60
PRO 300
ENTERPRISE Custom

Rate-limited requests receive a 429 Too Many Requests response with a Retry-After header.