Skip to content
Navigation

Grant access

POST
https://api.sureshake.com/v2/entities/{entityId}/collections/{id}/access

Path parameters

  • entityId
    string
    required
    format: uuid
  • id
    string
    required
    format: uuid

Request body JSON

  • userId
    optional
    string
    minLength: 1
  • grantedToUserId
    optional
    string
    minLength: 1
  • accessLevel
    optional
    read
    or
    write
    or
    admin
  • permission
    optional
    read
    or
    write
    or
    admin
  • role
    optional
    read
    or
    write
    or
    admin

Returns

200

Default Response

JSON
  • data
    object
    required
    • success
      boolean
      required
    • access
      optional
      object
      • id
        string
        required
      • userId
        string
        required
      • grantedToUserId
        string
        required
      • accessLevel
        read
        or
        write
        or
        admin
        required
      • permission
        read
        or
        write
        or
        admin
        required
      • grantedAt
        string
        required
      • createdAt
        string
        required
      • updatedAt
        string
        required
      • grantedToName
        optional
        string
        or null
      • grantedToEmail
        optional
        string
        or null

400

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

401

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

403

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

404

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

409

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

500

Default Response
JSON
  • error
    object
    required
    • code
      string
      required

      Machine-readable error code (e.g., NOT_FOUND)

    • message
      string
      required

      Human-readable error message

    • details
      optional
      unknown

      Optional structured error details

    • traceId
      optional
      string

      Unique ID for log correlation

Type to search…

↑↓ navigate↵ selectEsc close