### Example Response for Create Webhook Source: https://www.useanvil.com/docs/api/graphql/reference This is an example of the response structure when creating a webhook. ```json { "data": { "createWebhook": { "eid": "kQp2qd9FVUWrrE60hMbi", "name": "Organization Name", "logo": {}, "logoURL": "https://app.useanvil.com/uploads/nA1jH49FVUWrrE60hMbi.png", "stylesheetURL": "https://example.com/anvil-styles.css", "parentOrganization": Organization, "billingEmail": "user@domain.com", "supportEmail": "user@domain.com", "slug": "organization-name", "users": [User], "adminUsers": [User], "organizationUsers": [OrganizationUser], "organizationUserInvites": [OrganizationUserInvite], "isPersonal": false, "isSubscribed": true, "useTestSignatureProvider": false, "config": {}, "resolvedConfig": {}, "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "welds": WeldPage, "etchTemplates": [EtchTemplate], "etchPackets": EtchPacketPage, "forges": [Forge], "forgeMaps": [ForgeMap], "casts": CastPage, "paymentMethods": [PaymentMethod], "webhook": Webhook, "webhookActions": [WebhookAction], "webhookLogs": WebhookLogPage, "childOrganizations": [Organization], "relatedOrganizations": [Organization], "subscribedPlanFeatures": {}, "subscriptionActivity": {}, "currentInvoice": Invoice, "totalUsedUnits": 123, "weldCompleteWebhookStats": {}, "weldCompleteStats": {}, "etchCompleteStats": {}, "remainingSubmissions": {}, "remainingEtchCompletions": {}, "signatureProviderType": "xyz789", "availableSignatureProviderTypes": [ "xyz789" ], "isSso": true, "remainingUsers": 987 } } } ``` -------------------------------- ### Start Workflow URL Source: https://www.useanvil.com/docs/api/workflows Construct this URL to initiate a Workflow. You can copy it from your Workflow's API information page or build it dynamically. This URL can be linked to from your application to guide users through a Workflow. ```url https://app.useanvil.com/form/${organization.slug}/${forge.slug}?d={...} ``` -------------------------------- ### Start Page Numbering on the 2nd Page Source: https://www.useanvil.com/docs/api/generate-pdf Place the running element after the desired page break to control where it appears. This example starts page numbering on the second page. ```html Lonely Page 1 content Page 2 content Page Page 3 content ``` -------------------------------- ### Date Example Source: https://www.useanvil.com/docs/api/graphql/reference A simple example of a Date scalar type, represented as an ISO8601 formatted string. ```string "2007-12-03" ``` -------------------------------- ### Full Example with Mixed Styling Source: https://www.useanvil.com/docs/api/fill-pdf A comprehensive example showing document-level and field-specific styling applied simultaneously when filling a PDF. ```APIDOC ## POST /api/v1/fill/{pdfTemplateID}.pdf ### Description Fills a PDF document with data, demonstrating a combination of document-level and individual field-level styling. ### Method POST ### Endpoint `https://app.useanvil.com/api/v1/fill/{pdfTemplateID}.pdf` ### Parameters #### Request Body - **fontSize** (Integer) - Optional - Document-level font size. - **data** (Object) - Required - An object containing the data to fill into the PDF fields. - **aTextField** (Object) - An object for a specific text field with its own styling properties. - **fontFamily** (String) - Optional - Font family for this field. - **fontSize** (Integer) - Optional - Font size for this field. - **textColor** (String) - Optional - Text color for this field. - **alignment** (String) - Optional - Text alignment for this field. - **fontWeight** (String) - Optional - Font weight for this field. - **value** (String) - Required - The fill data for the text field. - **aFullName** (Object) - An object for a complex field with its own styling. - **fontFamily** (String) - Optional - Font family for this field. - **fontSize** (Integer) - Optional - Font size for this field. - **textColor** (String) - Optional - Text color for this field. - **value** (Object) - Required - The complex fill data for the field. - **firstName** (String) - Optional - First name. - **lastName** (String) - Optional - Last name. - **aDocumentStyledField** (String) - The value for a field that inherits document-level styling. ### Request Example ```json { "fontSize": 12, "data": { "aTextField": { "fontFamily": "Roboto", "fontSize": 8, "textColor": "#333333", "alignment": "center", "fontWeight": "boldItalic", "value": "Lorem ipsum" }, "aFullName": { "fontFamily": "Lato", "fontSize": 14, "textColor": "#CC0000", "value": { "firstName": "Sally", "lastName": "Sanders" } }, "aDocumentStyledField": "Document styling only" } } ``` ### Response #### Success Response (200) - **pdfUrl** (String) - The URL to the filled PDF document. ``` -------------------------------- ### Fetch Webhook Log Response Example Source: https://www.useanvil.com/docs/api/graphql/reference This is an example response for the `webhookLog` query, showing details of a specific webhook log. ```json { "data": { "webhookLog": { "eid": "kQp2qd9FVUWrrE60hMbi", "action": "weldComplete", "isError": true, "isRetry": true, "statusCode": 123, "millisecondsToFinish": 123, "objectEid": "kQp2qd9FVUWrrE60hMbi", "rootObjectType": "WeldData", "rootObjectURL": "https://app.useanvil.com/org/my-org/w/my-workflow/iXLRleX92vhwF8cIhsk2", "objectMetadata": {}, "organization": Organization, "originalWebhookLog": WebhookLog, "createdAt": "2026-04-27T19:14:37.724Z" } } } ``` -------------------------------- ### Example EtchPacket Response Source: https://www.useanvil.com/docs/api/graphql/reference This is an example response structure for the `etchPacket` query, illustrating the fields returned for a completed EtchPacket. ```json { "data": { "etchPacket": { "eid": "kQp2qd9FVUWrrE60hMbi", "name": "EtchPacket Name", "status": "completed", "isTest": false, "allowUpdates": false, "containsFillData": true, "payload": { "myPDFId": { "textColor": "#000000", "data": {"email": "hello@example.com"} } }, "numberRemainingSigners": 123, "detailsURL": "https://app.useanvil.com/org/my-org/etch/nA1jH49FVUWrrE60hMbi", "webhookURL": "https://yoursite.com/webhooks/anvil", "organization": Organization, "documentGroup": DocumentGroup, "etchTemplate": EtchTemplate, "userUploads": [UserUpload], "etchLogEvents": [EtchLog], "webhookLogs": [WebhookLog], "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "archivedAt": "2007-12-03", "completedAt": "2007-12-03", "sentAt": "2007-12-03", "embeddedAt": "2007-12-03" } } } ``` -------------------------------- ### GraphQL Variables Example: Create Weld Data Source: https://www.useanvil.com/docs/api/graphql/reference Example variables for creating weld data. ```json { "weldEid": "kQp2qd9FVUWrrE60hMbi", "weldDataGroupEid": "kQp2qd9FVUWrrE60hMbi", "isTest": false, "webhookURL": "https://domain.com/page.html" } ``` -------------------------------- ### GraphQL Response Example: Create Weld Data Source: https://www.useanvil.com/docs/api/graphql/reference Example response structure for creating weld data. ```json { "data": { "createWeldData": { "eid": "kQp2qd9FVUWrrE60hMbi", "displayTitle": "Sally's workflow submission", "status": "in-progress", "isTest": true, "isExpired": false, "isComplete": false, "isAllComplete": false, "continueURL": "https://app.useanvil.com/form/demo/my-form/nA1jH49FVUWrrE60hMbi", "webhookURL": "https://yoursite.com/webhooks/anvil", "completionPercentage": 0.2, "numberRemainingSigners": 123, "payloadCanBeUpdated": false, "hasSigners": true, "nextSigner": Signer, "nextSigners": [Signer], "hasPin": false, "pin": "9876", "agents": {}, "files": [ { "downloadURL": "https://app.useanvil.com/api/document-group/nA1jH49FVUWrrE60hMbi/Hello-World.pdf", "filename": "Hello-World.pdf", "name": "Hello World", "type": "pdf" } ], "excludedFiles": [ { "downloadURL": "https://app.useanvil.com/api/document-group/nA1jH49FVUWrrE60hMbi/Dont-Sign-Me.pdf", "filename": "Dont-Sign-Me.pdf", "name": "Do not sign this doc", "type": "pdf" } ], "weld": Weld, "weldVersionId": 123, "submissions": [Submission], "documentGroup": DocumentGroup, "webhookLogs": [WebhookLog], "etchLogEvents": [EtchLog], "weldDataLogEvents": [WeldDataLog], "userUploads": [UserUpload], "forgesRequiringCompletion": [Forge], "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "dataUpdatedAt": "2007-12-03", "expiresAt": "2007-12-03", "archivedAt": "2007-12-03", "embeddedAt": "2007-12-03", "currentStepInfo": {}, "stylesheetURL": "https://domain.com/page.html" } } } ``` -------------------------------- ### Example User Object Structure Source: https://www.useanvil.com/docs/api/graphql/reference This example shows the structure of a User object, including fields like eid, email, name, role, and timestamps. ```json { "eid": "kQp2qd9FVUWrrE60hMbi", "email": "user@domain.com", "name": "User Name", "firstName": "Bobby", "lastName": "Jones", "role": "user", "verifiedEmail": "user@domain.com", "preferences": UserPreferences, "organizations": [Organization], "organizationUsers": [OrganizationUser], "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "onboarding": {}, "extra": {}, "numSentEtchPackets": 123 } ``` -------------------------------- ### Webhook Log Response Example Source: https://www.useanvil.com/docs/api/graphql/reference This is an example of a response when fetching a single webhook log by its EID. ```json { "data": { "submission": { "eid": "kQp2qd9FVUWrrE60hMbi", "status": "in-progress", "resolvedPayload": { "email": { "id": "f162136372633517", "aliasId": "email", "type": "email", "label": "Email", "value": "hello@example.com" } }, "payload": { "f162136372633517": {"type": "email", "value": "hello@example.com"} }, "payloadValue": {"f162136372633517": "hello@example.com"}, "currentStep": 123, "totalSteps": 123, "continueURL": "https://app.useanvil.com/form/demo/my-form/nA1jH49FVUWrrE60hMbi", "weldData": WeldData, "forge": Forge, "user": User, "signer": Signer, "reviewData": {}, "completionPercentage": 33.33, "isExcluded": true, "touchedByUser": false, "requestMeta": {}, "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "completedAt": "2007-12-03" } } } ``` -------------------------------- ### Full Example: Document and Individual Field Styling Source: https://www.useanvil.com/docs/api/fill-pdf A comprehensive example demonstrating document-level styling and specific styling for individual text and complex fields. It shows how to apply various style properties and structure data for complex fields. ```javascript POST https://app.useanvil.com/api/v1/fill/{pdfTemplateID}.pdf { "title": "Doc with style", // Document-level styling properties "fontSize": 12, "data": { // An individually-styled field "aTextField": { "fontFamily": "Roboto", "fontSize": 8, "textColor": "#333333", "alignment": "center", "fontWeight": "boldItalic", "value": "Lorem ipsum" }, // A individually-styled complex field "aFullName": { "fontFamily": "Lato", "fontSize": 14, "textColor": "#CC0000", // For complex values, "value": { "firstName": "Sally", "lastName": "Sanders", } }, // A field that will inherit the template's styling "aDocumentStyledField": "Document styling only" } } ``` -------------------------------- ### WeldFile Input Object Example Source: https://www.useanvil.com/docs/api/graphql/reference Used with `createWeld` to specify a file for upload. This example demonstrates the structure for defining file input. ```json { "id": "myDocument", "title": "My Document", "castEid": "nA1jH49FVUWrrE60hMbi", "file": { "description": "Base64 buffer upload", "value": { "data": "base64filestring===", "mimetype": "application/pdf", "filename": "my-file.pdf" } }, "mimetype": "abc123", "name": "xyz789", "src": "abc123", "stamp": 987.65 } ``` -------------------------------- ### Example UserPreferences Object Structure Source: https://www.useanvil.com/docs/api/graphql/reference This example illustrates the structure of the UserPreferences object, containing boolean and string fields related to user settings. ```json { "acceptedSignature": true, "name": "UserPreferences Name", "initials": "abc123", "require2FA": true } ``` -------------------------------- ### Enable Interactive Signing with createEtchPacket Source: https://www.useanvil.com/docs/api/e-signatures To enable interactive signing, set `allowUpdates` to `true` and define interactive fields within the signer's `fields` array. This example demonstrates the GraphQL mutation and variable setup. ```graphql mutation CreateEtchPacket( # These are the most relevant arguments, so we'll focus on them: $allowUpdates: Boolean, $files: [EtchFile!], $signers: [JSON!], $data: JSON, # ... # The rest of your arguments go here, for example: # $name: String, # $organizationEid: String, ) { createEtchPacket( allowUpdates: $allowUpdates, files: $files, signers: $signers, data: $data, ) { eid status documentGroup { eid status signers { eid routingOrder # New! This will fetch the user-entered payload payload } } } } ``` ```javascript const variables = { allowUpdates: true, // Must be `true` files: [ { id: 'sampleTemplate', castEid: '05xXsZko33JIO6aq5Pnr', }, ], data: { // These payloads will be the initial base of the data used to fill the // PDFs in this packet, and the data from any Interactive Signing input // will be merged on top of this data whenever it's provided. The data // from these payloads will also be used as the initial value for any // Interactive Fields which happen to be mapped to them. payloads: { sampleTemplate: { data: { name: 'Robin Smith', shortText: 'Example Short Text', email: 'robin@example.com', date: '2024-07-24', ssn: '456454567', ein: '897654321', }, }, }, }, signers: [ { id: 'signer1', name: 'Robin Smith', email: 'robin@example.com', fields: [ // This is an Interactive Signing field declaration: { // This field will be shown in Signer1's Interactive Signing // experience with the initial value pre-filled to // `robin@example.com`. This is because one of the payloadMaps // points to a field for which their is data from the payloads // already. This allows you to pre-fill the data and give the // signer the option to update it if needed. kind: 'form', // Required: Indicates this is an Interactive Signing field label: 'Email', // Optional description: 'Please enter in your email address.', // Optional helpTip: 'You can change this later if you want.', // Optional // Required: An array of objects specifying what fields should be // filled using the data provided by the Signer to this Interactive Field. // - They can span across different files (if your packet has more // than 1 file) and field aliases can be used in the "fieldId". // - The type of field rendered in the form to the Signer will be // derived from the payload fields specified here. // - All targeted fields in the payload maps must be of the same type. payloadMaps: [ { fileId: 'sampleTemplate', fieldId: 'email', }, { fileId: 'sampleTemplate2', fieldId: 'emailAddress', }, ], }, { kind: 'form', // Required label: 'Home Phone', // Optional options: { optional: true, // Allows the field to be optional when signing placeholder: '1-231-231-2312', // Optional }, payloadMaps: [ { fileId: 'sampleTemplate', fieldId: 'homePhone', }, ], }, { kind: 'form', label: 'Home Address', payloadMaps: [ { fileId: 'sampleTemplate', fieldId: 'homeAddress', }, ], }, { // This field will NOT be shown in Signer1's Interactive Signing // experience because a value already exists in the data payload // that matches one of the payloadMap targets AND the // `ignoreWhenFilled` option is set to `true`. kind: 'form', label: 'Social Security Number', ignoreWhenFilled: true, payloadMaps: [ { fileId: 'sampleTemplate', fieldId: 'ssn', }, ], }, // This is a standard "signature" field declaration: { fileId: 'sampleTemplate', fieldId: 'signature', }, { ``` -------------------------------- ### Example UserUpload Object Structure Source: https://www.useanvil.com/docs/api/graphql/reference This example demonstrates the structure of a UserUpload object, which includes fields related to user-uploaded content and associated Anvil objects. ```json { "eid": "kQp2qd9FVUWrrE60hMbi", "location": "xyz789", "user": User, "etchPacket": EtchPacket, "weldData": WeldData, "forge": Forge, "cast": Cast, "metadata": {}, "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z" } ``` -------------------------------- ### Example Submission Payload Source: https://www.useanvil.com/docs/api/object-references An example of a submission payload for 'email' and 'fullName' fields. ```javascript { email: { type: 'shortText', value: 'bobby@tables.com' }, name: { type: 'fullName', value: { firstName: 'Bobby', mi: '', lastName: 'Tables' } }, ...other ids... } ``` -------------------------------- ### DocumentGroup Response Example Source: https://www.useanvil.com/docs/api/graphql/reference This is an example of a response object for a DocumentGroup, detailing its status, associated files, and URLs for download. ```json { "data": { "voidDocumentGroup": { "eid": "nA1jH49FVUWrrE60hMbi", "status": "completed", "provider": "etch", "currentRoutingStep": 123, "files": [ { "downloadURL": "https://app.useanvil.com/api/document-group/nA1jH49FVUWrrE60hMbi/Hello-World.pdf", "filename": "Hello-World.pdf", "name": "Hello World", "type": "pdf" } ], "weldData": WeldData, "etchPacket": EtchPacket, "signers": [Signer], "providerConfig": {}, "finishPageConfig": {}, "signaturePageConfig": {}, "downloadZipURL": "http://app.useanvil.com/download/nA1jH49FVUWrrE60hMbi.zip", "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "completedAt": "2007-12-03", "stylesheetURL": "https://domain.com/page.html", "orgLogo": {} } } } ``` -------------------------------- ### WeldPage Object Example Source: https://www.useanvil.com/docs/api/graphql/reference Represents a paginated list of Weld records. This example shows the structure for paginated Weld results. ```json { "rowCount": 20, "pageCount": 2, "page": 1, "pageSize": 10, "items": [Weld] } ``` -------------------------------- ### Create Submission Response Source: https://www.useanvil.com/docs/api/graphql/reference Example response structure after creating a submission. ```json { "data": { "createSubmission": { "eid": "kQp2qd9FVUWrrE60hMbi", "status": "in-progress", "resolvedPayload": { "email": { "id": "f162136372633517", "aliasId": "email", "type": "email", "label": "Email", "value": "hello@example.com" } }, "payload": { "f162136372633517": {"type": "email", "value": "hello@example.com"} }, "payloadValue": {"f162136372633517": "hello@example.com"}, "currentStep": 987, "totalSteps": 123, "continueURL": "https://app.useanvil.com/form/demo/my-form/nA1jH49FVUWrrE60hMbi", "weldData": WeldData, "forge": Forge, "user": User, "signer": Signer, "reviewData": {}, "completionPercentage": 33.33, "isExcluded": false, "touchedByUser": true, "requestMeta": {}, "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "completedAt": "2007-12-03" } } } ``` -------------------------------- ### GraphQL Response Example Source: https://www.useanvil.com/docs/api/graphql/reference This is an example of a GraphQL response, showing the structure of data returned after a query or mutation. It includes details about an organization and its associated entities. ```json { "data": { "disconnectDocusign": { "eid": "kQp2qd9FVUWrrE60hMbi", "name": "Organization Name", "logo": {}, "logoURL": "https://app.useanvil.com/uploads/nA1jH49FVUWrrE60hMbi.png", "stylesheetURL": "https://example.com/anvil-styles.css", "parentOrganization": Organization, "billingEmail": "user@domain.com", "supportEmail": "user@domain.com", "slug": "organization-name", "users": [User], "adminUsers": [User], "organizationUsers": [OrganizationUser], "organizationUserInvites": [OrganizationUserInvite], "isPersonal": true, "isSubscribed": false, "useTestSignatureProvider": false, "config": {}, "resolvedConfig": {}, "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "welds": WeldPage, "etchTemplates": [EtchTemplate], "etchPackets": EtchPacketPage, "forges": [Forge], "forgeMaps": [ForgeMap], "casts": CastPage, "paymentMethods": [PaymentMethod], "webhook": Webhook, "webhookActions": [WebhookAction], "webhookLogs": WebhookLogPage, "childOrganizations": [Organization], "relatedOrganizations": [Organization], "subscribedPlanFeatures": {}, "subscriptionActivity": {}, "currentInvoice": Invoice, "totalUsedUnits": 987, "weldCompleteWebhookStats": {}, "weldCompleteStats": {}, "etchCompleteStats": {}, "remainingSubmissions": {}, "remainingEtchCompletions": {}, "signatureProviderType": "abc123", "availableSignatureProviderTypes": [ "abc123" ], "isSso": true, "remainingUsers": 123 } } } ``` -------------------------------- ### Weld Object Example Source: https://www.useanvil.com/docs/api/graphql/reference This example demonstrates the structure of a Weld object, including all its available fields and their expected data types. It can be used as a reference when querying or manipulating Weld data. ```json { "versionNumber": 987, "versionId": 123, "latestDraftVersionNumber": 123, "publishedNumber": 987, "publishedAt": "2007-12-03", "hasUnpublishedChanges": false, "hasBeenPublished": true, "eid": "kQp2qd9FVUWrrE60hMbi", "slug": "weld-name", "name": "Weld Name", "visibility": "live", "config": {}, "organization": Organization, "hasSigners": true, "forges": [Forge], "casts": [Cast], "weldDatas": WeldDataPage, "signatureProviderType": "etch", "availableSignatureProviderTypes": ["etch", "docusign"], "remainingSubmissions": {}, "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "archivedAt": "2007-12-03", "expiresAt": "2007-12-03", "stylesheetURL": "https://domain.com/page.html", "submissionsCount": 987 } ``` -------------------------------- ### Individual Document Download URL Example Source: https://www.useanvil.com/docs/api/e-signatures Example of how an individual document's download URL is represented within the `files` property of a `DocumentGroup` object. This provides direct access to each signed document. ```javascript // documentGroup.files ; [ { name: 'NDA', type: 'pdf', filename: 'nda.pdf', downloadURL: 'https://app.useanvil.com/api/document-group/nA1jH49FVUWrrE60hMbi/nda.pdf', }, ] ``` -------------------------------- ### Create Forge Response Source: https://www.useanvil.com/docs/api/graphql/reference Example response structure after creating a forge. ```json { "data": { "createForge": { "versionNumber": 987, "versionId": 987, "latestDraftVersionNumber": 987, "publishedNumber": 987, "publishedAt": "2007-12-03", "hasUnpublishedChanges": false, "hasBeenPublished": false, "eid": "kQp2qd9FVUWrrE60hMbi", "name": "Forge Name", "slug": "forge-name", "isRequired": true, "config": {}, "fieldInfo": {}, "weld": Weld, "organization": Organization, "userUploads": [UserUpload], "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "archivedAt": "2007-12-03", "examplePayload": {} } } } ``` -------------------------------- ### Example GraphQL Response Structure Source: https://www.useanvil.com/docs/api/graphql/reference This is a general example of a GraphQL response structure, showing fields like status, resolvedPayload, payload, and timestamps. ```json { "eid": "kQp2qd9FVUWrrE60hMbi", "status": "in-progress", "resolvedPayload": { "email": { "id": "f162136372633517", "aliasId": "email", "type": "email", "label": "Email", "value": "hello@example.com" } }, "payload": { "f162136372633517": {"type": "email", "value": "hello@example.com"} }, "payloadValue": {"f162136372633517": "hello@example.com"}, "currentStep": 123, "totalSteps": 987, "continueURL": "https://app.useanvil.com/form/demo/my-form/nA1jH49FVUWrrE60hMbi", "weldData": WeldData, "forge": Forge, "user": User, "signer": Signer, "reviewData": {}, "completionPercentage": 33.33, "isExcluded": false, "touchedByUser": true, "requestMeta": {}, "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "completedAt": "2007-12-03" } ``` -------------------------------- ### Start a Workflow using Node API Client Source: https://www.useanvil.com/docs/api/workflows Initiate a workflow submission using the Anvil Node API client. Provide variables including forgeEid, payload for initial data, and optional parameters like complete, isTest, and webhookURL. The example shows how to access the new submission details from the result. ```javascript const result = await anvilClient.forgeSubmit({ variables: { forgeEid: forge.eid, complete: false, isTest: false, // Seed the submission with data here... payload: { // See field aliases section below name: 'Sally Jones', email: 'sally@example.com', }, // optional webhook URL for actions taken on the new // WeldData, Submission, and Signers. You must first // enable webhooks. webhookURL: 'https://mysite.com/anvil-webhook', }, }) const newSubmission = result.data.data.forgeSubmit // => { // eid: 'abc123' // payload: {} // the actual data // weldData: { // eid: 'def456', // continueURL: 'https://app.useanvil.com/form/demo/my-form/abc123' // } // forge: { // eid: 'ghi789', // slug: 'my-form' // } // } // UI URL for this Forge Submission is // https://app.useanvil.com/form/${organization.slug}/${forge.slug}/abc123 ``` -------------------------------- ### WebhookActionConfigInput Example Source: https://www.useanvil.com/docs/api/graphql/reference Configuration options for a Webhook Action. Use this to specify settings like data encryption. ```json {"encryptData": false} ``` -------------------------------- ### WeldData Example Source: https://www.useanvil.com/docs/api/graphql/reference An example JSON object representing a WeldData, illustrating the structure and typical values for its fields. ```APIDOC ## WeldData Example An example JSON object representing a WeldData, illustrating the structure and typical values for its fields. ### Example ```json { "eid": "kQp2qd9FVUWrrE60hMbi", "displayTitle": "Sally's workflow submission", "status": "in-progress", "isTest": false, "isExpired": false, "isComplete": true, "isAllComplete": false, "continueURL": "https://app.useanvil.com/form/demo/my-form/nA1jH49FVUWrrE60hMbi", "webhookURL": "https://yoursite.com/webhooks/anvil", "completionPercentage": 0.2, "numberRemainingSigners": 123, "payloadCanBeUpdated": false, "hasSigners": true, "nextSigner": Signer, "nextSigners": [Signer], "hasPin": true, "pin": "9876", "agents": {}, "files": [ { "downloadURL": "https://app.useanvil.com/api/document-group/nA1jH49FVUWrrE60hMbi/Hello-World.pdf", "filename": "Hello-World.pdf", "name": "Hello World", "type": "pdf" } ], "excludedFiles": [ { "downloadURL": "https://app.useanvil.com/api/document-group/nA1jH49FVUWrrE60hMbi/Dont-Sign-Me.pdf", "filename": "Dont-Sign-Me.pdf", "name": "Do not sign this doc", "type": "pdf" } ], "weld": Weld, "weldVersionId": 987, "submissions": [Submission], "documentGroup": DocumentGroup, "webhookLogs": [WebhookLog], "etchLogEvents": [EtchLog], "weldDataLogEvents": [WeldDataLog], "userUploads": [UserUpload], "forgesRequiringCompletion": [Forge], "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "dataUpdatedAt": "2007-12-03", "expiresAt": "2007-12-03", "archivedAt": "2007-12-03", "embeddedAt": "2007-12-03", "currentStepInfo": {}, "stylesheetURL": "https://domain.com/page.html" } ``` ``` -------------------------------- ### Example EtchPacketPage Object Source: https://www.useanvil.com/docs/api/graphql/reference Represents a paginated response for EtchPackets. This includes pagination details and the array of EtchPacket items for the requested page. ```json { "rowCount": 20, "pageCount": 2, "page": 1, "pageSize": 10, "items": [EtchPacket] } ``` -------------------------------- ### WeldDataPage Object Example Source: https://www.useanvil.com/docs/api/graphql/reference Represents a paginated list of WeldData records. This example illustrates the structure for paginated results. ```json { "rowCount": 20, "pageCount": 2, "page": 1, "pageSize": 10, "items": [WeldData] } ``` -------------------------------- ### PaymentMethod Type Example Source: https://www.useanvil.com/docs/api/graphql/reference Example JSON structure for a PaymentMethod object. Details a payment method associated with an organization. ```json { "id": "xyz789", "type": "xyz789", "last4": "xyz789", "providerName": "abc123", "status": "xyz789", "expMonth": 123, "expYear": 987, "isDefault": true } ``` -------------------------------- ### Generate PDF using cURL Source: https://www.useanvil.com/docs/api/generate-pdf This example demonstrates how to generate a PDF using a cURL command. It includes authentication with an API key and sending a JSON payload with basic title and data. ```APIDOC ## Generate PDF using cURL ### Description This example demonstrates how to generate a PDF using a cURL command. It includes authentication with an API key and sending a JSON payload with basic title and data. ### Method POST ### Endpoint https://app.useanvil.com/api/v1/generate-pdf ### Parameters #### Request Body - **title** (string) - Optional - The title for the PDF. - **data** (array) - Required - An array of objects defining the content of the PDF. ### Request Example ```json { "title": "Hello", "data": [ { "label": "Hello World", "content": "I like turtles" } ] } ``` ### Response #### Success Response (200) - The response will be the generated PDF file. ``` -------------------------------- ### OrganizationUser Type Example Source: https://www.useanvil.com/docs/api/graphql/reference Example JSON structure for an OrganizationUser object. This links a User to an Organization with a specific role. ```json { "role": "admin", "externalId": "xyz789", "user": User, "organization": Organization, "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z" } ``` -------------------------------- ### DocumentGroup Response Example Source: https://www.useanvil.com/docs/api/graphql/reference This is an example of the response structure for a DocumentGroup query, illustrating the fields and data types returned. ```APIDOC ## DocumentGroup Response ### Description Represents a collection of final files generated from WeldData or EtchPacket, sent out for signature. ### Response Fields - **eid** (String): The unique identifier for the document group. - **status** (String): The current status of the document group (e.g., 'completed'). - **provider** (String): The provider used for the document group (e.g., 'etch'). - **currentRoutingStep** (Int): The current step in the routing process. - **files** ([Object]): An array of file objects associated with the document group. - **downloadURL** (String): URL to download a specific file. - **filename** (String): The name of the file. - **name** (String): The display name of the file. - **type** (String): The MIME type of the file (e.g., 'pdf'). - **weldData** (Object): Data related to Weld. - **etchPacket** (Object): Data related to Etch Packet. - **signers** ([Object]): An array of signer objects. - **providerConfig** (Object): Configuration specific to the provider. - **finishPageConfig** (Object): Configuration for the finish page. - **signaturePageConfig** (Object): Configuration for the signature page. - **downloadZipURL** (String): URL to download a zip archive of all files. - **createdAt** (Date): Timestamp when the document group was created. - **updatedAt** (Date): Timestamp when the document group was last updated. - **completedAt** (Date): Timestamp when the document group was completed. - **stylesheetURL** (String): URL to a stylesheet for the document group. - **orgLogo** (Object): Organization logo information. ### Response Example ```json { "data": { "voidDocumentGroup": { "eid": "nA1jH49FVUWrrE60hMbi", "status": "completed", "provider": "etch", "currentRoutingStep": 123, "files": [ { "downloadURL": "https://app.useanvil.com/api/document-group/nA1jH49FVUWrrE60hMbi/Hello-World.pdf", "filename": "Hello-World.pdf", "name": "Hello World", "type": "pdf" } ], "weldData": WeldData, "etchPacket": EtchPacket, "signers": [Signer], "providerConfig": {}, "finishPageConfig": {}, "signaturePageConfig": {}, "downloadZipURL": "http://app.useanvil.com/download/nA1jH49FVUWrrE60hMbi.zip", "createdAt": "2026-04-27T19:14:37.724Z", "updatedAt": "2026-04-27T19:14:37.724Z", "completedAt": "2007-12-03", "stylesheetURL": "https://domain.com/page.html", "orgLogo": {} } } } ``` ``` -------------------------------- ### Monitor all events on all objects of any type Source: https://www.useanvil.com/docs/api/webhooks This is the most comprehensive setup, monitoring all events across all object types and all their instances. Use '*' for `action`, `objectType`, and `objectEid` to capture every event. ```json { "action": "*", "objectType": "*", "objectEid": "*", ... } ``` -------------------------------- ### List Payload Example Source: https://www.useanvil.com/docs/api/object-references An example of a list payload, where the 'value' is an array of objects, each conforming to the defined field types. ```javascript [ { aFieldId: ...one of the above types…, anotherFieldId: ...one of the above types…, ... }, {...} ] ```