> ## Documentation Index
> Fetch the complete documentation index at: https://docs.emergedata.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Consent Status

> Get consent status per provider for a partner user (`uid`).

The response is reconstructed from partner mappings and consent webhook history.



## OpenAPI

````yaml /openapi/link.json get /consent/status/{uid}
openapi: 3.1.0
info:
  title: Emerge API
  version: 1.0.0
  description: >-
    Privacy-first API for accessing consented user data. Emerge provides two
    main services: **Link** for collecting user consent and **Query** for
    retrieving user data.
  contact:
    name: Emerge Support
    email: account@emergedata.ai
servers:
  - url: https://link.emergedata.ai
    description: Link API - Consent collection
security:
  - bearerAuth: []
tags:
  - name: Link
    description: Consent flow configuration and status
paths:
  /consent/status/{uid}:
    get:
      tags:
        - Link
      summary: Get Consent Status
      description: >-
        Get consent status per provider for a partner user (`uid`).


        The response is reconstructed from partner mappings and consent webhook
        history.
      operationId: get_consent_status_consent_status__uid__get
      parameters:
        - name: uid
          in: path
          required: true
          schema:
            type: string
            title: Uid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsentStatusResponse'
              examples:
                default:
                  summary: Provider consent statuses
                  value:
                    sub: psub_d4e5f6789012345678901234abcdef01
                    client_id: ck_live_123456789
                    consents:
                      - provider: google_data
                        scopes:
                          - >-
                            https://www.googleapis.com/auth/dataportability.myactivity.search
                        window: fixed
                        valid_until: '2026-08-11T09:10:11.000000+00:00'
                        status: active
                        issued_at: '2026-02-12T09:10:11.000000+00:00'
                        revoked_at: null
                      - provider: gmail
                        scopes:
                          - https://www.googleapis.com/auth/gmail.readonly
                        window: fixed
                        valid_until: '2026-08-11T09:10:11.000000+00:00'
                        status: revoked
                        issued_at: '2025-12-01T11:00:00.000000+00:00'
                        revoked_at: '2026-01-15T14:20:00.000000+00:00'
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                detail: Invalid token
        '404':
          description: Subject not found
          content:
            application/json:
              example:
                detail: Subject not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - loc:
                      - query
                      - uid
                    msg: Field required
                    type: missing
      security:
        - bearerAuth: []
components:
  schemas:
    ConsentStatusResponse:
      type: object
      title: ConsentStatusResponse
      description: Consent state by provider for a partner user.
      properties:
        sub:
          type: string
          title: Sub
        client_id:
          type: string
          title: Client Id
        consents:
          type: array
          items:
            $ref: '#/components/schemas/ConsentStatusItem'
          title: Consents
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ConsentStatusItem:
      type: object
      title: ConsentStatusItem
      properties:
        provider:
          type: string
          title: Provider
        scopes:
          type: array
          items:
            type: string
          title: Scopes
        window:
          type: string
          title: Window
          description: Consent window type (currently fixed).
        valid_until:
          anyOf:
            - type: string
            - type: 'null'
          title: Valid Until
        status:
          type: string
          title: Status
          description: active or revoked
        issued_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Issued At
        revoked_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Revoked At
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API token from the Control Room. Include as `Authorization: Bearer
        <token>`

````