Create a sim swap event subscription for a phone number
POST/simswap/subscriptions
Create a sim swap event subscription for a phone number
Create a sim swap event subscription for a phone number
curl https://api.example.com/camara/simswap/subscriptions \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CAMARA_BEARER_TOKEN" \
-d '{
"config": {
"subscriptionDetail": {
"phoneNumber": "+123456789"
},
"subscriptionExpireTime": "2025-01-17T13:18:23.682Z",
"subscriptionMaxEvents": 10
},
"protocol": "HTTP",
"sink": "https://endpoint.example.com/sink",
"types": [
"org.camaraproject.sim-swap-subscriptions.v0.swapped"
]
}'{
"protocol": "HTTP",
"sink": "https://endpoint.example.com/sink",
"types": [
"org.camaraproject.sim-swap-subscriptions.v0.swapped"
],
"config": {
"subscriptionDetail": {
"phoneNumber": "+123456789"
},
"subscriptionExpireTime": "2025-01-17T13:18:23.682Z"
},
"id": "1119920371",
"startsAt": "2024-06-07T16:10:15.302Z",
"expiresAt": "2024-06-07T16:10:15.302Z",
"status": "ACTIVATION_REQUESTED"
}{
"protocol": "HTTP",
"sink": "https://endpoint.example.com/sink",
"types": [
"org.camaraproject.sim-swap-subscriptions.v0.swapped"
],
"config": {
"subscriptionDetail": {},
"subscriptionExpireTime": "2025-01-17T13:18:23.682Z"
},
"id": "1119920371",
"startsAt": "2024-06-07T16:10:15.302Z",
"expiresAt": "2024-06-07T16:10:15.302Z",
"status": "ACTIVATION_REQUESTED"
}{
"status": 400,
"code": "INVALID_ARGUMENT",
"message": "Client specified an invalid argument, request body or query param."
}{
"status": 400,
"code": "OUT_OF_RANGE",
"message": "Client specified an invalid range."
}{
"status": 400,
"code": "INVALID_PROTOCOL",
"message": "Only HTTP is supported"
}{
"status": 400,
"code": "INVALID_CREDENTIAL",
"message": "Only Access token is supported"
}{
"status": 400,
"code": "INVALID_TOKEN",
"message": "Only bearer token is supported"
}{
"status": 400,
"code": "INVALID_SINK",
"message": "sink not valid for the specified protocol"
}{
"status": 401,
"code": "UNAUTHENTICATED",
"message": "Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required."
}{
"status": 403,
"code": "PERMISSION_DENIED",
"message": "Client does not have sufficient permissions to perform this action."
}{
"status": 409,
"code": "ABORTED",
"message": "Concurrency conflict."
}{
"status": 409,
"code": "ALREADY_EXISTS",
"message": "The resource that a client tried to create already exists."
}{
"status": 422,
"code": "SERVICE_NOT_APPLICABLE",
"message": "The service is not available for the provided identifier."
}{
"status": 422,
"code": "MISSING_IDENTIFIER",
"message": "The device cannot be identified."
}{
"status": 422,
"code": "UNNECESSARY_IDENTIFIER",
"message": "The device is already identified by the access token."
}{
"status": 429,
"code": "QUOTA_EXCEEDED",
"message": "Out of resource quota."
}{
"status": 429,
"code": "TOO_MANY_REQUESTS",
"message": "Rate limit reached."
}Returns Examples
{
"protocol": "HTTP",
"sink": "https://endpoint.example.com/sink",
"types": [
"org.camaraproject.sim-swap-subscriptions.v0.swapped"
],
"config": {
"subscriptionDetail": {
"phoneNumber": "+123456789"
},
"subscriptionExpireTime": "2025-01-17T13:18:23.682Z"
},
"id": "1119920371",
"startsAt": "2024-06-07T16:10:15.302Z",
"expiresAt": "2024-06-07T16:10:15.302Z",
"status": "ACTIVATION_REQUESTED"
}{
"protocol": "HTTP",
"sink": "https://endpoint.example.com/sink",
"types": [
"org.camaraproject.sim-swap-subscriptions.v0.swapped"
],
"config": {
"subscriptionDetail": {},
"subscriptionExpireTime": "2025-01-17T13:18:23.682Z"
},
"id": "1119920371",
"startsAt": "2024-06-07T16:10:15.302Z",
"expiresAt": "2024-06-07T16:10:15.302Z",
"status": "ACTIVATION_REQUESTED"
}{
"status": 400,
"code": "INVALID_ARGUMENT",
"message": "Client specified an invalid argument, request body or query param."
}{
"status": 400,
"code": "OUT_OF_RANGE",
"message": "Client specified an invalid range."
}{
"status": 400,
"code": "INVALID_PROTOCOL",
"message": "Only HTTP is supported"
}{
"status": 400,
"code": "INVALID_CREDENTIAL",
"message": "Only Access token is supported"
}{
"status": 400,
"code": "INVALID_TOKEN",
"message": "Only bearer token is supported"
}{
"status": 400,
"code": "INVALID_SINK",
"message": "sink not valid for the specified protocol"
}{
"status": 401,
"code": "UNAUTHENTICATED",
"message": "Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required."
}{
"status": 403,
"code": "PERMISSION_DENIED",
"message": "Client does not have sufficient permissions to perform this action."
}{
"status": 409,
"code": "ABORTED",
"message": "Concurrency conflict."
}{
"status": 409,
"code": "ALREADY_EXISTS",
"message": "The resource that a client tried to create already exists."
}{
"status": 422,
"code": "SERVICE_NOT_APPLICABLE",
"message": "The service is not available for the provided identifier."
}{
"status": 422,
"code": "MISSING_IDENTIFIER",
"message": "The device cannot be identified."
}{
"status": 422,
"code": "UNNECESSARY_IDENTIFIER",
"message": "The device is already identified by the access token."
}{
"status": 429,
"code": "QUOTA_EXCEEDED",
"message": "Out of resource quota."
}{
"status": 429,
"code": "TOO_MANY_REQUESTS",
"message": "Rate limit reached."
}