Skip to content

REST API v1

The ShieldCI REST API lets you manage projects, reports, teams, and tokens programmatically. It is entirely separate from the package-facing endpoint that the ShieldCI Laravel package uses to submit analysis results.

Base URL: https://shieldci.com/api/v1

All endpoints require a valid Sanctum personal access token and an active subscription. See Authentication for setup instructions.


Endpoints

MethodEndpointAbilityDescription
GET/api/v1/userreadGet your profile
PUT/api/v1/userwriteUpdate your display name
DELETE/api/v1/useradminDelete your account
POST/api/v1/user/export-datawriteRequest a data export
GET/api/v1/user/notificationsreadList notifications
PUT/api/v1/user/notifications/{notification}/readwriteMark a notification as read
GET/api/v1/tokensreadList personal access tokens
POST/api/v1/tokensadminCreate a personal access token
DELETE/api/v1/tokens/{token}adminRevoke a personal access token
GET/api/v1/projectsreadList projects
POST/api/v1/projectswriteCreate a project
GET/api/v1/projects/{project}readGet a project
PUT/api/v1/projects/{project}writeUpdate a project
DELETE/api/v1/projects/{project}writeDelete a project
POST/api/v1/projects/{project}/regenerate-tokenwriteRegenerate a project's API token
GET/api/v1/projects/{project}/reportsreadList reports for a project
GET/api/v1/reports/{report}readGet a full report
DELETE/api/v1/reports/{report}writeDelete a report
GET/api/v1/teamsreadList teams
POST/api/v1/teamswriteCreate a team
GET/api/v1/teams/{team}readGet a team and its members
PUT/api/v1/teams/{team}writeRename a team
DELETE/api/v1/teams/{team}writeDelete a team
POST/api/v1/teams/{team}/membersadminInvite a member
PUT/api/v1/teams/{team}/members/{user}adminUpdate a member's role
DELETE/api/v1/teams/{team}/members/{user}adminRemove a member

Getting Started

1. Create a token

Open the ShieldCI dashboard → Profile → API TokensNew Token. Assign the abilities your integration needs (read, write, and/or admin) and save the token value; it is shown only once.

Alternatively, create one via the API if you already have a token with the admin ability:

bash
curl -X POST https://shieldci.com/api/v1/tokens \
  -H "Authorization: Bearer shieldci_{existing_token}" \
  -H "Content-Type: application/json" \
  -d '{"name": "ci-pipeline", "abilities": ["read", "write"]}'

2. Authenticate requests

Include your token in the Authorization header of every request:

bash
curl https://shieldci.com/api/v1/user \
  -H "Authorization: Bearer shieldci_{token}" \
  -H "Accept: application/json"

3. Choose the right ability

Every endpoint requires a minimum ability. Use the least-privileged token that covers your use case:

AbilityWhat it covers
readView projects, reports, teams, and notifications
writeCreate and update projects, reports, and teams (includes read)
adminManage tokens, delete resources, and team members (includes write)

4. Handle errors

All error responses use the same envelope:

json
{
  "error": "ErrorType",
  "message": "Human-readable description."
}

See Errors for the full status code reference. See Rate Limits for throttle details and retry guidance.


Resources

ResourceDescription
UsersManage your profile, data exports, and notifications
TokensCreate and revoke personal access tokens
ProjectsManage the projects your ShieldCI package reports to
ReportsView and delete analysis reports
TeamsCreate teams and manage their members

Reference

  • Authentication - How to create tokens and use the Authorization header
  • Rate Limits - Request limits by plan and retry strategies
  • Errors - Full HTTP status code and error format reference