Skip to main content
Attach one or more clients (works) to a connection job. Each work represents a tax preparation for a specific client. You can create multiple works in a single request.
mutation CreateJobWorks($connectionJobId: ID!, $inputs: [CreateJobWorksInput!]!) {
  createJobWorks(connectionJobId: $connectionJobId, inputs: $inputs) {
    id
    createdAt
    updatedAt
    workspaceId
    workId
    connectionJobId
  }
}

Arguments

connectionJobId
ID!
required
The ID of the connection job returned from createConnectionJob. This groups the works together for batch processing.
inputs
[CreateJobWorksInput!]!
required
Array of work inputs. Each input represents one client/tax preparation to attach to the job.

Returns

id
ID!
Job work identifier. Save this for creating job work artifacts (attaching files).
createdAt
Date!
Timestamp when the job work was created.
updatedAt
Date!
Timestamp when the job work was last updated.
workspaceId
ID!
The workspace ID this job work belongs to.
workId
ID!
The work ID this job work references.
connectionJobId
ID!
The connection job ID this job work belongs to.

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 CreateJobWorks($connectionJobId: ID!, $inputs: [CreateJobWorksInput!]!) { createJobWorks(connectionJobId: $connectionJobId, inputs: $inputs) { id createdAt updatedAt workspaceId workId connectionJobId } }",
    "variables": {
      "connectionJobId": "job_123456",
      "inputs": [
        {
          "name": "John Smith - 2024 Tax Return",
          "externalId": "client-12345"
        },
        {
          "name": "Jane Doe - 2024 Tax Return",
          "externalId": "client-67890"
        }
      ]
    }
  }'
{
  "data": {
    "createJobWorks": [
      {
        "id": "job_work_789",
        "createdAt": "2024-01-15T10:35:00Z",
        "updatedAt": "2024-01-15T10:35:00Z",
        "workspaceId": "workspace_123456",
        "workId": "work_789",
        "connectionJobId": "job_123456"
      },
      {
        "id": "job_work_790",
        "createdAt": "2024-01-15T10:35:00Z",
        "updatedAt": "2024-01-15T10:35:00Z",
        "workspaceId": "workspace_123456",
        "workId": "work_790",
        "connectionJobId": "job_123456"
      }
    ]
  }
}
After creating job works, use createJobWorkArtifacts to attach files to each job work. The externalId should match your platform’s client identifier to enable correlation between Filed and your system.

Troubleshooting

Problem: createJobWorks fails with invalid connection job ID Solutions:
  • Verify the connectionJobId exists and belongs to your connection
  • Ensure you’re using the id from the createConnectionJob response
  • Check that the connection job status allows adding works
Problem: Duplicate external IDs Solutions:
  • Ensure each externalId is unique within your platform
  • If you need to create multiple works for the same client, use different external IDs (e.g., add a suffix or timestamp)
  • Verify you’re not accidentally reusing external IDs from previous imports