Skip to content

Delete subscribers

Deletes a user or multiple users from a given subscriber list

Endpoint URI

1
POST https://services.ownpage.fr/v1/newsletters/lists/LIST_ID/subscribers/delete

Endpoint parameters

  • LIST_ID : the email list you want to modify

Headers

  • X-Ownpage-Client-Token : a valid token

Payload (JSON)

The data should be a JSON array of subscribers. Each subscriber must have the following parameter :

  • email : the user's email address

    Payload is limited to 20.000 users per request.

Response

Successful request:

1
2
3
4
HTTP/1.1 200 OK
{
    "success": "3 subscriptions have been deleted"
}

Invalid request:

1
2
3
4
5
HTTP/1.1 400 Invalid request
{
    "status": 400,
    "cause": "1 error(s): email is not valid user1@"
}

Example

We remove 3 users from the list with id #123

1
curl -X POST --header "X-Ownpage-Client-Token:TOKEN" --header "Content-Type:application/json" --data REQUEST_DATA https://services.ownpage.fr/v1/newsletters/lists/123/subscribers/delete

With REQUEST_DATA:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
[
  {
    "email": "user1@provider.com"
  },
  {
    "email": "user2@provider.com"
  },
  {
    "email": "user3@provider.com"
  }
]

Response:

1
2
3
{
    "success": "3 subscriptions have been deleted"
}

Comments