Skip to main content
POST
/
api
/
access
/
clients
/
{client_profile_id}
/
collections
/
{collection_id}
Grant Access
curl --request POST \
  --url https://api.example.com/api/access/clients/{client_profile_id}/collections/{collection_id} \
  --header 'Authorization: <authorization>'

Authentication

Authorization
string
required
Bearer token: Bearer <admin_token>

Path Parameters

client_profile_id
string
required
The client’s profile ID (UUID)
collection_id
string
required
The collection ID (UUID)

Example Request

curl -X POST https://api.sari-platform.com/api/access/clients/client-uuid/collections/collection-uuid \
  -H "Authorization: Bearer <admin_token>"

Response

{
  "message": "Access granted",
  "client_id": "client-uuid",
  "collection_id": "collection-uuid",
  "granted_at": "2024-01-15T10:00:00Z"
}

What Happens

  1. Access Record Created - Entry added to client_api_access table
  2. Cache Invalidated - Client’s collection list cache cleared

Errors

StatusDescription
401Invalid or expired token
403Admin access required
404Client or collection not found
409Client already has access