Subscription with id '5754963' is either undefined or inactive

I amble to GET the email subscription status for an e-mail address:

{
 "subscribed": true,
 "markedAsSpam": false,
 "unsubscribeFromPortal": false,
 "portalId": 5339105,
 "bounced": false,
 "email": "email@someemail.com",
 "subscriptionStatuses": [
 {
 "id": 5754963,
 "updatedAt": 1550222130487,
 "subscribed": true,
 "optState": "OPT_IN",
 "legalBasis": "LEGITIMATE_INTEREST_PQL",
 "legalBasisExplanation": "<p> Gostaria de receber informações sobre os produtos e serviços da Rijk Zwaan e consentir com o uso de meus dados pessoais e meu endereço de e-mail para essa finalidade. Ao clicar no botão \"Enviar solicitação\", declaro que li e aceito a política de cookies e privacidade </p>"
 }
 ],
 "status": "subscribed"
}

But when I want to post (PUT) back modified content (changed LegalBasis and explanation,

{
 "subscribed": true,
 "markedAsSpam": false,
 "unsubscribeFromPortal": false,
 "portalId": 5339105,
 "bounced": false,
 "email": "email@someemail.com",
 "subscriptionStatuses": [{
 "id": 5754963,
 "updatedAt": 1550222130487,
 "subscribed": true,
 "optState": "OPT_IN",
 "legalBasis": "PERFORMANCE_OF_CONTRACT",
 "legalBasisExplanation": "We need to send them these emails as part of our agreement with them."
 }
 ],
 "status": "subscribed"
}

the response I get =

{
 "status": "error",
 "message": "Subscription with id '5754963' is either undefined or inactive.",
 "correlationId": "9cd4cdc0-dc2a-4fc1-8d6f-20a3c3f5f0a0",
 "requestId": "24dbe7d1-2006-404a-8f63-3f1442619fea"
}

16x16_smiley-frustrated.png.png

Can anybody explain to me what I am doing wrong here?

Hi @franknesse,

You’re seeing the following error:

 "message": "Subscription with id '5754963' is either undefined or inactive.",

because susbcription 5754963 is currently set as Inactive.

This can be seen from either:

1. This endpoint- Get email subscription types for a portal | Email API where the active key is returning false for subscription 5754963:

{
id:5754963,
portalId:5339105,
name:"One to One",
description:"One to One emails",
active:false,
internal:true,
category:"Sales",
channel:"Email",
order:2,
internalName:"ONE_TO_ONE"}

2. In your HubSpot portal. (At the top right hand corner > Click on the ‘Settings’ icon > At the left side panel > Expand ‘Marketing’ > Click on ‘Email’ > Select the ‘Subscription Types’ tab).

You can see that the subscription One to One’s status is Inactive.

If you’d like to set the subscription status back to active: Hover over the subscription > Click ‘Edit’ > Check the ‘Active’ checkbox > Click the ‘Finish’ button.

Ah, ok. So this is just functional behavior? I’ll need to have a serious chat then with the guy that set this subscription without telling me :slightly_smiling_face: Thanks for your reply @WendyGoh !