Attach one or more files (artifacts) to a job work. Artifacts represent documents, forms, or other files associated with a tax preparation. You can create multiple artifacts in a single request.
mutation CreateJobWorkArtifacts ( $jobWorkId : ID ! , $inputs : [ CreateJobWorkArtifactsInput ! ] ! ) {
createJobWorkArtifacts ( jobWorkId : $jobWorkId , inputs : $inputs ) {
id
createdAt
updatedAt
workspaceId
artifactId
connectionJobId
workArtifact {
id
externalId
}
}
}
Arguments
The ID of the job work returned from createJobWorks . This identifies which client/tax preparation to attach files to.
inputs
[CreateJobWorkArtifactsInput!]!
required
Array of artifact inputs. Each input represents one file to attach to the job work. Show CreateJobWorkArtifactsInput
File name or descriptive identifier for the artifact (e.g., “W-2 Form”, “1099-INT”, “receipts.pdf”).
Type or category of the artifact (e.g., “w2”, “1099”, “receipt”, “document”, “form”).
Optional URL where the file can be accessed. This should be a publicly accessible URL or a URL that Filed can access using the connection credentials.
Your platform’s unique identifier for this file/artifact. Used to correlate the artifact with your system.
Optional metadata about the artifact. Can include file size, mime type, upload date, or any other relevant information.
Returns
Timestamp when the job artifact was created.
Timestamp when the job artifact was last updated.
The workspace ID this job artifact belongs to.
The artifact ID this job artifact references.
The connection job ID this job artifact belongs to.
The work artifact associated with this job artifact. The unique identifier of the work artifact.
The external identifier you provided when creating the artifact. This matches the externalId from your input.
Example
curl -X POST https://gateway.filed.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <accessToken>" \
-H "source-platform: my-sample-platform" \
-d '{
"query": "mutation CreateJobWorkArtifacts($jobWorkId: ID!, $inputs: [CreateJobWorkArtifactsInput!]!) { createJobWorkArtifacts(jobWorkId: $jobWorkId, inputs: $inputs) { id createdAt updatedAt workspaceId artifactId connectionJobId workArtifact { id externalId } } }",
"variables": {
"jobWorkId": "job_work_789",
"inputs": [
{
"name": "W-2 Form 2024",
"type": "w2",
"url": "https://api.example.com/files/w2-2024.pdf",
"externalId": "file-12345",
"metadata": {
"fileSize": 245678,
"mimeType": "application/pdf",
"uploadDate": "2024-01-10T08:00:00Z"
}
},
{
"name": "1099-INT Statement",
"type": "1099",
"url": "https://api.example.com/files/1099-int.pdf",
"externalId": "file-67890",
"metadata": {
"fileSize": 189234,
"mimeType": "application/pdf"
}
}
]
}
}'
{
"data" : {
"createJobWorkArtifacts" : [
{
"id" : "job_artifact_456" ,
"createdAt" : "2024-01-15T10:40:00Z" ,
"updatedAt" : "2024-01-15T10:40:00Z" ,
"workspaceId" : "workspace_123456" ,
"artifactId" : "artifact_456" ,
"connectionJobId" : "job_123456" ,
"workArtifact" : {
"id" : "artifact_456" ,
"externalId" : "file-12345"
}
}
]
}
}
File URL Accessibility : Ensure the URLs you provide are accessible to Filed. If your files require authentication, Filed will use the connection credentials provided during the connection setup. Test that Filed can access the URLs using those credentials.
The url field should point to a file that Filed can download. Filed will fetch the file from this URL when processing the work. Ensure the URL is valid and the file is accessible at the time of import.
Troubleshooting
Problem : Artifacts created but files cannot be accessed
Solutions :
Verify the URLs are publicly accessible or accessible with the connection credentials
Test the URLs manually to ensure they return the expected files
Check that file URLs haven’t expired or been moved
Ensure the connection credentials have permission to access the file URLs
Problem : Invalid URL format
Solutions :
Ensure URLs use valid protocols (https:// or http://)
Verify URLs are properly encoded if they contain special characters
Check that URLs point to actual files, not directories or API endpoints that require additional parameters