امتثال
واجهة البرمجة

Users

GET
/v1/me/consents

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Response Body

Successful Response

application/json
  1. response
telemetry*

A user's consent to usage analytics and session recording (spec C REQ-OBS-34): their newest analytics row in users.tenant_permissions decides it (P0 master plan §3.1), and it is unset until they choose.

curl -X GET 'https://api.aisc.sa/v1/me/consents'
{  "telemetry": {    "effective_from": "2019-08-24T14:15:22Z",    "notice_version": "v1",    "state": "unset"  }}
PUT
/v1/me/consents/telemetry

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Request Body

application/json
  1. body
granted*Granted
locale*Locale
Value in"ar""en"
notice_version*Notice Version
Match^v[0-9]{1,4}$
source*Source
Value in"consent_banner""settings""signup"

Response Body

Successful Response

application/json
  1. response

A user's consent to usage analytics and session recording (spec C REQ-OBS-34): their newest analytics row in users.tenant_permissions decides it (P0 master plan §3.1), and it is unset until they choose.

effective_from?|

When the choice that decides the state was recorded (UTC); null when unset.

notice_version?|

The notice version the user answered; null when unset. A choice made under an earlier version than the web's current notice counts as unset (REQ-OBS-56).

state*State

granted, denied, or unset when the user has not chosen.

Value in"granted""denied""unset"
curl -X PUT 'https://api.aisc.sa/v1/me/consents/telemetry' \  -H 'Content-Type: application/json' \  -d '{  "granted": true,  "locale": "ar",  "notice_version": "string",  "source": "consent_banner"}'
{  "effective_from": "2019-08-24T14:15:22Z",  "notice_version": "v1",  "state": "unset"}
GET
/v1/me/notifications

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Query Parameters

limit?Limit
Range1 <= value <= 50
Default20

Response Body

Successful Response

application/json
  1. response
items*array<>
unread*Unread
curl -X GET 'https://api.aisc.sa/v1/me/notifications'
{  "items": [    {      "created_at": "2019-08-24T14:15:22Z",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "params": {},      "read_at": "2019-08-24T14:15:22Z",      "target_path": "string",      "template_id": "string"    }  ],  "unread": 0}
GET
/v1/me/notifications/{item_id}

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Path Parameters

item_id*Item Id
Formatuuid

Response Body

Successful Response

application/json
  1. response
created_at*Created At
Formatdate-time
id*Id
Formatuuid
params*
read_at*|null
target_path*Target Path
template_id*Template Id
curl -X GET 'https://api.aisc.sa/v1/me/notifications/497f6eca-6276-4993-bfeb-53cbbbba6f08'
{  "created_at": "2019-08-24T14:15:22Z",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "params": {},  "read_at": "2019-08-24T14:15:22Z",  "target_path": "string",  "template_id": "string"}
POST
/v1/me/notifications/{item_id}/read

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Path Parameters

item_id*Item Id
Formatuuid

Response Body

Successful Response

curl -X POST 'https://api.aisc.sa/v1/me/notifications/497f6eca-6276-4993-bfeb-53cbbbba6f08/read'
Empty
POST
/v1/users/me/dsar

Authenticated data subject (user) submits a DSAR. Request lands in the manual review queue and is resolved within 30 days per PDPL Implementing Regulations Art. 3. Returns 202 with the request_id and the resolution deadline timestamp.

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Request Body

application/json
  1. body

Request body for POST /v1/users/me/dsar.

request_details?|

Optional free-text description of the scope or subject of your request (up to 4000 characters). For 'rectification' requests, please describe what information needs to be corrected.

request_type*Request Type

The type of data-subject right you are exercising under the PDPL: 'access' (receive a copy of your personal data), 'erasure' (request deletion of your personal data), 'portability' (receive your data in a portable format), 'rectification' (correct inaccurate personal data), 'objection' (object to processing of your personal data), 'restriction' (request that processing of your personal data be paused).

Value in"access""erasure""portability""rectification""objection""restriction"

Response Body

Successful Response

application/json
  1. response

Response for POST /v1/users/me/dsar.

deadline_at*Deadline At

The date and time by which your request will be resolved (UTC). EMTITHAL is required to respond within 30 days of receiving your request. If the deadline passes without resolution, the request is automatically transitioned to the 'expired' status.

Formatdate-time
message_ar*Message Ar

Acknowledgment message in Arabic.

message_en*Message En

Acknowledgment message in English.

request_id*Request Id

Unique identifier for your submitted request. Keep this for your records.

Formatuuid
status?Status

Current status of your request. Always 'pending' immediately after submission while your request is being queued for review.

Default"pending"
curl -X POST 'https://api.aisc.sa/v1/users/me/dsar' \  -H 'Content-Type: application/json' \  -d '{  "request_type": "access"}'
{  "deadline_at": "2019-08-24T14:15:22Z",  "message_ar": "string",  "message_en": "string",  "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",  "status": "pending"}
GET
/v1/users/me/permissions

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Response Body

Successful Response

application/json
  1. response
ai_training*
analytics*

A user's consent to usage analytics and session recording (spec C REQ-OBS-34): their newest analytics row in users.tenant_permissions decides it (P0 master plan §3.1), and it is unset until they choose.

llm_assistant*
curl -X GET 'https://api.aisc.sa/v1/users/me/permissions'
{  "ai_training": {    "changed_at": "2019-08-24T14:15:22Z",    "granted": true,    "policy_version": "string"  },  "analytics": {    "effective_from": "2019-08-24T14:15:22Z",    "notice_version": "v1",    "state": "unset"  },  "llm_assistant": {    "changed_at": "2019-08-24T14:15:22Z",    "granted": true,    "policy_version": "string"  }}
PUT
/v1/users/me/permissions

Authorization

BearerAuth
headerAuthorizationBearer <token>

JWT access token. Obtain via POST /v1/auth/login.

Request Body

application/json
  1. body
granted*Granted
locale*Locale
Value in"ar""en"
policy_version*Policy Version
Match^[A-Za-z0-9.+:_-]+$
Length1 <= length <= 80
purpose*Purpose
Value in"ai_training""llm_assistant"
source*Source
Value in"settings""signup"

Response Body

Successful Response

application/json
  1. response
changed_at?|null
granted*Granted
policy_version?string|null
curl -X PUT 'https://api.aisc.sa/v1/users/me/permissions' \  -H 'Content-Type: application/json' \  -d '{  "granted": true,  "locale": "ar",  "policy_version": "string",  "purpose": "ai_training",  "source": "settings"}'
{  "changed_at": "2019-08-24T14:15:22Z",  "granted": true,  "policy_version": "string"}