Check Consent GET
Returns the latest PDPA consent status of a mobile number in your account. Use it before sending to confirm the recipient still consents.
Authorization
API Key (Authentication) — send the header Authorization: Bearer <API_KEY> (API keys start with smsk_)
HTTP Request
http
GET https://public-api.smsup-plus.com/Consent/checkconsent/{mobile}?type={consentType}Content Type
No body — parameters are sent in the path and query string
Parameter Description
| Property | Type | Required | Description |
|---|---|---|---|
mobile | string (path) | Required | Mobile number. Characters other than digits and + (spaces, -, …) are removed; 10–15 digits must remain |
type | string (query) | Optional | Only match this consentType (e.g. marketing). If omitted, the latest record of any type is returned |
Response Description
| Property | Type | Description |
|---|---|---|
status | number | 200 when a record is found |
data.granted | boolean | true = consented, false = declined / withdrawn |
data.consentType | string | Consent type of this record |
data.source | string | Where the consent was collected, as sent when saving (empty if none) |
data.createdAt | string | Time the record was saved (ISO 8601, UTC) |
Request Example
bash
curl -X GET 'https://public-api.smsup-plus.com/Consent/checkconsent/0812345678?type=marketing' \
-H 'Authorization: Bearer <API_KEY>'js
const res = await fetch('https://public-api.smsup-plus.com/Consent/checkconsent/0812345678?type=marketing', {
headers: { Authorization: 'Bearer <API_KEY>' },
})
console.log(await res.json())Response Example
json
{
"status": 200,
"data": {
"granted": true,
"consentType": "marketing",
"source": "web",
"createdAt": "2026-11-16T03:15:42.512Z"
}
}Possible Errors
This endpoint always answers HTTP 200 (except authentication errors) — check the status field in the body.
| HTTP | Response | Cause |
|---|---|---|
| 200 | {"status":404,"description":"No consent record found.","data":null} | No consent saved for this number (or for this type) |
| 200 | {"status":400,"description":"Invalid mobile number."} | Fewer than 10 or more than 15 digits |
| 200 | {"status":500,"description":"Failed to query consent."} | Query failed; retry |
| 200 | {"status":401,"description":"Unauthorized."} | The account could not be resolved from the credentials |
| 401 | {"error":"invalid api key"} | Invalid API key — see Errors |
WARNING
The lookup matches the number exactly — use the same number format you used when saving consent (e.g. saved as 0812345678 → check 0812345678, not 66812345678).
