NexGen Cloud User Consent API

User Consent endpoints record each user's grant or revoke decision for a given consent type (e.g. marketing communications, data-sharing terms). Use these endpoints to read what consent has been granted, fetch current consent templates, and update consent state programmatically.

Business capability
Privacy & Data Protection Management BC-130.50

Operations 5

GET /auth/user-consent Get Consents for a User #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nexgen-cloud-user-consent-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

nexgen-cloud-user-consent-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Infrahub User Consent API
  version: '1.0'
  description: User Consent stores all consents from a User
servers:
- url: https://infrahub-api.nexgencloud.com/v1
security:
- accessToken: []
- apiKey: []
tags:
- name: User Consent
  description: User Consent stores all consents from a User
paths:
  /auth/user-consent:
    get:
      tags:
      - User Consent
      summary: Get Consents for a User
      description: Fetch all the recorded consents given from a User
      operationId: Get_All_Consents_for_a_User
      parameters:
      - name: consent_type
        in: query
        description: Filter by consent type
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserConsentsResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '500':
          description: Internal Server Error
          content: {}
    post:
      tags:
      - User Consent
      summary: Add a new User consent
      description: Add a new consent given by the User
      operationId: Add_a_new_consent_for_a_User
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecordConsentRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsentActionResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: payload
  /auth/user-consent/templates:
    get:
      tags:
      - User Consent
      summary: Get all consent templates
      description: Returns current consent templates for all consent types
      operationId: Get_all_consent_templates
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsentTemplatesResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
  /auth/user-consent/templates/{consent_type}:
    get:
      tags:
      - User Consent
      summary: Get consent template for a specific type
      description: Returns the current consent template for a specific consent type
      operationId: Get_consent_template_by_type
      parameters:
      - name: consent_type
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsentTemplate'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
  /auth/user-consent/{consent_type}:
    patch:
      tags:
      - User Consent
      summary: Grant or revoke an existing consent
      description: Revoke or grant a consent to the User
      operationId: Update_a_consent_action_by_type
      parameters:
      - name: consent_type
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateConsentRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsentActionResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '500':
          description: Internal Server Error
          content: {}
      x-codegen-request-body-name: payload
components:
  schemas:
    ConsentActionResponse:
      type: object
      properties:
        message:
          type: string
        consent:
          $ref: '#/components/schemas/UserConsent'
    RecordConsentRequest:
      required:
      - action
      - consent_type
      type: object
      properties:
        consent_type:
          type: string
          example: auto_top_up
          enum:
          - auto_top_up
        action:
          type: string
          example: granted
          enum:
          - granted
          - revoked
        consent_method:
          type: string
          example: web_checkbox
          default: web_checkbox
          enum:
          - web_checkbox
          - api
          - admin_override
        consent_version:
          type: string
          description: Version identifier. Defaults to the current version for the consent type
        metadata:
          type: object
          properties: {}
          description: Consent-type-specific metadata
    ConsentBlock:
      type: object
      properties:
        type:
          type: string
          description: Block display type
          example: text
          enum:
          - text
          - warning
          - info
          - success
          - failure
        text:
          type: string
          description: Block text, may contain ${variable} placeholders
    ErrorResponseModel:
      type: object
      properties:
        status:
          type: boolean
          default: false
        message:
          type: string
        error_reason:
          type: string
    UserConsentsResponse:
      type: object
      properties:
        consents:
          type: array
          items:
            $ref: '#/components/schemas/UserConsent'
    ConsentTemplate:
      type: object
      properties:
        version:
          type: string
          description: Template version identifier
        blocks:
          type: array
          items:
            $ref: '#/components/schemas/ConsentBlock'
    ConsentTemplatesResponse:
      type: object
      properties:
        templates:
          type: object
          properties: {}
          description: Templates keyed by consent type
    UserConsent:
      type: object
      properties:
        id:
          type: integer
        user_id:
          type: integer
        org_id:
          type: integer
        consent_type:
          type: string
        action:
          type: string
        ip_address:
          type: string
        consent_method:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
    UpdateConsentRequest:
      required:
      - action
      type: object
      properties:
        action:
          type: string
          example: granted
          enum:
          - granted
          - revoked
        consent_method:
          type: string
          example: web_checkbox
          default: web_checkbox
          enum:
          - web_checkbox
          - api
          - admin_override
        consent_version:
          type: string
          description: Version identifier. Defaults to the current version for the consent type
        metadata:
          type: object
          properties: {}
          description: Consent-type-specific metadata
  securitySchemes:
    accessToken:
      type: apiKey
      description: Bearer Token
      name: Authorization
      in: header
    apiKey:
      type: apiKey
      description: Send it as api_key in header
      name: api_key
      in: header
x-original-swagger-version: '2.0'