> For the complete documentation index, see [llms.txt](https://docs.ees.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ees.xyz/sdk/create-job.md).

# Create job

The ees-sdk makes it easy to create jobs.

```typescript
const transactionReceipt: `0x${string}` = await eesSDK.createJob(jobSpecification, sponsor, sponsorSignature, hasSponsorship, index);
```

Here `jobSpecification` has type [`JobSpecification`](/sdk/types.md). The `sponsor` field has type `` `0x{string}` `` and is the sponsor address of the job. The `sponsorSignature` has type `` `0x{string}` `` and is an EIP-712 signature of `jobSpecification` signed by the `sponsor`. Next, `hasSponsorship` has type boolean and is a flag that indicates whether the job should be created with a sponsorship. Finally, `index` is the index in the jobs array in which the job should be created. The function returns `transactionReceipt` of viem's type `TransactionReceipt` containing information about the transaction.

{% hint style="warning" %}
**Warning:** If `index < jobs.length`, the job will *reuse* an existing index in the array. This can only be done if the job at that index is cancelled, i.e. if the `owner` field is set to the zero address. Otherwise if `index >= jobs.length`, this operation will extend the `jobs` array. Reusing an index is cheaper gas wise but will revert if the index is not free.
{% endhint %}

{% hint style="info" %}
**Note:** If `hasSponsorship` is set to true, the `sponsor` and `sponsorSignature` will not be considered and arbitrary values can be given. The same is true for the `nonce` and `deadline` fields of the `jobSpecification` object.
{% endhint %}

{% hint style="warning" %}
**Warning:** This action will perform an on-chain transaction and requires that the eesSDK object was initialised with a wallet client.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ees.xyz/sdk/create-job.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
