> For the complete documentation index, see [llms.txt](https://docs.truedat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truedat.io/v8.8/api-integrations/connectors-management-apis/events.md).

# Events

## List events for a job

> Returns the events for a job.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/jobs/{job_external_id}/events":{"get":{"description":"Returns the events for a job.","operationId":"TdCxWeb.EventController.index","parameters":[{"description":"Job external ID","in":"path","name":"job_external_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventIndexResponse"}}},"description":"Events"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxNotFoundResponse"}}},"description":"Not found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List events for a job","tags":["Events"]}}},"components":{"schemas":{"EventIndexResponse":{"additionalProperties":false,"properties":{"data":{"description":"List of events for the job","items":{"$ref":"#/components/schemas/Event"},"type":"array"}},"required":["data"],"title":"EventIndexResponse","type":"object"},"Event":{"additionalProperties":false,"properties":{"id":{"description":"Event internal ID","type":"integer"},"inserted_at":{"description":"Creation timestamp","format":"date-time","nullable":true,"type":"string"},"job_id":{"description":"Job internal ID","nullable":true,"type":"integer"},"message":{"description":"Event message","type":"string"},"metadata":{"additionalProperties":true,"description":"Additional event metadata","nullable":true,"type":"object"},"type":{"description":"Event type","type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","nullable":true,"type":"string"}},"required":["id","type","message"],"title":"Event","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxNotFoundResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxNotFoundResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```

## Create an event for a job

> Creates an event for a job.

```json
{"openapi":"3.0.0","info":{"title":"td-cx","version":"Truedat 8.9.0"},"paths":{"/api/jobs/{job_external_id}/events":{"post":{"description":"Creates an event for a job.","operationId":"TdCxWeb.EventController.create","parameters":[{"description":"Job external ID","in":"path","name":"job_external_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventCreateRequest"}}},"description":"Event","required":false},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventShowResponse"}}},"description":"Created"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxForbiddenResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxNotFoundResponse"}}},"description":"Not found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxUnprocessableEntityResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdCxInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create an event for a job","tags":["Events"]}}},"components":{"schemas":{"EventCreateRequest":{"additionalProperties":false,"properties":{"event":{"additionalProperties":false,"properties":{"message":{"description":"Event message","type":"string"},"metadata":{"additionalProperties":true,"description":"Additional event metadata","nullable":true,"type":"object"},"type":{"description":"Event type","type":"string"}},"required":["type","message"],"type":"object"}},"required":["event"],"title":"EventCreateRequest","type":"object"},"EventShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Event"}},"required":["data"],"title":"EventShowResponse","type":"object"},"Event":{"additionalProperties":false,"properties":{"id":{"description":"Event internal ID","type":"integer"},"inserted_at":{"description":"Creation timestamp","format":"date-time","nullable":true,"type":"string"},"job_id":{"description":"Job internal ID","nullable":true,"type":"integer"},"message":{"description":"Event message","type":"string"},"metadata":{"additionalProperties":true,"description":"Additional event metadata","nullable":true,"type":"object"},"type":{"description":"Event type","type":"string"},"updated_at":{"description":"Last update timestamp","format":"date-time","nullable":true,"type":"string"}},"required":["id","type","message"],"title":"Event","type":"object"},"TdCxUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnauthorizedResponse","type":"object"},"TdCxForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxForbiddenResponse","type":"object"},"TdCxNotFoundResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxNotFoundResponse","type":"object"},"TdCxUnprocessableEntityResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxUnprocessableEntityResponse","type":"object"},"TdCxInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdCxInternalServerErrorResponse","type":"object"}}}}
```
