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 subprofile

A method to edit the properties of an existing subprofile. It is called using the following URL:$id?access_token=xxxx

The $id needs to be replaced with the ID of the subprofile you want to edit the properties of.

Available data

The following data can be placed in the message body of the HTTP PUT command:

  • fields: Fields that the subprofile contains
  • secret: The secret code that is associated with the subprofile

PHP example

The following example demonstrates how to use this method:

// dependencies

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

// data to be sent to the api
$data = array(
    "fields" => array(
        'firstname' =>  'John',
        'lastname'  =>  'Doe',
        'email'     =>  ''
    'secret' => "geheimecode"

// do the call, and print result
print_r($api->put("subprofile/{$subprofileID}", $data));

The example above requires the CopernicaRestApi class.

More information