Skip to main content
GET
https://sandbox.finhub.cloud
/
api
/
v2.1
/
admin
/
consents
Consent Management API
curl --request GET \
  --url https://sandbox.finhub.cloud/api/v2.1/admin/consents \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'X-Tenant-ID: <x-tenant-id>' \
  --data '
{
  "type": "<string>",
  "version": "<string>",
  "effectiveDate": "<string>",
  "content": {
    "title": "<string>",
    "body": "<string>",
    "locale": "<string>"
  }
}
'
{
  "success": true,
  "data": {
    "templates": [
      {
        "consentId": "cons_12345",
        "type": "TERMS",
        "version": "2.1",
        "status": "ACTIVE",
        "effectiveDate": "2024-01-01",
        "content": {
          "title": "Terms and Conditions",
          "body": "..."
        }
      },
      {
        "consentId": "cons_67890",
        "type": "PRIVACY",
        "version": "1.5",
        "status": "ACTIVE",
        "effectiveDate": "2024-01-01"
      }
    ]
  }
}

Consent Management API

APIs for managing consent templates (DEFINITION records) for your tenant.
Base URL: https://sandbox.finhub.cloud/api/v2.1/admin/consents

Available Operations

List Consents

GET /admin/consents

Create Consent

POST /admin/consents

Get Consent

GET /admin/consents/{consentId}

Update Consent

PUT /admin/consents/{consentId}

Delete Consent

DELETE /admin/consents/{consentId}

Retrieves all consent templates (DEFINITION records) for the tenant.

Request

Authorization
string
required
Bearer token for authentication
X-Tenant-ID
string
required
Tenant identifier

Code Examples

curl -X GET "https://sandbox.finhub.cloud/api/v2.1/admin/consents" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: YOUR_TENANT_ID"
{
  "success": true,
  "data": {
    "templates": [
      {
        "consentId": "cons_12345",
        "type": "TERMS",
        "version": "2.1",
        "status": "ACTIVE",
        "effectiveDate": "2024-01-01",
        "content": {
          "title": "Terms and Conditions",
          "body": "..."
        }
      },
      {
        "consentId": "cons_67890",
        "type": "PRIVACY",
        "version": "1.5",
        "status": "ACTIVE",
        "effectiveDate": "2024-01-01"
      }
    ]
  }
}

Retrieves a specific consent template by ID.

Request

Consent template identifier

Code Examples

curl -X GET "https://sandbox.finhub.cloud/api/v2.1/admin/consents/cons_12345" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: YOUR_TENANT_ID"
{
  "success": true,
  "data": {
    "consentId": "cons_12345",
    "type": "TERMS",
    "version": "2.1",
    "status": "ACTIVE",
    "effectiveDate": "2024-01-01",
    "content": {
      "title": "Terms and Conditions",
      "body": "Full terms text...",
      "locale": "en-US"
    },
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
  }
}

Creates a new consent template (DEFINITION record).

Request

type
string
required
Consent type: TERMS, PRIVACY, DATA_PROCESSING, COMMERCIAL, MARKETING
version
string
required
Version identifier (e.g., “2.1”)
effectiveDate
string
required
Date when consent becomes effective (YYYY-MM-DD)
content
object
required
Consent content

Code Examples

curl -X POST "https://sandbox.finhub.cloud/api/v2.1/admin/consents" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: YOUR_TENANT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "TERMS",
    "version": "2.2",
    "effectiveDate": "2024-02-01",
    "content": {
      "title": "Terms and Conditions",
      "body": "Full terms text...",
      "locale": "en-US"
    }
  }'
{
  "success": true,
  "data": {
    "consentId": "cons_new123",
    "type": "TERMS",
    "version": "2.2",
    "status": "DRAFT",
    "effectiveDate": "2024-02-01",
    "createdAt": "2024-01-15T10:30:00Z"
  }
}

Updates an existing consent template.

Request

Consent template identifier

Code Examples

curl -X PUT "https://sandbox.finhub.cloud/api/v2.1/admin/consents/cons_12345" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: YOUR_TENANT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "content": {
      "title": "Updated Terms and Conditions",
      "body": "Updated terms text...",
      "locale": "en-US"
    }
  }'
{
  "success": true,
  "data": {
    "consentId": "cons_12345",
    "type": "TERMS",
    "version": "2.1",
    "status": "ACTIVE",
    "updatedAt": "2024-01-15T11:00:00Z"
  }
}

Deletes a consent template (soft delete). Cannot delete templates with active customer consents.
Templates with active customer consents cannot be deleted. Deactivate the template instead.

Request

Consent template identifier

Code Examples

curl -X DELETE "https://sandbox.finhub.cloud/api/v2.1/admin/consents/cons_12345" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: YOUR_TENANT_ID"
{
  "success": true,
  "data": {
    "consentId": "cons_12345",
    "status": "DELETED",
    "deletedAt": "2024-01-15T12:00:00Z"
  }
}

TypeDescription
TERMSTerms and conditions
PRIVACYPrivacy policy
DATA_PROCESSINGData processing agreement
COMMERCIALCommercial services agreement
MARKETINGMarketing communications

Response Codes

CodeDescription
200Operation successful
201Template created successfully
400Invalid request data
401Not Authorized
403Not Allowed
404Template not found
409Conflict - template exists or has active consents
500Internal server error