Skip to content
Docs menu

Guides

Features

API

Integrations

Resubscribe a contact

Emails a contact a confirmation link for one list. They are subscribed only when they click it.

POST /v1/contacts/{id}/resubscribe

Example

curl https://api.wakio.net/v1/contacts/con_7Hq2LpXz4VnBw8tRjG6sYe/resubscribe \
  -H "Authorization: Bearer $WAKIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "consent_ip": "203.0.113.7"
}'

Response 202:

{
  "status": "confirmation_sent"
}

Parameters

NameTypeRequiredDescription
idstringYesIn the path: the contact's Wakio id, such as con_…, or your own external_id. Escape any / in an external_id as %2F.
liststringNoThe id of the one list to confirm, from API id on Lists. Required once your account has more than one brand. Without it, Wakio uses your brand's default list.
consent_ipstringNoThe IPv4 or IPv6 address the person agreed from, kept in the consent record. Leave it out when you do not have it. Wakio never records your server's address in its place.

Response

NameTypeRequiredDescription
statusstringYesconfirmation_sent when Wakio sent the email, or already_sent when this address had 3 in the last 30 days or one in the last 24 hours, so nothing was sent now.
retry_afterstringNoWith already_sent only: the ISO 8601 UTC time from which another confirmation can be sent.

Errors

Every error this endpoint itself returns is {"error": "<code>"}, sometimes with one more field that explains it. The API overview lists the responses that do not follow that shape.

StatusCodeWhat happenedWhat to do
401invalid_api_keyThe Authorization header is missing, malformed, or names no active key.Send Authorization: Bearer <key> with an active key from API keys in the dashboard.
403insufficient_scopeThe key does not carry the scope this endpoint needs. scope names it.Issue a key with Can manage contacts ticked under API keys, and use it for this call.
404contact_not_foundNo contact in your account has this id. A con_… id is only ever looked up as a Wakio id, never as an external_id.Check the id, or use the external_id you stored on the contact.
409already_subscribedThe contact is active and already subscribed to this list. Nothing was sent.Nothing to do. Read the contact with Get a contact to see its lists.
409not_withdrawnThe contact never unsubscribed, so there is no opt-out to reverse. Nothing was sent.Subscribe them with Add a contact and subscribed: true.
422undeliverableThe address has bounced, was found invalid, or filed a complaint, so Wakio will not mail it. Nothing was sent.Ask the person for a working address, and change it with Update a contact.
422no_consent_textThe list's brand has no consent text yet, so there is nothing for the person to agree to. Nothing was sent.Publish your consent text under Consent text in the dashboard, then try again.
422invalid_contactconsent_ip is not an IPv4 or IPv6 address, or list is not a list id. Nothing was sent. detail lists each problem.Fix each problem detail lists.
422lists_requiredThe account has more than one brand and the request has no list, so Wakio cannot tell which brand the person is confirming. Nothing was sent. detail says so.Send list with the id of the list they agreed to, from API id on Lists.
422unknown_listlist is not one of your account's lists. Nothing was sent. list_ids echoes it.Use an id under API id on Lists.
422no_verified_sending_domainThe list's brand has no domain it can send from. Nothing was sent, and the next call tries again.Finish verifying a domain under Sending domains.

Notes

Someone who unsubscribed made that decision, so the API cannot reverse it for them. This call sends the same confirmation email your signup forms send, for one list. The contact stays as it is until the person clicks the link in it. Then they are active and subscribed to that list, and Wakio keeps the click as their consent record.

Answers 202 as soon as the email is queued. Use it when someone ticks the newsletter box after they unsubscribed, because Add a contact with subscribed: true cannot bring them back. It only applies after an unsubscribe. For someone who never unsubscribed, add them with subscribed: true instead.

Three emails per address in 30 days

Wakio sends at most three confirmations per address in 30 days, at least 24 hours apart, so a sync that retries cannot mail the same person over and over. A call over the limit answers 202 with already_sent and a retry_after time, and sends nothing. retry_after is an ISO 8601 UTC time, such as 2026-11-08T10:00:00Z, from which another confirmation can be sent. Wait until then rather than retrying in a loop. The limit follows the address, so changing a contact's email or erasing and re-adding them does not reset it. If the send fails, for instance because no domain is verified, the limit is released and your next call tries again.

What is refused

  • 409 already_subscribed when the contact is active and already on the list.
  • 409 not_withdrawn when the contact never unsubscribed, so there is no opt-out to reverse. Add them with subscribed: true instead. The exception is a contact still on one of your lists whose address Wakio's own address check found invalid: the call sends, so the person can show the address works, and their click lifts the block.
  • 422 undeliverable when the address bounced, was found invalid, or filed a complaint. An address that only unsubscribed is not refused, because that is what this call reverses.
  • 422 no_consent_text when the brand has no consent text, because the person would have nothing to agree to.

The confirmation request is recorded with the source api. If you send consent_ip, that address is kept with it. If you leave it out, no address is kept. Wakio never records your server's address, because it says nothing about the person.

This call needs a key with the Can manage contacts scope.