Create a job

View as Markdown
Create a job that runs a Python script on the platform. The code becomes the job's script; declare its dependencies inline in a PEP 723 `# /// script` block. The job then appears on the platform, where it can be run and its executions reviewed. To change an existing job's name, description, or code, use update_job instead. Requires an API key with the `write` scope.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
namestringRequired1-200 characters
Name of the job. Unique within the organization.
codestringRequired

Python source of the script the job runs. Declare dependencies inline in a PEP 723 # /// script block.

descriptionstring or nullOptional
What the job does.

Response

OK
idstringformat: "uuid"

Pass this as job_id to the job execution tools.

namestring
archivedboolean
descriptionstring or nullOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
500
Internal Server Error