Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time

REST API: PUT unsubscribe subprofile

You can execute the setup unsubscribe behavior of a subprofile in the collection of a database by sending an HTTP PUT request to the following URL:$id/unsubscribe?access_token=xxxx

The variable $id should be replaced with the ID of the subprofile you want to unsubscribe.

Body data

The request does not need any additional data to be sent in the body. The CopernicaRestApi class class does require a body to be sent, so in this case we use an empty array.

PHP example

The following PHP script demonstrates how the API method can be called.

// dependencies

// change this into your access token
$api = new CopernicaRestAPI("your-access-token", 3);

// body data
$data = array();

// do the call
$api->put("subprofile/{$subprofileID}/unsubscribe", $data));

The example above requires the CopernicaRestApi class.

More information