Skip to main content

FormShareMutations

No description

type FormShareMutations {
createFormShare(
formId: Long!
password: String
expiresAt: ZonedDateTime
maxResponses: Int
): FormShare
createPrefilledFormShare(
formId: Long!
answers: String!
correlation: String!
password: String
expiresAt: ZonedDateTime
maxResponses: Int
): FormShare
revokeFormShare(
formShareId: Long!
): Boolean
rotateFormShare(
formShareId: Long!
newPassword: String
): FormShare
pushFormShareSchema(
formShareId: Long!
): FormShare
deleteFormShareData(
formShareId: Long!
): Int
}

Fields

FormShareMutations.createFormShare ● FormShare object

Share a form as a public link that anyone can fill without an account. Freezes the form's current schema and version onto the link (editing the form later does not change what the link serves). Optional password (a speed bump, not a security boundary — it travels next to the link), expiry and maximum number of responses; maxResponses: 1 makes it single-use. Requires canManageForms.

FormShareMutations.createFormShare.formId ● Long! non-null scalar
FormShareMutations.createFormShare.password ● String scalar
FormShareMutations.createFormShare.expiresAt ● ZonedDateTime scalar
FormShareMutations.createFormShare.maxResponses ● Int scalar

FormShareMutations.createPrefilledFormShare ● FormShare object

Mint a link that arrives already filled in, for one named recipient. answers is a JSON object of seeded values whose keys must be VISIBLE question names of the form (a mistyped key fails this call and is named in the error). correlation is a JSON object of values the server keeps and never sends to the browser — a task id, a customer id — which the Form Submission trigger later reports under prefill; its keys must not name any question of the form. Defaults to single-use: omitting maxResponses means 1, not unlimited. Requires canManageForms.

FormShareMutations.createPrefilledFormShare.formId ● Long! non-null scalar
FormShareMutations.createPrefilledFormShare.answers ● String! non-null scalar
FormShareMutations.createPrefilledFormShare.correlation ● String! non-null scalar
FormShareMutations.createPrefilledFormShare.password ● String scalar
FormShareMutations.createPrefilledFormShare.expiresAt ● ZonedDateTime scalar
FormShareMutations.createPrefilledFormShare.maxResponses ● Int scalar

FormShareMutations.revokeFormShare ● Boolean scalar

Kill a share link. Final for that token — it is never reactivated, and the responses it collected stay attached to it. Use rotateFormShare to re-share. Returns false if it was already revoked. Requires canManageForms.

FormShareMutations.revokeFormShare.formShareId ● Long! non-null scalar

FormShareMutations.rotateFormShare ● FormShare object

Revoke a link and issue a replacement with a NEW token, keeping the same expiry, response cap and frozen schema version. The password carries over unless newPassword replaces it. Requires canManageForms.

FormShareMutations.rotateFormShare.formShareId ● Long! non-null scalar
FormShareMutations.rotateFormShare.newPassword ● String scalar

FormShareMutations.pushFormShareSchema ● FormShare object

Move a live link onto the form's current definition, appending a new frozen version. Responses already collected keep the version they answered. Fails if the link already serves the latest version, or has been revoked. Requires canManageForms.

FormShareMutations.pushFormShareSchema.formShareId ● Long! non-null scalar

FormShareMutations.deleteFormShareData ● Int scalar

Erase the personal data one share link collected: permanently deletes its responses AND the files those responses referenced. Irreversible, and not the same as revoking — revoking kills the URL and keeps the answers, this keeps the (dead) URL as history and destroys the answers. Returns the number of responses deleted. Requires canManageForms.

FormShareMutations.deleteFormShareData.formShareId ● Long! non-null scalar

Returned By

formShares mutation