Skip to content

API Overview

Pakyas provides a RESTful HTTP API for all operations.

EnvironmentURL
Productionhttps://api.pakyas.com/api/v1
Ping Endpointhttps://ping.pakyas.com

Generate an API key from your organization settings (Settings > API Keys), or with pakyas api-key create. Include it in requests:

Terminal window
curl -H "Authorization: Bearer pk_live_xxx" \
"https://api.pakyas.com/api/v1/checks?org_id=<ORG_ID>"

A key belongs to one organization and can only access that organization.

ScopeAllows
readView checks, pings, projects and the organization
writeread, plus create, update, pause and delete checks and projects, and manage phone destinations. Also needed to create or revoke API keys
managewrite, plus Owner/Admin operations: organization settings, members, deleting the organization, and quota usage

A key never does more than the user who created it: Admin- and Owner-level operations also need that user to hold the role. A key made by an Admin can’t promote anyone to Owner or delete the organization, and a key whose creator has left the organization can’t do Admin- or Owner-level operations at all.

API keys can’t create organizations. Sign in to the web app to create one.

A key has access to All projects, or to Selected projects only (chosen when you create it in Settings > API Keys). A key limited to selected projects:

  • Lists only its projects and their checks, and only its own organization.
  • Gets 404 Not Found for any project, check or ping outside its projects, the same response as for one that doesn’t exist. Creating a check in another project is also a 404.
  • Can’t do organization-wide operations: organization settings and members, API keys, phone destinations, quota, or creating projects. These return 403 Forbidden.

Use selected-project keys for CI jobs and servers that only report on, or manage, a few projects.

POST /api/v1/api-keys made with an API key can only create a key that:

  • has scopes the calling key holds,
  • expires no later than the calling key (if the calling key expires, the new key must too),
  • belongs to the same organization.

Keys limited to selected projects can’t create or revoke keys. project_access must be all or selected, and selected needs at least one project from the organization in allowed_project_ids.

For browser/CLI authentication, use JWT tokens obtained via login.

Ping URLs are on https://ping.pakyas.com and need no API key.

MethodEndpointDescription
GET/POST/{public_id}Success ping
GET/POST/{public_id}/startStart ping
GET/POST/{public_id}/failFail ping
GET/POST/{public_id}/{exit_code}Ping with exit code
MethodEndpointDescription
GET/checksList checks
POST/checksCreate check
GET/checks/{id}Get check
PUT/checks/{id}Update check
DELETE/checks/{id}Delete check

See individual endpoint pages for details.

  • Ping API: 3,000 pings per minute from one IP address, and 500 per minute from one IP address to one check. Over the limit, pings get 429 Too Many Requests with X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.
  • Management API: if you get 429 Too Many Requests, wait and retry.

Errors return JSON with an error field:

{
"error": "Check not found"
}
StatusMeaning
400Invalid request (for example, an out-of-range threshold or an invalid project_access)
401Missing, invalid, expired or revoked API key
403The key’s scopes, the key’s project access, or the user’s role don’t allow the operation
404Not found, or outside the projects a restricted key may access
409Conflict, such as a project slug already used in the organization (on create and update)
429Rate limited