The CanIPhish Public API (v3) lets you drive your tenant programmatically. You can read reporting and intelligence data — campaign results, human-risk scores, dark-web breaches, domain supply-chain posture and the tenants you can access — and manage configuration by creating, updating, deleting and duplicating campaigns, employee lists, content-library items (phishing emails, sender IDs, phishing websites, voice-phishing templates and training modules) and platform settings.
This article is a practical overview. For the complete, always-current reference — every endpoint, its parameters, request/response schemas and a “try it” console — see the interactive API reference at api-docs.caniphish.com.
Table of Contents
- Base URL
- Authentication
- Access & authorization
- Request & response conventions
- API quota & rate limits
- Working with tenants
- Quickstart
- What you can manage
- Common workflows
- Error handling
- Best practices
- Need help?
Base URL
All endpoints live under:
https://api.caniphish.com/api/v3Authentication
Every request must include two headers:
| Header | Value |
|---|---|
X-API-Key |
Your personal API key. Each platform user has one key. See Find your API key. |
X-Email-Address |
The email address of the user the API key belongs to. |
The user identified by X-Email-Address must have access to the tenantID supplied in the request body. Each call that passes authentication and authorization uses one unit of the monthly API quota of the tenant in tenantID. The tenant lookup (get-tenant-access) doesn't use quota.
Keep your API key secret. It grants the same access the associated user has. Store it in a secrets manager or environment variable — never commit it to source control or expose it in client-side code.
Find your API key
- Sign in to the platform.
- Click the profile icon at the top right, and then select View User Profile:
- On the User Profile tab, select Account API Key. The section opens and the API Key field shows your key. If the field is empty, select Generate a new API key. The image below hides the key:
- Select Copy to copy the key.
The key does not expire. One key is for all tenants that the user can access. The AI Assistant Connector (MCP) uses the same key.
To replace the key, select Generate a new API key, and then select Yes, generate a new key! in the confirmation window. The old key stops immediately, and you cannot get it back. Update each script, integration and AI assistant that uses the old key.
Access & authorization
Most endpoints, reads included, require the requesting user to be a Platform Admin (AD) or Platform Super Admin (SA) on the tenant. Other roles get 403 with the error code PERMISSION_DENIED.
-
Any user with access to the tenant can call the tenant lookup (get-tenant-access), get-entitlements, get-reference-data, get-user-profile, update-user-profile and the webhook event types lookup (
integrations/webhooks/get-event-types). -
Platform Reporter (RP) can also call these five reporting endpoints, if the user has no campaign tag restrictions:
reporting/phishing/get-all-campaignsreporting/phishing/get-campaign-resultsreporting/training/get-all-campaignsreporting/training/get-training-resultsreporting/employees/get-human-risk
These endpoints return every campaign on the tenant. A Reporter with campaign tag restrictions gets 403
PERMISSION_DENIEDfrom them. All other endpoints, including get-all-employee-information and get-audit-log, are for Platform Admins only, as in the console. -
Management / write endpoints also need a subscription. A request is rejected with 403 unless both of the following hold:
- Role — the requesting user is a Platform Admin (AD) or Platform Super Admin (SA) on the tenant.
- Entitlement — the tenant has an active Professional or Enterprise subscription, an active Enterprise trial, or is a partner-managed tenant billed under a master subscription whose master tenant holds an Enterprise subscription.
A small number of read endpoints also need this subscription, for example get-phishing-email and get-training-module.
You can check both conditions up front by calling get-entitlements, which reports whether the caller is an admin and whether the tenant is write- and Enterprise-entitled — useful for a client that wants to preflight before attempting a gated call.
Request & response conventions
-
All endpoints are
POST. - Most requests take a JSON body that includes a
tenantID. A couple of read endpoints (the tenant-ID lookups) need only the authentication headers. -
Success responses are
200with a JSON object. -
Authentication / validation errors return
400with{ "Error": "message" }. -
Authorization (role / subscription) failures return
403with{ "Error": "message" }. - Errors also include a machine-readable
ErrorCode, so you can branch on it in code rather than parsing messages. Common codes areAUTH_ERROR,QUOTA_EXCEEDED,TENANT_ACCESS_DENIED,TENANT_NOT_FOUND,PERMISSION_DENIED,ENTITLEMENT_REQUIRED,MISSING_REQUIRED_FIELD,MISSING_BODYandINVALID_JSON. Some endpoints return other codes, and some validation errors have noErrorCode. Always examine the HTTP status and theErrormessage too.
API quota & rate limits
Each tenant has a monthly API quota. Most responses carry three headers so you can track consumption in real time. They show the quota of the tenant in the request's tenantID:
X-API-Quota-Limit your tenant's quota
X-API-Quota-Used units consumed so far
X-API-Quota-Remaining units leftA response does not have these headers when the request stops before the platform reads the tenant, for example with AUTH_ERROR, QUOTA_EXCEEDED or a missing tenantID.
Call get-entitlements at any time to read your current plan and quota.
How big is the quota?
- Professional and Enterprise: 200 calls a month for each employee licence on your subscription. For example, a 100-employee subscription includes 20,000 calls a month.
- Free: a smaller allowance. New Free tenants get 200 calls a month, and write endpoints need a paid plan (see Access & authorization above).
- Partner-managed customer tenants can have a different allowance.
Your exact allowance and usage are shown on the Subscription & Billing tab under Monthly API Quota, in the X-API-Quota-Limit header, and in get-entitlements (apiQuota and apiQuotaUsed).
To open the tab, click the profile icon at the top right, select View User Profile, and then select the Subscription & Billing tab. The Monthly API Quota line shows the number of calls used and the quota:
When does the quota reset?
Once a month, on the same day as your tenant's employee licences reset, not on the 1st of the calendar month. The Subscription & Billing tab shows how many days are left next to Monthly quota reset in.
What happens when the quota runs out?
Calls are rejected with HTTP 400, "Error": "Maximum Quota Exceeded" and ErrorCode QUOTA_EXCEEDED until the quota resets. For a larger quota, add employee licences to your subscription.
Is there a per-second rate limit?
No. CanIPhish doesn't apply a per-second rate limit; the monthly quota is the limit. Requests your AI assistant makes through the AI Assistant Connector (MCP) count towards the same quota. Each assistant action uses at least one unit, because the connector checks your plan before every action, and most actions use two or more.
Working with tenants
Most actions target a specific tenant, passed as tenantID in the request body. If your API key can reach more than one tenant (for example, an MSP or partner account), first call the tenant-lookup endpoint (get-tenant-access) — which needs only the auth headers — to retrieve the tenant IDs you can access, then supply the appropriate tenantID on each subsequent call.
If you have access to one tenant only, you can also find its ID in the platform: click the profile icon at the top right, and then select View User Profile. The Tenant ID shows on the left side of the page.
Quickstart
1. Find the tenants you can access (headers only):
curl -X POST https://api.caniphish.com/api/v3/account/get-tenant-access \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Email-Address: you@example.com"2. Check your entitlements and quota:
curl -X POST https://api.caniphish.com/api/v3/account/get-entitlements \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Email-Address: you@example.com" \
-H "Content-Type: application/json" \
-d '{ "tenantID": "YOUR_TENANT_ID" }'3. List your campaigns:
curl -X POST https://api.caniphish.com/api/v3/campaigns/list-campaigns \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-Email-Address: you@example.com" \
-H "Content-Type: application/json" \
-d '{ "tenantID": "YOUR_TENANT_ID" }'What you can manage
The API is organised into these areas (see the interactive reference for the full endpoint list in each):
| Area | Capabilities |
|---|---|
| Campaigns | Create, update, delete and duplicate phishing, training and combined phishing-training campaigns; send test emails; resend to campaigns or individual targets; mark an interaction of a target as a false positive; rename/delete historic campaigns. |
| Content library | Manage phishing emails, sender IDs, phishing websites, voice-phishing templates and training modules (create, update, delete, duplicate, list, get). |
| Employee lists | Build and maintain manual, directory-synced and dynamic (risk-based) employee lists; erase employee data; set business-impact classification. |
| Reporting & intelligence | Campaign and training results, human-risk scores, leaderboards, dark-web breaches, domain supply-chain posture, audit and SMTP logs, on-demand and scheduled PDF reports. |
| Reported phishing | List and retrieve employee-reported emails, triage them, and clone a reported email into a template. |
| Settings & configuration | Phishing education, phish-reporting, training, leaderboard, learner appearance, language, MFA and SSO, email delivery, sending domains, directory integrations, and quarantine credentials. |
| Webhooks | Configure an HTTPS endpoint to receive phishing and training events. |
| Account | Entitlements and quota, user profile, and the tenants your key can access. |
Common workflows
Chain endpoints in order to complete an end-to-end task. There is one endpoint to create each type of employee list: create-manual-employee-list, create-directory-employee-list and create-dynamic-employee-list.
-
Run a phishing simulation —
create-manual-employee-list→create-sender-id→create-phishing-email→create-phishing-website→create-phishing-campaign; later pull results withget-campaign-results. -
Assign training —
create-manual-employee-list→ (optional)create-training-module→create-training-campaign; track withget-training-resultsandget-training-certificate. -
Combined phishing + training — as above, but with
create-phishing-training-campaign. -
Onboard employees from a directory —
list-directory-integrations→get-directory-groups→create-directory-employee-list. -
Authorise a sending domain —
request-domain-verification→verify-domain→lock-domain; the domain can then back sender IDs and phish reporting. -
Compliance reporting —
generate-reportfor an on-demand PDF, orupdate-scheduled-reportsfor recurring delivery (recipients must be on verified domains). -
Event-driven integration —
update-webhookwith an HTTPS endpoint to receive phishing/training events. -
Preflight what you can do —
get-entitlementsbefore attempting gated calls.
Error handling
Handle failures by status code and ErrorCode:
| Status | Meaning | Typical ErrorCode
|
What to do |
|---|---|---|---|
400 |
Authentication or validation problem |
AUTH_ERROR, MISSING_REQUIRED_FIELD, TENANT_ACCESS_DENIED
|
Check your headers, tenantID, and required fields. For TENANT_ACCESS_DENIED, confirm the user has access to the tenant (get-tenant-access). |
403 |
Role or subscription not sufficient |
PERMISSION_DENIED, ENTITLEMENT_REQUIRED
|
Confirm the user's role allows the endpoint (see Access & authorization) and the plan is entitled (get-entitlements). |
400 |
Monthly API quota used up | QUOTA_EXCEEDED |
Wait for the monthly reset (see Monthly quota reset in on the Subscription & Billing tab), or add employee licences for a larger quota. |
Best practices
-
Preflight with
get-entitlementsbefore write operations to avoid predictable403s. - Watch the quota headers on each response that has them, and back off before you hit the limit.
- Use returned names in follow-up calls. Some resources (for example campaign names) are sanitised on save — use the value returned in the response, not the string you sent, for later get/update/delete calls.
- Verify domains before using them for sender IDs, phish reporting, or scheduled-report recipients.
- Secure your key and rotate it if it may have been exposed.
Need help?
The full, interactive reference — with every endpoint, schema and a live “try it” console — is at api-docs.caniphish.com. If you get stuck, contact CanIPhish support with the endpoint, request body (with your API key removed) and the Error/ErrorCode you received, and we’ll help you resolve it.
Comments
0 comments
Please sign in to leave a comment.