Skip to Content

Content Control

POST/subscriber-management/actions/content-controlService & Plan ManagementOpenAPI

Applies a content control policy to one or more SIMs.

Auth Scope
urn:grt:gemm
Content-Type
application/json
Base URL
https://gemmapi2.granitenet.com/v2/api/gemm/v1

Uses and Requirements

Mobility sends an asynchronous SubscriberService callback for each SIM in the request when its content control settings are updated, or if the update fails.

Note

You can submit 1 SIM per request, or up to 1,000 when bulk content control is enabled for your account.

HTTP Status Codes

StatusWhen
200The request was accepted and a transactionID was returned. The content control change is applied asynchronously and the result for each SIM is sent later in a callback.
400Validation failed (for example, contentControl is missing or not one of the listed values, contentControlId does not match a listed value, an ICCID is invalid or duplicated, or more SIMs were sent than allowed (1, or up to 1,000 when bulk content control is enabled for your account)), or a SIM is not eligible: it was not found, is not under the macnum account, is not Activated or Suspended, the SIMs are on different carriers, or content control is not supported for the SIM's carrier. No SIM is processed.
401The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header.
403Your token's role does not allow this action, or the SIM belongs to an account you do not have access to or that is not under the account in the macnum header.
429Too many requests were sent in a short period. Wait briefly and retry.
500An unexpected server error occurred.
503The system is under scheduled maintenance. Retry after the maintenance window.
504A dependent service did not respond in time. Retry the request.

Available For

  • Granite Multi Carrier SIM
  • Granite Multi Carrier SIM: SIMs with a dynamic or public dynamic IP only.

Headers

HeaderValue
AuthorizationBearer access-token
Content-Typeapplication/json
macnumMacnum of the top level account for your organization.

Request Body Parameters

ParameterTypeRequiredDescription
simsarray of simInfo objectsYesThe SIMs to apply the content control policy to, specified by simInfo objects. You can submit 1 SIM per request, or up to 1,000 when bulk content control is enabled for your account.
simInfoobjectYesSIM information.
iccidstringYes19-20 digits. An F is allowed as the 20th character.
contentControlIdintegerConditionalThe numeric ID of the content control policy that restricts the content the SIM can access.
Send either contentControlId or contentControl.
contentControlstringConditionalThe name of the content control policy that restricts the content the SIM can access. Valid values are:
  • No APN
  • Business
  • No Entertainment
  • No Adult Content
Send either contentControlId or contentControl.

Request Examples

Request to apply content control to an Activated or Suspended SIM using contentControlId:

Request to apply content control to an Activated or Suspended SIM using contentControl:

Responses

Immediate Success Response (200 OK)

Response Fields

ParameterTypeDescription
transactionIDstringA unique string that associates the request with the results sent in callbacks.
Mobility sends a separate callback for each SIM that matched the request, showing whether the operation succeeded for that SIM and containing any requested information. All callbacks for the request have the same transactionID.

Callback Success Response

Callback Response Fields

ParameterTypeDescription
requestTypestringName of the requested action. For content control, the value is ContentControl.
transactionIDstringA unique string that associates the request with the results sent in callbacks. Mobility sends a separate callback for each SIM that matched the request, showing whether the operation succeeded for that SIM and containing any requested information. All callbacks for the request have the same transactionID.
simInfoobjectSIM information.
iccidstring19-20 digits.
msisdnstring10 digits.
resultobjectAn object containing the result status.
statusstringResult status: success or failure.
messagestringResult message.
errorsobjectA list of error objects, if any.
errorCodestringError code.
errorMessagestringError message.
callbackCountintegerThe number of times this callback message has been sent.
maxCallbackThresholdintegerThe maximum number of times this callback message will be sent if it is not correctly acknowledged.

Failure Responses

Immediate Error Message

The example below is an HTTP 403 response, returned when the SIM belongs to an account you do not have access to.

Error Response Fields

ParameterTypeDescription
resultobjectAn object containing the result status.
statusstringResult status: success or failure.
errorsobjectA list of error objects, if any.
errorCodestringError code.
errorMessagestringError message.

SIM Eligibility Error (HTTP 400)

When a SIM is not eligible (for example, it was not found, is not Activated or Suspended, or the SIMs are on different carriers), the response is HTTP 400 with a per-SIM validation body instead of the format above. validationErrorInfo gives the overall message, and data.simCardDetails lists each SIM with its error in status.

Code Examples

Last updated on