Manage subscription requests

Approve POST https://{controlplane_path}/api/1/rest/public/api_subscription/approve
Revoke POST https://{controlplane_path}/api/1/rest/public/api_subscription/revoke
Renew POST https://{controlplane_path}/api/1/rest/public/api_subscription/renew
Delete DELETE https://{controlplane_path}/api/1/rest/public/api_subscription
Important: This API applies to APIM 3.0, not Classic APIM.

Approve, revoke, renew, or delete Service subscriptions. Service owners and Environment admins use these APIs to manage subscription requests from APIM 3.0 Developer Portal users.

Prerequisites

  • Approve and Renew: Environment admin permissions.
  • Revoke and Delete: A user account with access to the APIM 3.0 Developer Portal.

Approve subscription

POST https://{controlplane_path}/api/1/rest/public/api_subscription/approve

Approve a pending API subscription request.

Example

This example uses Basic authentication. For a JWT example, refer to Authentication.

The following cURL examples use my-environment for the environment name.

curl -X 'POST' \
  'https://elastic.snaplogic.com/api/1/rest/public/api_subscription/approve' \
  -H 'Authorization: Basic {base64_encoded email:password}' \
  -H 'Content-Type: application/json' \
  -d '{
  "user_id": "[email protected]",
  "org_name": "my-environment",
  "application_name": "my-app",
  "application_owner": "[email protected]",
  "version_name": "1.0",
  "service_slug": "bookstore-service"
}'

Request header

Use the application/json content type with basic authentication (email and password) or a JWT. For examples, refer to Authentication.

Request body

Key Type Description
user_id string Required. The email address of the user who requested the subscription.
org_name string Required. The name of the environment (Org).
application_name string Required. The name of the application.
application_owner string Required. The email address of the application owner.
version_name string Required. The Service version identifier.
service_slug string Required. The slug identifier for the Service.

Response


{
  "response_map": {
    "status": "ok",
    "message": "Subscription status updated to approved"
  },
  "http_status_code": 200
}

Revoke subscription

POST https://{controlplane_path}/api/1/rest/public/api_subscription/revoke

Revoke an active API subscription.

Example

This example uses Basic authentication. For a JWT example, refer to Authentication.

curl -X 'POST' \
  'https://elastic.snaplogic.com/api/1/rest/public/api_subscription/revoke' \
  -H 'Authorization: Basic {base64_encoded email:password}' \
  -H 'Content-Type: application/json' \
  -d '{
  "user_id": "[email protected]",
  "org_name": "my-environment",
  "application_name": "my-app",
  "application_owner": "[email protected]",
  "version_name": "1.0",
  "service_slug": "bookstore-service",
  "jwt_name": "my-jwt-token"
}'

Request header

Use the application/json content type with basic authentication (email and password) or a JWT. For examples, refer to Authentication.

Request body

Key Type Description
user_id string Required. The email address of the subscription holder.
org_name string Required. The name of the environment (Org).
application_name string Required. The name of the application.
application_owner string Required. The email address of the application owner.
version_name string Required. The Service version identifier.
service_slug string Required. The slug identifier for the Service.
jwt_name string Optional. The name of the JWT to revoke. If provided, revokes only the specified JWT token instead of the entire subscription.

Response


{
  "response_map": {
    "status": "ok",
    "message": "Subscription status updated to revoked"
  },
  "http_status_code": 200
}

If you include jwt_name, the response returns: "JWT token '{jwt_name}' has been revoked".

Renew subscription

POST https://{controlplane_path}/api/1/rest/public/api_subscription/renew

Renew an existing API subscription.

Example

This example uses Basic authentication. For a JWT example, refer to Authentication.

curl -X 'POST' \
  'https://elastic.snaplogic.com/api/1/rest/public/api_subscription/renew' \
  -H 'Authorization: Basic {base64_encoded email:password}' \
  -H 'Content-Type: application/json' \
  -d '{
  "user_id": "[email protected]",
  "org_name": "my-environment",
  "application_name": "my-app",
  "application_owner": "[email protected]",
  "version_name": "1.0",
  "service_slug": "bookstore-service"
}'

Request header

Use the application/json content type with basic authentication (email and password) or a JWT. For examples, refer to Authentication.

Request body

Same as Approve subscription.

Response


{
  "response_map": {
    "status": "ok",
    "message": "Subscription renewed successfully",
    "subscription_expires_in": 1777214400000,
    "renewed_at": "2026-04-29T10:00:00+00:00",
    "token_expires_in": 1777214400000
  },
  "http_status_code": 200
}
Key Type Description
subscription_expires_in number The new subscription expiration time in milliseconds since epoch (for example, 1777214400000 = April 26, 2026 16:00 UTC).
renewed_at string The ISO 8601 timestamp of the renewal.
token_expires_in number The API key expiration time in milliseconds since epoch (for example, 1777214400000 = April 26, 2026 16:00 UTC). Applies only to API Key subscriptions.

Delete subscriptions

DELETE https://{controlplane_path}/api/1/rest/public/api_subscription?org_name={org_name}

Delete one or more Service subscriptions. You must provide either application_name or both service_slug and version_name.

Example

This example uses Basic authentication. For a JWT example, refer to Authentication.

curl -X 'DELETE' \
  'https://elastic.snaplogic.com/api/1/rest/public/api_subscription?org_name=my-environment&application_name=my-app' \
  -H 'Authorization: Basic {base64_encoded email:password}'

Request header

Use the application/json content type with basic authentication (email and password) or a JWT. For examples, refer to Authentication.

Query parameters

Key Type Description
org_name string Required. The name of the environment (Org).
application_name string Required if service_slug and version_name are not provided. The name of the application.
version_name string Required with service_slug. The Service version identifier.
service_slug string Required with version_name. The slug identifier for the Service.

Request body

None.

Response


{
  "response_map": {
    "message": "Successfully deleted 2 subscription(s) for application my-app",
    "deleted_count": 2
  },
  "http_status_code": 200
}
Key Type Description
message string A summary of the deletion result.
deleted_count number The number of subscriptions the request deleted.

Error handling

HTTP status codes Message Resolution
400 Either application_name or both service_slug and version_name are required. Provide the required query parameters for the Delete endpoint.
401 Unauthorized Verify your credentials and permissions.
403 Cannot approve a revoked subscription. Resubmit the subscription before approving it again.
403 Cannot renew an expired subscription. This subscription has expired. You cannot renew it.
404 Unable to find a subscription associated with the application and asset Verify the environment name, Service slug, version name, and application name are correct.