DocsUsersPreferences

User Preferences

Get or update a user’s preferences settings.

Get Preferences

Endpoint

GET ${baseUrl}/users/preferences

Response

interface UserPreferencesResponse {
  success: boolean
  data: {
    preferences: {
      id: number
      transcriptOrder: boolean
      newsletter: boolean
      ccStored: boolean
      transcriptDelivered: boolean
      transcriptCancelled: boolean
      transcriptRefund: boolean
    }
    recordsPerPage: number
  }
}

Update Preferences

Endpoint

PUT ${baseUrl}/users/preferences

Request Body

interface UpdatePreferencesRequest {
  preferences: {
    transcriptOrder: boolean
    newsletter: boolean
    ccStored: boolean
    transcriptDelivered: boolean
    transcriptCancelled: boolean
    transcriptRefund: boolean
  }
  recordsPerPage: number
}

Example Request

const response = await fetch('${baseUrl}/users/preferences', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    Authorization: 'Basic YOUR_API_KEY',
  },
  body: JSON.stringify({
    recordsPerPage: 20,
    preferences: {
      transcriptOrder: true,
      newsletter: false,
      ccStored: true,
      transcriptDelivered: true,
      transcriptCancelled: true,
      transcriptRefund: true,
    },
  }),
})
 
const data = await response.json()

Error Codes

Status CodeDescription
200Success
400Invalid Request Body
401Unauthorized
403Forbidden
500Server Error