Skip to content

Questions

Create a question
client.Questions.New(ctx, body) (*QuestionUnion, error)
POST/v5/questions
List questions
client.Questions.List(ctx, query) (*CursorPage[QuestionUnion], error)
GET/v5/questions
Get a question
client.Questions.Get(ctx, questionID) (*QuestionUnion, error)
GET/v5/questions/{question_id}
Update a question
client.Questions.Update(ctx, questionID, body) (*QuestionUnion, error)
PATCH/v5/questions/{question_id}
Archive a question
client.Questions.Archive(ctx, questionID) (*QuestionUnion, error)
DELETE/v5/questions/{question_id}
Restore an archived question
client.Questions.Restore(ctx, questionID) (*QuestionUnion, error)
POST/v5/questions/{question_id}/restore
ModelsExpand Collapse
type CategoricalQuestion struct{…}
ID string

Unique identifier of the entity

Choices []string

Categorical answer choices (must contain at least one entry)

Multi boolOptional

Whether the question allows multiple answers.

CreatedAt Time

ISO-timestamp when the entity was created

formatdate-time
CreatedBy Identity

The identity that created the entity.

ID string
Type IdentityType
One of the following:
const IdentityTypeUser IdentityType = "user"
const IdentityTypeServiceAccount IdentityType = "service_account"
Object IdentityObjectOptional
Name string
Prompt string

user-facing question prompt

ArchivedAt TimeOptional

ISO-timestamp when the entity was archived

formatdate-time
Conditions []map[string, any]Optional

Conditions for the question to be shown

Object CategoricalQuestionObjectOptional
QuestionType CategoricalQuestionQuestionTypeOptional
type CategoricalQuestionConfiguration struct{…}
Choices []string

Categorical answer choices (must contain at least one entry)

Multi boolOptional

Whether the question allows multiple answers.

type FormQuestion struct{…}
ID string

Unique identifier of the entity

FormSchema map[string, any]

The JSON schema of the desired form object

CreatedAt Time

ISO-timestamp when the entity was created

formatdate-time
CreatedBy Identity

The identity that created the entity.

ID string
Type IdentityType
One of the following:
const IdentityTypeUser IdentityType = "user"
const IdentityTypeServiceAccount IdentityType = "service_account"
Object IdentityObjectOptional
Name string
Prompt string

user-facing question prompt

ArchivedAt TimeOptional

ISO-timestamp when the entity was archived

formatdate-time
Conditions []map[string, any]Optional

Conditions for the question to be shown

Object FormQuestionObjectOptional
QuestionType FormQuestionQuestionTypeOptional
type FormQuestionConfiguration struct{…}
FormSchema map[string, any]

The JSON schema of the desired form object

type FreeTextQuestion struct{…}
ID string

Unique identifier of the entity

CreatedAt Time

ISO-timestamp when the entity was created

formatdate-time
CreatedBy Identity

The identity that created the entity.

ID string
Type IdentityType
One of the following:
const IdentityTypeUser IdentityType = "user"
const IdentityTypeServiceAccount IdentityType = "service_account"
Object IdentityObjectOptional
Name string
Prompt string

user-facing question prompt

ArchivedAt TimeOptional

ISO-timestamp when the entity was archived

formatdate-time
Conditions []map[string, any]Optional

Conditions for the question to be shown

Configuration FreeTextQuestionConfigurationOptional
MaxLength int64Optional

Maximum characters allowed

minimum1
MinLength int64Optional

Minimum characters required

minimum0
Object FreeTextQuestionObjectOptional
QuestionType FreeTextQuestionQuestionTypeOptional
type FreeTextQuestionConfiguration struct{…}
MaxLength int64Optional

Maximum characters allowed

minimum1
MinLength int64Optional

Minimum characters required

minimum0
type NumberQuestion struct{…}
ID string

Unique identifier of the entity

CreatedAt Time

ISO-timestamp when the entity was created

formatdate-time
CreatedBy Identity

The identity that created the entity.

ID string
Type IdentityType
One of the following:
const IdentityTypeUser IdentityType = "user"
const IdentityTypeServiceAccount IdentityType = "service_account"
Object IdentityObjectOptional
Name string
Prompt string

user-facing question prompt

ArchivedAt TimeOptional

ISO-timestamp when the entity was archived

formatdate-time
Conditions []map[string, any]Optional

Conditions for the question to be shown

Configuration NumberQuestionConfigurationOptional
Max float64Optional

Maximum value for the number

Min float64Optional

Minimum value for the number

Object NumberQuestionObjectOptional
QuestionType NumberQuestionQuestionTypeOptional
type NumberQuestionConfiguration struct{…}
Max float64Optional

Maximum value for the number

Min float64Optional

Minimum value for the number

type QuestionUnion interface{…}
One of the following:
type CategoricalQuestion struct{…}
ID string

Unique identifier of the entity

Choices []string

Categorical answer choices (must contain at least one entry)

Multi boolOptional

Whether the question allows multiple answers.

CreatedAt Time

ISO-timestamp when the entity was created

formatdate-time
CreatedBy Identity

The identity that created the entity.

ID string
Type IdentityType
One of the following:
const IdentityTypeUser IdentityType = "user"
const IdentityTypeServiceAccount IdentityType = "service_account"
Object IdentityObjectOptional
Name string
Prompt string

user-facing question prompt

ArchivedAt TimeOptional

ISO-timestamp when the entity was archived

formatdate-time
Conditions []map[string, any]Optional

Conditions for the question to be shown

Object CategoricalQuestionObjectOptional
QuestionType CategoricalQuestionQuestionTypeOptional
type RatingQuestion struct{…}
ID string

Unique identifier of the entity

MaxLabel string

Label shown for the maximum rating

MinLabel string

Label shown for the minimum rating

Steps int64

Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

minimum1
CreatedAt Time

ISO-timestamp when the entity was created

formatdate-time
CreatedBy Identity

The identity that created the entity.

ID string
Type IdentityType
One of the following:
const IdentityTypeUser IdentityType = "user"
const IdentityTypeServiceAccount IdentityType = "service_account"
Object IdentityObjectOptional
Name string
Prompt string

user-facing question prompt

ArchivedAt TimeOptional

ISO-timestamp when the entity was archived

formatdate-time
Conditions []map[string, any]Optional

Conditions for the question to be shown

Object RatingQuestionObjectOptional
QuestionType RatingQuestionQuestionTypeOptional
type NumberQuestion struct{…}
ID string

Unique identifier of the entity

CreatedAt Time

ISO-timestamp when the entity was created

formatdate-time
CreatedBy Identity

The identity that created the entity.

ID string
Type IdentityType
One of the following:
const IdentityTypeUser IdentityType = "user"
const IdentityTypeServiceAccount IdentityType = "service_account"
Object IdentityObjectOptional
Name string
Prompt string

user-facing question prompt

ArchivedAt TimeOptional

ISO-timestamp when the entity was archived

formatdate-time
Conditions []map[string, any]Optional

Conditions for the question to be shown

Configuration NumberQuestionConfigurationOptional
Max float64Optional

Maximum value for the number

Min float64Optional

Minimum value for the number

Object NumberQuestionObjectOptional
QuestionType NumberQuestionQuestionTypeOptional
type FreeTextQuestion struct{…}
ID string

Unique identifier of the entity

CreatedAt Time

ISO-timestamp when the entity was created

formatdate-time
CreatedBy Identity

The identity that created the entity.

ID string
Type IdentityType
One of the following:
const IdentityTypeUser IdentityType = "user"
const IdentityTypeServiceAccount IdentityType = "service_account"
Object IdentityObjectOptional
Name string
Prompt string

user-facing question prompt

ArchivedAt TimeOptional

ISO-timestamp when the entity was archived

formatdate-time
Conditions []map[string, any]Optional

Conditions for the question to be shown

Configuration FreeTextQuestionConfigurationOptional
MaxLength int64Optional

Maximum characters allowed

minimum1
MinLength int64Optional

Minimum characters required

minimum0
Object FreeTextQuestionObjectOptional
QuestionType FreeTextQuestionQuestionTypeOptional
type FormQuestion struct{…}
ID string

Unique identifier of the entity

FormSchema map[string, any]

The JSON schema of the desired form object

CreatedAt Time

ISO-timestamp when the entity was created

formatdate-time
CreatedBy Identity

The identity that created the entity.

ID string
Type IdentityType
One of the following:
const IdentityTypeUser IdentityType = "user"
const IdentityTypeServiceAccount IdentityType = "service_account"
Object IdentityObjectOptional
Name string
Prompt string

user-facing question prompt

ArchivedAt TimeOptional

ISO-timestamp when the entity was archived

formatdate-time
Conditions []map[string, any]Optional

Conditions for the question to be shown

Object FormQuestionObjectOptional
QuestionType FormQuestionQuestionTypeOptional
type TimestampQuestion struct{…}
ID string

Unique identifier of the entity

CreatedAt Time

ISO-timestamp when the entity was created

formatdate-time
CreatedBy Identity

The identity that created the entity.

ID string
Type IdentityType
One of the following:
const IdentityTypeUser IdentityType = "user"
const IdentityTypeServiceAccount IdentityType = "service_account"
Object IdentityObjectOptional
Name string
Prompt string

user-facing question prompt

ArchivedAt TimeOptional

ISO-timestamp when the entity was archived

formatdate-time
Conditions []map[string, any]Optional

Conditions for the question to be shown

Configuration TimestampQuestionConfigurationOptional
Multi boolOptional

Whether to allow multiple timestamps

Object TimestampQuestionObjectOptional
QuestionType TimestampQuestionQuestionTypeOptional
type RatingQuestion struct{…}
ID string

Unique identifier of the entity

MaxLabel string

Label shown for the maximum rating

MinLabel string

Label shown for the minimum rating

Steps int64

Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

minimum1
CreatedAt Time

ISO-timestamp when the entity was created

formatdate-time
CreatedBy Identity

The identity that created the entity.

ID string
Type IdentityType
One of the following:
const IdentityTypeUser IdentityType = "user"
const IdentityTypeServiceAccount IdentityType = "service_account"
Object IdentityObjectOptional
Name string
Prompt string

user-facing question prompt

ArchivedAt TimeOptional

ISO-timestamp when the entity was archived

formatdate-time
Conditions []map[string, any]Optional

Conditions for the question to be shown

Object RatingQuestionObjectOptional
QuestionType RatingQuestionQuestionTypeOptional
type RatingQuestionConfiguration struct{…}
MaxLabel string

Label shown for the maximum rating

MinLabel string

Label shown for the minimum rating

Steps int64

Number of discrete points on the scale (e.g., 5 for a 1–5 scale)

minimum1
type TimestampQuestion struct{…}
ID string

Unique identifier of the entity

CreatedAt Time

ISO-timestamp when the entity was created

formatdate-time
CreatedBy Identity

The identity that created the entity.

ID string
Type IdentityType
One of the following:
const IdentityTypeUser IdentityType = "user"
const IdentityTypeServiceAccount IdentityType = "service_account"
Object IdentityObjectOptional
Name string
Prompt string

user-facing question prompt

ArchivedAt TimeOptional

ISO-timestamp when the entity was archived

formatdate-time
Conditions []map[string, any]Optional

Conditions for the question to be shown

Configuration TimestampQuestionConfigurationOptional
Multi boolOptional

Whether to allow multiple timestamps

Object TimestampQuestionObjectOptional
QuestionType TimestampQuestionQuestionTypeOptional
type TimestampQuestionConfiguration struct{…}
Multi boolOptional

Whether to allow multiple timestamps