# Event category empty when using /api/contacts/activity endpoint

**URL:** <https://forum.mautic.org/t/event-category-empty-when-using-api-contacts-activity-endpoint/24013>\
**Category:** Product Support\
**Tags:** mautic-3\
**Created:** [May 6, 2022, 8:58am UTC](https://forum.mautic.org/t/event-category-empty-when-using-api-contacts-activity-endpoint/24013 "2022-05-06T08:58:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![a.bell](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/a.bell/32/2264_2.png) [@a.bell](https://forum.mautic.org/u/a.bell)\
**Post date:** [May 6, 2022, 8:58am UTC](https://forum.mautic.org/t/event-category-empty-when-using-api-contacts-activity-endpoint/24013/1 "2022-05-06T08:58:18Z")

</div>

**Your software**  
My Mautic version is: 3.3  
My PHP version is: 7.4  
My Database type and version is: MySql 5.6

**Your problem**  
My problem is:  
Using the API endpoint /api/contacts/activity events are returned, but any form submission events do not load the associated category. The category is set on the form but the api response shows the category property as an empty object example:

```auto
{
    "event": "form.submitted",
    "eventId": "form.submitted338690",
    "eventLabel": {
        "label": "[FORM ACTION NAME]",
        "href": "[URL TO FORM]/s/forms/view/993"
    },
    "eventType": "Form submitted",
    "timestamp": "2022-03-22T12:50:25+00:00",
    "contactId": "[CONTACT_ID]",
    "details": {
        "submission": {
            "id": 338690,
            "ipAddress": {
                "ipAddress": "127.0.0.1"
            },
            "form": {
                "id": 993,
                "name": " submission action",
                "alias": "_submi",
                "category": {} <<<< this is empty?
            },
            "dateSubmitted": "2022-03-22T12:50:25+00:00",
            "referer": "http://localhost:8000/index.php/s/forms/preview/993",
            "results": {
                "form_id": "993",
                "first_name": "test",
                "last_name": "test",
                "work_email_address": "test@test.com",
                "company_name": "test"
            }
        },
        "form": {
            "id": 993,
            "name": " submission action",
            "alias": "_submi",
            "category": {}
        },
        "page": {}
    }
}

```

These errors are showing in the log:  
N/A

Steps I have tried to fix the problem:  
Debugging - tried making category a public variable within the `app/bundles/FormBundle/Entity/Form.php` class to see if that returned the category but it did not.

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [May 6, 2022, 11:52pm UTC](https://forum.mautic.org/t/event-category-empty-when-using-api-contacts-activity-endpoint/24013/2 "2022-05-06T23:52:45Z")

</div>

Hmm. strange I checked it on one of my servers and strangely it really does not show the category object. Do you mind creating an issue on GitHub, thanks.

---

<div class="post-metadata">

**Author:** ![a.bell](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/a.bell/32/2264_2.png) [@a.bell](https://forum.mautic.org/u/a.bell)\
**Post date:** [June 9, 2022, 8:19am UTC](https://forum.mautic.org/t/event-category-empty-when-using-api-contacts-activity-endpoint/24013/3 "2022-06-09T08:19:26Z")

</div>

Issue created on github: [Event Category empty when using /api/contacts/activity endpoint · Issue #11231 · mautic/mautic · GitHub](https://github.com/mautic/mautic/issues/11231)
