# Getting USER\_DOES\_NOT\_HAVE\_PERMISSIONS when creating email

**URL:** <https://community.hubspot.com/t/getting-user-does-not-have-permissions-when-creating-email/140500>\
**Category:** APIs & Integrations\
**Tags:** email\
**Created:** [October 3, 2025, 8:00am UTC](https://community.hubspot.com/t/getting-user-does-not-have-permissions-when-creating-email/140500 "2025-10-03T08:00:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PR74](https://avatars.discourse-cdn.com/v4/letter/p/e495f1/32.png) [@PR74](https://community.hubspot.com/u/PR74)\
**Post date:** [October 3, 2025, 8:00am UTC](https://community.hubspot.com/t/getting-user-does-not-have-permissions-when-creating-email/140500/1 "2025-10-03T08:00:28Z")

</div>

Hi,

I’m trying to create an email with associations via the API.

My POST to [https://api.hubapi.com/crm/v3/objects/emails:](https://api.hubapi.com/crm/v3/objects/emails:)

```lia-code-sample
{
 "properties": {
 "hs_email_subject": "Hello",
 "hs_email_text": "Test1",
 "hs_timestamp": "2025-10-02T18:00:01+01:00",
 "hs_email_direction": "EMAIL",
 "hs_email_status": "SENT"
 },
 "associations": [
 {
 "to": {
 "id": 466992278730
 },
 "types": [
 {
 "associationCategory": "HUBSPOT_DEFINED",
 "associationTypeId": 198
 }
 ]
 }
 ]
}

```

yields the following response:

```lia-code-sample
{
 "status": "error",
 "message": "one or more associations are not valid",
 "correlationId": "1008940b-2d9d-4074-902b-391d8ce2aac9",
 "errors": [
 {
 "context": {
 "validationResult": [
 "USER_DOES_NOT_HAVE_PERMISSIONS"
 ]
 }
 }
 ],
 "category": "BAD_REQUEST"
}

```

If I remove the association property, the Hubspot API reports back that the email was created.

Using the following scopes:

```lia-code-sample
"oauth",
"crm.objects.contacts.read",
"crm.objects.contacts.write",
"crm.objects.companies.read",
"crm.objects.companies.write",
"crm.objects.deals.read",
"crm.objects.deals.write"

```

I am able to successfully create contacts with associations using the payload below to [https://api.hubapi.com/crm/v3/objects/contacts](https://api.hubapi.com/crm/v3/objects/contacts:) so associations work, just not when doing from email to contact.

```lia-code-sample
{
 "properties": {
 "email": "someone@example.com",
 "firstname": "John",
 "lastname": "Doe"
 },
 "associations": [
 {
 "to": {
 "id": 238323633387
 },
 "types": [
 {
 "associationCategory": "HUBSPOT_DEFINED",
 "associationTypeId": 279
 }
 ]
 }
 ]
}

```

Does anyone have a suggestion? Thank you!

Edit: solution found, apparently the legacy association ids work: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api-reference/crm-associations-v4/guide#v1-associations-legacy)

For emails it’s the “Engagement to …” that work.

---

<div class="post-metadata">

**Author:** ![PR74](https://avatars.discourse-cdn.com/v4/letter/p/e495f1/32.png) [@PR74](https://community.hubspot.com/u/PR74)\
**Post date:** [October 3, 2025, 12:05pm UTC](https://community.hubspot.com/t/getting-user-does-not-have-permissions-when-creating-email/140500/2 "2025-10-03T12:05:45Z")

</div>

Solution found, apparently the legacy association ids work: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api-reference/crm-associations-v4/guide#v1-associations-legacy)

For emails it’s the “Engagement to …” that work.
