For the complete documentation index, see llms.txt. This page is also available as Markdown.

Job

Manage Jobs

Listing available jobs

get

Retrieves agent jobs.

Supports offset pagination (pageNumber, pageSize) and cursor pagination (next, prev). Cursor pagination is active when next or prev is provided.

In cursor mode:

  • next and prev cannot be used together and return 400.

  • pageNumber is ignored.

  • the X-Total-Count request header is ignored and the X-Total-Count response header is not returned.

If no sort is provided, results are returned in _id:ASC order. If a sort is provided, _id:ASC is appended as a tie-breaker when _id is not already part of the sort.

Required scopes
This endpoint requires the following scopes:
  • : Needed to read AI agents.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

Query parameters
qstringOptional

A standard query parameter is used to search for specific values.

See: Standard Practices - Query parameter

pageSizestringOptional

The number of documents to be retrieved per page.

pageNumberstringOptional

The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.

nextstring · max: 4096Optional

Opaque cursor from the X-Next-Cursor response header. Use it to retrieve the next set of results. Cannot be combined with prev in the same request; sending both returns 400 Bad Request. When provided, cursor pagination is active: pageNumber is ignored and the X-Total-Count request header is ignored (the X-Total-Count response header is not returned).

prevstring · max: 4096Optional

Opaque cursor from the X-Prev-Cursor response header. Use it to retrieve the previous set of results. Cannot be combined with next in the same request; sending both returns 400 Bad Request. When provided, cursor pagination is active and pageNumber is ignored.

sortstringOptional

List of properties used to sort the results, separated by colons.

fieldsstringOptional

Fields to be returned in the response.

Header parameters
X-Total-CountbooleanOptional

Flag indicating whether the total number of retrieved results should be returned.

Responses
200

List of available jobs.

application/json
get/ai-service/{tenant}/jobs
GET /ai-service/{tenant}/jobs HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "id": "68835cc3ef4e8e1425c360ad",
    "status": "success",
    "sessionId": "123e4567-e89b-12d3-a456-426614174000",
    "agentType": "complaint",
    "type": "AGENT_CHAT",
    "agentId": "complaint-agent",
    "commerceEvent": "product.product-updated",
    "message": "Dear Customer,\n\nWe have successfully processed your support request regarding the incorrect information on invoice EIN251131 for order EON1031. Our team has verified the order and customer details, confirming both the order and legal entity were found.\nThank you for your patience and cooperation.\n\nBest regards,\n[Your Support Team]",
    "metadata": {
      "version": 1,
      "createdAt": "2025-07-25T10:30:27.167Z",
      "modifiedAt": "2025-07-25T10:31:14.509Z"
    }
  }
]

Searching jobs

post

Searches agent jobs based on the provided query in the request body.

Supports offset pagination (pageNumber, pageSize) and cursor pagination (next, prev). Cursor pagination is active when next or prev is provided.

In cursor mode:

  • next and prev cannot be used together and return 400.

  • pageNumber is ignored.

  • the X-Total-Count request header is ignored and the X-Total-Count response header is not returned.

If no sort is provided, results are returned in _id:ASC order. If a sort is provided, _id:ASC is appended as a tie-breaker when _id is not already part of the sort.

Required scopes
This endpoint requires the following scopes:
  • : Needed to read AI agents.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

Query parameters
pageSizestringOptional

The number of documents to be retrieved per page.

pageNumberstringOptional

The page number to be retrieved. The size of the pages should be specified by the pageSize parameter.

nextstring · max: 4096Optional

Opaque cursor from the X-Next-Cursor response header. Use it to retrieve the next set of results. Cannot be combined with prev in the same request; sending both returns 400 Bad Request. When provided, cursor pagination is active: pageNumber is ignored and the X-Total-Count request header is ignored (the X-Total-Count response header is not returned).

prevstring · max: 4096Optional

Opaque cursor from the X-Prev-Cursor response header. Use it to retrieve the previous set of results. Cannot be combined with next in the same request; sending both returns 400 Bad Request. When provided, cursor pagination is active and pageNumber is ignored.

sortstringOptional

List of properties used to sort the results, separated by colons.

fieldsstringOptional

Fields to be returned in the response.

Header parameters
X-Total-CountbooleanOptional

Flag indicating whether the total number of retrieved results should be returned.

Body
qstringOptional

A standard query parameter is used to search for specific values.

See: Standard Practices - Query parameter

Responses
200

List of available jobs.

application/json
post/ai-service/{tenant}/jobs/search
POST /ai-service/{tenant}/jobs/search HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 23

{
  "q": "name:~Complaint"
}
[
  {
    "id": "68835cc3ef4e8e1425c360ad",
    "status": "success",
    "sessionId": "123e4567-e89b-12d3-a456-426614174000",
    "agentType": "complaint",
    "type": "AGENT_CHAT",
    "agentId": "complaint-agent",
    "commerceEvent": "product.product-updated",
    "message": "Dear Customer,\n\nWe have successfully processed your support request regarding the incorrect information on invoice EIN251131 for order EON1031. Our team has verified the order and customer details, confirming both the order and legal entity were found.\nThank you for your patience and cooperation.\n\nBest regards,\n[Your Support Team]",
    "metadata": {
      "version": 1,
      "createdAt": "2025-07-25T10:30:27.167Z",
      "modifiedAt": "2025-07-25T10:31:14.509Z"
    }
  }
]

Retrieving available job

get

Retrieves agent job by its ID.

Required scopes
This endpoint requires the following scopes:
  • : Needed to read AI agents.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

jobIdstringRequired
Query parameters
fieldsstringOptional

Fields to be returned in the response.

Responses
200

A job details.

application/json

Contains information about the job result - whether it was successful or not, what was the agent output etc.

idstringOptional

Unique identifier of the job.

agentTypestring · enumOptional

Type of the agent handling the request.

Possible values:
statusstring · enumOptional

Status of the job.

Possible values:
typestring · enumOptional

Type of the job.

Possible values:
sessionIdstringOptional

Unique identifier of the session. Send this value back as the session-id header on later chat and attachment calls.

agentIdstringOptional

Unique identifier of the agent.

messagestringOptional

Agent message.

commerceEventstringOptional

Commerce event which triggered the job.

get/ai-service/{tenant}/jobs/{jobId}
GET /ai-service/{tenant}/jobs/{jobId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "id": "68835cc3ef4e8e1425c360ad",
  "status": "success",
  "sessionId": "123e4567-e89b-12d3-a456-426614174000",
  "agentType": "complaint",
  "type": "AGENT_CHAT",
  "agentId": "complaint-agent",
  "commerceEvent": "product.product-updated",
  "message": "Dear Customer,\n\nWe have successfully processed your support request regarding the incorrect information on invoice EIN251131 for order EON1031. Our team has verified the order and customer details, confirming both the order and legal entity were found.\nThank you for your patience and cooperation.\n\nBest regards,  \n[Your Support Team]",
  "metadata": {
    "version": 1,
    "createdAt": "2025-07-25T10:30:27.167Z",
    "modifiedAt": "2025-07-25T10:31:14.509Z"
  }
}

Deleting a job

delete

Deletes job by given ID.

Required scopes
This endpoint requires the following scopes:
  • : Needed to manage AI agents.
Authorizations
OAuth2clientCredentialsRequired
Token URL:
Path parameters
tenantstringRequired

Your Emporix tenant name.

Note: The tenant name should always be provided in lowercase.

jobIdstringRequired
Responses
204

Given job has been deleted.

No content

delete/ai-service/{tenant}/jobs/{jobId}
DELETE /ai-service/{tenant}/jobs/{jobId} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Last updated

Was this helpful?