Action Tokens
Trigger CodeWall actions from Slack, CI/CD pipelines, and other external systems.
Action tokens let external systems trigger CodeWall actions via simple HTTP requests. Each token is scoped to specific actions and tied to your organisation, so you can grant granular access without sharing user credentials.
Common use cases include triggering an emergency stop from a Slack slash command, pausing schedules during a change freeze, or kicking off a pentest from a CI/CD pipeline after a deployment.
Creating a token
- Go to Settings > Webhooks
- Click Add > Action Token
- Enter a label (e.g. "Slack Emergency Stop")
- Select which actions this token can perform
- Optionally set an expiry date
- Click Create Token
- Copy the token immediately --- it is only shown once
Available actions
| Action | Endpoint | Description |
|---|---|---|
emergency_stop | POST /v1/actions/emergency-stop | Kill all active pentest runs immediately |
pause_all_schedules | POST /v1/actions/pause-schedules | Pause all active recurring schedules |
resume_all_schedules | POST /v1/actions/resume-schedules | Resume all paused schedules |
approve_phase | POST /v1/actions/approve-phase | Approve or reject a pending phase gate |
trigger_retest | POST /v1/actions/trigger-retest | Re-run a finding retest |
trigger_run | POST /v1/actions/trigger-run | Start a new pentest run against a target |
Authentication
Include your token in the Authorization header:
Authorization: Bearer cwa_your_token_hereOr pass it as a query parameter (useful for simpler integrations):
POST /v1/actions/emergency-stop?token=cwa_your_token_hereExamples
Emergency stop
curl -X POST https://api.codewall.ai/v1/actions/emergency-stop \
-H "Authorization: Bearer cwa_your_token_here"Response:
{
"response_type": "in_channel",
"text": "Emergency stop executed. 3 run(s) terminated.",
"stopped": ["run-abc", "run-def", "run-ghi"],
"count": 3
}Pause all schedules
curl -X POST https://api.codewall.ai/v1/actions/pause-schedules \
-H "Authorization: Bearer cwa_your_token_here"Resume all schedules
curl -X POST https://api.codewall.ai/v1/actions/resume-schedules \
-H "Authorization: Bearer cwa_your_token_here"Approve a phase gate
curl -X POST https://api.codewall.ai/v1/actions/approve-phase \
-H "Authorization: Bearer cwa_your_token_here" \
-H "Content-Type: application/json" \
-d '{"run_id": "run-abc123", "decision": "approve"}'The decision field accepts "approve" or "reject". When rejecting, you can optionally set rejection_action to "cancel" (default) or "skip_to_report".
Trigger a finding retest
curl -X POST https://api.codewall.ai/v1/actions/trigger-retest \
-H "Authorization: Bearer cwa_your_token_here" \
-H "Content-Type: application/json" \
-d '{"finding_id": 42}'Trigger a new pentest run
curl -X POST https://api.codewall.ai/v1/actions/trigger-run \
-H "Authorization: Bearer cwa_your_token_here" \
-H "Content-Type: application/json" \
-d '{"target_url": "https://staging.example.com", "mode": "quick", "name": "Post-deploy scan"}'Optional fields: project_id (defaults to the org's default project), mode ("quick" or "thorough", defaults to "quick"), name (human-readable label).
Slack integration
Action tokens are designed to work seamlessly with Slack. Two common setups:
Slack Workflow Builder
- Create a new Workflow in Slack
- Add a trigger (e.g. emoji reaction, slash command, or button)
- Add a Send a web request step
- Set the URL to
https://api.codewall.ai/v1/actions/emergency-stop - Set method to POST
- Add a header:
Authorization: Bearer cwa_your_token_here - The response
textfield will be displayed in Slack
Slack slash command
- Create a Slack app at api.slack.com/apps
- Add a slash command (e.g.
/codewall-stop) - Set the Request URL to
https://api.codewall.ai/v1/actions/emergency-stop?token=cwa_your_token_here - The response includes
response_type: "in_channel"so the result is visible to the channel
CI/CD integration
Trigger pentests automatically after deployments:
# GitHub Actions example
- name: Trigger pentest
run: |
curl -X POST https://api.codewall.ai/v1/actions/trigger-run \
-H "Authorization: Bearer ${{ secrets.CODEWALL_ACTION_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{"target_url": "https://staging.example.com", "name": "Post-deploy: ${{ github.sha }}"}'Security
- Tokens are stored as SHA-256 hashes --- CodeWall never stores the plaintext token
- Each token is scoped to specific actions and bound to a single organisation
- Tokens can be revoked instantly in Settings
- Tokens can be given an optional expiry date
- All token usage is recorded in the Audit Log
- Action endpoints are rate-limited to prevent abuse (3--10 requests per minute depending on the action)
Rate limits
| Endpoint | Limit |
|---|---|
| Emergency stop | 3/minute |
| Pause/resume schedules | 3/minute |
| Approve phase | 10/minute |
| Trigger retest | 5/minute |
| Trigger run | 5/minute |

