(API) How to remove someone from a container

This tutorial is in order to Delete a Recipient Item from a created Container.

1 - Create a Container:

Botdoc P2 Container is a session with multiple secure Features inside of it, with P2 you can make a Flow automation or just a simple file "push", "pull", “DocuSign” or “External URL”.

Endpoint: https://api.botdoc.io/v1/module_container/container/ 
Method: POST.

Example of the body in JSON format:

{ "page_type": "p2", "callback_url": "https://link.to.your.callback.url", "display_chat": true }

Example how to create a Container by cURL:

curl -i --request POST "https://api.botdoc.io/v1/module_container/container/" \ --header "Authorization: JWT <Authorization Token>" \ --header "Content-Type: application/json" \ --data-raw "{ "page_type": "p2", "callback_url": "https://link.to.your.callback.url", "display_chat": true }"

2 - Define Recipient(s):

After the Secure Container was created, you need to create the Recipient(s) of your Secure Container.
Endpoint: https://api.botdoc.io/v1/module_container/container/{container_id}/recipient/
Method: POST.

Example of the body in JSON format:

{ "first_name": "First", "last_name": "Receiver" }

Example how to create a Recipient by cURL:

3 - Define your RecipientItem(s)

3.1 - Add the First Recipient Item for the Recipient:

Now, you need to add your first RecipientItem linked to the Recipient in Step 2.
Endpoint: https://api.botdoc.io/v1/module_container/recipient/{recipient_id}/recipient_item/
Method: POST.

Example of the body in JSON format:

Example how to create a first Recipient Item by cURL:

3.2 - Add the Second Recipient Item for the Recipient:

Now, you need to add your second RecipientItem linked to the Recipient in the Step 2.
Endpoint: https://api.botdoc.io/v1/module_container/recipient/{recipient_id}/recipient_item/
Method: POST.

Example of the body in JSON format:

Example how to create a second Recipient Item by cURL:

4 - Remove the Recipient Item From a Container:

Now, you need to remove your RecipientItem linked to the Recipient in the Step 2.
Endpoint: https://api.botdoc.io/v1/module_container/recipientitem/{id}/
Method: POST.

Example of the body in JSON format:

Example how to delete a Recipient Item by cURL:

 

For more details about creating a requests you can take a look at our Botdoc API Reference on api.botdoc.io/documentation/#create-request