Revoke a service grant

Disconnects the service from the project: the grant and its key are revoked together, and the key is refused everywhere within 60 seconds.

DELETE/v1/service-grants/{grant_id}

Disconnects the service from the project: the grant and its key are revoked together, and the key is refused everywhere within 60 seconds. Revoking the grant's key through revokeKey revokes the grant too. Sandboxes the key made keep their billing mark. A repeat is a no-op.

A key with the keys:write scope.

Request

curl -X DELETE "https://api.pod.mapier.ai/v1/service-grants/sgr_3ahrz6dmv29gqy5ckt18fp" \
  -H "Authorization: Bearer $POD_API_KEY"

Parameters

NameInTypeRequiredWhat it is
grant_idpathstringYes
Idempotency-KeyheaderstringNoMakes a repeat of this call safe for 24 hours.

Answer

200. The grant, with revoked_at set.

200
{
  "id": "sgr_3ahrz6dmv29gqy5ckt18fp",
  "project": "prj_3ahrz6dmv29gqy5ckt18fp",
  "service": "pod-ci",
  "mode": "test",
  "key": "key_3ahrz6dmv29gqy5ckt18fp",
  "billing_mark": "example",
  "scopes": ["sandboxes:read"],
  "granted_by": "example",
  "created_at": "2026-11-23T12:00:00.000Z",
  "revoked_at": null
}
FieldTypeAlwaysWhat it is
idstringYes
projectstringYes
service"pod-ci"YesA service a project can be connected to. Its grant's billing mark has the same name.
mode"test" | "live"Yes
keystringYes
billing_markstringYesWhat sandboxes the key creates carry; their usage bills through the service.
scopes"sandboxes:read" | "sandboxes:write" | "sandboxes:exec" | "files:read" | "files:write" | "snapshots:write" | "usage:read" | "keys:write" | "projects:write" | "members:read" | "end_users:read" | "end_users:write" | "screen:read" | "screen:write" | "webhooks:read" | "webhooks:write" | "permissions:read" | "permissions:write" | "permissions:records" | "ci:read" | "ci:write" | "network:read" | "network:write"[]Yes
granted_bystringYesThe identity account of the owner who granted it.
created_atstringYesRFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z.
revoked_atstring | nullYes

Errors

The refusals this call is known for: not_found. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptpod.serviceGrants.revoke(id)
Pythonpod.service_grants.revoke(id)